Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 4.41 KB

Roles.md

File metadata and controls

90 lines (62 loc) · 4.41 KB

Roles

Information pertaining to retrieving, creating, editing, and deleting roles. Admin permissions and Team feature required.

Link to documentation

List all roles

Returns a list of roles in the account. The roles are returned sorted by creation date, with the most recently created roles appearing first.

The response contains an object with a roles property that contains an array of up to per_page roles. Each entry in the array is a separate role object. If no more roles are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your roles.

Link to documentation

hrvst roles list
Option Description Required
--page The page number to use in pagination. Use all to retrieve all pages. false
--per_page The number of records to return per page. Can range between 1 and 2000. false
--fields Comma separated list of fields to display in the output. false
--output The output format: json, table false

Retrieve a specific role

Retrieves the role with the given ID. Returns a role object and a 200 OK response code if a valid identifier was provided.

Link to documentation

hrvst roles get
Option Description Required
--role_id The ID of the role you're retrieving. true
--fields Comma separated list of fields to display in the output. false
--output The output format: json, table false

Create a role

Creates a new role object. Returns a role object and a 201 Created response code if the call succeeded.

Link to documentation

hrvst roles create
Option Description Required
--name true
--user_ids[] The IDs of the users assigned to this role. false
--fields Comma separated list of fields to display in the output. false
--output The output format: json, table false

Update a role

Updates the specific role by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a role object and a 200 OK response code if the call succeeded.

Link to documentation

hrvst roles update
Option Description Required
--role_id The ID of the role you're updating. true
--name The name of the role. false
--fields Comma separated list of fields to display in the output. false
--output The output format: json, table false

Delete a role

Delete a role. Deleting a role will unlink it from any users it was assigned to. Returns a 200 OK response code if the call succeeded.

Link to documentation

hrvst roles delete
Option Description Required
--role_id The ID of the role you're updating. true
--fields Comma separated list of fields to display in the output. false
--output The output format: json, table false