Skip to content
Navigation

searchRepoExtensionFilesAtBranch

Read the files that ids names with their content, a page at a time, at the branch's working state. Send the same ids again with each page's next_cursor until it is null. An id that names no file of the extension refuses the read.

POST
/repos/{repo_id}/branches/{branch}/extensions/{name}/files/search

Path parameters

  • repo_id
    string
    required
    pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • branch
    string
    required
    minLength: 1
  • name
    string
    required
    maxLength: 64 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Request body JSON required

  • ids
    array of
    string
    required
    pattern: ^extension_file_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • cursor
    optional
    string
    minLength: 1

Returns

200

ExtensionFilePage

JSON
  • data
    array of
    object
    required
    • id
      string
      required
      pattern: ^extension_file_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • extension_id
      string
      required
      pattern: ^extension_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • path
      string
      required
      maxLength: 256 · pattern: ^(?:[A-Za-z0-9_][A-Za-z0-9._-]*\/)*[A-Za-z0-9_][A-Za-z0-9._-]*$
    • content
      string
      required
    • attachment_blob_id
      required

      One of the following:

      • TypeId
      • null
    • formatted_content
      required

      The file formatted with Prettier for reading, when that differs from content. Forge formats a file shortly after it's written, so this is null until then, and stays null when the file is already formatted, isn't TypeScript, JavaScript or JSON, is over 256 KiB, or doesn't parse. Writes never take it, and builds read only content, so edit from content.

      One of the following:

      • string
      • null
    • formatting_pending
      boolean
      required

      Whether Forge is still formatting the file: read it again shortly for formatted_content. False once it's formatted, or when Forge doesn't format it.

  • next_cursor
    required

    One of the following:

    • PageCursor
    • null

400

InvalidCursor | InvalidRequest | RequestBodyTooDeep
JSON

One of the following:

  • InvalidCursorEncoded
    • _tag
      InvalidCursor
      required
    • reason
      string
      required
      minLength: 1
  • 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

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

BranchNotFound | ExtensionNotFound | ExtensionFileNotFound | RepoNotFound
JSON

One of the following:

  • BranchNotFoundEncoded
    • _tag
      BranchNotFound
      required
    • branch
      string
      required
      minLength: 1
  • ExtensionNotFoundEncoded
    • _tag
      ExtensionNotFound
      required
    • extension_name
      string
      required
      minLength: 1
  • ExtensionFileNotFoundEncoded
    • _tag
      ExtensionFileNotFound
      required
    • extension_name
      string
      required
      minLength: 1
    • file_id
      string
      required
      pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • RepoNotFoundEncoded
    • _tag
      RepoNotFound
      required

413

RequestBodyTooLarge
JSON
  • _tag
    RequestBodyTooLarge
    required
  • max_bytes
    integer
    required
    maximum: 9007199254740991 · minimum: -9007199254740991

429

RateLimited
JSON
  • _tag
    RateLimited
    required

500

RepoFailure
JSON
  • _tag
    RepoFailure
    required
  • reason
    string
    required

503

SessionUnavailable | RateLimitUnavailable
JSON

One of the following:

  • SessionUnavailableEncoded
    • _tag
      SessionUnavailable
      required
  • RateLimitUnavailableEncoded
    • _tag
      RateLimitUnavailable
      required

Type to search…

↑↓ navigate↵ selectEsc close