File Upload

Push file data to Validere using the API.

https://api.validere.io/platform/v1

Get File Upload URL

Generates a presigned upload url to upload files to Validere. Presigned URLs can be used multiple times, up to the expiration date and time. Multipart uploads when used with presigned URLs, allows users to upload the large object using a secure, time-limited method.

Get File Upload Url

get

Generates a presigned S3 upload url to upload files to the Data Platform.

The following fields should be passed as query parameters:

  • file_name (str) - Must include file extension. Must match the DatasetType that was registered for the dataset_id.
  • content_type (str) - Optional. Can be specified in request. Otherwise, will be interpreted from file_name.

Requests made from systems authenticated via api-key must additionally pass the following fields:

  • client_id (uuid) - The Data Platform Client making the request.
  • dataset_id (uuid) - The Data Platform Dataset for which the payload is being ingested for.
Authorizations
Query parameters
client_idstring · uuidOptional
company_idstring · uuidOptional
dataset_idstring · uuidOptional
file_idstring · uuidOptional
content_typestringOptional
file_namestringRequired
Responses
200

Successful Response

application/json
get
GET /data/file_upload_url?file_name=text HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "meta": {
    "type": "FileUploadUri",
    "transaction_id": "6372d109-d86e-4820-bc72-da6b5b0c61d0",
    "info": "Please make a PUT request with the file attachment to the attached `data[uri]`"
  },
  "data": [
    {
      "file_id": "6372d109-d86e-4820-bc72-da6b5b0c61d0",
      "uri": "https://presignedurl.s3.us-west-2.amazonaws.com/image.png"
    }
  ]
}

In order to upload the file, attach a file in the body of the PUT request in a binary format.

Example Request

curl --location --request GET 'api.validere.io/platform/v1/data/file_upload_url?client_id=9142d109-d86e-4820-bc72-da6b5b0c61d0&dataset_id=6372d109-d86e-4820-bc72-da6b5b0c61d0&file_name=some_file.csv&content_type=text/csv' \
--header 'Authorization: Bearer token'

Example Response

{
  "meta": {
    "type": "FileUploadUri",
    "transaction_id": "8232d109-d86e-4820-bc72-da6b5b0c61d0",
    "info": "Please make a PUT request with the file attachment to the attached `data[uri]`"
  },
  "data": [
    {
      "file_id": "8232d109-d86e-4820-bc72-da6b5b0c61d0",
      "uri": "https://presignedurl.s3.us-west-2.amazonaws.com/some_file.csv"
    }
  ]
}

Example upload file request

curl --location --request PUT 'https://presignedurl.s3.us-west-2.amazonaws.com/some_file.csv \
--header 'Content-Type: text/csv \
--data-binary '@/Desktop/some_file.csv

Last updated