Discipline
Disciplines define categories of work within an organisation. Each discipline has a code, name, description, and enabled state.
Discipline Object
| Field | Type | Description |
|---|---|---|
| id | snowflake | the discipline's id |
| organisation_id | snowflake | the discipline's organisation id |
| code | string | a short code for the discipline (up to 12 characters) |
| name | string | the name of the discipline (up to 200 characters) |
| description | string | a description of the discipline |
| enabled | boolean | whether the discipline is enabled |
Get Discipline
GET /api/disciplines/{discipline.id}
Returns the discipline object for the given discipline id. Requires membership in the organisation that owns the discipline.
Error Responses
| Status Code | Description |
|---|---|
| 400 | The discipline or organisation was not found |
| 403 | The user is not a member of the organisation |
Update Discipline
PATCH /api/disciplines/{discipline.id}
Updates a discipline. Requires the MANAGE_ORGANISATION permission for the organisation.
All parameters for this method are optional. Only the fields provided will be updated.
Parameters
| Field | Type | Description |
|---|---|---|
| code | string? | a short code for the discipline (up to 12 characters) |
| name | string? | the name of the discipline (up to 200 characters) |
| description | string? | a description of the discipline |
| enabled | boolean? | whether the discipline is enabled |
Error Responses
| Status Code | Description |
|---|---|
| 400 | The discipline or organisation was not found |
| 403 | The user lacks the MANAGE_ORGANISATION permission |
List Disciplines
GET /organisations/{organisation.id}/disciplines
Returns an array of discipline objects for the organisation. Requires membership in the organisation.
Error Responses
| Status Code | Description |
|---|---|
| 400 | The organisation was not found |
| 403 | The user is not a member of the organisation |
Create Discipline
POST /organisations/{organisation.id}/disciplines
Creates a new discipline in the organisation. Requires the MANAGE_ORGANISATION permission. Returns the created discipline object.
Parameters
| Field | Type | Description |
|---|---|---|
| code | string? | a short code for the discipline (up to 12 characters) |
| name | string? | the name of the discipline (up to 200 characters) |
| description | string? | a description of the discipline |
Notes
- New disciplines are created with
enabledset totrueby default.
Error Responses
| Status Code | Description |
|---|---|
| 400 | The organisation was not found |
| 403 | The user lacks the MANAGE_ORGANISATION permission |