GET
/
repos
/
{repo_id}
/
blobs
/
upload
curl --request GET \
  --url https://api.diversion.dev/v0/repos/{repo_id}/blobs/upload \
  --header 'Authorization: Bearer <token>'
{
  "location": {
    "storage_backend": 1,
    "storage_uri": "repo_id/2aae6c35c94fcfb415dbe95f408b9ce91ee846ed"
  },
  "upload_url": {
    "url": "https://dv-blobs.s3.amazonaws.com/",
    "fields": {
      "x-amz-checksum-algorithm": "SHA1",
      "key": "repo_id/dv.blob.40630485-8f8f-4c34-b102-0072ca53ffba",
      "x-amz-algorithm": "AWS4-HMAC-SHA256",
      "x-amz-credential": "AKAKI6PFK43K4U6ASQ3V2/11111111/eu-central-1/s3/aws4_request",
      "x-amz-date": "20221130T095258Z",
      "policy": "eyJleHBpcmF0aW9uIjogIjIwMjItMTEtMzBUMTA6NTI6NThaIiwgImNvbmRpdGlvbnMiOiBbeyJ4LWFtei1jaGVja3N1bS1hbGdvcml0aG0iOiAiU0hBMSJ9LCB7ImJ1Y2tldCI6ICJkdi1ibG9icyJ9LCB7ImtleSI6ICJyZXBvX2lkL2R2LmJsb2IuNDA2MzA0ODUtOGY4Zi00YzM0LWIxMDItMDA3MmNhNTNmZmJhIn0sIHsieC1hbXotYWx",
      "x-amz-signature": "bc50d66096b27eb2bc4855ef59748f8dfba896529b11480daaa594097fc46713"
    }
  }
}

Authorizations

Authorization
string
headerrequired

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

Query Parameters

sha1
string

A sha1 hexdigest

Response

201 - application/json
location
object
required
upload_url
object