You can delete an HTTP bearer token.

Before you begin

Procedure

  1. Enter the command to delete the HTTP bearer token, as in the following example.
    curl --insecure -X DELETE -H "Accept: application/json" -H "Authorization:  Bearer $token" -H "Cache-Control: no-cache" "https://$vRA/identity/api/tokens/$token"
  2. Examine the response.

    A successful request returns status code 204.

Delete Token Request and Response

The following sample displays output based on the example request.

curl --insecure -X DELETE -H "Accept: application/json" -H "Authorization:  Bearer $token" -H "Cache-Control: no-cache" "https://$vRA/identity/api/tokens/$token"
204 NO CONTENT

The server returns one of the following status codes.

Table 1. Status Codes for Delete a Bearer Token

Status Code

Description

204 NO CONTENT

The request succeeded. The resource has been deleted.

401 UNAUTHORIZED

You must have authentication credentials to access the resource. All requests must be authenticated.

403 FORBIDDEN

Your authentication credentials do not provide sufficient access to the resource.

404 NOT FOUND

Could not locate the resource based on the specified URI.

405 METHOD NOT ALLOWED

The DELETE method is not supported for the resource.

500 SERVER ERROR

Could not create or update the resource because of an internal server error.