Enumeration Types
- Last UpdatedJul 22, 2024
- 10 minute read
List Enumerations
Returns an array of Enumerations in a given namespace and the version ETag in the HTTP response header. The If-Match and If-None-Match headers are supported.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations
?skip={skip}&count={count}&filter={filter}&includeDeleted={includeDeleted}
Parameters
string tenantId
string namespaceId
[optional] integer skip
Parameter representing the zero-based offset of the first object to retrieve. If unspecified, a default value of 0 is used.[optional] integer count
Parameter representing the maximum number of objects to retrieve. If unspecified, a default value of 100 is used.[optional] string filter
Parameter representing the condition for results to be filtered by. If unspecified, results are not filtered.[optional] boolean includeDeleted
Parameter indicating whether to include deleted Enumeration members. If unspecified, a default value of false is used.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Enumeration[] | Success. |
| 304 | None | Not modified. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 412 | AdhErrorResponse | Precondition failed. |
Example response body
200 Response
[
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
]
400 Response (AdhErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
Create Enumeration With Server Generated Id
Creates a new Enumeration. Response includes ETag header.
Request
POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations
Parameters
string tenantId
string namespaceId
Request Body
An Enumeration.
{
"Name": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"Code": 0
},
{
"Name": "CLOSED",
"Code": 1
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 201 | Enumeration | Created. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 409 | AdhErrorResponse | Conflict |
Example response body
201 Response
{
"Id": "6B29FC40-CA47-1067-B31D-00DD010662DA",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
400 Response (AdhErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
Get Enumeration By Id
Returns the specified Enumeration and the version ETag in the HTTP response header. The If-Match and If-None-Match headers are supported.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}
?includeDeleted={includeDeleted}
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.boolean includeDeleted
Parameter indicating whether to include deleted Enumeration members. If unspecified, a default value of false is used.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Enumeration | Success. |
| 304 | None | Not modified. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
| 412 | AdhErrorResponse | Precondition failed. |
Example response body
200 Response
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
400 Response (AdhErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
Get Or Create Enumeration
Creates a new Enumeration or returns the current one if the body is equivalent to what is stored. Response includes ETag header.
Request
POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Request Body
An Enumeration.
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"Code": 0
},
{
"Name": "CLOSED",
"Code": 1
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Enumeration | Success. |
| 201 | Enumeration | Created. |
| 302 | None | Found. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 409 | AdhErrorResponse | Conflict. |
Example response body
200 Response
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
201 Response
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
400 Response (AdhErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
Create Or Update Enumeration
Creates a new Enumeration or updates an existing and adds its Etag in the HTTP response header. Hard delete of the type is not supported through this route. The If-Match header is supported.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Request Body
An Enumeration.
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"Code": 0
},
{
"Name": "CLOSED",
"Code": 1
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Enumeration | Success. |
| 201 | Enumeration | Created. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 409 | AdhErrorResponse | Conflict. |
| 412 | AdhErrorResponse | Precondition failed. |
Example response body
200 Response
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
201 Response
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
400 Response (AdhErrorResponse)
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
Delete Enumeration By Id
Deletes the Enumeration.
Request
DELETE /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Deleted. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
| 409 | AdhErrorResponse | Conflict. |
Bulk Create Enumeration
Creates multiple new Enumeration and returns a list of any errors along with the created objects. Response includes ETag header.
Request
POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Bulk/Enumerations
Parameters
string tenantId
string namespaceId
Request Body
A list of Enumeration objects.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Enumeration | Success. |
| 207 | MultiStatusResultOfEnumerationAndAdhErrorResponse | Partial. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 409 | AdhErrorResponse | Conflict. |
Example response body
200 Response
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
207 Response (MultiStatusResultOfEnumerationAndAdhErrorResponse)
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
],
"ChildErrors": [
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
]
}
Bulk Delete Enumeration
Deletes multiple Enumerations and returns an Ok if successful. In the case where a deletion is invalid, it will be added to a child errors list while the ones that were successful will be returned in the data.
Request
DELETE /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Bulk/Enumerations
Parameters
string tenantId
string namespaceId
Request Body
A list of Enumeration object ids.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Enumeration[] | Success. |
| 207 | MultiStatusResultOfEnumerationAndAdhErrorResponse | Partial. |
| 400 | AdhErrorResponse | Missing or invalid inputs. |
| 403 | AdhErrorResponse | Forbidden. |
| 409 | AdhErrorResponse | Conflict. |
Example response body
200 Response
[
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
]
207 Response (MultiStatusResultOfEnumerationAndAdhErrorResponse)
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
],
"ChildErrors": [
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
]
}
Get Enumeration Acl By Id
Returns the AccessControlList for the specified Enumeration.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}/AccessControl
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AccessControlList | Success. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
Example response body
200 Response (AccessControlList)
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
Update Enumeration Acl By Id
Updates and returns the AccessControlList for the specified Enumeration.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}/AccessControl
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Request Body
An AccessControlList.
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 3,
"ObjectId": "11111111-1111-1111-1111-111111111111"
},
"AccessRights": 3
},
{
"Trustee": {
"Type": 3,
"ObjectId": "22222222-2222-2222-1111-111111111111"
},
"AccessRights": 15
}
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AccessControlList | Success. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
Example response body
200 Response (AccessControlList)
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
Get Enumeration Owner By Id
Returns the Trustee for the specified Enumeration.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}/Owner
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Trustee | Success. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
Example response body
200 Response (Trustee)
{
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
}
Update Enumeration Owner By Id
Updates and returns the Trustee for the specified Enumeration.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}/Owner
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Request Body
A Trustee.
{
"Type": 1,
"TenantId": "55555555-5555-5555-5555-555555555555",
"ObjectId": "44444444-4444-4444-4444-444444444444"
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Trustee | Success. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
Example response body
200 Response (Trustee)
{
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
}
List Enumeration Access Rights By Id
Returns a list of CommonAccessRights for the specified Enumeration.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Enumerations/{id}/AccessRights
Parameters
string tenantId
string namespaceId
string id
The id of the Enumeration.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Inline | Success. |
| 403 | AdhErrorResponse | Forbidden. |
| 404 | AdhErrorResponse | Enumeration not found. |
Definitions
Enumeration
Represents an Enumeration object.
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Name | string | false | true | The name of this object |
| GraphQLName | string | false | true | The name of this object as it appears in GraphQL |
| Version | int32 | false | false | The current version number of this object |
| Id | string | false | true | The id which is used in lookup |
| State | LifeCycleState | false | false | The lifecycle state of this object |
| CreatedDate | date-time | false | true | Date this object was created |
| ModifiedDate | date-time | false | true | The last time this object was modified |
| Description | string | false | true | Description of what this object is |
| Members | [EnumerationState] | false | true | List of all the states the Enumeration can be in. |
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
LifeCycleState
Enumerated Values
| Property | Value |
|---|---|
| Active | 0 |
| Deprecated | 1 |
| Deleted | 2 |
EnumerationState
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Name | string | false | true | The name of this EnumerationState |
| GraphQLName | string | false | true | The name of this EnumerationState as it appears in GraphQL |
| Code | int32 | false | false | The code the enumeration state is associated with. Must be non-negative and unique |
| State | LifeCycleState | false | false | The lifecycle state of this EnumerationState |
| Description | string | false | true | Description of what this EnumerationState is for |
{
"Name": "string",
"GraphQLName": "string",
"Code": 0,
"State": 0,
"Description": "string"
}
AdhErrorResponse
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | An optional unique string used to identify an operation |
| Error | string | false | true | Description of the error |
| Reason | string | false | true | Short blurb on why the error occured |
| Resolution | string | false | true | Short blurb on how to fix the error |
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
MultiStatusResultOfEnumerationAndAdhErrorResponse
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Reason | string | false | false | Short blurb on why the error occured |
| Error | string | false | false | Description of the error |
| OperationId | string | false | false | An optional unique string used to identify an operation |
| Data | [Enumeration] | false | false | List of data returned from the multi-calls |
| ChildErrors | [AdhErrorResponse] | false | false | List of errors from all the multi-calls |
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
{
"Id": "SimpleEnumeration",
"Name": "SimpleEnumeration",
"GraphQLName": "SimpleEnumeration",
"Members": [
{
"Name": "ACTIVE",
"GraphQLName": "ACTIVE",
"Code": 0,
"State": "Active",
"Description": "This is an active state"
},
{
"Name": "CLOSED",
"GraphQLName": "CLOSED",
"Code": 1,
"State": "Active",
"Description": "This is a closed state"
}
],
"Version": 1,
"State": "Active",
"CreatedDate": "0001-01-01T00:00:00Z",
"ModifiedDate": "0001-01-01T00:00:00Z"
}
],
"ChildErrors": [
{
"OperationId": "string",
"Error": "string",
"Reason": "string",
"Resolution": "string",
"property1": null,
"property2": null
}
]
}
AccessControlList
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| RoleTrusteeAccessControlEntries | [AccessControlEntry] | false | true | None |
{
"RoleTrusteeAccessControlEntries": [
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
]
}
AccessControlEntry
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Trustee | Trustee | false | true | None |
| AccessType | AccessType | false | false | None |
| AccessRights | int64 | false | false | None |
{
"Trustee": {
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
},
"AccessType": 0,
"AccessRights": 0
}
Trustee
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Type | TrusteeType | false | false | None |
| ObjectId | string | false | true | None |
| TenantId | string | false | true | None |
{
"Type": 1,
"ObjectId": "string",
"TenantId": "string"
}
TrusteeType
Enumerated Values
| Property | Value |
|---|---|
| User | 1 |
| Client | 2 |
| Role | 3 |
AccessType
Enumerated Values
| Property | Value |
|---|---|
| Allowed | 0 |
| Denied | 1 |