Skip to content
Navigation

Revert a memory version

Saves a new version that undoes the given one. A later edit to the same files answers 409 conflict.

POST
https://api.cloudraker.com/me/assistant/memory-repo/history/{sha}/revert
Try it
Path parameters
Live API request

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

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • sha
    string
    required
    pattern: ^[0-9a-f]{40}$

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

personal_account_required — only the owner may open this memory.
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

404

memory_not_available — this memory does not exist for you.
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