Object Data Service: Check Access
Table of Contents
Details
Checks access for the specified user to the list of objects.
Request
URL
POST https://{server_name}/m42Services/api/data/objects/checkaccessHeaders
For a list of available HTTP request headers, see Web Services: REST API integration.
POST Body
Payload properties:
- userId: identifies the user whose access to the specified objects is being checked.
- objects: a collection of objects to verify access for.
- ciName: property defining the object type; has higher priority if present.
- acomType: fallback property used to determine the object type when ciName is not provided.
- objectId: unique identifier of the object to check access for.
Example 1
Checks access to objects based on ciName.
{
"userId": "5F9B82B7-59B9-F011-0FA6-4CB04A972376",
"objects": [
{
"ciName": "SVMChangeRequestType",
"objectId": "E0DC2D9D-02E2-CD2E-85F4-08DE1B8155B9"
}
]
}Example 2
Checks access to objects based on acomType.
{
"userId": "5F9B82B7-59B9-F011-0FA6-4CB04A972376",
"objects": [
{
"acomType": "ServiceDeskChangeRequest",
"objectId": "E0DC2D9D-02E2-CD2E-85F4-08DE1B8155B9"
}
]
}Response
Returns a list of accessible objects that include additional data.
Example
{
"AccessibleObjects": [
{
"ObjectId": "888eb12f-930c-cabf-4527-08de21e86ca6",
"ObjectLink": "https://M42-NB-1295/wm/app-SelfServicePortal/?view-options=%7B\"objectId\":\"888eb12f-930c-cabf-4527-08de21e86ca6\",\"type\":\"SVMChangeRequestType\",\"viewType\":\"preview\"%7D"
}
]Status Codes and Errors
| Code | Message |
|---|---|
| 400 | Wrong reference, or mandatory attribute is missing. |
| 401 | Unauthorized |
| 415 | The request Content-type is not defined |
| 500 | Internal Server Error. If an unexpected error occurred. |