Fetch Content Model by Internal Name
curl --request GET \
--url https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName} \
--header 'Authorization: Bearer <token>' \
--header 'x-environment-id: <x-environment-id>' \
--header 'x-tenant-id: <x-tenant-id>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}"
headers = {
"x-tenant-id": "<x-tenant-id>",
"x-workspace-id": "<x-workspace-id>",
"x-environment-id": "<x-environment-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tenant-id': '<x-tenant-id>',
'x-workspace-id': '<x-workspace-id>',
'x-environment-id': '<x-environment-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}', 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://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-environment-id: <x-environment-id>",
"x-tenant-id: <x-tenant-id>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("x-environment-id", "<x-environment-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}")
.header("x-tenant-id", "<x-tenant-id>")
.header("x-workspace-id", "<x-workspace-id>")
.header("x-environment-id", "<x-environment-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["x-workspace-id"] = '<x-workspace-id>'
request["x-environment-id"] = '<x-environment-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Status": "success",
"Data": {
"record": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"internal_name": "<string>",
"name": "<string>",
"type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"template": "<string>",
"act_as_web_page": true,
"is_localization_enabled": true,
"group_id": "<string>",
"description": "<string>",
"is_versionable": true,
"fields": [
{
"component_id": "<string>",
"destination_relation_field_id": "<string>",
"field_properties": {},
"is_required": true,
"relation_type": "<string>",
"position": 123,
"is_removable": true,
"is_editable": true
}
]
},
"_meta_": {
"tenant_id": "<string>",
"workspace_id": "<string>",
"content_model_id": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}Content Delivery APIs
Get Model Detail By Internal Name
Retrieve the full definition and metadata of a content model by its internal name. Use this when you know the model’s identifier and you need to access field definitions and other properties associated with the content model using this endpoint.
GET
/
content
/
v2
/
content-models
/
by_internal_name
/
{modelInternalName}
Fetch Content Model by Internal Name
curl --request GET \
--url https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName} \
--header 'Authorization: Bearer <token>' \
--header 'x-environment-id: <x-environment-id>' \
--header 'x-tenant-id: <x-tenant-id>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}"
headers = {
"x-tenant-id": "<x-tenant-id>",
"x-workspace-id": "<x-workspace-id>",
"x-environment-id": "<x-environment-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tenant-id': '<x-tenant-id>',
'x-workspace-id': '<x-workspace-id>',
'x-environment-id': '<x-environment-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}', 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://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-environment-id: <x-environment-id>",
"x-tenant-id: <x-tenant-id>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("x-environment-id", "<x-environment-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}")
.header("x-tenant-id", "<x-tenant-id>")
.header("x-workspace-id", "<x-workspace-id>")
.header("x-environment-id", "<x-environment-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.experro.app/content/v2/content-models/by_internal_name/{modelInternalName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["x-workspace-id"] = '<x-workspace-id>'
request["x-environment-id"] = '<x-environment-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Status": "success",
"Data": {
"record": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"internal_name": "<string>",
"name": "<string>",
"type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"template": "<string>",
"act_as_web_page": true,
"is_localization_enabled": true,
"group_id": "<string>",
"description": "<string>",
"is_versionable": true,
"fields": [
{
"component_id": "<string>",
"destination_relation_field_id": "<string>",
"field_properties": {},
"is_required": true,
"relation_type": "<string>",
"position": 123,
"is_removable": true,
"is_editable": true
}
]
},
"_meta_": {
"tenant_id": "<string>",
"workspace_id": "<string>",
"content_model_id": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}{
"Status": "failure",
"Data": {
"Status": "failure",
"Error": {
"message": "<string>",
"name": "<string>",
"code": "<string>"
}
}
}Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See Authentication & Base URLs.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Identifier for the tenant. Ensures data isolation per tenant.
Workspace identifier within the tenant. Scopes resources to a specific workspace.
Unique identifier of the target environment. Used to scope the API call to a specific deployment environment.
Example:
"PRODUCTION-15a0f8c2-a5e8-4e40-ae74-cb1389d22f45-w49jkngj"
Path Parameters
The unique ID of the record.
Query Parameters
Specifies the language or region for the response data
⌘I