Approve a Request
Request Structure
| Endpoint: | /certificate/workorder/update |
| Type: | POST |
| Sample URL: |
To understand the elements of the sample URL, click here. |
| Headers | |
| Content-Type: | application/json |
- 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.
| Name | Description |
|---|---|
| sessionId
|
(Mandatory) Session Id received after login. Type: String Constraint: Required if username and password are not provided. |
| username
|
(Mandatory) AppViewX login username. Type: String Constraint: Required if sessionId is not provided. |
| password
|
(Mandatory) AppViewX login password. Type: String Constraint: Required if sessionId is not provided. |
| Content-Type
|
(Mandatory) Specifies the nature of the data in the
payload. Type: String Constraint: Value of the parameter should be ‘application/json’. |
| gwsource
|
(Mandatory) Source from which the request is triggered. (E.g.
external) Type: String |
| Payload
|
Contains all the parameters to be sent in the request body for
the POST request. Type: Payload |
| Name | Description |
|---|---|
| data | (Mandatory) Contains the action data. Type: String |
| task_action
|
(Mandatory) Action to be performed. Type: Number Constraint: Values are 1 for approve and 2 for reject. |
| header | (Mandatory) Contains the request details. Type: String |
| request_id
|
Id of the request. Type: String |
| workorder_id
|
Id of the workorder. Type: String Constraint: Value should be 0. |
| task_id
|
Id of the task to be performed. Type: String Constraint: Value should be review_1. |
Response Structure
Response returns string of type application/json with the following body parameters:
| Name | Description |
|---|---|
| response | Contains the response attributes for the approve request. |
| requestId
|
Request id for approve action for the application
connector. Type: String |
| message
|
Success message of the action or a failure description in case of
an error. Type: String |
| message | Success message or failure description in case of
error. Type: String |
| appStatusCode | Application specific status code for the response. It is a
non-null value for a failure response. Type: String |
| tags | Additional information in case of failure response. |
Status Codes
| HTTP Code | appStatusCode | Response Message |
|---|---|---|
| 200 OK | NA | Request submitted to workflow engine for processing workflow request 14. |
| 401 Unauthorized | AVX_GW_003 | Authentication failed, reason - Invalid
Credentials. Remediation: Ensure that valid username and password or valid sessionId is provided as header parameters. |
| 404 Not Found | engine-db-011 | Request not found. Remediation: Ensure that a valid value is provided for the request_id field in the request. |
Sample Request/Response
{
"data": {
"task_action": 1
},
"header": {
"request_id": "14",
"workorder_id": "0",
"task_id": "review_1"
}
} {
"response": {
"message": "Request submitted to workflow engine for processing workflow request 14",
"requestId": "14"
},
"message": "Success",
"appStatusCode": null,
"tags": {},
"headers": null
}