Skip to main content

Accounts

Accounts are passive entities that store quota information for resources consumed by associated profiles. An account is created for a user when they first sign up.


Objects​

Account​

PathJSON TypeFormatDescription
idstringVersion 4 UUIDThe account ID
createdstringISO 8601 timestampThe instant at which the account was created
lastModifiedstringISO 8601 timestampThe instant at which the account was last modified
companystringThe name of the company associated with the account
ownerEmailstringEmail addressThe email address of the owner profile
ownerProfileIdstringThe ID of the owner profile
maxWorkspacesnumberUnsigned integerThe maximum number of workspaces that can be created under the account
maxRowsnumberUnsigned integerThe maximum number of managed database rows available to the account
minutesPerMonthnumberUnsigned integerThe number of pipeline run minutes available to the account per month
minutesUsednumberUnsigned integerThe number of pipeline run minutes used by the account per month
maxClientsnumberUnsigned integerThe number of API key clients available to the account

Requests​

View all accounts​

GET /api/accounts

Returns all accounts the authenticated user profile is an owner of.

Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts' -i -X GET

Response​

200 OK

Account collection with HAL links.

Example response body

View an account​

GET /api/accounts/{account-id}

Returns the account {account-id}.

Prerequisites​

  • Account {account-id} must exist
  • The authenticated user profile must be an owner of the account {account-id}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub' -i -X GET

Response​

200 OK

Account with HAL links.

Example response body

Initialise a new account​

POST /api/accounts/new

Initialises a new account.

Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/new' -i -X POST \
-H 'Content-Type: application/json'

Response​

200 OK

Account with HAL links.

Example response body

Create an account​

PUT /api/accounts/{account-id}

Creates the account {account-id}.

Prerequisites​

  • The ownerEmail must match the authenticated user profile's email address

Body​

Account resource.

{
"company" : "Test Company",
"ownerEmail" : "sit+prod+2@meltano.com"
}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"company" : "Test Company",
"ownerEmail" : "sit+prod+2@meltano.com"
}'

Response​

201 Created

Account with HAL links.

Example response body

Update an account​

PUT /api/accounts/{account-id}

Updates the account {account-id}.

Prerequisites​

  • Account {account-id} must exist
  • The authenticated user profile must be an owner of the account {account-id}

Body​

Account resource.

{
"company" : "Test Company (updated)",
"ownerEmail" : "sit+prod@meltano.com",
"maxWorkspaces" : 0,
"maxRows" : 0,
"minutesPerMonth" : 0,
"maxClients" : 0
}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"company" : "Test Company (updated)",
"ownerEmail" : "sit+prod@meltano.com",
"maxWorkspaces" : 0,
"maxRows" : 0,
"minutesPerMonth" : 0,
"maxClients" : 0
}'

Response​

200 OK

Account with HAL links.

Example response body

View all account admins​

GET /api/accounts/{account-id}/admins

Returns all admins of the account {account-id}.

Prerequisites​

  • The authenticated user profile must be an owner of the account {account-id}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub/admins' -i -X GET

Response​

200 OK

Profile collection with HAL links.

Example response body

Add an account admin​

PUT /api/accounts/{account-id}/admins/{profile-id}

Adds the profile {profile-id} as an admin of the account {account-id}.

Prerequisites​

  • The authenticated user profile must be an owner of the account {account-id}
  • Profile {profile-id} must exist
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub/admins/auth0%7C6a21dcb31409cf3514bdf167' -i -X PUT \
-H 'Content-Type: application/json'

Response​

200 OK

Account with HAL links.

Example response body

Remove an account admin​

DELETE /api/accounts/{account-id}/admins/{profile-id}

Removes the profile {profile-id} as an admin of the account {account-id}.

Prerequisites​

  • The authenticated user profile must be an owner of the account {account-id}
  • Profile {profile-id} must be an admin of the account {account-id}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub/admins/auth0%7C6a21dcb31409cf3514bdf167' -i -X DELETE

Response​

204 No Content

No response body provided.


Set an account owner​

PUT /api/accounts/{account-id}/owner/{profile-id}

Sets the profile {profile-id} as the primary owner of the account {account-id}.

Prerequisites​

  • The authenticated user profile must be an owner of the account {account-id}
  • Profile {profile-id} must be an admin of the account {account-id}
Examples
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/accounts/wlsdb-zejub/owner/auth0%7C6a21dcb31409cf3514bdf167' -i -X PUT \
-H 'Content-Type: application/json'

Response​

200 OK

Account with HAL links.

Example response body

Transfer a workspace​

PUT /api/accounts/{account-id}/workspaces/{workspace-id}/transfer

Transfers the workspace {workspace-id} to the account {account-id}.

Prerequisites​

  • The user must be the owner of the account {account-id}

Response​

200 OK

Workspace with HAL links.

Example response body

See Also​