Implement a Request

The implement request API implements the request for the certificate.

Request Structure

Endpoint: /certificate/workorder/update
Type: POST
Sample URL:
https://<IP/HostName/TenantName>:<GWPORT>/avxapi/certificate/workorder/update?gwsource=external

To understand the elements of the sample URL, click here.

Headers
Content-Type: application/json
Understanding the sample URL
  • 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.

  • 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.
Table 1. Input Parameters
Name Description
sessionId

Header

(Mandatory) Session Id received after login.

Type: String

Constraint: Required if username and password are not provided.

username

Header

(Mandatory) AppViewX login username.

Type: String

Constraint: Required if sessionId is not provided.

password

Header

(Mandatory) AppViewX login password.

Type: String

Constraint: Required if sessionId is not provided.

Content-Type

Header

(Mandatory) Specifies the nature of the data in the payload.

Type: String

Constraint: Value of the parameter should be ‘application/json’

gwkey

Query

(Mandatory) Tenant Key. This is needed only in case of multi-tenant installations and can disregarded for other types of installations.

Type: String

gwsource

Query

(Mandatory) Source from which the request is triggered. (E.g. external)

Type: String

Payload

Body

Contains all the parameters to be sent in the request body for the POST request.

Type: Payload

Table 2. Payload
Name Description
data (Mandatory) Contains the action data.

Type: String

task_action

data

(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

header

Id of the request.

Type: String

workorder_id

header

Id of the workorder.

Type: String

Constraint: Value should be 0.

task_id

header

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:

Table 3. Parameters
Name Description
response Contains the response attributes for the implement request.
requestId

response

Request id for implement action for the application connector.

Type: String

message

response

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

Request Payload
{
 "data": {
 "task_action": 1
 },
 "header": {
 "request_id": "14",
 "workorder_id": "0",
 "task_id": "review_2"
 }
 }
Response
{
"response": {
 "message": "Request submitted to workflow engine for processing workflow request 14",
 "requestId": "14"
 },
 "message": "Success",
 "appStatusCode": null,
 "tags": {},
 "headers": null
 }