Get content by IDs, or handles
curl --request POST \
--url https://delivery.enterspeed.com/v2 \
--header 'Content-Length: <content-length>' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"ids": [
"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content"
],
"handles": [
"content-1234"
]
}
'import requests
url = "https://delivery.enterspeed.com/v2"
payload = {
"ids": ["gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content"],
"handles": ["content-1234"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Length": "<content-length>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<x-api-key>',
'Content-Length': '<content-length>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ids: [
'gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content'
],
handles: ['content-1234']
})
};
fetch('https://delivery.enterspeed.com/v2', 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://delivery.enterspeed.com/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content'
],
'handles' => [
'content-1234'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Length: <content-length>",
"Content-Type: application/json",
"X-Api-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://delivery.enterspeed.com/v2"
payload := strings.NewReader("{\n \"ids\": [\n \"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content\"\n ],\n \"handles\": [\n \"content-1234\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Length", "<content-length>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://delivery.enterspeed.com/v2")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Length", "<content-length>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content\"\n ],\n \"handles\": [\n \"content-1234\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://delivery.enterspeed.com/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Length"] = '<content-length>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content\"\n ],\n \"handles\": [\n \"content-1234\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"status": 200,
"missingViewReferences": [
{
"path": "<string>",
"viewId": "<string>"
}
]
},
"views": {
"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content": {
"title": "How to increase performance",
"image": "/media-path/performance.jpg",
"url": "/blog/how-to-increase-performance/"
},
"content-1234": {
"title": "How to increase performance",
"image": "/media-path/performance.jpg",
"url": "/blog/how-to-increase-performance/"
}
}
}{
"meta": {
"status": 422
},
"message": "<string>"
}Get content by IDs, or handles
The Post version of the Delivery API is used to fetch many view by IDs or handles.
Note: The maximum handles and ids combined in one request is limited to 1000
POST
/
v2
Get content by IDs, or handles
curl --request POST \
--url https://delivery.enterspeed.com/v2 \
--header 'Content-Length: <content-length>' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"ids": [
"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content"
],
"handles": [
"content-1234"
]
}
'import requests
url = "https://delivery.enterspeed.com/v2"
payload = {
"ids": ["gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content"],
"handles": ["content-1234"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Length": "<content-length>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<x-api-key>',
'Content-Length': '<content-length>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ids: [
'gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content'
],
handles: ['content-1234']
})
};
fetch('https://delivery.enterspeed.com/v2', 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://delivery.enterspeed.com/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content'
],
'handles' => [
'content-1234'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Length: <content-length>",
"Content-Type: application/json",
"X-Api-Key: <x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://delivery.enterspeed.com/v2"
payload := strings.NewReader("{\n \"ids\": [\n \"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content\"\n ],\n \"handles\": [\n \"content-1234\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Length", "<content-length>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://delivery.enterspeed.com/v2")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Length", "<content-length>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content\"\n ],\n \"handles\": [\n \"content-1234\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://delivery.enterspeed.com/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Length"] = '<content-length>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content\"\n ],\n \"handles\": [\n \"content-1234\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"status": 200,
"missingViewReferences": [
{
"path": "<string>",
"viewId": "<string>"
}
]
},
"views": {
"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content": {
"title": "How to increase performance",
"image": "/media-path/performance.jpg",
"url": "/blog/how-to-increase-performance/"
},
"content-1234": {
"title": "How to increase performance",
"image": "/media-path/performance.jpg",
"url": "/blog/how-to-increase-performance/"
}
}
}{
"meta": {
"status": 422
},
"message": "<string>"
}Headers
The length of the message body, in bytes (this header is automatically added by most clients).
Note: The endpoint does not support Transfer-Encoding: chunked. JsonContent and PostAsJsonAsync in .NET will by default set the Transfer-Encoding: chunked header. Use types like e.g. StringContent or ByteArrayContent instead.
Query Parameters
Body
application/json
The ids or handles of the views to load
Both ids and handles are optional, but the request must contain at least one id or one handle.
Response
Valid request.
Example:
{
"gid://Environment/290a1654-e380-487e-8ea0-8f9f2fff589c/Source/01gh7ed9-6912-485b-9595-cd1e0c4ce89c/Entity/1234/View/content": {
"title": "How to increase performance",
"image": "/media-path/performance.jpg",
"url": "/blog/how-to-increase-performance/"
},
"content-1234": {
"title": "How to increase performance",
"image": "/media-path/performance.jpg",
"url": "/blog/how-to-increase-performance/"
}
}
Was this page helpful?