Skip to content
ClockLap Developers
API reference clocklap.com Get an API key

API reference

Roles

4 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.

GET/v1/rolesList roles

List roles

Example

curl "https://ca-api.clocklap.com/v1/roles" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200

POST/v1/rolesCreate a role

Create a role

Body (JSON)

NameTypeDescription
namerequiredstring
descriptionstring
permissionsarray of string Default []
clone_fromstring

Example

curl -X POST "https://ca-api.clocklap.com/v1/roles" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example","description":"string","permissions":[],"clone_from":"string"}'

Responses

200

PATCH/v1/roles/{id}Update one role

Update one role

Path parameters

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
namestring
descriptionstring
permissionsarray of string

Example

curl -X PATCH "https://ca-api.clocklap.com/v1/roles/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example","description":"string","permissions":["string"]}'

Responses

200

DELETE/v1/roles/{id}Delete one role

Delete one role

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X DELETE "https://ca-api.clocklap.com/v1/roles/{id}" \
  -H "Authorization: Bearer $CLOCKLAP_API_KEY"

Responses

200