Create new form version
curl --request POST \
--url http://localhost:8081/protocols/{id}/forms/versionsconst options = {method: 'POST'};
fetch('http://localhost:8081/protocols/{id}/forms/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:8081/protocols/{id}/forms/versions"
response = requests.post(url)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protocolId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"questions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protocolFormId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"questionText": "<string>",
"metadata": {},
"required": true,
"weight": 123,
"position": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protocolQuestionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"optionText": "<string>",
"score": 123,
"position": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}Create new form version
Creates a new version of the protocol form (version is auto-incremented).
POST
/
protocols
/
{id}
/
forms
/
versions
Create new form version
curl --request POST \
--url http://localhost:8081/protocols/{id}/forms/versionsconst options = {method: 'POST'};
fetch('http://localhost:8081/protocols/{id}/forms/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:8081/protocols/{id}/forms/versions"
response = requests.post(url)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protocolId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"questions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protocolFormId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"questionText": "<string>",
"metadata": {},
"required": true,
"weight": 123,
"position": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protocolQuestionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"optionText": "<string>",
"score": 123,
"position": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}⌘I