openapi: 3.0.3
info:
title: GorillaDesk Company User API
description: '# Introduction
The GorillaDesk API is organized around REST.
Our API has predictable resource-oriented URLs, accepts JSON-encoded and form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs..
# Authentication
The GorillaDesk API uses Token authentication. API keys are per-company and can be generated and deleted in the [Addons page](https://beta.gorilladesk.com/addons/api).
# Rate Limits
We enforce API call rate limits to protect our infrastructure from excessive request rates, to keep GorillaDesk fast and stable for everyone. These limits are high enough that typical API workflows aren''t affected. However, please do code your integration to follow the rule below:
**If you receive a response status code of 429 (Too Many Requests), please sleep/pause for the number of seconds specified by the rate_reset value before making additional requests to that endpoint.**
Rate limits are enforced per endpoint group. Endpoint groups are used to provide more granular control by grouping endpoint URL paths and methods (e.g. GET, PUT, etc.) together. For instance, GETs to /v1/users/ and POSTs/PUTs to /v1/customers/ may be counted as two different API groups. This allows us to offer a higher limit on lightweight requests than we would be able to on more resource intensive request types.
API responses will have the following headers to provide rate limiting statistics about the limit it''s closest to hitting.
- `x-rate-limit-limit`: Request limit enforced for this endpoint, some endpoints may allow bursting over this limit
- `x-rate-limit-remaining`: Requests left in the enforcement window
- `x-rate-limit-reset`: Seconds remaining before this enforcement window ends (as a decimal).
'
x-logo:
url: https://cdn.gorilladesk.com/assets/images/gorilladesk.png
altText: GorillaDesk logo
servers:
- url: https://api.gorilladesk.com/v1
security:
- Bearer: []
tags:
- name: User
paths:
/users:
get:
summary: List all users
tags:
- User
parameters:
- in: query
name: limit
schema:
type: integer
default: 20
minimum: 1
maximum: 100
- in: query
name: offset
schema:
type: integer
default: 0
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/User'
has_more:
type: boolean
'401':
description: Unauthorized error
'403':
description: Bad Request
content:
application/json:
schema:
type: object
required:
- error
- message
properties:
error:
type: object
nullable: true
message:
type: string
/users/{userId}:
get:
summary: Retrieve a user
tags:
- User
parameters:
- in: path
name: userId
description: User Id
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/User'
'401':
$ref: '#/paths/~1users/get/responses/401'
'404':
description: Not Found
components:
schemas:
User:
type: object
properties:
id:
type: string
example: 0nk8PGvAO
username:
type: string
example: johndoe
first_name:
type: string
example: John
last_name:
type: string
example: Doe
role:
type: string
enum:
- super_admin
- admin
- technician
example: super_admin
license:
type: string
example: '#91161'
email:
type: string
example: example@gmail.com
avatar:
type: string
example: https://d2e627ktfmb6xb.cloudfront.net/avatars/static/avatar_1.jpg
securitySchemes:
Bearer:
type: http
scheme: bearer