Browse Questionnaires
curl --request GET \
--url https://api.{tenant}.getomneo.com/api/v3/questionnairesimport requests
url = "https://api.{tenant}.getomneo.com/api/v3/questionnaires"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.{tenant}.getomneo.com/api/v3/questionnaires', 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.{tenant}.getomneo.com/api/v3/questionnaires",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.{tenant}.getomneo.com/api/v3/questionnaires"
req, _ := http.NewRequest("GET", url, nil)
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.{tenant}.getomneo.com/api/v3/questionnaires")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/questionnaires")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"name": "<string>",
"handle": "<string>",
"description": "<string>",
"questionnaireable_type": "<string>",
"questionnaireable_id": "<string>",
"profile_id": "<string>",
"purpose": "<string>",
"is_active": true,
"meta": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"pages": [
{
"id": 123,
"questionnaire_version_id": 123,
"sort_order": 123,
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"section_header": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"questions": [
{
"id": 123,
"questionnaire_question_id": 123,
"questionnaire_id": "<string>",
"questionnaire_page_id": 123,
"question_id": 123,
"question_version_id": 123,
"mapping_key": "<string>",
"sort_order": 123,
"is_required": true,
"visibility_condition": [
"<unknown>"
],
"visibility_dependencies": [
"<unknown>"
],
"is_active": true,
"question": {
"id": "<string>",
"handle": "<string>",
"name": "<string>",
"link_type": "<string>",
"link_target": "<string>",
"link_write_policy": "<string>"
},
"version": {
"id": "<string>",
"version": "<string>",
"label": "<string>",
"description": "<string>",
"help_text": "<string>",
"icon": "<string>",
"image_url": "<string>",
"type": "<string>",
"options": "<string>",
"validation": "<string>",
"default_value": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
]
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Questionnaire
Browse Questionnaires
A GET to the /questionnaires endpoint allows your application to retrieve all questionnaire records.
GET
/
v3
/
questionnaires
Browse Questionnaires
curl --request GET \
--url https://api.{tenant}.getomneo.com/api/v3/questionnairesimport requests
url = "https://api.{tenant}.getomneo.com/api/v3/questionnaires"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.{tenant}.getomneo.com/api/v3/questionnaires', 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.{tenant}.getomneo.com/api/v3/questionnaires",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.{tenant}.getomneo.com/api/v3/questionnaires"
req, _ := http.NewRequest("GET", url, nil)
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.{tenant}.getomneo.com/api/v3/questionnaires")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/questionnaires")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"name": "<string>",
"handle": "<string>",
"description": "<string>",
"questionnaireable_type": "<string>",
"questionnaireable_id": "<string>",
"profile_id": "<string>",
"purpose": "<string>",
"is_active": true,
"meta": [
"<unknown>"
],
"created_at": "<string>",
"updated_at": "<string>",
"pages": [
{
"id": 123,
"questionnaire_version_id": 123,
"sort_order": 123,
"title": "<string>",
"description": "<string>",
"image_url": "<string>",
"section_header": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"questions": [
{
"id": 123,
"questionnaire_question_id": 123,
"questionnaire_id": "<string>",
"questionnaire_page_id": 123,
"question_id": 123,
"question_version_id": 123,
"mapping_key": "<string>",
"sort_order": 123,
"is_required": true,
"visibility_condition": [
"<unknown>"
],
"visibility_dependencies": [
"<unknown>"
],
"is_active": true,
"question": {
"id": "<string>",
"handle": "<string>",
"name": "<string>",
"link_type": "<string>",
"link_target": "<string>",
"link_write_policy": "<string>"
},
"version": {
"id": "<string>",
"version": "<string>",
"label": "<string>",
"description": "<string>",
"help_text": "<string>",
"icon": "<string>",
"image_url": "<string>",
"type": "<string>",
"options": "<string>",
"validation": "<string>",
"default_value": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
]
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Filtering
This endpoint accepts
filter and sort query parameters. See Filtering, sorting, and search for paging and for the shared search_with, custom_field, and json_contains filters.Examples
curl -X GET "https://api.[tenant].getomneo.com/api/v3/questionnaires?filter[handle]={handle}" \
-H "Authorization: Bearer ${TOKEN}"
curl -X GET "https://api.[tenant].getomneo.com/api/v3/questionnaires?filter[name][nullable]=0" \
-H "Authorization: Bearer ${TOKEN}"
Operators
| Operator | Meaning | Example |
|---|---|---|
eq | Equal to. Applied when you give no operator. | filter[handle]={handle} |
ne | Not equal to. | filter[handle][ne]={handle} |
gt | Greater than. | filter[handle][gt]={handle} |
gte | Greater than or equal to. | filter[handle][gte]={handle} |
lt | Less than. | filter[handle][lt]={other-handle} |
lte | Less than or equal to. | filter[handle][lte]={other-handle} |
in | Matches any value in a comma separated list. | filter[questionnaireable_id][in]=123,456 |
not_in | Excludes every value in a comma separated list. | filter[questionnaireable_id][not_in]=123,456 |
nullable | 1 returns records where the attribute is empty. Any other value returns records where it is set. | filter[name][nullable]=1 |
not_has operator applies to related attributes, which this endpoint does not have.
Filter attributes
| Attribute | Attribute | Attribute |
|---|---|---|
name | handle | description |
questionnaireable_type | questionnaireable_id | profile_id |
purpose | is_active | current_version_id |
meta |
sort key, for example ?sort=-name for descending order.
Custom field filters
Questionnaire records carry custom fields, so this endpoint also acceptsfilter[custom_field][namespace:handle].
curl -X GET "https://api.[tenant].getomneo.com/api/v3/questionnaires?filter[custom_field][{namespace}:{handle}]={value}" \
-H "Authorization: Bearer ${TOKEN}"
⌘I