Managing Regular Expressions Assignmentยถ


Data Structuresยถ

RegExpPolicyModelยถ

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.

Retrieve Available Attributes of the RegExpPolicyModelยถ

Request

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.


Get the List of Regular Expression Assignments for Policiesยถ

Request

Method

GET

Path

/api/v2/policy/regexp

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

POST

Path

/api/v2/policy/regexp

Headers

Content-Type: Application/json

Body

RegExpPolicyModel

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

GET

Path

/api/v2/policy/<policy_id>/regexp/<regexp_id>

Headers

Content-Type: Application/json

Body

PolicyModel

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

DELETE

Path

/api/v2/policy/<policy_id>/regexp/<regexp_id>

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"
}