Created
June 11, 2025 20:20
-
-
Save rodrcastro/1fd99b32687c624c3d4f8d09f3bd318b to your computer and use it in GitHub Desktop.
openapi test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.3 | |
info: | |
title: Locations API | |
version: 1.0.0 | |
description: > | |
A location is the place of an install represented by a single address. A | |
location can contain one or more servers. Cameras | |
are also assigned directly to locations. | |
x-gitbook-description-document: | |
object: document | |
data: | |
schemaVersion: 8 | |
nodes: | |
- object: block | |
type: paragraph | |
isVoid: false | |
data: {} | |
nodes: | |
- object: text | |
leaves: | |
- object: leaf | |
text: >- | |
A location is the place of an install represented by a single | |
address. A location can contain one or more servers. Cameras | |
are also assigned directly to locations. | |
marks: [] | |
x-gitbook-description-html: >- | |
<p>A location is the place of an install represented by a single address. A | |
location can contain one or more servers. Cameras<br>are also assigned | |
directly to locations.</p> | |
servers: | |
- url: https://api.livereach.ai/api/v1 | |
security: | |
- ApiKeyAuth: [] | |
- BearerAuth: [] | |
paths: | |
/locations: | |
get: | |
tags: | |
- List Locations | |
summary: List locations | |
parameters: | |
- name: query | |
in: query | |
description: Full‑text search term | |
schema: | |
type: string | |
x-gitbook-description-html: <p>Full‑text search term</p> | |
- name: from | |
in: query | |
description: Zero‑based index of the first result to return | |
schema: | |
type: integer | |
minimum: 0 | |
default: 0 | |
x-gitbook-description-html: <p>Zero‑based index of the first result to return</p> | |
- name: limit | |
in: query | |
description: Maximum number of results to return | |
schema: | |
type: integer | |
minimum: 1 | |
maximum: 100 | |
default: 20 | |
x-gitbook-description-html: <p>Maximum number of results to return</p> | |
responses: | |
'200': | |
description: A paginated list of locations | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/EnvelopeLocationArray' | |
x-gitbook-description-html: <p>A paginated list of locations</p> | |
/locations/{id}: | |
parameters: | |
- name: id | |
in: path | |
required: true | |
description: Location ID | |
schema: | |
type: integer | |
x-gitbook-description-html: <p>Location ID</p> | |
get: | |
tags: | |
- get | |
summary: Retrieve a location | |
responses: | |
'200': | |
description: The requested location | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/EnvelopeLocation' | |
x-gitbook-description-html: <p>The requested location</p> | |
tags: | |
- name: List Locations | |
description: This is the descripotion for the list endpoint. | |
x-page-title: List Locations (tag) | |
x-displayName: List Locations (tag) | |
x-page-icon: dog | |
x-page-description: > | |
Retrieves a list of all locations attached to the user's | |
organization. (tag) | |
This will return only a list of locations that the user - determined | |
by the API Key or Bearer token - is authorized to view. | |
- name: get | |
description: This is the descripotion for the get endpoint. | |
x-page-title: Retrieve a Location (tag) | |
x-displayName: List Locations | |
x-page-icon: dog | |
x-page-description: | | |
Retrieves the location with the specified id. | |
components: | |
securitySchemes: | |
ApiKeyAuth: | |
type: apiKey | |
in: header | |
name: Authorization | |
description: | | |
Format: `Authorization: Api-Key {API_KEY}` | |
x-gitbook-description-html: '<p>Format: <code>Authorization: Api-Key {API_KEY}</code></p>' | |
BearerAuth: | |
type: http | |
scheme: bearer | |
bearerFormat: JWT | |
description: | | |
Format: `Authorization: Bearer {TOKEN}` | |
x-gitbook-description-html: '<p>Format: <code>Authorization: Bearer {TOKEN}</code></p>' | |
schemas: | |
OperationResult: | |
type: object | |
properties: | |
success: | |
type: boolean | |
httpCode: | |
type: integer | |
example: 200 | |
required: | |
- success | |
- httpCode | |
EnvelopeLocation: | |
type: object | |
properties: | |
result: | |
$ref: '#/components/schemas/OperationResult' | |
content: | |
$ref: '#/components/schemas/Location' | |
required: | |
- result | |
- content | |
EnvelopeLocationArray: | |
type: object | |
properties: | |
result: | |
$ref: '#/components/schemas/OperationResult' | |
content: | |
type: array | |
items: | |
$ref: '#/components/schemas/Location' | |
required: | |
- result | |
- content | |
Location: | |
type: object | |
description: A physical or logical site belonging to an organization | |
properties: | |
id: | |
type: integer | |
readOnly: true | |
organization_id: | |
type: integer | |
name: | |
type: string | |
coord: | |
type: array | |
description: '[longitude, latitude]' | |
minItems: 2 | |
maxItems: 2 | |
items: | |
type: number | |
format: double | |
x-gitbook-description-html: <p>[longitude, latitude]</p> | |
example: [-87.9073214, 41.97416] | |
created: | |
type: string | |
format: date-time | |
readOnly: true | |
updated: | |
type: string | |
format: date-time | |
readOnly: true | |
archived: | |
type: boolean | |
default: false | |
timezone: | |
type: string | |
example: America/Los_Angeles | |
region: | |
type: string | |
enum: | |
- US | |
- EU | |
country: | |
type: string | |
minLength: 2 | |
maxLength: 2 | |
example: US | |
state: | |
type: string | |
example: CA | |
city: | |
type: string | |
example: "San\_Jose" | |
required: | |
- id | |
- organization_id | |
- name | |
- coord | |
- created | |
- updated | |
- archived | |
x-gitbook-description-html: <p>A physical or logical site belonging to an organization</p> | |
LocationInput: | |
allOf: | |
- $ref: '#/components/schemas/Location' | |
- type: object | |
required: | |
- organization_id | |
- name | |
- coord | |
properties: | |
id: | |
readOnly: true | |
created: | |
readOnly: true | |
updated: | |
readOnly: true | |
LocationPatch: | |
type: object | |
description: Properties to update; omit fields to leave unchanged | |
properties: | |
name: | |
type: string | |
coord: | |
type: array | |
minItems: 2 | |
maxItems: 2 | |
items: | |
type: number | |
format: double | |
archived: | |
type: boolean | |
timezone: | |
type: string | |
region: | |
type: string | |
enum: | |
- US | |
- EU | |
country: | |
type: string | |
minLength: 2 | |
maxLength: 2 | |
state: | |
type: string | |
city: | |
type: string | |
x-gitbook-description-html: <p>Properties to update; omit fields to leave unchanged</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment