Summary
Updates a form
Description
Updates a previously created JSON form, based on a supplied document ID and an object of fields to update.
Route
PUT /json-forms/forms/:id
Roles
admin
other
readonly
apiread
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
id |
string |
yes |
The ID of the form. |
options |
object |
yes |
object containing the fields to be updated |
Copied to Clipboard
{
"options": null
}
Copied to Clipboard
{
"type": "object",
"properties": {
"options": {
"title": "options",
"$ref": "formDocument#/definitions/form",
"examples": [
{
"name": "update",
"struct": {
"type": "object",
"description": "",
"items": [
{
"nodeId": "cf2a1c51-8062-434a-9224-2e8e5c00e1e7",
"type": "string",
"title": "Text 1",
"description": "",
"placeholder": "Enter text",
"required": false,
"readOnly": false,
"binding": false,
"rel": "item",
"targetPointer": "/default"
}
]
},
"schema": {
"title": "update",
"description": "",
"type": "object",
"required": [],
"properties": {
"text1": {
"type": "string",
"title": "Text 1",
"$id": "/properties/text1",
"description": ""
}
}
},
"uiSchema": {
"text1": {
"ui:placeholder": "Enter text"
}
},
"bindingSchema": {},
"validationSchema": {}
}
]
}
},
"required": [
"options"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
document |
object |
A response object containing the request status and a message |
Copied to Clipboard
{
"status": "success",
"message": "Form updated"
}
Copied to Clipboard
{
"title": "document",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"failure"
]
},
"message": {
"type": "string",
"examples": [
"Form updated"
]
}
}
}