Managing Regular Expressions AssignmentΒΆ
Data StructuresΒΆ
Attribute | Type | Required | Description |
---|---|---|---|
id | string | Read-only, unique regular expression policy identifier. | |
policy_id | string | yes | Immutable policy identifier. |
regexp_id | string | yes | Immutable regular expression identifier. |
policy_name | string | Read-only, expensive to use. | |
regexp_name | string | Read-only, expensive to use. | |
created_at | datetime | Read-only. Timestamp of creation. | |
modified_at | datetime | Read-only. Timestamp of modification. | |
removed | boolean | Read-only. |
Request for Retrieving Available Attributes of the RegExpPolicyModel
Method | GET
|
Path | /api/v2/objspec/regexp_policy
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
The next chapter describes procedures for creating separate requests.
Retrieving the List of Regular Expression Assignments for PoliciesΒΆ
Request
Method | GET
|
Path | /api/v2/policy/regexp
|
Example Request
Sending GET https://10.0.0.0/api/v2/policy/regexp
curl -s -k -X GET -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' 'https://10.0.214.98/api/v2/policy/regexp'
Response
{
"result": "success",
"regexp_policy": [
{
"policy_id": "9124292845052624899",
"regexp_id": "9124292845052624897",
"policy_name": "Policy_1",
"regexp_name": "Reg_ex_1",
"created_at": "2024-06-20 03:34:38.425893-07",
"modified_at": "2024-06-20 03:34:38.425893-07"
},
{
"policy_id": "9124292845052624897",
"regexp_id": "9124292845052624900",
"policy_name": "Policy_2",
"regexp_name": "Reg_ex_2",
"created_at": "2024-06-20 06:56:17.452651-07",
"modified_at": "2024-06-20 06:56:17.452651-07"
},
{
"policy_id": "9124292845052624897",
"regexp_id": "9124292845052624897",
"policy_name": "Policy_2",
"regexp_name": "Reg_ex_1",
"created_at": "2024-06-20 06:56:17.452652-07",
"modified_at": "2024-06-20 06:56:17.452652-07"
},
{
"policy_id": "9124292845052624900",
"regexp_id": "9124292845052624900",
"policy_name": "Policy_3",
"regexp_name": "Reg_ex_2",
"created_at": "2024-06-20 06:56:35.335851-07",
"modified_at": "2024-06-20 06:56:35.335851-07"
}
]
}
Assigning Regular Expression to a PolicyΒΆ
Request
Method | POST
|
Path | /api/v2/policy/regexp
|
Headers | Content-Type: Application/HTML
|
Body | RegExpPolicyModel
|
Example Request
Sending POST https://10.0.0.0/api/v2/policy/regexp
curl -s -k -X POST -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/policy/regexp -H 'Content-Type: application/json' -d'{"policy_id":"9124292845052624899","regexp_id":"9124292845052624900"}'
Response
{
"result": "success"
}
Checking Regular Expression Assignment With a PolicyΒΆ
Request
Method | GET
|
Path | /api/v2/policy/<policy_id>/regexp/<regexp_id>
|
Headers | Content-Type: Application/HTML
|
Body | PolicyModel
|
Example Request
Sending GET https://10.0.0.0/api/v2/policy/9124292845052624899/regexp/9124292845052624897
curl -s -k -X GET -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/policy/9124292845052624899/regexp/9124292845052624897
Response
{
"result": "success",
"regexp_policy": {
"policy_id": "9124292845052624899",
"regexp_id": "9124292845052624897",
"policy_name": "Policy_1",
"regexp_name": "Reg_ex_1",
"created_at": "2024-06-20 03:16:15.126665-07",
"modified_at": "2024-06-20 03:16:15.126665-07"
}
}
Deleting Regular Expression Assignment to a PolicyΒΆ
Request
Method | DELETE
|
Path | /api/v2/policy/<policy_id>/regexp/<regexp_id>
|
Example Request
Sending DELETE https://10.0.0.0/api/v2/policy/9124292845052624899/regexp/9124292845052624897
curl -s -k -X DELETE -H 'Authorization: sgfeea6jsaz4mum9su8w61877n1g06sk' https://10.0.214.98/api/v2/policy/9124292845052624899/regexp/9124292845052624897
Response
{
"result": "success"
}