Skip to main content
GET
curl (Linux)

Authorizations

Authorization
string
header
required

The token from the agent's discovery file. Required over loopback TCP; not used over the Unix socket.

Path Parameters

file_rule_id
string
required

The unique identifier of the file rule.

Example:

"file_rule_123"

Response

200 - application/json

Successfully retrieved the file rule.

A file rule declares which files on a device Miru manages and what to do with them: upload them to a bucket, delete the local copies once they are no longer needed, or both. retention is optional and marks the rules that delete: when it is absent the device keeps matching files indefinitely — Miru never deletes them — and when it is present the rule deletes each matching file once its retention guarantee ends. A rule that both deletes and uploads always states retention.require_upload, so whether local deletion waits for the upload is itself an explicit decision.

object
enum<string>
required

The object type, which is always file_rule.

Available options:
file_rule
Example:

"file_rule"

id
string
required

ID of the file rule.

Example:

"file_rule_123"

name
string
required

A human-readable name for the file rule. Not unique within a workspace: file rules are immutable, so each authored revision mints a new rule and several rules may share a name. The name participates in the rule's digest, so renaming a rule mints a new rule.

Example:

"Robot Logs"

digest
string
required

The digest of the file rule. File rules are immutable and deduplicated by digest within a workspace.

Example:

"sha256:1234567890"

os
enum<string>
required

The operating system family this file rule targets, derived from source.glob: a glob starting with / is linux, and a glob starting with a drive letter is windows. Read-only: clients cannot set it.

Available options:
linux,
windows
Example:

"linux"

source
File Rule Source · object
required
Example:
created_at
string<date-time>
required

Timestamp of when the file rule was created.

Example:

"2021-01-01T00:00:00Z"

updated_at
string<date-time>
required

Timestamp of when the file rule was last updated.

Example:

"2021-01-01T00:00:00Z"

upload
File Rule Upload · object

Where matching files are uploaded. Absent when the rule only enforces local retention.

Example:
retention
File Rule Retention · object

Governs deletion of the local copies of matching files. Absent when the device keeps matching files indefinitely — Miru never deletes them; present when the rule deletes each matching file once its retention guarantee ends.

Example:
Last modified on October 9, 2026