Core System API (1.0.0)

Download OpenAPI specification:

Healthz

Healthz_checkHealthz

Responses

Auth

Auth_loginGoogle

path Parameters
provider
required
string (Auth.OAuthProviders)
Value: "google"

The OAuth2 provider to use for login.

query Parameters
c
required
string

The callback URL of the OAuth2 login. See details

r
string

The redirect URL for login callback.

Responses

Auth_refreshToken

path Parameters
refreshToken
required
string

The refresh token to use for refreshing the access token.

Responses

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "expirationTime": 0,
  • "refreshToken": "string"
}

User

User_getMe

Get the current user's information.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "username": "string",
  • "name": "string",
  • "avatarUrl": "string",
  • "roles": [
    ]
}

Unit

Unit_getAllOrganizations

Get all organizations

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unit_createOrg

Create a new unit or organization

Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

type
required
number
Value: 1
slug
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 1,
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "slug": "string"
}

Unit_addParentChild

Create a new parent-child relationship between units by linking them

Request Body schema: application/json
required
parentId
required
string <uuid> (uuid)
childId
required
string <uuid> (uuid)

Responses

Request samples

Content type
application/json
{
  • "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
  • "childId": "da54978f-5a21-4efd-948e-3959f61b037a"
}

Response samples

Content type
application/json
{
  • "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
  • "childId": "da54978f-5a21-4efd-948e-3959f61b037a"
}

Unit_removeParentChild

Remove a parent-child relationship between units by unlinking them

path Parameters
parent_id
required
string
child_id
required
string <uuid> (uuid)

Responses

Unit_getOrgById

Get a specific unit with the slug of its organization by its unique identifier

path Parameters
slug
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "slug": "string"
}

Unit_updateOrg

Update an existing unit or organization by its unique identifier

path Parameters
slug
required
string
Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

slug
required
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "slug": "string"
}

Unit_deleteOrg

Delete a specific organization by its unique identifier

path Parameters
slug
required
string

Responses

Unit_listOrgSubUnitIds

List all unit IDs, optionally filtered by parent organization ID

path Parameters
slug
required
string
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]

Unit_listOrgSubUnits

List all units, optionally filtered by parent organization ID

path Parameters
slug
required
string
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unit_createUnit

Create a new unit or organization

path Parameters
slug
required
string
Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

type
required
number
Value: 0

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_getUnitById

Get a specific unit with the slug of its organization by its unique identifier

path Parameters
slug
required
string
id
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_updateUnit

Update an existing unit or organization by its unique identifier

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
name
required
string

The name of the unit or organization

description
required
string

A brief description of the unit or organization

required
object

Metadata for the unit or organization, can include additional information like contact details, address, etc.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "metadata": { },
  • "type": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_deleteUnit

Delete a specific unit of an organization by its unique identifier

path Parameters
slug
required
string
id
required
string <uuid> (uuid)

Responses

Unit_listUnitSubUnitIds

List all unit IDs, optionally filtered by parent unit ID

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]

Unit_listUnitSubUnits

List all units, optionally filtered by parent unit ID

path Parameters
slug
required
string
id
required
string <uuid> (uuid)
query Parameters
parentId
string <uuid> (uuid)

The parent unit ID used to filter subunits by their parent-child relationship

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Unit_createUnitForm

Create a new form under a unit.

path Parameters
slug
required
string
unitId
required
string <uuid> (uuid)
Request Body schema: application/json
required
title
required
string

The title of the form.

description
required
string

The description of the form.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "description": "string",
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "lastEditor": "36717201-0d72-4dee-86ae-b634e48b6033",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Unit_listFormsByUnit

List forms under a specific unit.

path Parameters
slug
required
string
unitId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Forms

Forms_listForms

List all existing forms.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Forms_createQuestion

Create a new question for a specific form.

path Parameters
formId
required
string <uuid> (uuid)
Request Body schema: application/json
required
required
required
boolean
type
required
string (Forms.QuestionTypes)
Enum: "short_text" "long_text" "single_choice" "multiple_choice" "date"

The current types of question

label
required
string
description
required
string
order
required
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "required": true,
  • "type": "short_text",
  • "label": "string",
  • "description": "string",
  • "order": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "required": true,
  • "type": "short_text",
  • "title": "string",
  • "description": "string",
  • "order": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_listQuestions

List all the questions of a specific form.

path Parameters
formId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Forms_updateQuestion

Update an existing question by its unique identifier.

path Parameters
formId
required
string <uuid> (uuid)
questionId
required
string <uuid> (uuid)
Request Body schema: application/json
required
required
required
boolean
type
required
string (Forms.QuestionTypes)
Enum: "short_text" "long_text" "single_choice" "multiple_choice" "date"

The current types of question

label
required
string
description
required
string
order
required
integer <int32>

Responses

Request samples

Content type
application/json
{
  • "required": true,
  • "type": "short_text",
  • "label": "string",
  • "description": "string",
  • "order": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "required": true,
  • "type": "short_text",
  • "title": "string",
  • "description": "string",
  • "order": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_deleteQuestion

Delete an existing question by its unique identifier.

path Parameters
formId
required
string <uuid> (uuid)
questionId
required
string <uuid> (uuid)

Responses

Forms_updateForm

Update an existing form by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)
Request Body schema: application/json
required
title
required
string

The title of the form.

description
required
string

The description of the form.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "description": "string",
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "lastEditor": "36717201-0d72-4dee-86ae-b634e48b6033",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Forms_deleteForm

Delete an existing form by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)

Responses

Forms_getFormById

Get a specific form by its unique identifier.

path Parameters
id
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "title": "string",
  • "description": "string",
  • "unitId": "b3eb5f92-604a-46b9-9881-9d84000fd7ed",
  • "lastEditor": "36717201-0d72-4dee-86ae-b634e48b6033",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Responses

Responses_getQuestionAnswers

Get all answers for a specific question across all form responses.

path Parameters
formId
required
string <uuid> (uuid)
questionId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Responses_submitFormResponse

Submit a new response to a form.

path Parameters
formId
required
string <uuid> (uuid)
Request Body schema: application/json
required
required
Array of objects (Responses.AnswerRequest)

All answers for this form submission.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Responses_listFormResponses

List all responses for a specific form.

path Parameters
formId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "responses": [
    ]
}

Responses_getFormResponse

Get a specific response by ID.

path Parameters
formId
required
string <uuid> (uuid)
responseId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "formId": "126460ed-49b2-4c69-849a-bd8904ec5d8f",
  • "submittedBy": "a641a425-2470-49a5-92c2-5825c2833a34",
  • "questionAnswerPairs": [
    ],
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Responses_deleteFormResponse

Delete a response and all its associated data.

path Parameters
formId
required
string <uuid> (uuid)
responseId
required
string <uuid> (uuid)

Responses

Response samples

Content type
application/json
{}