Get Resources for User Group
This API is used to fetch all the resources for a given user group.
Before you begin
- Session ID is obtained from the login API.
- Ensure that the session ID is valid and has not expired.
- Make sure you have valid User Group name.
Request Structure
| Endpoint: | /usergroup-getResources |
| Type: | POST |
| Sample URL: | https://<IP/HostName/TenantName>:<GWPORT>/avxapi/usergroup-getResources?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 |
|---|---|
| startIndex
|
(Optional) Start index to show in output in case if there are
more than one matching records. Example: "1" |
| maxSize
|
(Optional) The number of records to return in a response. maxSize
is starting from the start index. Example: "0" |
| name
|
(Mandatory) Name of the user group. Example: "admin usergroup" |
Response Structure
- Status Code: 200 OK
- Message: Matching results found for the given input.
- Headers:
- Content-Type: application/json
| Name | Description |
|---|---|
| response | Contains the response attributes for resource of user group. |
| 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 |
|---|---|---|
| 200 OK | null | Matching results found for the given input. |
| 404 Not Found | DG_009 | No matching records found. |
| 400 Bad Request | RBAC_RE_021 | Mandatory field 'name' is missing or empty |
| 401 Unauthorized | AVX_GW_003 | Authentication failed, reason - Invalid Credentials. |
Sample Request/Response
Get all resources under the user group usergroup_1.
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/usergroup-getResources?gwsource=external{
"payload": {
"startIndex": 1,
"maxSize": 0,
"name": "usergroup_1"
}
}{
"response":{
"data":[
{"name": " resource_0", "description": "Resource for usergroup_0", "state": "A",…},
{"name": "resource_1", "description": " Resource for usergroup_1", "state": "A",…},
{"name": " resource_2", "description": “Resource for usergroup_1”, "state": "A", ,…},
{"name": " resource_3", "description": "Resource for usergroup_1", "state": "A",…}
],
"totalRecords": 4,
"obtainedRecords": 4,
"obtainedRecordRange":{
"start": 1,
"end": 4
}
},
"message": "Matching results found for the given input.",
"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.
