Skip to main content
PUT
Update an Access Rule by id (V2)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

access_rule_id
integer<int64>
required

Access rule identifier.

Body

application/json

display_name, description and image are replaced on every update: leaving one out, or sending null, clears it. The other fields are left unchanged when omitted.

name
string

Names a rule that has no name yet. A rule that already has a name cannot be renamed; sending a different name is a 409.

display_name
string | null

Optional. Display Name must be non-empty and less than 1000 chars.

description
string | null

A human-friendly description of the access rule.

tags
string[]

Replaces the rule's tags. _nio_access_rule is added if missing. An empty list leaves the tags unchanged.

collaborators
object

Describes who can view or query a resource

image
string | null

Optional. Image url must be < 1000 characters, start from https://, ends with one of: jpg, apng, jpeg, jfif, pjpeg, webp, pjp, svg, avif, png, gif, bmp, tiff

status
enum<string>

Current status of the access rule. Deleting a rule archives it.

Available options:
archived,
active
price_cpm_usd
number<double>

How much to charge for a row which matches this access rule. Cost per mille (CPM), more commonly called “cost per thousand,” is how much a buyer pays for 1,000 records.

Required range: x >= 0

Response

OK. The updated rule, which the caller always owns.

id
integer
required

Unique identifier for the access rule.

company_id
integer<int64>
required

The id of an existing company

Example:

345

company_name
string
required

Name of the company that owns this rule.

data_plane_id
string<uuid>
required

The data plane the access rule belongs to. A rule can only be queried from this data plane.

status
enum<string>
required

Status of the access rule. Archived rules are never returned by the read endpoints, so this is active everywhere except the response to the update that archives the rule.

Available options:
archived,
active
tags
string[]
required

Optional. _nio_access_rule will be added even if not presented. Access Rule tag must be non-empty and less than 256 chars.

collaborators
object
required

Describes who can view or query a resource

price_cpm_usd
number<double>
required

How much to charge for a row which matches this access rule. Cost per mille (CPM), more commonly called “cost per thousand,” is how much a buyer pays for 1,000 records.

Required range: x >= 0
dataset_ids
integer<int64>[]
required

All datasets that were used to form the data.

metadata
object
required

When the access rule was created and last updated, and by whom. Only the owning company sees the user ids.

type
enum<string>
required

Indicates the ownership of the access rule.

Available options:
owned
is_owned
enum<boolean>
required

Always true for an owned rule.

Available options:
true
mappings
object[]
required

Attributes that are mapped to columns referenced by this access rule. For each mapped attribute, properties lists the attribute property paths that are exposed by the rule.

query_policy
object | null
required

Limits how a querying company may use the attributes and fields this access rule selects. An attribute is a Rosetta Stone attribute that the access rule selects from _rosetta_stone. A field is any other column of the access rule, such as a dataset column it selects directly. A query that breaks the policy reads no rows from the access rule.

name
string | null

It should be unique. Also should not intersect with Dataset names. Must be <= 256 characters and consist of only alphanumeric characters and underscores.

company_slug
string | null

Optional. Unique slug assigned to company.

display_name
string | null

Optional. Display Name must be non-empty and less than 1000 chars.

description
string | null

A human-friendly description of the access rule.

image
string | null

Optional. Image url must be < 1000 characters, start from https://, ends with one of: jpg, apng, jpeg, jfif, pjpeg, webp, pjp, svg, avif, png, gif, bmp, tiff

nql
string | null

NQL query of access rule.

schema
object | null

Schema describing a structure of View (Access Rule). When the rule exposes mapped attributes, they are described under properties._rosetta_stone.