Skip to content
Navigation

createRepoAttachmentBlob

Create an attachment blob for a file of the given name, media type, and size, and answer the signed URLs to send its bytes to storage: one PUT up to 16 MiB, and parts past that. An attachment field takes its id as {"id":…}, and a binary extension file as its "attachment_blob_id".

POST
/repos/{repo_id}/attachment-blobs

Path parameters

  • repo_id
    string
    required
    pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request body JSON required

  • filename
    string
    required
    minLength: 1
  • content_type
    string
    required
    minLength: 1
  • size
    integer
    required
    maximum: 5492189429760 · minimum: 0

Returns

201

AttachmentBlobUpload

JSON
  • attachment_blob
    object
    required
    • id
      string
      required
      pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • filename
      string
      required
      minLength: 1
    • content_type
      string
      required
      minLength: 1
    • size
      integer
      required
      maximum: 9007199254740991 · minimum: 0
    • created_by_id
      string
      required
      pattern: ^(?:user|extension)_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • created_at
      string
      required
    • uploaded_at
      required

      One of the following:

      • string
      • null
    • promoted_at
      required

      One of the following:

      • string
      • null
  • parts
    array of
    object
    required
    • url
      string
      required
      minLength: 1
    • offset
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991
    • length
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991
    • headers
      map of
      string
      required
  • expires_at
    string
    required
    minLength: 1

400

InvalidRequest | RequestBodyTooDeep
JSON

One of the following:

  • InvalidRequestEncoded
    • _tag
      InvalidRequest
      required
    • part
      path
      or
      query
      or
      headers
      or
      body
      required
    • issues
      array of
      object
      required
      • path
        array of
        required

        One of the following:

        • string
        • integer
      • message
        string
        required
  • RequestBodyTooDeepEncoded
    • _tag
      RequestBodyTooDeep
      required
    • max_depth
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

401

InvalidCredentials
JSON
  • _tag
    InvalidCredentials
    required

402

StorageLimitReached
JSON
  • _tag
    StorageLimitReached
    required
  • plan
    free
    or
    pro
    or
    team
    required
  • included_bytes
    integer
    required
    maximum: 9007199254740991 · minimum: -9007199254740991
  • message
    string
    required

403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired
JSON

One of the following:

  • ForbiddenEncoded
    • _tag
      Forbidden
      required
    • message
      string
      required
  • ForbiddenOriginEncoded
    • _tag
      ForbiddenOrigin
      required
  • RequiresPersonalSessionEncoded
    • _tag
      RequiresPersonalSession
      required
  • RunBranchRequiredEncoded
    • _tag
      RunBranchRequired
      required
    • branch
      string
      required
      minLength: 1
    • message
      string
      required

404

RepoNotFound
JSON
  • _tag
    RepoNotFound
    required

409

RepoArchived
JSON
  • _tag
    RepoArchived
    required

413

WriteTooLarge | RequestBodyTooLarge
JSON

One of the following:

  • WriteTooLargeEncoded
    • _tag
      WriteTooLarge
      required
    • message
      string
      required
  • RequestBodyTooLargeEncoded
    • _tag
      RequestBodyTooLarge
      required
    • max_bytes
      integer
      required
      maximum: 9007199254740991 · minimum: -9007199254740991

429

RateLimited
JSON
  • _tag
    RateLimited
    required

500

AttachmentUrlFailed | RepoFailure
JSON

One of the following:

  • AttachmentUrlFailedEncoded
    • _tag
      AttachmentUrlFailed
      required
  • RepoFailureEncoded
    • _tag
      RepoFailure
      required
    • reason
      string
      required

503

AttachmentStorageUnavailable | RepoBusy | SessionUnavailable | RateLimitUnavailable
JSON

One of the following:

  • AttachmentStorageUnavailableEncoded
    • _tag
      AttachmentStorageUnavailable
      required
  • RepoBusyEncoded
    • _tag
      RepoBusy
      required
    • message
      string
      required
  • SessionUnavailableEncoded
    • _tag
      SessionUnavailable
      required
  • RateLimitUnavailableEncoded
    • _tag
      RateLimitUnavailable
      required

Type to search…

↑↓ navigate↵ selectEsc close