ContentResource
Post contentsresourcesderive
Derive an image with a named recipe and answer with the asset it is stored under, so a caller that cannot run the recipe itself (a pod without the matte model) can have the deployment holding it do the work and then draw the result from the shared store.
Internal only: it derives an arbitrary url on demand, and the identity it
derives into is the x-rlvt-company-id of the internal request, so it is
refused without the internal secret rather than left to a user token.
POST
/
contents
/
resources
/
derive
cURL
curl --request POST \
--url https://api.reelevant.com/v2/contents/resources/derive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipe": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.reelevant.com/v2/contents/resources/derive"
payload = {
"recipe": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({recipe: '<string>', url: '<string>'})
};
fetch('https://api.reelevant.com/v2/contents/resources/derive', 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.reelevant.com/v2/contents/resources/derive",
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([
'recipe' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.reelevant.com/v2/contents/resources/derive"
payload := strings.NewReader("{\n \"recipe\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.reelevant.com/v2/contents/resources/derive")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipe\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reelevant.com/v2/contents/resources/derive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipe\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"program": "<string>",
"version": "<string>",
"datetime": "<string>",
"message": "<string>",
"data": {
"identifier": "<string>",
"version": "<string>",
"contentType": "<string>",
"generated": true
},
"code": 123
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://api.reelevant.com/v2/contents/resources/derive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipe": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.reelevant.com/v2/contents/resources/derive"
payload = {
"recipe": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({recipe: '<string>', url: '<string>'})
};
fetch('https://api.reelevant.com/v2/contents/resources/derive', 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.reelevant.com/v2/contents/resources/derive",
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([
'recipe' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.reelevant.com/v2/contents/resources/derive"
payload := strings.NewReader("{\n \"recipe\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.reelevant.com/v2/contents/resources/derive")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipe\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reelevant.com/v2/contents/resources/derive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipe\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"program": "<string>",
"version": "<string>",
"datetime": "<string>",
"message": "<string>",
"data": {
"identifier": "<string>",
"version": "<string>",
"contentType": "<string>",
"generated": true
},
"code": 123
}