Bulk Add/Update Certificate Attributes

This API allows you to add or update one or more certificate attributes for one or multiple certificates in a single API request.

Before you Begin

  • Ensure that the user has the required permissions to add and update certificate attributes.

Request Structure

Endpoint: /certificate/attributeValues
Type: PUT
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 if username and password are not provided) Session ID received after login

Type: String

username

Header

(Mandatory if sessionId is not provided) AppViewX login username

Type: String

password

Header

(Mandatory if sessionId is not provided) AppViewX login password.

Type: String

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. (for example, external)

Type: String

Payload

Body

Contains all the parameters to be included in the request body for the PUT request.

Type: Payload

Payload

Table 2. Payload
Name Description
resourceIds (Mandatory if resourceIdList is not specified) Resource ID of the certificate for which the attributes in the payload have to be added and/or updated

The resourceIds parameter is used when one or more attributes have to be added an/or updated for a single certificate.

Certificate resources IDs can be retrieved using the /certificate/search API.

Type: String

Note: It is recommended that resourceIdList is used instead of resourceIds because resourceIds will be deprecated soon.
resourceIdList (Mandatory if resourceIds is not specified) Comma-separated list of resource IDs of all certificates for which the attributes in the payload have to be added and/or updated

The resourceIdList parameter is used when one or more attributes have to be added and/or updated for multiple certificates.

Type: Array

attributeValues (Mandatory) A nested JSON containing the key-value attribute pairs to added and/or updated for the specified certificate(s)

The key represents the attribute name and the value is the value being assigned to the specified attribute.

Type: JSON

Constraints:
  • The value of the date attribute should be in the GMT time zone.
  • The certificate attribute name and value should be assigned valid values as defined in the product.

Response Structure

Success Response

200 OK Response with the message: Certificate attribute updated successfully.

Response content-type: application/json

Table 3. Response Parameters
Name Description
message Success or failure description

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 for the failure response

Status Codes

HTTP Code appStatusCode Response Message
401 Unauthorized AVX_GW_003 Authentication failed, reason: Invalid credentials

Remediation: Ensure that valid username and password or a valid sessionId is provided as header parameters.

400 Bad Request MANDATORY_FIELD_MISSING Mandatory field missing or invalid value

Remediation: Ensure that the missing mandatory field, as specified in the error response, is included in the payload and is assigned a valid value.

400 Bad Request RESOURCE_ID_EMPTY Either both the resourceIdsand resourceIdList parameters are not specified or do not have a value assigned.

Remediation: Ensure that either one of the parameters, resourceIds and resourceIdList, is specified and is not empty.

400 Bad Request CertAttributeBulkError-020 Invalid date format

Remediation: Ensure that the value for the date attribute is a valid format, such as MM/dd/yyyy, yyyy-MM-dd, dd-MM-yyyy or one of the ISO 8601 formats (like MM/dd/yyyy HH:mm or MM/dd/yyyy HH:mm:ss) .

404 Bad Request INVALID_REQUEST Both resourceIds and resourceIdList are specified in the payload.

Remediation: Only of the two parameters, resourceIds and resourceIdList, must be specified at a time.

403 Forbidden CERT-ACF-0058 User does not have the required permissions for performing this action.

Remediation: Ensure that the user has all the requisite permissions for adding/updating certificate attributes.

403 Forbidden ACF-GW-005 User does not have access to the target API.

Remediation: Ensure that the user has the requisite ACF permissions to add and update certificate attributes.

404 Not Found RESOURCE_ID_NOT_AVAILABLE_OR_PERMISSION_DENIED
  • One or more of the resource IDs specified are unavailable.
  • User does not have the permission to add and update the certificate attributes for certificates with the specified resource IDs.

Remediation: Ensure that all resource IDs specified in the payload are valid (have a corresponding certificate) and that the user has all the requisite permissions to add and update the attributes.

417 Expectation Failed CERT_ATTRIBUTE_NOT_AVAILABLE The specified certificate attribute is not defined in the AppViewX product.

Remediation: Ensure that the certificate attribute name is already defined in the AppViewX product.

417 Expectation Failed CERT_ATTRIBUTE_NOT_AVAILABLE Certificate attribute value is invalid.

Remediation: Ensure that the new certificate attribute value provided is a valid value for that attribute.

Sample Request/Response

Sample Request
{
	"attributeValues": {
		"test": "testValue123",
		"dropdown": "test",
		"Date": "1751278741000",
		"expiryNotification": "false"
	},
	"resourceIdList: [
		"67bc2ca76a105e1a05691c1c",
		"67bc2ca76a105e1a05691c2c",
		"67bc2ca76a105e1a05691c3c"
	]
}
Sample Response
{
	"response": null,
	"message": "Certificate attribute(s) value updated successfully",
	"appStatusCode": null,
	"tags": { },
	"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.