Created
July 6, 2022 20:14
-
-
Save syntaqx/3038cb0d4c919e896c07a6dbea9646c0 to your computer and use it in GitHub Desktop.
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.1 | |
info: | |
title: Users & Organizations API | |
version: 1.0.0 | |
servers: | |
- url: https://api.entrata.io/users/v1 | |
- url: http://api.entrata.io/users/v1 | |
tags: | |
- name: organizations | |
- name: user | |
- name: users | |
- name: emails | |
paths: | |
/orgs: | |
get: | |
tags: | |
- organizations | |
summary: List organizations | |
parameters: | |
- name: since | |
in: query | |
description: An organization ID. Only return organizations with an ID greater | |
than this ID. | |
schema: | |
type: number | |
- name: per_page | |
in: query | |
description: The number of results per page (max 100) | |
schema: | |
type: number | |
default: 30.0 | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Organization' | |
/orgs/{org}: | |
get: | |
tags: | |
- organizations | |
summary: Get an organization | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Organization' | |
delete: | |
tags: | |
- organizations | |
summary: Update an organization | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: {} | |
patch: | |
tags: | |
- organizations | |
summary: Update an organization | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Organization' | |
/orgs/{org}/audit-log: | |
get: | |
tags: | |
- organizations | |
summary: Get the audit log for an organization | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/LogEntry' | |
/orgs/{org}/members: | |
get: | |
tags: | |
- organizations | |
summary: List organization members | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: page | |
in: query | |
description: Page number of the results to fetch | |
schema: | |
type: number | |
default: 1.0 | |
- name: per_page | |
in: query | |
description: The number of results per page (max 100) | |
schema: | |
type: number | |
default: 30.0 | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/User' | |
/orgs/{org}/members/{username}: | |
get: | |
tags: | |
- organizations | |
summary: Check organization membership for a user | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
204: | |
description: No Content | |
content: {} | |
404: | |
description: Not Found | |
content: {} | |
post: | |
tags: | |
- organizations | |
summary: Set organization membership for a user | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
204: | |
description: No Content | |
content: {} | |
delete: | |
tags: | |
- organizations | |
summary: Remove an organization member | |
parameters: | |
- name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
204: | |
description: No Content | |
content: {} | |
/users/{username}/orgs: | |
get: | |
tags: | |
- organizations | |
- users | |
summary: List organizations for a user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: page | |
in: query | |
description: Page number of the results to fetch | |
schema: | |
type: number | |
default: 1.0 | |
- name: per_page | |
in: query | |
description: The number of results per page (max 100) | |
schema: | |
type: number | |
default: 30.0 | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Organization' | |
/user: | |
get: | |
tags: | |
- user | |
summary: Get the authenticated user | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
/users: | |
get: | |
tags: | |
- users | |
summary: List users | |
parameters: | |
- name: since | |
in: query | |
description: An organization ID. Only return organizations with an ID greater | |
than this ID. | |
schema: | |
type: number | |
- name: per_page | |
in: query | |
description: The number of results per page (max 100) | |
schema: | |
type: number | |
default: 30.0 | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/User' | |
post: | |
tags: | |
- users | |
summary: Create a user | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
/users/{username}: | |
get: | |
tags: | |
- users | |
summary: Get a user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
delete: | |
tags: | |
- users | |
summary: Delete a user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
204: | |
description: No Content | |
content: {} | |
patch: | |
tags: | |
- users | |
summary: Update a user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
/users/{username}/emails: | |
get: | |
tags: | |
- emails | |
summary: List email addresses for the user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
- name: page | |
in: query | |
description: Page number of the results to fetch | |
schema: | |
type: number | |
default: 1.0 | |
- name: per_page | |
in: query | |
description: The number of results per page (max 100) | |
schema: | |
type: number | |
default: 30.0 | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Email' | |
post: | |
tags: | |
- emails | |
summary: Add an email address for the user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
200: | |
description: OK | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Email' | |
delete: | |
tags: | |
- emails | |
summary: Delete an email address for the user | |
parameters: | |
- name: username | |
in: path | |
required: true | |
schema: | |
type: string | |
responses: | |
204: | |
description: No Content | |
content: {} | |
components: | |
schemas: | |
User: | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
login: | |
type: string | |
email: | |
type: string | |
format: email | |
avatar_url: | |
type: string | |
format: uri | |
name: | |
type: string | |
company: | |
type: string | |
location: | |
type: string | |
bio: | |
type: string | |
created_at: | |
type: string | |
format: date-time | |
updated_at: | |
type: string | |
format: date-time | |
Organization: | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
name: | |
type: string | |
avatar_url: | |
type: string | |
format: uri | |
description: | |
type: string | |
created_at: | |
type: string | |
format: date-time | |
updated_at: | |
type: string | |
format: date-time | |
Email: | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
email: | |
type: string | |
format: email | |
visibility: | |
type: string | |
enum: | |
- public | |
- private | |
is_primary: | |
type: boolean | |
verified_at: | |
type: string | |
format: date-time | |
created_at: | |
type: string | |
format: date-time | |
updated_at: | |
type: string | |
format: date-time | |
LogEntry: | |
type: object | |
parameters: | |
page: | |
name: page | |
in: query | |
description: Page number of the results to fetch | |
schema: | |
type: number | |
default: 1.0 | |
per_page: | |
name: per_page | |
in: query | |
description: The number of results per page (max 100) | |
schema: | |
type: number | |
default: 30.0 | |
since: | |
name: since | |
in: query | |
description: An organization ID. Only return organizations with an ID greater | |
than this ID. | |
schema: | |
type: number | |
org: | |
name: org | |
in: path | |
required: true | |
schema: | |
type: string | |
username: | |
name: username | |
in: path | |
required: true | |
schema: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment