Mock Accounts API (1.0.0)

Download OpenAPI specification:

A mock up of a simple account management API for sample purposes.

Accounts

Endpoints that manage accounts.

Create an account

Creates a new account.

Authorizations:
userApiKey
Request Body schema: application/json
username
required
string

The account's username.

email
required
string <email>

The account holder's email address.

active
required
boolean

If true, the account is activated on creation.

accountType
required
string
Enum: "personal" "corporate"

The type of account:

  • trial
  • personal
  • corporate
licenseId
Array of strings <uid> [ items <uid > ]

A list of the licenses assigned to the account.

object

Information about the account holder.

Responses

Request samples

Content type
application/json
{
  • "username": "alex.lee",
  • "email": "user@example.com",
  • "active": true,
  • "accountType": "personal",
  • "licenseId": [
    ],
  • "userInfo": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get an account

Gets information about an account.

Authorizations:
userApiKey
path Parameters
accountId
required
integer (accountId)
Example: 89021278386

The account ID.

Responses

Response samples

Content type
application/json
{
  • "username": "alex.lee",
  • "email": "user@example.com",
  • "active": true,
  • "accountType": "personal",
  • "licenseId": [
    ],
  • "userInfo": {
    }
}

Update an account

Updates an account's information.

Authorizations:
userApiKey
path Parameters
accountId
required
integer (accountId)
Example: 89021278386

The account ID.

Request Body schema: application/json
username
required
string

The account's username.

email
required
string <email>

The account holder's email address.

active
required
boolean

If true, the account is activated on creation.

accountType
required
string
Enum: "personal" "corporate"

The type of account:

  • trial
  • personal
  • corporate
licenseId
Array of strings <uid> [ items <uid > ]

A list of the licenses assigned to the account.

object

Information about the account holder.

Responses

Request samples

Content type
application/json
{
  • "username": "alex.lee",
  • "email": "user@example.com",
  • "active": true,
  • "accountType": "personal",
  • "licenseId": [
    ],
  • "userInfo": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Remove an account

Removes an account from the active accounts database.

Note:

This endpoint soft deletes the account. It does not permanently delete the account from the accounts database.

Authorizations:
userApiKey
path Parameters
accountId
required
integer (accountId)
Example: 89021278386

The account ID.

Responses

Account Licenses

Endpoints that manage account licenses.

Get account licenses

Returns information about all licenses assigned to the given account ID.

Authorizations:
userApiKey
path Parameters
accountId
required
integer (accountId)
Example: 89021278386

The account ID.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get an account's license

Returns an account's product license information.

Authorizations:
userApiKey
path Parameters
accountId
required
integer (accountId)
Example: 89021278386

The account ID.

licenseId
required
string <uid> (licenseId)
Example: 7d56bd9d-a642-4fee-9700-0c5c60c98e26

The license's unique ID.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update an account's license

Updates the status of an account's product license.

Authorizations:
userApiKey
path Parameters
accountId
required
integer (accountId)
Example: 89021278386

The account ID.

licenseId
required
string <uid> (licenseId)
Example: 7d56bd9d-a642-4fee-9700-0c5c60c98e26

The license's unique ID.

Request Body schema: application/json
licenseId
required
string <uid>

The account's license ID.

licenseState
string
Enum: "activate" "softHold" "suspend"

The license state:

  • activate — Activate the license.
  • softHold — Suspend the license for 30 days.
  • suspend — Suspend the license indefinitely.
notes
string

An optional note about the license.

Responses

Request samples

Content type
application/json
{
  • "licenseId": "7d56bd9d-a642-4fee-9700-0c5c60c98e26",
  • "licenseState": "suspend",
  • "notes": "Account license suspended due to non-payment."
}

Response samples

Content type
application/json
{
  • "licenseStatus": "removed",
  • "message": "Removed license '7d56bd9d-a642-4fee-9700-0c5c60c98e26' from account 89021278386",
  • "license": {
    },
  • "notes": "removed due to license violation"
}

Product Licenses

Endpoints that manage product licenses.