Add Certificate Attributes
Before you begin
- The user has the ACF permission to add certificate attributes.
- A certificate attribute with the specified name and label combination should not already exist.
Request Structure
| Endpoint: | /certificate/attribute |
| Type: | POST |
| Sample URL: |
To understand the elements of the sample URL, click here. |
| Headers | |
| Content-Type: | application/json |
| 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 Type: String |
| Payload
|
Contains all the parameters to be included in the request body
for the POST request. It consists of an array of attributes listed
below. The array cannot be empty; a minimum of one entry must be
present. Type: Payload |
Payload
| Name | Description |
|---|---|
| name | (Mandatory) The name of the custom attribute. Type: String Constraint: Must not start with special characters. No special characters except -, _ are allowed. |
| label | (Mandatory) The label to be shown on the UI for the custom
attribute. Type: String Constraint: Must not start with special characters. No special characters except -, _ are allowed. |
| value | (Optional) Default value for the attribute. Type: String |
| mandatory | (Optional) Indicates whether the attribute is mandatory or
optional. Type: Boolean |
| helpInfo | (Optional) Help information about the field. Type: String |
Response Structure
Response returns string of type application/json with the following body parameters:
| Name | Description |
|---|---|
| response | Contains the response attributes. |
| successfullFields
|
List of fields that have been added successfully. Type: Array of CertificateGenericField |
| failedFields
|
List of fields that have not been added
successfully. Type: Array of CertificateGenericField |
| 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 Accepted | NA | The response messages are as follows:
Remediation Validate the inputs based on the
following failure reasons:
|
| 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. |
| 400 Bad Request | MANDATORY_FIELD_MISSING | Mandatory field is missing or invalid -
payload. Remediation: Payload array cannot be empty. At least one attribute must be provided. |
| 400 Bad Request | avx-common-028 | Invalid / Incorrect payload. Remediation: Check and ensure that the values provided for all the fields in the payload are accurate. |
Sample Request/Response
[
{
"name": "externalemail",
"label": "External_Email",
"value": "[email protected]",
"mandatory": true,
"helpInfo":"The external email id"
},
{
"name": "priority",
"label": "priority",
"value": "1",
"mandatory": false
}
] {
"response": {
"failedFields": [],
"successfullFields": [
{
"id": "externalemailcustomAttributecustomAttribute",
"type": "text",
"value": "[email protected]",
"values": null,
"label": "External_Email",
"searchKey": "externalemail",
"errorCode": null,
"mandatory": true,
"validation": null,
"divClasses": null,
"classNames": null,
"category": "certAttributes",
"certificateAuthority": null,
"regexValue": null,
"helpInfo": "The external email id",
"name": "externalemail",
"mandatoryFor": null,
"_id": "externalemail"
},
{
"id": "prioritycustomAttributecustomAttribute",
"type": "text",
"value": "1",
"values": null,
"label": "priority",
"searchKey": "priority",
"errorCode": null,
"mandatory": false,
"validation": null,
"divClasses": null,
"classNames": null,
"category": "certAttributes",
"certificateAuthority": null,
"regexValue": null,
"helpInfo": null,
"name": "priority",
"mandatoryFor": null,
"_id": "priority"
}
]
},
"message": "Certificate attribute added successfully",
"appStatusCode": null,
"tags": {},
"headers": null
} What's next?
References
- 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.
