Skip to main content
PATCH
/
sources
/
{id}
Patch Source
curl --request PATCH \
  --url https://api.sandbox.isometric.com/mrv/v0/sources/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '
{
  "description": {
    "__typename": "Undefined"
  },
  "display_name": {
    "__typename": "Undefined"
  },
  "is_public": {
    "__typename": "Undefined"
  },
  "published_at": {
    "__typename": "Undefined"
  },
  "supplier_reference_id": {
    "__typename": "Undefined"
  }
}
'
import requests

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

payload = {
"description": { "__typename": "Undefined" },
"display_name": { "__typename": "Undefined" },
"is_public": { "__typename": "Undefined" },
"published_at": { "__typename": "Undefined" },
"supplier_reference_id": { "__typename": "Undefined" }
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: {__typename: 'Undefined'},
display_name: {__typename: 'Undefined'},
is_public: {__typename: 'Undefined'},
published_at: {__typename: 'Undefined'},
supplier_reference_id: {__typename: 'Undefined'}
})
};

fetch('https://api.sandbox.isometric.com/mrv/v0/sources/{id}', 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}",
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([
'description' => [
'__typename' => 'Undefined'
],
'display_name' => [
'__typename' => 'Undefined'
],
'is_public' => [
'__typename' => 'Undefined'
],
'published_at' => [
'__typename' => 'Undefined'
],
'supplier_reference_id' => [
'__typename' => 'Undefined'
]
]),
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}"

payload := strings.NewReader("{\n \"description\": {\n \"__typename\": \"Undefined\"\n },\n \"display_name\": {\n \"__typename\": \"Undefined\"\n },\n \"is_public\": {\n \"__typename\": \"Undefined\"\n },\n \"published_at\": {\n \"__typename\": \"Undefined\"\n },\n \"supplier_reference_id\": {\n \"__typename\": \"Undefined\"\n }\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.sandbox.isometric.com/mrv/v0/sources/{id}")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": {\n \"__typename\": \"Undefined\"\n },\n \"display_name\": {\n \"__typename\": \"Undefined\"\n },\n \"is_public\": {\n \"__typename\": \"Undefined\"\n },\n \"published_at\": {\n \"__typename\": \"Undefined\"\n },\n \"supplier_reference_id\": {\n \"__typename\": \"Undefined\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Patch.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": {\n \"__typename\": \"Undefined\"\n },\n \"display_name\": {\n \"__typename\": \"Undefined\"\n },\n \"is_public\": {\n \"__typename\": \"Undefined\"\n },\n \"published_at\": {\n \"__typename\": \"Undefined\"\n },\n \"supplier_reference_id\": {\n \"__typename\": \"Undefined\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "description": "<string>",
  "display_name": "<string>",
  "id": "src_1EBBF4M7X1S06G1Y",
  "is_public": true,
  "original_filename": "<string>",
  "project_id": "prj_1CTWZQGKE1S0VAXA",
  "published_at": "2023-12-25",
  "supplier_reference_id": "<string>",
  "url_info": {
    "url": "<string>",
    "__typename": "SourcePublicUrlInfo"
  }
}
{
"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
description
default:{"__typename":"Undefined"}
display_name
default:{"__typename":"Undefined"}
Required string length: 1 - 150
is_public
default:{"__typename":"Undefined"}

If the source document should be publicly available on the Registry once credits are issued.

published_at
default:{"__typename":"Undefined"}

Date in ISO format (YYYY-MM-DD)

supplier_reference_id
default:{"__typename":"Undefined"}

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200

Response

Successful Response

description
string | null
required
display_name
string | null
required
id
string
required
Required string length: 20 - 37
Examples:

"src_1EBBF4M7X1S06G1Y"

"src_1DW1B17VNSBX37N0"

is_public
boolean
required

This field indicates Whether or not this source document will be public on the Registry once Credits are issued referencing it.

original_filename
string | null
required
project_id
string | null
required

The ID of the project that the source is associated with.

Required string length: 20 - 37
Example:

"prj_1CTWZQGKE1S0VAXA"

published_at
string<date> | null
required
supplier_reference_id
string | null
required

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200
type
enum<string>
required
Available options:
DOCUMENT,
WEBSITE
url_info
SourcePublicUrlInfo · object
required

URL info for the source, that varies depending on if it is public or private