Skip to main content

ACL-OKM API

The ACL-OKM API manages the relationships between ACLs and OKMs.

GET

Get all relationships for one customer

Sending a GET to the acl-okms endpoint will return a list of the ACL and OKM relationships for a customer. The default pagination is 30 records per request.

Example request:

GET https://domain.name/api/v1/acl-okms?customer={customer}

Example response:

{
"message": "Resource fetched successfully",
"pagination": {
"page": 1,
"results_per_page": "30",
"total_results": "6"
},
"data": [
{
"acl_id": "acl1_cust1234",
"okm_id": "okm1_cust1234"
},
{
"acl_id": "acl1_cust1234",
"okm_id": "okm2_cust1234"
},
{
"acl_id": "acl1_cust1234",
"okm_id": "okm3_cust1234"
},
...
]
}

Get a list for the customer with pagination

The default pagination is 30 records per request.

GET https://domain.name/api/v1/acl-okms/?customer={customer}&page={start page}&results_per_page={results per page}

Example response will be the same as above

Get one list for a customer

Sending a GET to the acl-okm endpoint with an id will return an acl-okm relationship object for a customer. The default pagination is 30 records per request.

Example request:

GET https://domain.name/api/v1/acl-okms/{acl-okm-id}?customer={customer}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"message": "Resource fetched successfully",
"data": {
"acl_id": "acl1_cust1234",
"okm_id": "okm1_cust1234"
}
}

Possible errors

Error CodeDescription
400 Bad request
403 Forbidden{ "error_code": "UNAUTHORIZED_ACCESS", "error_msg": "Missing required scopes" }
404 Not FoundError: acl-okm record not found

POST

Sending a POST to the acl-okms endpoint will link an ACL to an OKM.

POST https://domain.name/api/v1/acl-okms/

Example request:

{
"customer": "invu",
"acl_id":"acl1_cust1234",
"okm_id":"okm1_cust1234"
}

Where:

FieldTypeDescription
customerstringThe customer name.
acl_idstringId of the ACL to link to the OKM identified by okm_id.
okm_idstringId of the OKM to link the ACL to.

Example response:

HTTP/1.1 201 OK
{
"message": "Resource created successfully"
}

Possible errors

Error codeDescription
400 Bad RequestEror: Error in creating acl-okm record error: duplicate key value violates unique constraint "acl_id_customer_key"
403 Forbidden{ "error_code": "UNAUTHORIZED_ACCESS", "error_msg": "Missing required scopes" }

PUT

Sending a PUT to the acl-okms endpoint will update the link between an ACL and an OKM.

PUT https://domain.name/api/v1/acl-okms/

Example request:

{
"acl_id":"acl2_cust1234",
"okm_id":"okm4_cust1234"
}

Where the acl_id, and okm_id follow the same definition of the POST section.

Example response:

HTTP/1.1 200 OK

Possible errors

Error codeDescription
400 Bad RequestOKM id is missing. ACL id is missing. Body is empty.
403 Forbidden{ "error_code": "UNAUTHORIZED_ACCESS", "error_msg": "Missing required scopes" }
404 Not FoundACL is not found. OKM is not found.

DELETE

A DELETE request sent to the acl-okms endpoint removes the link between an ACL and an OKM. DELETE https://domain.name/api/v1/acl-okms/:okm_id

Example response:

html HTTP/1.1 200 OK

Possible errors

Error codeDescription
400 Bad RequestOKM id is missing.
403 Forbidden{ "error_code": "UNAUTHORIZED_ACCESS", "error_msg": "Missing required scopes" }
404 Not FoundOKM not found

PATCH

Not supported.

Error codeDescription
405 Method Not AllowedCannot PATCH