Shares API

Shares endpoints in the Brix REST API for digital signage: 3 operations (GET, PUT). Each lists its path, auth, required permission and a curl example.

View as Markdown

Base URL https://api.brixsignage.com. Send Authorization: Bearer $BRIX_API_KEY unless an operation says No auth. The permission chip names what the key must hold. See Authentication and scopes, Errors and rate limits and Pagination.

GET/v1/shares/{kind}/{id}

Bearer token screen.view

List the share entries for one content item, showing which nodes, users, and roles it is shared with, and at what level. Requires view, edit, or share permission on the item at its home node. **Notes.** - Besides the screen.view gate, the caller needs the item's view, edit or share permission (playlist.view, …) at its location; media is checked at the workspace root. - A row targets one location (and everything under it), one person or one role; a row with no target shares with every location.

ParameterInTypeRequiredDescription
kindpathstringyes`playlist`, `schedule`, `layout`, `creative`, `signage`, `app` or `media`.
idpathstringyesThe content item's id.
curl "https://api.brixsignage.com/v1/shares/{kind}/{id}" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200 Success.

FieldTypeDescription
dataarray of object
data[].idstring
data[].targetNodeIdstring | null
data[].targetUserIdstring | null
data[].targetRoleIdstring | null
data[].level"disabled" | "play" | "play_local"

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 You hold none of the item's view, edit or share permission at its location.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 404 No such item in this workspace.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 422 Unknown `kind`.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

PUT/v1/shares/{kind}/{id}

Bearer token screen.view

Replace the entire share set for one content item. Each entry targets exactly one of a node, a user, or a role. Requires the item's own share permission at its home node. **Notes.** - Replaces every share of the item in one step. Besides the screen.view gate, the caller needs the kind's share permission at the item's location (media: at the workspace root). - A row targets one location (and everything under it), one person or one role; a row with no target shares with every location. - The response echoes the request's rows rather than the stored ones.

ParameterInTypeRequiredDescription
kindpathstringyes`playlist`, `schedule`, `layout`, `creative`, `signage`, `app` or `media`.
idpathstringyesThe content item's id.

Request body application/json

FieldTypeRequiredDescription
sharesarray of objectyesThe whole new share set (at most 200). An empty array removes every share.
shares[].targetNodeIdstring | nullno
shares[].targetUserIdstring | nullno
shares[].targetRoleIdstring | nullno
shares[].levelstringyes`disabled`, `play` or `play_local`; any other value is stored as `play`.
curl -X PUT "https://api.brixsignage.com/v1/shares/{kind}/{id}" \
  -H "Authorization: Bearer $BRIX_API_KEY" \
  -H "Content-Type: application/json"

Response 200 Success.

FieldTypeDescription
dataobject
data.contentKind"playlist" | "schedule" | "layout" | "creative" | "app" | "media" | "signage"
data.contentIdstring
data.sharesarray of objectThe share set as SENT, with duplicate targets collapsed (last one wins): `level` is echoed as sent, not as stored, and there are no row ids (read them with GET).
data.shares[].targetNodeIdstring | null
data.shares[].targetUserIdstring | null
data.shares[].targetRoleIdstring | null
data.shares[].levelstring

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 You do not hold the kind's share permission (`playlist.share`, …) at the item's location.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 404 No such item in this workspace.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 422 Unknown `kind`, more than 200 rows, a row with more than one target, or a person or role that is not in this workspace (a person must be one the share directory offers you).

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

GET/v1/shares/directory

Bearer token screen.view

List the people and roles a share can target, including id, display name, and, for roles, colour and member count. Available to anyone holding a share permission on any content, rather than requiring full user directory access. People are listed only from the caller's own workspace: a franchise child workspace sees its own people, never the parent's or another child workspace's. Email is returned only for people the caller can see with the user view permission; otherwise it is null. A role's member count counts only the listed people. **Notes.** - Besides the screen.view gate, the caller needs at least one share permission somewhere. - People stop at the child-workspace line: a franchise child workspace sees only its own people, and the parent does not see into a child. email needs user.view reaching that person, else it is null.

curl "https://api.brixsignage.com/v1/shares/directory" \
  -H "Authorization: Bearer $BRIX_API_KEY"

Response 200 Success.

FieldTypeDescription
dataobject
data.usersarray of objectPeople in the workspace the caller shares from (active and invited; never across a franchise child-workspace line).
data.users[].idstring
data.users[].namestring
data.users[].emailstring | nullOnly for people the caller could read with `user.view`; null otherwise.
data.rolesarray of objectEvery role in the workspace.
data.roles[].idstring
data.roles[].namestring
data.roles[].colorstring | null
data.roles[].memberCountintegerMembers among the people listed above.

Response 401 Missing, expired or revoked bearer token.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 403 You hold no share permission (`playlist.share`, `media.share`, …) anywhere.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.

Response 5XX Server error. The body carries a `requestId` to quote to support.

FieldTypeDescription
errorstringMachine-readable code: `unauthorized`, `forbidden`, `not_found`, `validation_error`, `conflict`, `rate_limited`, `internal_error`, …
messagestringHuman-readable explanation. Safe to show an operator.
requestIdstringPresent on 5xx: quote it to support.