For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
API

Apply file operations to a site bundle

POST
/sites/{api_name}/file-operations/

Use with AI:Rippling AI ChatGPT Claude Cursor

Apply file operations to a site bundle

POST
/sites/{api_name}/file-operations/

Apply file and directory operations atomically against the active bundle.

For put file operations:

  1. Get a presign: POST /sites/upload-batches/presign/ with file_intents (client_ref can be any unique id; file_name is the staged basename).
  2. Upload bytes to S3 using files[].upload_url and files[].upload_fields from the presign response (see POST /sites/upload-batches/presign/).
  3. Apply the put: POST /sites/{api_name}/file-operations/ with base_bundle_id set to the site's current_bundle_id, and an operations item { op: put, kind: file, path: <bundle dest>, file_id: <files[].file_id> }.

Required Scopes

  • sites.read-write

Request

Path Parameters
    api_name stringrequired

    The unique api_name of the site.

    Example: employee_portal
Body
    base_bundle_id stringrequired

    Must match the site's current active bundle. Returns 409 when stale.

    entry_path string

    Optional bundle entry path. When omitted, the current entry path is kept.

    operations object[]required
    Non-empty array of file or directory operations.
      Array [
      op stringrequired

      Operation type. Supported values are put, rename, move, and delete. move is valid for files only; directories support put, rename, and delete.

      kind stringrequired

      Target kind. Supported values are file and directory.

      path string

      Target path for put and delete operations.

      file_id string

      Staged upload id from POST /sites/upload-batches/presign/ after uploading bytes to S3. Required for put operations on files. The id can be reused for 1 hour from presign, each attach copies the bytes into that site's bundle, a repeat attach before expiry creates another bundle, and the staged object is removed after expiry.

      from_path string

      Source path for rename and move operations.

      to_path string

      Destination path for rename and move operations.

      recursive boolean

      When true, delete directory removes nested files. Used by delete directory operations.

      ]

Responses​

Successful response
Schema
    id string

    Identifier field

    name string

    The display name of the custom site

    description string

    The optional description of the custom site

    api_name string

    The unique api name of the custom site

    logo string

    A Rippling-owned logo URL for the custom site

    current_bundle_id string

    The active bundle id for the custom site

    admin_group_id string

    The admin group id for the custom site

    viewer_group_id string

    The viewer group id for the custom site

    created_by string

    The ID of the role that created the custom site

    created_at string

    Record creation date

Loading...