curl --request GET \
--url https://api.ctrl-hub.com/v3/form-submission-versions \
--header 'X-Session-Token: <api-key>'import requests
url = "https://api.ctrl-hub.com/v3/form-submission-versions"
headers = {"X-Session-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Session-Token': '<api-key>'}};
fetch('https://api.ctrl-hub.com/v3/form-submission-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ctrl-hub.com/v3/form-submission-versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Session-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ctrl-hub.com/v3/form-submission-versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Session-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ctrl-hub.com/v3/form-submission-versions")
.header("X-Session-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ctrl-hub.com/v3/form-submission-versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Session-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-submission-versions",
"attributes": {
"payload": {},
"status": "draft",
"iteration": 2,
"upgrade": {
"from_schema_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discarded": [
{
"field_id": "<string>",
"value": "<unknown>"
}
]
},
"resources": [
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "images",
"attributes": {},
"relationships": {},
"meta": {}
},
"jsonapi": {
"version": "1.0"
}
}
]
},
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"latest": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_latest": true,
"short_id": "<string>",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"author": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "users"
}
},
"organisation": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "organisations"
}
},
"payload_images": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "images"
}
]
},
"payload_videos": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "videos"
}
]
},
"payload_schemes": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schemes"
}
]
},
"payload_contracts": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "scheme-contracts"
}
]
},
"payload_work_orders": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "work-orders"
}
]
},
"payload_operations": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "operations"
}
]
},
"payload_properties": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "properties"
}
]
},
"payload_users": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "users"
}
]
},
"payload_meters": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "meters"
}
]
},
"payload_vehicles": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "vehicles"
}
]
},
"payload_equipment_items": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "equipment-items"
}
]
},
"submission": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-submissions"
}
},
"schema": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-schemas"
}
},
"form": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "forms"
}
},
"scheme_shares": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "scheme-shares"
}
]
}
}
}
],
"meta": {
"pagination": {
"counts": {
"pages": 1,
"resources": 1
},
"current_page": 1,
"offsets": {
"next": null,
"previous": null
},
"requested": {
"limit": 10,
"offset": 0
}
},
"features": {
"include": {
"options": [
"related.resource"
]
}
}
},
"jsonapi": {
"version": "1.0"
},
"included": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "forms",
"attributes": {
"name": "<string>",
"description": "<string>",
"status": "draft"
},
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"counts": {
"schemas": 0,
"categories": 0,
"submissions": 0,
"submission_versions": 0
}
},
"relationships": {
"organisation": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "organisations"
}
},
"categories": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-categories"
}
]
},
"schemas": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-schemas"
}
]
},
"author": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "users"
}
},
"workflow": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "workflow-definitions"
}
},
"latest_schema": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-schemas"
}
},
"submissions": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-submissions"
}
]
}
}
}
]
}{
"id": "98ca4a78-b66f-4234-9719-aaf832ee6669",
"status": "400",
"title": "A validation error was encountered",
"source": {
"parameter": "include"
},
"meta": {
"resource": "wrong_value"
}
}{
"id": "05fc9c8d-73b9-4697-9337-57f7a567a48f",
"status": "401",
"title": "You are not authorised to access this resource",
"detail": "In order to access this resource, you need the 'admin' role.",
"code": "AUTH.001"
}{
"id": "fe9d9a69-f0a7-4fdc-bb2c-176027f316c5",
"status": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred on the server."
}Get all versions of form submissions
List all of the submission versions.
curl --request GET \
--url https://api.ctrl-hub.com/v3/form-submission-versions \
--header 'X-Session-Token: <api-key>'import requests
url = "https://api.ctrl-hub.com/v3/form-submission-versions"
headers = {"X-Session-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Session-Token': '<api-key>'}};
fetch('https://api.ctrl-hub.com/v3/form-submission-versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ctrl-hub.com/v3/form-submission-versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Session-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ctrl-hub.com/v3/form-submission-versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Session-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ctrl-hub.com/v3/form-submission-versions")
.header("X-Session-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ctrl-hub.com/v3/form-submission-versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Session-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-submission-versions",
"attributes": {
"payload": {},
"status": "draft",
"iteration": 2,
"upgrade": {
"from_schema_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discarded": [
{
"field_id": "<string>",
"value": "<unknown>"
}
]
},
"resources": [
{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "images",
"attributes": {},
"relationships": {},
"meta": {}
},
"jsonapi": {
"version": "1.0"
}
}
]
},
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"latest": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_latest": true,
"short_id": "<string>",
"superseded_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"superseded_at": "2023-11-07T05:31:56Z"
},
"relationships": {
"author": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "users"
}
},
"organisation": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "organisations"
}
},
"payload_images": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "images"
}
]
},
"payload_videos": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "videos"
}
]
},
"payload_schemes": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "schemes"
}
]
},
"payload_contracts": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "scheme-contracts"
}
]
},
"payload_work_orders": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "work-orders"
}
]
},
"payload_operations": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "operations"
}
]
},
"payload_properties": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "properties"
}
]
},
"payload_users": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "users"
}
]
},
"payload_meters": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "meters"
}
]
},
"payload_vehicles": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "vehicles"
}
]
},
"payload_equipment_items": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "equipment-items"
}
]
},
"submission": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-submissions"
}
},
"schema": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-schemas"
}
},
"form": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "forms"
}
},
"scheme_shares": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "scheme-shares"
}
]
}
}
}
],
"meta": {
"pagination": {
"counts": {
"pages": 1,
"resources": 1
},
"current_page": 1,
"offsets": {
"next": null,
"previous": null
},
"requested": {
"limit": 10,
"offset": 0
}
},
"features": {
"include": {
"options": [
"related.resource"
]
}
}
},
"jsonapi": {
"version": "1.0"
},
"included": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "forms",
"attributes": {
"name": "<string>",
"description": "<string>",
"status": "draft"
},
"meta": {
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"counts": {
"schemas": 0,
"categories": 0,
"submissions": 0,
"submission_versions": 0
}
},
"relationships": {
"organisation": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "organisations"
}
},
"categories": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-categories"
}
]
},
"schemas": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-schemas"
}
]
},
"author": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "users"
}
},
"workflow": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "workflow-definitions"
}
},
"latest_schema": {
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-schemas"
}
},
"submissions": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "form-submissions"
}
]
}
}
}
]
}{
"id": "98ca4a78-b66f-4234-9719-aaf832ee6669",
"status": "400",
"title": "A validation error was encountered",
"source": {
"parameter": "include"
},
"meta": {
"resource": "wrong_value"
}
}{
"id": "05fc9c8d-73b9-4697-9337-57f7a567a48f",
"status": "401",
"title": "You are not authorised to access this resource",
"detail": "In order to access this resource, you need the 'admin' role.",
"code": "AUTH.001"
}{
"id": "fe9d9a69-f0a7-4fdc-bb2c-176027f316c5",
"status": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred on the server."
}Authorizations
Session token for authentication.
Query Parameters
A comma separated list of related resources to include.
author, form, organisation, schema, submission, payload_images, payload_videos, payload_operations, payload_work_orders, payload_schemes, payload_contracts, payload_properties, payload_users, payload_meters, payload_vehicles, payload_equipment_items, scheme_shares Filters the response data based on the value provided.
Available filters:
in(submission,[xxx]): Filter submission versions by submission ID(s), e.g.eq(submission,xxx)for every version of one submissionin(id,[xxx]): Filter by submission ID(s). Matches the same field assubmission, not the version's own IDin(form,[xxx]): Filter submission versions by form ID(s)in(schema,[xxx]): Filter submission versions by the schema they were captured onin(organisation,[xxx]): Filter submission versions by organisation ID(s)in(author.id,[xxx]): Filter submission versions by author ID(s)status: Filter bydraftorsubmitted, e.g.eq(status,submitted)eq(is_latest,true): Filter for the latest version of each submission onlyge(created_at,<date-time>): Filter submission versions created at or after an RFC 3339 timestample(created_at,<date-time>): Filter submission versions created at or before an RFC 3339 timestampin(related_resources.id,[xxx]): Filter submission versions by related resource ID(s)in(scheme_shares,[xxx]): Filter submission versions by scheme share ID(s)
For more information on using named filters, see the docs
Limit the number of resources returned by the API
x >= 1Offset the resources returned by the API
x >= 0JSON:API pagination, as page[limit] and page[offset]. The same as the top-level limit and offset parameters; when both forms are sent, page[...] wins.
Show child attributes
Show child attributes
A comma separated list of fields to sort by.
created_at, -created_at Response
Get a list of submission versions.
JSON API response object
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Related resources that can be included when a form submission version is returned
A form
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
Show child attributes
Show child attributes