Add Multiple Certificate Attributes

This API will let you add multiple certificates attributes for a certificate based on the certificate UUID or the resource ID.

Before you begin

  • The user has the ACF permission to add certificate attributes.
  • Certificate attributes with the specified name and label combination should not already exist.

Request Structure

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

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

Headers
Content-Type: application/json
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’

gwsource

Query

(Mandatory) Source from which the request is triggered

Type: String

Payload

Body

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

Table 2. Payload
Name Description
certAttributes (Mandatory) A nested JSON that contains the key-value pairs for the attributes to be added for the certificate

Type: JSON

Constraint: Attribute name and value should not contain invalid (HTML and XML) characters.

resourceId (Mandatory if certificateUuid is not provided) Unique identifier associated with the certificate

Type: String

Note: It is recommended to use the resource ID since the use of certificate UUID will be deprecated in the future.
certificateUuid (Mandatory if resourceId is not provided) Unique Identifier assigned to the certificate

Type: String

Note: It is recommended to use the resource ID since the use of certificate UUID will be deprecated in the future.
action (Mandatory) Action to be performed by executing this API

Type: String

Possible value: add

category (Optional) Certificate category

Type: String

Constraints: Parameter value cannot be CA.

Response Structure

Table 3. Success Response
200 OK Response with message Certificate attributes saved to certificate successfully
Response content-Type: application/json
Table 4. Response Parameters
Name Description
response Response for the add request
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 Message and Possible remediation
401 Unauthorized AVX_GW_003 Authentication failed, reason - Invalid Credentials.

Possible remediation: Ensure that valid username and password or valid sessionId is provided as header parameters.

400 Bad Request VALIDATION_ERROR_0004 Mandatory field is missing or has invalid value.

Possible remediation: Ensure that the mandatory field specified in the error message is present in the payload and is assigned an accepted value.

400 Bad Request AVX-VLDN-001 Mandatory field is missing or has invalid value.

Possible remediation: Ensure that the mandatory field specified in the error message is present in the payload and is assigned an accepted value.

404 Not Found CERT-INV-0021 Certificate(s) for the given resource ID/certificate UUID are unavailable in the certificate inventory.

Possible remediation: Ensure that there is a corresponding certifcate for the given resource ID/certificate UUID.

404 Not Found AVX-VLDN-001 Either the certificate UUID or resource ID should be present in the request.

Possible remediation: Ensure that a valid resource ID/certificate UUID is present in the request.

403 Forbidden CERT-ACF-0058 User does not have relevant permission to perform this action.

Possible remediation: Ensure that the user has the required ACF permissions to export certificates for a given module.

403 Forbidden ACF_GW_005 User does not have access to the targeted API

Possible remediation: Ensure that the user has the required ACF permissions to export certificates for a given module.

Sample Request/Response

Sample Request
{
    "certAttributes": {
        "test2": "CERT+_ACCTest2",
        "test3": "CERT+_ACCTest3",
        "test4": "CERT+_ACCTest4",
        "test5": "CERT+_ACCTest4",
        "expiryNotification":"expiryNotification"
    },
    "category":"server",
    "action": "add",
    "certificateUuid": "08bd683de4fe75c3a611032201ea212fbe72f3f2",
    "resourceId": "66192b925c61db504033113e1"
}
Sample Response
{
    "response": null,
    "message": "Certificate attributes saved to certificate successfully.",
    "appStatusCode": null,
    "tags": null,
    "headers": null
}

References

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.