Accounts
This section details the calls needed to provide a listing of accounts the user has access to.
GET /user/{id}/accountrights
__
Details
Description
Parameters
Path Parameters
| Name | Description | Required | Type |
|---|---|---|---|
|
✔ |
Long |
Return Type
set[AccountRight]
| Field Name | Required | Type | Description | Format |
|---|---|---|---|---|
accountInvitationState |
✘ |
String |
Enum: PENDING, ACCEPTED, PENDING_AWAITING_2FA, ACCEPTED_AWAITING_2FA, EXPIRED, |
|
humanName |
✘ |
String |
||
id |
✘ |
Long |
int64 |
|
name |
✘ |
String |
||
ownerId |
✘ |
Long |
int64 |
|
ownerUsername |
✘ |
String |
||
productionInvitationState |
✘ |
String |
Enum: PENDING, ACCEPTED, PENDING_AWAITING_2FA, ACCEPTED_AWAITING_2FA, EXPIRED, |
|
rights |
✘ |
Set of AccountPermission |
||
subscriptionStatus |
✘ |
String |
Enum: trialing, trial_ended, assessing, active, soft_failure, past_due, suspended, canceled, unpaid, expired, delayed_cancel, unlinked, |
|
twoFactorAuthenticationRequired |
✘ |
Boolean |
||
userId |
✘ |
Long |
int64 |
Content Type
-
application/json
Responses
| Code | Description | Datatype |
|---|---|---|
0 |
default response |
Set[ |
The call returns an array of objects like this:
[
{
"humanName": "John Doe",
"id": 63625,
"ownerId": 118302,
"ownerUsername": "jdoe",
"rights": [
"ACCOUNT_VIEW",
"ACCOUNT_MANAGE",
"ACCOUNT_CREATE_PRODUCTION"
],
"subscriptionStatus": "canceled",
"twoFactorAuthenticationRequired": false,
"userId": 3
}
]
The id is the accountId and will be needed in subsequent calls.
The subscriptionStatus gives the status of the subscription. You will notice the call also returns accounts that shouldn’t be shown because their status is canceled, expired, suspended or trial_ended. These should be filtered out so they are not listed.
To get the account name like it is shown in Limecraft Flow, it should be calculated like this:
getName(a) {
return (a.accountHumanName || a.accountName || a.ownerUsername || `Account #${a.id}`);
}
The account listing in Limecraft Flow will also use the account’s configured color and header image. These can be requested for an individual account at GET /api/account/:accountId/branding.
GET /account/{accountId}/branding
__
Details
Description
Parameters
Path Parameters
| Name | Description | Required | Type |
|---|---|---|---|
|
✔ |
Long |
Return Type
AccountBranding
| Field Name | Required | Type | Description | Format |
|---|---|---|---|---|
accountId |
✘ |
Long |
int64 |
|
brandingWebsiteLink |
✘ |
String |
||
customCssVars |
✘ |
String |
||
defaultMailSupportEmail |
✘ |
String |
||
headerBackgroundColor |
✘ |
String |
||
headerLogoUrl |
✘ |
String |
||
headerText |
✘ |
String |
||
helpCenterLink |
✘ |
String |
||
privacyStatementLink |
✘ |
String |
||
workspaceTypeDeliveryEnabled |
✘ |
String |
||
workspaceTypeProductionEnabled |
✘ |
String |
Content Type
-
application/json
Responses
| Code | Description | Datatype |
|---|---|---|
0 |
default response |
|
The result is an object with some settings. The image, if set, is under the headerLogoUrl key. The color, if set, is under the headerBackgroundColor key.