Skip to main content

Save a site ingest path policy

Request

Save an ingest path policy for a site. If the resolved policy differs from the current policy, append a revision. If it matches, return the current revision without appending.

Allowed only on BYOS sites. Stores the authored rules without rewriting constant nameTemplate rules to device IDs and without creating devices. An empty rules list is legal and ignores every path.

Security
ApiKey(Required scopes: sites.update)
Path
idstringrequired

Site ID

Bodyapplication/jsonrequired
schemaVersionintegerrequired

Policy document version. Must be 1.

Value:1
rulesArray of objects, <= 100 items(IngestPathRule)required
previousRevisioninteger, >= 0

Optional revision that was current when the policy was edited. The request returns 409 if it does not match the current revision and the submitted policy differs from the current policy. Use 0 when the site has no saved policy.

Payload
{ "schemaVersion": 1, "rules": [ { … } ], "previousRevision": 0 }

Responses

The saved ingest path policy revision

Bodyapplication/json
revisionintegerrequired

Monotonic per-site revision. The highest value is current.

createdAtstring, (date-time)required
policyobject(IngestPathPolicy)required

Authored ingest path-policy document. First matching rule wins. An empty rules list ignores every path (v1 default-ignore). Constant nameTemplate rules stay stored as authored templates.

Response
{ "revision": 0, "createdAt": "2019-08-24T14:15:22Z", "policy": { "schemaVersion": 1, "rules": [ … ] } }