Start License Check By Resource

Start License Check By Resource
Start a license check for a resource

Start a license check for a resource

Request
URI
POST
https://{api_host}/v1/resources/license-checks
COPY
Request Body
ResourcesLicenseCheckSpec of type(s) application/json
Required
{
    "licenseCheckResources": [
        {
            "resourceInfo": {
                "domainId": "f0bf0f65-f719-4c2d-980a-29a9094045b5",
                "clusterId": "a0bf0f65-f719-4c2d-980a-29a9094045b5",
                "hostId": "b0bf0f65-f719-4c2d-980a-29a9094045b5"
            },
            "productInfo": {
                "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
                "type": "One among: VCENTER, NSXT, VSAN, WCP, ESXI",
                "licensingMode": "One among: SUBSCRIPTION, PERPETUAL, MIXED",
                "licenseKeyStatus": "One among: EXPIRED, ACTIVE, NEVER_EXPIRES",
                "licenseKeyExpirationDate": "2021-04-08T04:37:51.662Z",
                "errorResponse": {
                    "errorCode": "string",
                    "errorType": "string",
                    "arguments": [
                        "string"
                    ],
                    "context": {
                        "context": "string"
                    },
                    "message": "string",
                    "remediationMessage": "string",
                    "causes": [
                        {
                            "type": "string",
                            "message": "string"
                        }
                    ],
                    "nestedErrors": [
                        {
                            "errorCode": "string",
                            "errorType": "string",
                            "arguments": [
                                "string"
                            ],
                            "context": {
                                "context": "string"
                            },
                            "message": "string",
                            "remediationMessage": "string",
                            "causes": [
                                {
                                    "type": "string",
                                    "message": "string"
                                }
                            ],
                            "nestedErrors": [
                                {
                                    "errorCode": "string",
                                    "errorType": "string",
                                    "arguments": [
                                        "string"
                                    ],
                                    "context": {
                                        "context": "string"
                                    },
                                    "message": "string",
                                    "remediationMessage": "string",
                                    "causes": [
                                        {
                                            "type": "string",
                                            "message": "string"
                                        }
                                    ],
                                    "nestedErrors": [
                                        "Error Object"
                                    ],
                                    "referenceToken": "string"
                                }
                            ],
                            "referenceToken": "string"
                        }
                    ],
                    "referenceToken": "string"
                }
            }
        }
    ],
    "forAllDomains": false
}
array of object
licenseCheckResources
Optional

A list of resources for which license check needs to be performed

boolean
forAllDomains
Optional

Value that defines whether to get license check for all domains or not

Responses
202

Accepted

Returns ResourcesLicenseCheckResult of type(s) application/json
{
    "id": "string",
    "startTimestamp": "string",
    "endTimestamp": "string",
    "status": "One among: PENDING, Pending, IN_PROGRESS, In Progress, SUCCESSFUL, Successful, FAILED, Failed, CANCELLED, Cancelled, COMPLETED_WITH_WARNING, SKIPPED",
    "resourceLicensingInfos": [
        {
            "resourceInfo": {
                "domainId": "f0bf0f65-f719-4c2d-980a-29a9094045b5",
                "clusterId": "a0bf0f65-f719-4c2d-980a-29a9094045b5",
                "hostId": "b0bf0f65-f719-4c2d-980a-29a9094045b5"
            },
            "productInfo": {
                "licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
                "type": "One among: VCENTER, NSXT, VSAN, WCP, ESXI",
                "licensingMode": "One among: SUBSCRIPTION, PERPETUAL, MIXED",
                "licenseKeyStatus": "One among: EXPIRED, ACTIVE, NEVER_EXPIRES",
                "licenseKeyExpirationDate": "2021-04-08T04:37:51.662Z",
                "errorResponse": {
                    "errorCode": "string",
                    "errorType": "string",
                    "arguments": [
                        "string"
                    ],
                    "context": {
                        "context": "string"
                    },
                    "message": "string",
                    "remediationMessage": "string",
                    "causes": [
                        {
                            "type": "string",
                            "message": "string"
                        }
                    ],
                    "nestedErrors": [
                        "Error Object"
                    ],
                    "referenceToken": "string"
                }
            }
        }
    ]
}
string
id
Read-Only

ID of the resources license check task

string
startTimestamp
Read-Only

Task start timestamp

string
endTimestamp
Read-Only

Task end timestamp

string
status
Read-Only

Task status

array of object
resourceLicensingInfos
Read-Only

List of licensing infos of resources


400

Bad Request

Returns Error of type(s) application/json
"Error Object"
string
errorCode
Read-Only

The minor error code

string
errorType
Read-Only

The error type

array of string
arguments
Read-Only

The arguments used to localize the message, Can be used by scripts to automate the error processing.

object
context
Read-Only

The error context (e.g. the component where it occurred).

string
message
Read-Only

The localized error message

string
remediationMessage
Optional

The localized remediation error message

array of object
causes
Optional

The underlying cause exceptions.

array of Error
nestedErrors
Optional

The nested errors when the error is a composite one

string
referenceToken
Read-Only

A reference token correlating the error with the relevant detailed error logs. Should be sent to the service provider when reporting issues.


500

Internal server error

Returns Error of type(s) application/json
"Error Object"
string
errorCode
Read-Only

The minor error code

string
errorType
Read-Only

The error type

array of string
arguments
Read-Only

The arguments used to localize the message, Can be used by scripts to automate the error processing.

object
context
Read-Only

The error context (e.g. the component where it occurred).

string
message
Read-Only

The localized error message

string
remediationMessage
Optional

The localized remediation error message

array of object
causes
Optional

The underlying cause exceptions.

array of Error
nestedErrors
Optional

The nested errors when the error is a composite one

string
referenceToken
Read-Only

A reference token correlating the error with the relevant detailed error logs. Should be sent to the service provider when reporting issues.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/v1/resources/license-checks