[{"label":"Latest (v37.2)","version":"latest"},{"version":"v37.1"},{"version":"v37.0"},{"version":"v36.3"},{"version":"v36.2"},{"version":"v36.1"},{"version":"v36.0"},{"link":"https://developer.vmware.com/apis/1046/vmware-cloud-director","version":"v35.0"}]
vmware-cloud-director

Create Token

Description

Creates a new token. Proxy tokens are tied to the current user and can be used to access the set of proxies available to the user.

Request

Request

URL

URL


post
https://{api_host}/cloudapi/1.0.0/tokens
Copy

Request Body

Request Body

TokenParameters of type(s) application/json Optional
{
	"extensionId": "string",
	"name": "string",
	"type": "string"
}
string
extensionId Optional

The urn id of the extension to get a token for


string
name Optional

Name of the token to create


string
type Optional

The type of token to be created. Valid types are [“PROXY”, “EXTENSION”]

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns Token of type(s) application/json;version=37.0
{
	"expirationTimeUtc": "string",
	"id": "string",
	"name": "string",
	"org": {
		"id": "string",
		"name": "string"
	},
	"orgName": "string",
	"owner": {
		"id": "string",
		"name": "string"
	},
	"token": "string",
	"type": "string",
	"userId": "string",
	"username": "string"
}
string
id Required

ID of this token. Sorting on this field is not supported.


string
name Required

Name of the token


string as date-time
expirationTimeUtc Optional

Time stamp representing when the token will expire (in UTC).


org Optional

Entity reference used to describe VCD entities


string
orgName Optional

Name of the organization that the assigned user belongs to. Sorting and filtering on this field is not supported.


owner Optional

Owner of the token. Either a user or an extension


string
token Optional

User specific token that can be used to access proxies. Sorting on this field is not supported.


string
type Optional

Type of the token. Can be of type PROXY or EXTENSION


string
userId Optional

ID of the user that this token is assigned to. Sorting on this field is not supported. Can not be updated.


string
username Optional

Name of the user that this token is assigned to.

No error details were provided in the OpenAPI specification.

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"extensionId":"string","name":"string","type":"string"}' https://{api_host}/cloudapi/1.0.0/tokens


[{"label":"Latest (v37.2)","version":"latest"},{"version":"v37.1"},{"version":"v37.0"},{"version":"v36.3"},{"version":"v36.2"},{"version":"v36.1"},{"version":"v36.0"},{"link":"https://developer.vmware.com/apis/1046/vmware-cloud-director","version":"v35.0"}]
vmware-cloud-director
Availability
Added in 33.0
Token Operations
Feedback

Was this page helpful?