Skip to content
Navigation

Save a memory file

Creates or replaces one file. expectBlob is the blob you read (null for a new file), so a concurrent edit answers 409 instead of being overwritten.

PUT
https://api.cloudraker.com/organization/assistant-policy/files
Try it
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Request body JSON required

  • path
    string
    required
    maxLength: 512 · minLength: 1
  • content
    string
    required
    maxLength: 262144
  • expectBlob
    required

    The blob you read, or null to create a new file. Stale values answer 409.

    Any of the following:

    • string
    • null
  • message
    optional
    string
    maxLength: 500 · minLength: 1

Returns

200

Nothing changed; the unchanged head

JSON
  • data
    object
    required
    • sha
      string | null
      required
    • branch
      string
      required
    • changed
      number
      required

      How many files the version changed.

201

The new version

JSON
  • data
    object
    required
    • sha
      string | null
      required
    • branch
      string
      required
    • changed
      number
      required

      How many files the version changed.

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

403

forbidden: only an organization administrator may edit the assistant policy.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

409

expect_failed (paths) — the file changed since you read it; stale_parent or conflict — the history moved.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

422

lint_failed — violations lists each file rule the change broke.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

Type to search…

↑↓ navigate↵ selectEsc close