Credentials

GET /v6/credentials Credential list

Returns a list of all credentials configured in ThousandEyes.

Optional (Querystring) Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={aid} optional and requires the user to be assigned to the target account group, specifies the account group context of the request, obtained from the /account-groups endpoint. Specifying this parameter without the user being assigned to the target account will result in an error response. See Account group context for more information.

Request

  • There is no request body for this request.

Response

FieldData TypeUnitsNotes
credentialIdintegern/aunique ID of the credential
namestringn/aThe name of the credential
valuestringn/aThe value of the credential that will be encrypted (if the user has permission to read sensitive data)
apiLinksobjectn/aThe reference to this credential

Example

$ curl https://api.thousandeyes.com/v6/credentials.json \ -u noreply@thousandeyes.com:g351mw5xqhvkmh1vq6zfm51c62wyzib2

HTTP/1.1 200 OK Date: Fri, 15 Nov 2019 19:17:46 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding X-Server-Name: 8xb13 Cache-Control: no-store X-Organization-Rate-Limit-Limit: 240 X-Organization-Rate-Limit-Remaining: 211 X-Organization-Rate-Limit-Reset: 1573845480 Strict-Transport-Security: max-age=15724800; includeSubDomains Strict-Transport-Security: max-age=31536000 X-Content-Type-Options: nosniff

Body

{ "credentials": [ { "credentialId": 405, "name": "Example Credential 1", "apiLinks": [ { "rel": "self", "href": "https://api.thousandeyes.com/v6/credentials/405" } ] } ] }

For more information on our HTTP response status codes, see the response status codes documentation.

GET /v6/credentials/{credentialId} Credential details

Returns details for a credential, including test name, reference & value (value is only visible if the user has View sensitive data in web transaction permission). The user should have access to this credential by sharing the same account and must have the View tests permission.

Optional (Querystring) Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={aid} optional and requires the user to be assigned to the target account group, specifies the account group context of the request, obtained from the /account-groups endpoint. Specifying this parameter without the user being assigned to the target account will result in an error response. See Account group context for more information.

Request

  • {credentialId} the ID of the credential you wish to retrieve
  • There is no request body for this request.

Response

FieldData TypeUnitsNotes
credentialIdintegern/aunique ID of the credential
namestringn/aThe name of the credential
valuestringn/aThe value of the credential that will be encrypted (if the user has permission to read sensitive data)
apiLinksobjectn/aThe reference to this credential

Example

$ curl https://api.thousandeyes.com/v6/credentials/405.json \ -u noreply@thousandeyes.com:g351mw5xqhvkmh1vq6zfm51c62wyzib2

HTTP/1.1 200 OK Date: Fri, 15 Nov 2019 19:36:19 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding X-Server-Name: f72ql Cache-Control: no-store X-Organization-Rate-Limit-Limit: 240 X-Organization-Rate-Limit-Remaining: 228 X-Organization-Rate-Limit-Reset: 1573846620 Strict-Transport-Security: max-age=15724800; includeSubDomains Strict-Transport-Security: max-age=31536000 X-Content-Type-Options: nosniff

Body

{ "credentials": [ { "credentialId": 405, "name": "Example Credential 1", "apiLinks": [ { "rel": "self", "href": "https://api.thousandeyes.com/v6/credentials/405" } ] } ] }

For more information on our HTTP response status codes, see the response status codes documentation.

POST /v6/credentials/new.json Creating a credential

Creates a new credential in ThousandEyes, based on properties provided in the POST data. In order to create a new credential, the user attempting the creation must have permission to create tests.

Optional (Querystring) Parameters

  • aid={aid} optional and requires the user to be assigned to the target account group, specifies the account group context of the request, obtained from the /account-groups endpoint. Specifying this parameter without the user being assigned to the target account will result in an error response. See Account group context for more information.

Request

  • Request body should contain both a name and value to be set during creation.
FieldData TypeUnitsNotes
namestringn/aThe name of the credential
valuestringn/aThe value of the credential that will be encrypted (if the user has permission to read sensitive data)

Response

If a test is successfully created, an HTTP/201 CREATED response will be returned, and the credential definition will be returned.

FieldData TypeUnitsNotes
credentialIdintegern/aunique ID of the credential
namestringn/aThe name of the credential
valuestringn/aThe value of the credential that will be encrypted (if the user has permission to read sensitive data)
apiLinksobjectn/aThe reference to this credential

Example

Please note, credential creation/modification/deletion is not allowed on the Sandbox API account, and will not work if attempted. The following example is presented for documentation and reference purposes only.

$ curl -i https://api.thousandeyes.com/v6/credentials/new.json \ -d '{ "name": "new_api_credential", "value": "secret p@ssword" }' \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -u noreply@thousandeyes.com:g351mw5xqhvkmh1vq6zfm51c62wyzib2

