Custom Fields / Definition
/v3/custom-data/definition endpoint reference.
URL: https://demo.1health.io/api/v3/custom-data/definition
APIs for defining custom fields on a business object class. Supports creating, replacing, partially updating, and retiring definitions. The tenant and application are resolved from the authenticated context; storage slots are allocated automatically.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
| /v3/custom-data/definition | GET | List all custom data definitions for an application |
| /v3/custom-data/definition | POST | Create a custom data definition |
| /v3/custom-data/definition/{id} | GET | Retrieve a custom data definition by ID |
| /v3/custom-data/definition/{id} | PUT | Replace a custom data definition |
| /v3/custom-data/definition/{id} | PATCH | Partially update a custom data definition |
| /v3/custom-data/definition/{id} | DELETE | Retire a custom data definition |
GET/v3/custom-data/definition
List all custom data definitions for an application
Overview
Returns all custom data definitions defined for the resolved application, across every business object class, within the authenticated tenant and application context.
Authorization
Bearer JWT required. See the authentication guide.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| includeFields | boolean | No | false | When true, each definition is returned together with its fields; when false only the definition metadata is returned. Defaults to false. |
| name | String | No | Optional filter that restricts the result to definitions whose name matches the given value case-insensitively (exact match, not a substring). | |
| appId | Long | No | External application the custom data belongs to. Optional; when omitted, the application is resolved from the authenticated context. | |
| page | int | No | 0 | Zero-based page number. |
| size | int | No | 50 | Page size. |
Responses
200 OK
Custom data definitions retrieved successfully.
DTO: Page
{
"data": [
{}
],
"pageNumber": 1,
"pageSize": 1,
"offset": 1001,
"emptyPage": true,
"firstPage": true,
"lastPage": true,
"numberOfElements": 1001,
"totalElements": 1001,
"totalPages": 1
}
| Field | Type | Nullable | Description |
|---|---|---|---|
| data | List | No | |
| pageNumber | int | No | |
| pageSize | int | No | |
| offset | long | No | |
| emptyPage | boolean | No | |
| firstPage | boolean | No | |
| lastPage | boolean | No | |
| numberOfElements | long | No | |
| totalElements | long | No | |
| totalPages | int | No |
Example
curl -X GET "https://demo.1health.io/api/v3/custom-data/definition" \
-H "Authorization: Bearer $TOKEN"
POST/v3/custom-data/definition
Create a custom data definition
Overview
Defines a custom data definition on a business object class together with its fields. The caller provides a definition name, the target boClassId, and the list of fields (each a business displayName and fieldType); the platform automatically allocates the next available storage slot for each field.
Authorization
Bearer JWT required. See the authentication guide.
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appId | Long | No | External application the custom data belongs to. Optional; when omitted, the application is resolved from the authenticated context. |
Request Body
Content-Type: application/json · DTO: CustomDataDefinitionRequestDTO
{
"name": "example-value",
"boClassId": "example-value",
"fields": "example-value"
}
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
| name | string | Yes | Human-readable name of the custom data definition. | |
| boClassId | integer | Yes | ID of the business object class the custom data definition is attached to. | |
| fields | array | Yes | The custom fields that make up this definition. |
Responses
201 Created
Custom field definition created successfully.
DTO: CustomDataDefinitionResponseDTO
{
"id": 1001,
"name": "example-value",
"boClassId": 1001,
"typeKey": "example-value",
"appId": 1001,
"fields": [
{}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
| id | Long | Yes | Custom data definition instance ID. |
| name | String | Yes | Human-readable name of the custom data definition. |
| boClassId | Long | Yes | ID of the business object class the custom data definition is attached to. |
| typeKey | String | Yes | Key of the business object class the custom data definition is attached to. |
| appId | Long | Yes | Owning application. |
| fields | List | Yes | The custom fields that make up this definition. |
Example
curl -X POST "https://demo.1health.io/api/v3/custom-data/definition" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -d '{"name": "example-value", "boClassId": "example-value", "fields": "example-value"}'
GET/v3/custom-data/definition/{id}
Retrieve a custom data definition by ID
Overview
Returns a single custom data definition with its fields by its ID, within the authenticated tenant and application context.
Authorization
Bearer JWT required. See the authentication guide.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Long | Yes | The ID of the custom data definition to retrieve. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appId | Long | No | External application the custom data belongs to. Optional; when omitted, the application is resolved from the authenticated context. |
Responses
200 OK
Custom data definition retrieved successfully.
DTO: CustomDataDefinitionResponseDTO
{
"id": 1001,
"name": "example-value",
"boClassId": 1001,
"typeKey": "example-value",
"appId": 1001,
"fields": [
{}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
| id | Long | Yes | Custom data definition instance ID. |
| name | String | Yes | Human-readable name of the custom data definition. |
| boClassId | Long | Yes | ID of the business object class the custom data definition is attached to. |
| typeKey | String | Yes | Key of the business object class the custom data definition is attached to. |
| appId | Long | Yes | Owning application. |
| fields | List | Yes | The custom fields that make up this definition. |
Example
curl -X GET "https://demo.1health.io/api/v3/custom-data/definition/1001" \
-H "Authorization: Bearer $TOKEN"
PUT/v3/custom-data/definition/{id}
Replace a custom data definition
Overview
Replaces the mutable properties of an existing custom data definition. Only the definition name may be changed; its fields are managed separately.
Authorization
Bearer JWT required. See the authentication guide.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Long | Yes | The ID of the custom data definition to replace. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appId | Long | No | External application the custom data belongs to. Optional; when omitted, the application is resolved from the authenticated context. |
Request Body
Content-Type: application/json · DTO: CustomDataDefinitionUpdateRequestDTO
{
"name": "example-value"
}
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
| name | string | Yes | New human-readable name of the custom data definition. Required for a full replace (PUT); optional for a partial update (PATCH), where an omitted value leaves the name unchanged. |
Responses
200 OK
Custom data definition replaced successfully.
DTO: CustomDataDefinitionResponseDTO
{
"id": 1001,
"name": "example-value",
"boClassId": 1001,
"typeKey": "example-value",
"appId": 1001,
"fields": [
{}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
| id | Long | Yes | Custom data definition instance ID. |
| name | String | Yes | Human-readable name of the custom data definition. |
| boClassId | Long | Yes | ID of the business object class the custom data definition is attached to. |
| typeKey | String | Yes | Key of the business object class the custom data definition is attached to. |
| appId | Long | Yes | Owning application. |
| fields | List | Yes | The custom fields that make up this definition. |
Example
curl -X PUT "https://demo.1health.io/api/v3/custom-data/definition/1001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -d '{"name": "example-value"}'
PATCH/v3/custom-data/definition/{id}
Partially update a custom data definition
Overview
Updates only the mutable properties provided in the request body. Properties not included are left unchanged.
Authorization
Bearer JWT required. See the authentication guide.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Long | Yes | The ID of the custom data definition to partially update. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appId | Long | No | External application the custom data belongs to. Optional; when omitted, the application is resolved from the authenticated context. |
Request Body
Content-Type: application/json · DTO: CustomDataDefinitionUpdateRequestDTO
{
"name": "example-value"
}
| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
| name | string | No | New human-readable name of the custom data definition. Required for a full replace (PUT); optional for a partial update (PATCH), where an omitted value leaves the name unchanged. |
Responses
200 OK
Custom data definition updated successfully.
DTO: CustomDataDefinitionResponseDTO
{
"id": 1001,
"name": "example-value",
"boClassId": 1001,
"typeKey": "example-value",
"appId": 1001,
"fields": [
{}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
| id | Long | Yes | Custom data definition instance ID. |
| name | String | Yes | Human-readable name of the custom data definition. |
| boClassId | Long | Yes | ID of the business object class the custom data definition is attached to. |
| typeKey | String | Yes | Key of the business object class the custom data definition is attached to. |
| appId | Long | Yes | Owning application. |
| fields | List | Yes | The custom fields that make up this definition. |
Example
curl -X PATCH "https://demo.1health.io/api/v3/custom-data/definition/1001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -d '{"name": "example-value"}'
DELETE/v3/custom-data/definition/{id}
Retire a custom data definition
Overview
Soft-deletes a custom data definition together with all of its fields. The definition and its fields are hidden from default queries but preserved for audit.
Authorization
Bearer JWT required. See the authentication guide.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Long | Yes | The ID of the custom data definition to retire. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| appId | Long | No | External application the custom data belongs to. Optional; when omitted, the application is resolved from the authenticated context. |
Responses
200 OK
Custom data definition retired successfully.
DTO: CustomDataDefinitionDeleteResponseDTO
{
"id": 1001,
"active": true,
"deletedAt": "example-value"
}
| Field | Type | Nullable | Description |
|---|---|---|---|
| id | Long | No | The ID of the deleted custom field definition. |
| active | boolean | No | Whether the definition is still active. |
| deletedAt | string | No | Timestamp when the definition was deleted, in ISO-8601 format. |
Example
curl -X DELETE "https://demo.1health.io/api/v3/custom-data/definition/1001" \
-H "Authorization: Bearer $TOKEN"
Child Routes
| Path | Methods | Summary | agents.md |
|---|---|---|---|
| /v3/custom-data/definition/type | GET | https://agents.1health.io/public/demo/api/v3/custom-data/definition/type/agents.md | |
| /v3/custom-data/definition/{id} | — | field | https://agents.1health.io/public/demo/api/v3/custom-data/definition/_id_/agents.md |
Navigation
Parent: https://agents.1health.io/public/demo/api/v3/custom-data/agents.md · Site guide: https://agents.1health.io/public/demo/api/agents.md