curl --request PATCH \
--url https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-environment-id: <x-environment-id>' \
--header 'x-tenant-id: <x-tenant-id>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"version_data": [
{
"environment_id": "<string>",
"version_id": "<string>"
}
]
}
'import requests
url = "https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish"
payload = { "version_data": [
{
"environment_id": "<string>",
"version_id": "<string>"
}
] }
headers = {
"x-tenant-id": "<x-tenant-id>",
"x-workspace-id": "<x-workspace-id>",
"x-environment-id": "<x-environment-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
'x-workspace-id': '<x-workspace-id>',
'x-environment-id': '<x-environment-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version_data: [{environment_id: '<string>', version_id: '<string>'}]})
};
fetch('https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish', 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/{modelInternalName}/records/{contentModelDataId}/versions/unpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version_data' => [
[
'environment_id' => '<string>',
'version_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish"
payload := strings.NewReader("{\n \"version_data\": [\n {\n \"environment_id\": \"<string>\",\n \"version_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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>")
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.patch("https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish")
.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>")
.header("Content-Type", "application/json")
.body("{\n \"version_data\": [\n {\n \"environment_id\": \"<string>\",\n \"version_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version_data\": [\n {\n \"environment_id\": \"<string>\",\n \"version_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"Status": "<string>",
"Data": {
"success": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"failures": [
"<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>"
}
}
}Unpublish Record
Remove one or more versions of a content record from specified environments. Supply mappings of environment IDs to version IDs to unpublish. Returns lists of successfully unpublished and failed version IDs.
curl --request PATCH \
--url https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-environment-id: <x-environment-id>' \
--header 'x-tenant-id: <x-tenant-id>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"version_data": [
{
"environment_id": "<string>",
"version_id": "<string>"
}
]
}
'import requests
url = "https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish"
payload = { "version_data": [
{
"environment_id": "<string>",
"version_id": "<string>"
}
] }
headers = {
"x-tenant-id": "<x-tenant-id>",
"x-workspace-id": "<x-workspace-id>",
"x-environment-id": "<x-environment-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
'x-workspace-id': '<x-workspace-id>',
'x-environment-id': '<x-environment-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version_data: [{environment_id: '<string>', version_id: '<string>'}]})
};
fetch('https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish', 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/{modelInternalName}/records/{contentModelDataId}/versions/unpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'version_data' => [
[
'environment_id' => '<string>',
'version_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish"
payload := strings.NewReader("{\n \"version_data\": [\n {\n \"environment_id\": \"<string>\",\n \"version_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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>")
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.patch("https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish")
.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>")
.header("Content-Type", "application/json")
.body("{\n \"version_data\": [\n {\n \"environment_id\": \"<string>\",\n \"version_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.experro.app/content/v2/content-models/{modelInternalName}/records/{contentModelDataId}/versions/unpublish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"version_data\": [\n {\n \"environment_id\": \"<string>\",\n \"version_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"Status": "<string>",
"Data": {
"success": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"failures": [
"<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>"
}
}
}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.
"PRODUCTION-15a0f8c2-a5e8-4e40-ae74-cb1389d22f45-w49jkngj"
Path Parameters
The internal name of the content model.
Unique ID of the content record to publish.
Query Parameters
Specifies the language or region for the response data
Body
Mappings of environments to versions to unpublish.
List of { environment_id, version_id } pairs to unpublish.
Show child attributes
Show child attributes