Registering an API user

The API user account provides access to the DevOpsACCELERATE REST API. First, you register an API user via a REST API call. Then, you activate the account.

You can only register an API user once via a REST API call. When you register an API user: 

  • The API user account is not interchangeable with other account types. For example, the API account is invalid for accessing the web interface. To log into the UI, you need separate user account.
  • You receive an API key that corresponds to the registered API user. The API key does not expire until you rotate the key.

    IMPORTANT  The preferred method of obtaining your API key is to view your account in the DevOpsACCELERATE Web interface.

To register an API user

  1. Use the useraccounts endpoint and the following parameters. Use the example near the end of this topic as a guide.

    Parameter

    Description

    userAccountType The value API assigns the DEVOPS role after activation.
    emailAddress An email address that is not currently registered to another DevOpsACCELERATE user. The email address contains your company domain name.
  2. (Optional) From the REST response, record the information for future API calls.
  3. If you have not already done so, obtain an API key.

For every REST API call, you add the content-type and your own API key value. For example:

Content-Type: application/json

Example: Register the API user

Request

POST https://api.venafi.cloud/v1/useraccounts 
{ "username": "emailaddress@mycompany.com", "userAccountType": "API" }

Response

HTTP/1.1 201 CREATED
{
  "user": {
    "username": "emailaddress@mycompany.com",
    "id": "3842d230-161f-11e7-a465-4daa67dd4928",
    "companyId": "42f45710-14cd-11e7-85fb-f995edc38f5c",
    "emailAddress": "emailaddress@mycompany.com",
    "userType": "EXTERNAL",
    "userAccountType": "API",
    "userStatus": "PENDING_ACTIVATION",
    "roles": [
      "DEVOPS"
    ],
    "creationDate": "2017-03-31T14:35:00.179+0000"
  },
  "company": {
    "id": "42f45710-14cd-11e7-85fb-f995edc38f5c",
    "name": "Venafi, Inc.",
    "companyType": "TPP_CUSTOMER",
    "active": true,
    "creationDate": "2017-03-29T22:15:48.198+0000",
    "domains": [
      "mycompany.com"
    ]
  }
}

Related Topics Link IconRelated Topics