Skip to main content
POST
/
sources
/
{id}
/
signed_upload_url
Post Signed Upload Url
curl --request POST \
  --url https://api.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '
{
  "content_length": 123,
  "content_type": "<string>"
}
'
import requests

url = "https://api.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url"

payload = {
    "content_length": 123,
    "content_type": "<string>"
}
headers = {
    "x-client-secret": "<x-client-secret>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {
    'x-client-secret': '<x-client-secret>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({content_length: 123, content_type: '<string>'})
};

fetch('https://api.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url', 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.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url",
  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([
    'content_length' => 123,
    'content_type' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json",
    "x-client-secret: <x-client-secret>"
  ],
]);

$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.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url"

	payload := strings.NewReader("{\n  \"content_length\": 123,\n  \"content_type\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-client-secret", "<x-client-secret>")
	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.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url")
  .header("x-client-secret", "<x-client-secret>")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content_length\": 123,\n  \"content_type\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.isometric.com/mrv/v0/sources/{id}/signed_upload_url")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content_length\": 123,\n  \"content_type\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
"<string>"
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "ctx": {},
      "input": "<unknown>"
    }
  ]
}

Authorizations

Authorization
string
header
required

A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>

Headers

x-client-secret
string
required

A secret token identifying the client connecting to the API

Example:

"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"

Path Parameters

id
string
required
Required string length: 20 - 37
Examples:

"src_1EBBF4M7X1S06G1Y"

"src_1DW1B17VNSBX37N0"

Body

application/json
content_length
integer
required

The size (in bytes) of the file that will be uploaded. The pre-signed URL will only accept a file of this size.

Required range: x <= 50000000
content_type
string
required

The content type of the file that will be uploaded. This must also be passed as a 'content-type' header during the upload. The pre-signed URL will only accept a file of this content-type.

Response

Successful Response

The response is of type string.