Skip to main content
Reorder Rules
Sets the display order of all rules for a space by providing a new ordered array of rule IDs. Only space admins can reorder rules.

Path Parameters

string
required
UUID of the space.

Body Parameters

string[]
required
Ordered array of all rule UUIDs in the desired display order.
string
Required with a service key: the user this request acts as. The request has exactly that user’s permissions, so it is refused unless they are an admin of the space, and it is recorded as theirs. A user token always acts as its own user and must not send it (400 space/acting-user-not-allowed).

Response

Returns the full array of all rules for the space in the new order (same shape as List Rules).

Error Responses

Returned when spaceId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
A service key sent no actingUserId.
actingUserId is not a user id.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
actingUserId was sent in the query string. On this endpoint every field, actingUserId included, goes in the request body.
Returned when a service key names an actingUserId that isn’t a user in this project.
The caller (or the user named by actingUserId) is not an admin of the space.
One or more provided IDs do not exist in this space.
See also: useReorderRules