POST
/
sources
curl --request POST \
  --url https://api.sandbox.isometric.com/mrv/v0/sources \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '{
  "__typename": "<string>",
  "content_length": 123,
  "content_type": "application/geo+json",
  "display_name": "<string>",
  "file_name": "<string>",
  "is_public": false,
  "published_at": "2023-12-25",
  "supplier_reference_id": "<string>"
}'
{
  "signed_upload_url": "<string>",
  "source": {
    "display_name": "<string>",
    "id": "src_1EBBF4M7X1S06G1Y",
    "is_public": true,
    "published_at": "2023-12-25",
    "supplier_reference_id": "<string>",
    "type": "DOCUMENT",
    "url_info": {
      "__typename": "SourcePublicUrlInfo",
      "url": "<string>"
    }
  }
}

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"

Body

application/json
__typename
string
required

Contains the name of the model (formally, OpenAPI Schema Object). Used to determine the type of data, for example when two different types are unioned.

Allowed value: "CreateDocumentSourceRequest"
content_length
integer
required

The size (in bytes) of the file that will be uploaded. This must also be passed as a 'content-length' header during the upload. The pre-signed URL will only accept a file of this size.

Required range: x <= 50000000
content_type
enum<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.

Available options:
application/geo+json,
application/pdf,
application/x-ipynb+json,
image/jpeg,
image/png,
text/plain,
text/csv,
application/vnd.ms-excel,
application/msword,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
application/vnd.openxmlformats-officedocument.wordprocessingml.document
display_name
string
required
Required string length: 1 - 100
file_name
string
required

The full name of the file that will be uploaded, including it's file extension

published_at
string
required
supplier_reference_id
string
required
Maximum length: 100
is_public
boolean
default:
false

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

Response

200
application/json
Successful Response
signed_upload_url
string
required

A presigned upload URL, which must be used to upload the document associated with this source.

source
object
required

Was this page helpful?