OpenAPI definition ​
References are expanded below, except recursive definitions and references with sibling fields. Documentation overrides are included. Full original OpenAPI spec (JSON).
View endpoint OpenAPI definition
yaml
info:
title: Lightbug API
version: '2'
externalDocs:
description: ''
url: ''
openapi: 3.1.0
servers:
- url: https://api.lightbug.cloud/v2
tags: []
paths:
/users/login:
post:
description: |-
Login and receive an access token for future requests.
Optionally receive a refresh token for future access token generation.requestBody:
yaml
content:
application/json:
schema:
properties:
password:
description: Password of the user
type: string
refreshable:
description: Generate a refresh token, which expires this many seconds after the access token expiry. Max 31 days
maximum: 2678400
type: integer
username:
description: TODO convert to email instead of username before publishing auth routes...
type: string
required:
- password
- username
type: object
description: Login
required: trueyaml
responses:'200':
yaml
content:
application/json:
schema:
properties:
expiry:
description: Expiry of the access token
type: string
refreshToken:
description: 'Optional: Single use refresh token, if refreshable is set'
type: string
refreshTokenExpiry:
description: 'Optional: Expiry of the refresh token, if refreshable is set'
type: string
token:
description: JWT access token
type: string
userId:
description: User ID of the logged in user
type: integer
required:
- expiry
- token
- userId
type: object
description: OK'400':
yaml
content:
application/json:
schema:
properties:
code:
example: 400
type: integer
message:
example: status bad request
type: string
type: object
description: Bad Request'401':
yaml
content:
application/json:
schema:
properties:
code:
example: 400
type: integer
message:
example: status bad request
type: string
type: object
description: Unauthorized'429':
yaml
content:
application/json:
schema:
type: string
description: Limit exceeded
headers:
X-Ratelimit-Limit:
schema:
type: integer
X-Ratelimit-Remaining:
schema:
type: integer
X-Ratelimit-Reset:
schema:
type: integer'500':
yaml
content:
application/json:
schema:
properties:
code:
example: 400
type: integer
message:
example: status bad request
type: string
type: object
description: Internal Server Erroryaml
summary: Login
tags:
- auth
operationId: post-users-login