The REST API provides a number of operations to work with Concord forms:
Returns a list of currently available forms for a specific process.
/api/v1/process/${instanceId}/form
GET
Authorization
${instanceId}
Content-Type: application/json
[
{ "name": "myForm", "custom": false, ... },
{ "name": "myOtherForm", ... },
]
Returns data of a form, including the form’s fields and their values.
/api/v1/process/${instanceId}/form/${formName}
GET
Authorization
${instanceId}
Name of the form: ${formName}
Content-Type: application/json
{
"processInstanceId": "...",
"name": "myForm",
...,
"fields": [
{ "name": "...", "type": "..." }
]
}
Submits the provided JSON data as form values. The process resumes if the data passes the validation.
/api/v1/process/${instanceId}/form/${formName}
POST
Authorization
, Content-Type: application/json
{
"myField": "myValue",
...
}
A JSON object where keys must match the form’s field values.
Success response
Content-Type: application/json
{
"ok": true
}
Validation errors response
Content-Type: application/json
{
"ok": false,
"errors": {
"myField": "..."
}
}
Submits the provided multipart/form-data
request as form values. The process
resumes if the data passes the validation. This endpoint can be used to submit
file
fields (upload a file).
Note the multipart
extension in the endpoint’s URL.
/api/v1/process/${instanceId}/form/${formName}/multipart
POST
Authorization
, Content-Type: multipart/form-data
Body
A multipart/form-data
body where each part corresponds to one of
the form’s fields.
Success response
Content-Type: application/json
{
"ok": true
}
Validation errors response
Content-Type: application/json
{
"ok": false,
"errors": {
"myField": "..."
}
}
curl -i -H "Authorization: ..." \
-F myValue=abc \
-F myFile=@form.yml \
https://concord.example.com/api/v1/process/361bec22-14eb-4063-a26d-0eb7e6d4654e/form/myForm/multipart