List an SA form's versions
curl --request GET \
--url https://api.eka.care/protocol/workflow/sa-forms/{id}/versions \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/protocol/workflow/sa-forms/{id}/versions"
headers = {"auth": "<auth>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/protocol/workflow/sa-forms/{id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.eka.care/protocol/workflow/sa-forms/{id}/versions")
.header("auth", "<auth>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/protocol/workflow/sa-forms/{id}/versions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/protocol/workflow/sa-forms/{id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"_id": "<string>",
"form_id": "<string>",
"bid": "<string>",
"version": 123,
"name": "<string>",
"description": "<string>",
"score": {
"name": "<string>"
},
"questions": [
{
"key": "<string>",
"kind": "number",
"label": "<string>",
"required": true,
"options": [
"<string>"
],
"show_when": {
"question": "<string>",
"op": "is",
"value": "<string>"
},
"scores": [
123
],
"rev": 123
}
],
"changes": [
"<string>"
],
"saved_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"saved_at": "2023-11-07T05:31:56Z"
}
]
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Forms
List an SA form's versions
GET
/
protocol
/
workflow
/
sa-forms
/
{id}
/
versions
List an SA form's versions
curl --request GET \
--url https://api.eka.care/protocol/workflow/sa-forms/{id}/versions \
--header 'auth: <auth>'import requests
url = "https://api.eka.care/protocol/workflow/sa-forms/{id}/versions"
headers = {"auth": "<auth>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {auth: '<auth>'}};
fetch('https://api.eka.care/protocol/workflow/sa-forms/{id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.eka.care/protocol/workflow/sa-forms/{id}/versions")
.header("auth", "<auth>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/protocol/workflow/sa-forms/{id}/versions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/protocol/workflow/sa-forms/{id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["auth"] = '<auth>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"_id": "<string>",
"form_id": "<string>",
"bid": "<string>",
"version": 123,
"name": "<string>",
"description": "<string>",
"score": {
"name": "<string>"
},
"questions": [
{
"key": "<string>",
"kind": "number",
"label": "<string>",
"required": true,
"options": [
"<string>"
],
"show_when": {
"question": "<string>",
"op": "is",
"value": "<string>"
},
"scores": [
123
],
"rev": 123
}
],
"changes": [
"<string>"
],
"saved_by": {
"oid": "<string>",
"name": "<string>",
"ps": "D",
"s": "<string>"
},
"saved_at": "2023-11-07T05:31:56Z"
}
]
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Was this page helpful?

