The built-in Role model represents a set of access controls that can apply to a specific user.
Page Contents

All of the endpoints in the Role REST API are inherited from the generic PersistedModel REST API. The reference is provided here for convenience.

Quick reference

URI Pattern

HTTP Verb Default Permission Description Arguments

/roles

 

POST Allow

Add role instance and persist to data source.

JSON object (in request body)
/roles GET Deny Find instances of roles that match specified filter.

One or more filters in query parameters:

  • where
  • include
  • order
  • limit
  • skip / offset
  • fields
/roles PUT Deny Update / insert role instance and persist to data source. JSON object (in request body)
/roles/id GET Deny Find role by ID: Return data for the specified role instance ID. id, the role instance ID (in URI path)
/roles/id PUT Deny Update attributes for specified role ID and persist.

Query parameters:

  • data - An object containing property name/value pairs
  • id - The model id
/roles/id DELETE Deny Delete role with specified instance ID. id, role ID (in URI path)
/roles/id/exists GET Deny

Check instance existence: Return true if specified role ID exists.

URI path:

  • id - Model instance ID
/roles/count GET Deny

Return the number of role instances that matches specified where clause.

Where filter specified in query parameter
/roles/findOne GET Deny

Find first role instance that matches specified filter.

Same as Find matching instances.