Get fresh upload URL for template file
curl --request PUT \
--url https://api.nexrender.com/api/v2/templates/{id}/upload \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nexrender.com/api/v2/templates/{id}/upload"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nexrender.com/api/v2/templates/{id}/upload', 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.nexrender.com/api/v2/templates/{id}/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nexrender.com/api/v2/templates/{id}/upload"
req, _ := http.NewRequest("PUT", url, nil)
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.put("https://api.nexrender.com/api/v2/templates/{id}/upload")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrender.com/api/v2/templates/{id}/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uploadInfo": {
"url": "<string>",
"method": "PUT",
"expiresIn": 123,
"key": "<string>",
"fields": {}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Templates Management
Get fresh upload URL for template file
Generate a new presigned upload URL for uploading or replacing the template file (previous URLs expire). When an already processed file is replaced, jobs and downloads keep using it until the new file has been processed. A replacement that fails processing, or is not uploaded within 24 hours, is discarded and the template keeps its previous file.
PUT
/
templates
/
{id}
/
upload
Get fresh upload URL for template file
curl --request PUT \
--url https://api.nexrender.com/api/v2/templates/{id}/upload \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nexrender.com/api/v2/templates/{id}/upload"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nexrender.com/api/v2/templates/{id}/upload', 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.nexrender.com/api/v2/templates/{id}/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.nexrender.com/api/v2/templates/{id}/upload"
req, _ := http.NewRequest("PUT", url, nil)
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.put("https://api.nexrender.com/api/v2/templates/{id}/upload")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nexrender.com/api/v2/templates/{id}/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uploadInfo": {
"url": "<string>",
"method": "PUT",
"expiresIn": 123,
"key": "<string>",
"fields": {}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer token authentication using API tokens for team-based access control.
You can generate your own API token at: https://app.nexrender.com/settings/api-tokens
Was this page helpful?

