Skip to main content

Get User Forms

Endpoint: GET /api/human/template

Lists all user form details stored in the Conductor server, or gets a particular user form’s details by name and version.

Query parameters

Add the following query parameters only if a particular user form is to be retrieved.

ParameterDescriptionTypeRequired/ Optional
nameThe user form name to be retrieved.stringOptional.
versionThe version of the user form to be retrieved.integerOptional.

Response

Returns an array of user form details.

Examples

Get all user forms

Request

curl -X 'GET' \
'https://<YOUR_CLUSTER>/api/human/template? \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'

Response

[
{
"createTime": 1721621243092,
"updateTime": 1723805020725,
"createdBy": "USER:user@example.com",
"updatedBy": "USER:user@example.com",
"name": "ExpenseApproval",
"version": 1,
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"expenseName": {
"type": "string"
},
"expenseAmt": {
"type": "number"
},
"approve": {
"type": "boolean"
},
"approveReason": {
"type": "string"
}
},
"required": ["expenseName", "expenseAmt", "approve"]
},
"templateUI": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/expenseName",
"label": "Expense",
"options": {
"readonly": true
}
},
{
"type": "Control",
"scope": "#/properties/expenseAmt",
"label": "Amount",
"options": {
"readonly": true
}
},
{
"type": "Control",
"scope": "#/properties/approve",
"label": "Approved?",
"options": {}
},
{
"type": "Control",
"scope": "#/properties/approveReason",
"label": "Comments"
}
]
}
},
{
"createTime": 1736938788768,
"updateTime": 1736938788768,
"createdBy": "USER:user@example.com",
"updatedBy": "USER:user@example.com",
"name": "someForm",
"version": 2,
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"vegetable": {
"type": "string",
"enum": ["potatoes", "carrots", "celery", "apple", "banana"]
}
}
},
"templateUI": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/vegetable",
"label": "Pick a vegetable or fruit",
"options": {}
}
]
}
},
{
"createTime": 1736938081924,
"updateTime": 1736940939545,
"createdBy": "USER:user@example.com",
"updatedBy": "USER:user@example.com",
"name": "someForm",
"version": 1,
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"vegetable": {
"type": "string",
"enum": ["potatoes", "carrots"]
}
}
},
"templateUI": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/vegetable",
"label": "Pick one",
"options": {}
}
]
}
}
]
Get all versions of a user form

Request

curl -X 'GET' \
'https://<YOUR_CLUSTER>/api/human/template?name=someForm \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'

Response

[
{
"createTime": 1736938788768,
"updateTime": 1736938788768,
"createdBy": "USER:user@example.com",
"updatedBy": "USER:user@example.com",
"name": "someForm",
"version": 2,
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"vegetable": {
"type": "string",
"enum": ["potatoes", "carrots", "celery", "apple", "banana"]
}
}
},
"templateUI": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/vegetable",
"label": "Pick a vegetable or fruit",
"options": {}
}
]
}
},
{
"createTime": 1736938081924,
"updateTime": 1736940939545,
"createdBy": "USER:user@example.com",
"updatedBy": "USER:user@example.com",
"name": "someForm",
"version": 1,
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"vegetable": {
"type": "string",
"enum": ["potatoes", "carrots"]
}
}
},
"templateUI": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/vegetable",
"label": "Pick one",
"options": {}
}
]
}
}
]
Get one version of a user form

Request

curl -X 'GET' \
'https://<YOUR_CLUSTER>/api/human/template?name=someForm&version=2 \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'

Response

[
{
"createTime": 1736938788768,
"updateTime": 1736938788768,
"createdBy": "USER:user@example.com",
"updatedBy": "USER:user@example.com",
"name": "someForm",
"version": 2,
"jsonSchema": {
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"vegetable": {
"type": "string",
"enum": ["potatoes", "carrots", "celery", "apple", "banana"]
}
}
},
"templateUI": {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/vegetable",
"label": "Pick a vegetable or fruit",
"options": {}
}
]
}
}
]