Managing Regular Expressions Assignmentยถ
Data Structuresยถ
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only, unique regular expression policy identifier. |
|
|
string |
yes |
Immutable policy identifier. |
|
string |
yes |
Immutable regular expression identifier. |
|
string |
Read-only, expensive to use. |
|
|
string |
Read-only, expensive to use. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
Retrieve Available Attributes of the RegExpPolicyModelยถ
Request
Method |
|
Path |
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Get the List of Regular Expression Assignments for Policiesยถ
Request
Method |
|
Path |
|
Example Request
GET /api/v2/policy/regexp`
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'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 |
|
Path |
|
Headers |
|
Body |
|
Example Request
POST /api/v2/policy/regexp`
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
'https://10.0.214.98/api/v2/policy/regexp' \
-d'{"policy_id":"9124292845052624899","regexp_id":"9124292845052624900"}'
Response
{
"result": "success"
}
Checking Regular Expression Assignment With a Policyยถ
Request
Method |
|
Path |
|
Headers |
|
Body |
|
Example Request
GET /api/v2/policy/<id>/regexp/<id>`
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'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 |
|
Path |
|
Example Request
DELETE /api/v2/policy/<id>/regexp/<id>`
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/policy/9124292845052624899/regexp/9124292845052624897'
Response
{
"result": "success"
}