Get form by id
curl --request GET \
--url https://api.octaviatech.app/cms/forms/getById/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.octaviatech.app/cms/forms/getById/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.octaviatech.app/cms/forms/getById/{id}', 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.octaviatech.app/cms/forms/getById/{id}",
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-api-key: <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.octaviatech.app/cms/forms/getById/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.octaviatech.app/cms/forms/getById/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octaviatech.app/cms/forms/getById/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 123,
"message": "<string>",
"data": {
"form": {
"_id": "<string>",
"title": {},
"slug": "<string>",
"sections": [
{
"title": {},
"fields": [
{
"name": "<string>",
"type": "text",
"label": {},
"required": true,
"options": [
{
"value": "<string>",
"label": {}
}
],
"validation": {},
"multiple": true,
"accept": "<string>",
"colSpan": 123,
"icon": "<string>",
"disabled": true,
"verified": true,
"defaultValue": "<unknown>",
"placeholder": {},
"relation": {
"relatedFormId": "<string>",
"relationType": "one-to-one"
},
"relationDetails": {
"relatedForm": {
"_id": "<string>",
"slug": "<string>",
"title": {},
"formType": "public"
}
}
}
],
"icon": "<string>",
"description": {}
}
],
"tenantId": "<string>",
"description": {},
"submitButtonText": {},
"formType": "public",
"notification": {
"enabled": true,
"email": {
"admin": {
"enabled": true,
"recipients": [
"<string>"
],
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
},
"submitter": {
"enabled": true,
"recipientFieldName": "<string>",
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
}
},
"push": {
"admin": {
"enabled": true,
"userIds": [
"<string>"
],
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
},
"submitter": {
"enabled": true,
"userIdFieldName": "<string>",
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
}
}
},
"captcha": {
"enabled": true,
"provider": "recaptcha",
"minScore": 123
},
"relation": {
"parentFormId": "<string>",
"nextFormId": "<string>"
},
"relationDetails": {
"parentForm": {
"_id": "<string>",
"slug": "<string>",
"title": {},
"formType": "public"
},
"nextForm": {
"_id": "<string>",
"slug": "<string>",
"title": {},
"formType": "public"
}
},
"createdBy": "<string>",
"isActive": true,
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}Forms
Get form by id
Requires auth.
GET
/
forms
/
getById
/
{id}
Get form by id
curl --request GET \
--url https://api.octaviatech.app/cms/forms/getById/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.octaviatech.app/cms/forms/getById/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.octaviatech.app/cms/forms/getById/{id}', 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.octaviatech.app/cms/forms/getById/{id}",
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-api-key: <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.octaviatech.app/cms/forms/getById/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.octaviatech.app/cms/forms/getById/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.octaviatech.app/cms/forms/getById/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 123,
"message": "<string>",
"data": {
"form": {
"_id": "<string>",
"title": {},
"slug": "<string>",
"sections": [
{
"title": {},
"fields": [
{
"name": "<string>",
"type": "text",
"label": {},
"required": true,
"options": [
{
"value": "<string>",
"label": {}
}
],
"validation": {},
"multiple": true,
"accept": "<string>",
"colSpan": 123,
"icon": "<string>",
"disabled": true,
"verified": true,
"defaultValue": "<unknown>",
"placeholder": {},
"relation": {
"relatedFormId": "<string>",
"relationType": "one-to-one"
},
"relationDetails": {
"relatedForm": {
"_id": "<string>",
"slug": "<string>",
"title": {},
"formType": "public"
}
}
}
],
"icon": "<string>",
"description": {}
}
],
"tenantId": "<string>",
"description": {},
"submitButtonText": {},
"formType": "public",
"notification": {
"enabled": true,
"email": {
"admin": {
"enabled": true,
"recipients": [
"<string>"
],
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
},
"submitter": {
"enabled": true,
"recipientFieldName": "<string>",
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
}
},
"push": {
"admin": {
"enabled": true,
"userIds": [
"<string>"
],
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
},
"submitter": {
"enabled": true,
"userIdFieldName": "<string>",
"templateKey": "<string>",
"locale": "<string>",
"includeFields": [
"<string>"
]
}
}
},
"captcha": {
"enabled": true,
"provider": "recaptcha",
"minScore": 123
},
"relation": {
"parentFormId": "<string>",
"nextFormId": "<string>"
},
"relationDetails": {
"parentForm": {
"_id": "<string>",
"slug": "<string>",
"title": {},
"formType": "public"
},
"nextForm": {
"_id": "<string>",
"slug": "<string>",
"title": {},
"formType": "public"
}
},
"createdBy": "<string>",
"isActive": true,
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
}Was this page helpful?

