Skip to content
Navigation

checkOrgPolicy

Parse and check a policy file as saving it would, without saving: each problem with where it is and a suggested fix.

POST
/orgs/{org_id}/policy-checks

Path parameters

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

Request body JSON required

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

Returns

200

PolicyCheck

JSON
  • problems
    array of
    object
    required
    • severity
      error
      or
      warning
      required
    • code
      syntax
      or
      unsupported
      or
      truthiness
      or
      duplicate
      or
      unknownModel
      or
      unknownField
      +14 more
      required
    • message
      string
      required
    • fix
      required

      One of the following:

      • string
      • null
    • location
      required

      One of the following:

      • object
        • line
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
        • column
          integer
          required
          maximum: 9007199254740991 · minimum: -9007199254740991
      • null
    • policy
      required

      One of the following:

      • string
      • null
    • statement
      required

      One of the following:

      • integer
      • null
    • term
      required

      One of the following:

      • array<integer>
      • null
  • source
    required

    One of the following:

    • string
    • null

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

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

OrgNotFound | RepoNotFound
JSON

One of the following:

  • OrgNotFoundEncoded
    • _tag
      OrgNotFound
      required
  • 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

OrgFailure | RepoFailure
JSON

One of the following:

  • OrgFailureEncoded
    • _tag
      OrgFailure
      required
    • reason
      string
      required
  • RepoFailureEncoded
    • _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