Skip to content
Navigation

checkOrgPolicyDiff

List what a draft file allows or denies in a repo that the live policies don't, for every member who isn't an owner, member by member: the repo's resources, then the records you can read, limit of them a page, each record change with a count and examples of that page's records. Updates are compared on records as they stand and creates not at all, so simulate a proposed edit. Pass next_cursor back as cursor for the next page. A draft with policy_id stands in for that policy alone, as a new version of it would; a draft without one joins the live policies as a new policy. Needs readPolicies and readMembers on the org.

POST
/orgs/{org_id}/policy-diffs

Path parameters

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

Request body JSON required

  • repo_id
    string
    required
    pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • draft
    object
    required
    • source
      string
      required
      minLength: 1
    • repo_id
      optional
      string
      pattern: ^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • policy_id
      optional
      string
      pattern: ^policy_[0-7][0-9a-hjkmnp-tv-z]{25}$
  • branch
    optional
    string
    minLength: 1
  • cursor
    optional
    string
    minLength: 1
  • limit
    optional
    integer
    maximum: 200 · minimum: 1

Returns

200

Success

JSON
  • data
    array of
    object
    required
    • user_id
      string
      required
      pattern: ^(?:user|extension)_[0-7][0-9a-hjkmnp-tv-z]{25}$
    • action
      string
      required
      pattern: ^[a-z][A-Za-z]*$
    • change
      allowed
      or
      denied
      required
    • resource
      required

      One of the following:

      • object
        • kind
          model
          required
        • model_api_name
          string
          required
          minLength: 1
        • records
          integer
          required
          maximum: 9007199254740991
        • examples
          array of
          string
          required
          pattern: ^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$
      • object
        • kind
          schema
          required
        • model_api_name
          string
          required
          minLength: 1
      • object
        • kind
          repo
          or
          agentInstructions
          or
          agentSkills
          required
      • object
        • kind
          extension
          or
          installation
          required
        • extension
          string
          required
          maxLength: 129 · pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$
  • 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

OrgNotFound | RepoNotFound | PolicyNotFound | BranchNotFound
JSON

One of the following:

  • OrgNotFoundEncoded
    • _tag
      OrgNotFound
      required
  • RepoNotFoundEncoded
    • _tag
      RepoNotFound
      required
  • PolicyNotFoundEncoded
    • _tag
      PolicyNotFound
      required
  • BranchNotFoundEncoded
    • _tag
      BranchNotFound
      required
    • branch
      string
      required
      minLength: 1

409

PolicyLevelMismatch
JSON
  • _tag
    PolicyLevelMismatch
    required

413

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

422

PolicyInvalid
JSON
  • _tag
    PolicyInvalid
    required
  • 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

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