HTTP/1.1 201 CREATED Date: Fri, 15 Nov 2019 19:46:31 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding X-Server-Name: 8xb13 Cache-Control: no-store X-Organization-Rate-Limit-Limit: 240 X-Organization-Rate-Limit-Remaining: 239 X-Organization-Rate-Limit-Reset: 1573846620 Strict-Transport-Security: max-age=15724800; includeSubDomains Strict-Transport-Security: max-age=31536000 X-Content-Type-Options: nosniff

Body

{ "credentials": [ { "credentialId": 405, "name": "Example Credential 1", "apiLinks": [ { "rel": "self", "href": "https://api.thousandeyes.com/v6/credentials/405" } ] } ] }

For more information on our HTTP response status codes, see the response status codes documentation.

POST /v6/credentials/{credentialId}/update Updating a credential

Updates a credential in ThousandEyes, based on properties provided in the POST data. In order to update a credential, the user attempting the creation must have permission to update tests & should have access to the credential (same account)

Optional (Querystring) Parameters

  • aid={aid} optional and requires the user to be assigned to the target account group, specifies the account group context of the request, obtained from the /account-groups endpoint. Specifying this parameter without the user being assigned to the target account will result in an error response. See Account group context for more information.

Request

  • {credentialId} corresponds to the unique ID of the credential to be updated, obtained through the /credentials endpoint
  • Request body should contain fields to be set during update.
FieldData TypeUnitsNotes
namestringn/aThe name of the credential
valuestringn/aThe value of the credential that will be encrypted (if the user has permission to read sensitive data)

Response

If a credential is successfully edited, an HTTP/200 OK response will be returned, and the credential definition will be returned.

FieldData TypeUnitsNotes
credentialIdintegern/aunique ID of the credential
namestringn/aThe name of the credential
valuestringn/aThe value of the credential that will be encrypted (if the user has permission to read sensitive data)
apiLinksobjectn/aThe reference to this credential

Example

Please note, credential creation/modification/deletion is not allowed on the Sandbox API account, and will not work if attempted. The following example is presented for documentation and reference purposes only.

$ curl -i https://api.thousandeyes.com/v6/credentials/405/update.json \ -d '{ "value":"updated password" }' \ -H "Content-Type: application/json" \ -u noreply@thousandeyes.com:g351mw5xqhvkmh1vq6zfm51c62wyzib2

HTTP/1.1 200 OK Server: nginx Date: Mon, 09 May 2016 16:04:24 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Organization-Rate-Limit-Limit: 240 X-Organization-Rate-Limit-Remaining: 227 X-Organization-Rate-Limit-Reset: 1492608660 Strict-Transport-Security: max-age=31536000 X-Server-Name: 1-2

Body

{ "credentials": [ { "credentialId": 405, "name": "Example Credential 1", "apiLinks": [ { "rel": "self", "href": "https://api.thousandeyes.com/v6/credentials/405" } ] } ] }

For more information on our HTTP response status codes, see the response status codes documentation.

POST /v6/credentials/new.json Deleting a credential

Deletes the specified credential in ThousandEyes, based on the credentialID provided in the API request.

Optional (Querystring) Parameters

  • aid={aid} optional and requires the user to be assigned to the target account group, specifies the account group context of the request, obtained from the /account-groups endpoint. Specifying this parameter without the user being assigned to the target account will result in an error response. See Account group context for more information.

Request

  • The request body must be provided, but should be empty

Response

If a credential is successfully deleted, an HTTP/204 NO CONTENT response will be returned, and an empty JSON response will be in the body of the response.

Example

Please note, credential creation/modification/deletion is not allowed on the Sandbox API account, and will not work if attempted. The following example is presented for documentation and reference purposes only.

$ curl -i https://api.thousandeyes.com/v6/credentials/405/delete.json \ -d '' \ -H "Content-Type: application/json" \ -u noreply@thousandeyes.com:g351mw5xqhvkmh1vq6zfm51c62wyzib2

HTTP/1.1 204 No Content Date: Fri, 15 Nov 2019 20:24:33 GMT Content-Type: application/json;charset=UTF-8 Connection: keep-alive X-Server-Name: fjxcv Cache-Control: no-store X-Organization-Rate-Limit-Limit: 240 X-Organization-Rate-Limit-Remaining: 236 X-Organization-Rate-Limit-Reset: 1573849500 Strict-Transport-Security: max-age=15724800; includeSubDomains Strict-Transport-Security: max-age=31536000 X-Content-Type-Options: nosniff

Body

  • The body of a delete response will be empty.

For more information on our HTTP response status codes, see the response status codes documentation.