File Rules

Get

Retrieve a file rule by its ID.

get/file_rules/{file_rule_id}

Request

  • Base URL
    http://localhost/v0.2
  • URL
    http://localhost/v0.2/file_rules/{file_rule_id}
  • Auth
    • none
    • or HTTP bearer

Path parameters

file_rule_idstring required
Example:file_rule_123

The unique identifier of the file rule.

Response

Successfully retrieved the file rule.

object'file_rule' required

The object type, which is always file_rule.

idstring required

ID of the file rule.

namestring 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.

digeststring required

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

os'linux' | 'windows' required

An operating system family, from the agent's build-time OS vocabulary. Shared across resources (devices, config schemas, file rules, releases). This is the machine-readable OS kind, distinct from a human-readable version string.

  • linux
  • windows
created_atstring date-time required

Timestamp of when the file rule was created.

updated_atstring date-time required

Timestamp of when the file rule was last updated.

Example response

{
  "object": "file_rule",
  "id": "file_rule_123",
  "name": "Robot Logs",
  "digest": "sha256:1234567890",
  "os": "linux",
  "source": {
    "glob": "/var/log/robot/*.log",
    "stability_window_secs": 60
  },
  "upload": {
    "upload_collection_id": "upl_col_123",
    "upload_collection_name": "Robot Logs",
    "bucket_id": "bkt_123",
    "bucket_name": "my-uploads-bucket",
    "path": "{device_id}/{year}-{month}-{day}/{upload_id}/{file_name}"
  },
  "retention": {
    "require_upload": true,
    "ttl_secs": 604800
  },
  "created_at": "2021-01-01T00:00:00Z",
  "updated_at": "2021-01-01T00:00:00Z"
}

Changes

No operation changes recorded.