Associate Permissions to Role
This API is used to assign/un-assign ACF permissions to a role.
Before you begin
- Session ID is obtained from the login API.
- Ensure that the session ID is valid and has not expired.
Request Structure
| Endpoint: | /role-updatePermission |
| Type: | PUT |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/avxapi/role-updatePermission?gwsource=externalTo understand the elements of the sample URL, click here. |
| Headers: | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId (or) Token
|
(Mandatory) Use either Session Id or Token received after
login. Type: String Example: "sessionId": "ce7f1a14-2bf9-4e4a-89a8-bc780a255813" |
| gwsource
|
(Mandatory) Source from which the request is triggered. The values
can be: Type: String
|
| Payload
|
(Mandatory) Input data for request body in application/json format. For payload details, see Payload section. |
Payload
| Name | Description |
|---|---|
| roleName
|
(Mandatory) Name of the role. Example: "role_1" |
| assignPermissionList
|
(Optional) ACF permissions to be assigned to the role. Refer to the list of
possible permissions list for details. Example: "[ "general:accounts:resource:clone", "general:accounts:resource:delete" ]" |
| unassignPermissionList
|
(Optional) ACF permissions to be unassigned from the role. Refer to the list of
possible permissions list for details. Example: "[ "general:accounts:resource:delete" ]" |
Response Structure
- Status Code: 202 Accepted
- Message: ACF assignment initiated for the given role.
- Headers:
- Content-Type: application/json
| Name | Description |
|---|---|
| response | Contains the response attributes for ACF assignment initiated for the given role. |
| message | Success message or failure description in case of error. |
| appStatusCode | Application specific status code for the response. Will be non-null for failure response. |
| tags | More info in case of failure response. |
Status Codes
| HTTP Code | appStatusCode | Response Message |
|---|---|---|
| 202 Accepted | null | ACF assignment initiated for the given role. |
| 400 Bad Request | ACCT_RO_015 | Mandatory field 'roleName' is missing or empty. |
| 404 Not Found | ACCT_RO_001 | Role(s) not found. |
Sample Request/Response
Assign and unassign few ACF permissions to/from the role “role_1”.
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/role-updatePermission?gwsource=external{
"payload": {
"roleName": "role_1",
"assignPermissionList": [
"general:accounts:resource:clone",
"general:accounts:resource:delete"
],
"unassignPermissionList": [
"general:accounts:resource:delete"
]
}
} {
"response": "ACF assignment initiated for the given role",
"message": "ACF assignment initiated for the given role",
"appStatusCode": null,
"tags": null,
"headers": null
} What's Next
Reference
- IP/HostName/TenantName: Replace with the actual IP address, hostname,
or tenant name based on the specific configuration in AppViewX.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
The IP address will be included in the endpoint URL for an on-prem deployment.
- HostName: A human-readable label assigned to a device (host)
on a network
The hostname will be included in the endpoint URL for an on-prem deployment.
- TenantName: An identifier label for a tenant given to
indicate which tenant's data the API request will
access/modify
The tenant name will be included in the endpoint URL for a SaaS deployment.
- IP: A unique identifier assigned to each device connected to
a computer network that uses the Internet Protocol for communication
- GWPORT: AppViewX gateway port
A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.
Example: 31443
- avxapi: Path parameter value (static) that is part of the endpoint's URL
- Endpoint: Endpoint of the API, for example: execute-hook
- gwsource: Source or origin of a gateway, for example: external.
