Skip to content

Instantly share code, notes, and snippets.

@LucasRoesler
Last active July 7, 2020 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LucasRoesler/a82a1632c4f7e2d6027a to your computer and use it in GitHub Desktop.
Save LucasRoesler/a82a1632c4f7e2d6027a to your computer and use it in GitHub Desktop.
EB SCIM
swagger: '2.0'
info:
title: Teem User Provisioning API
version: "1.0.0"
contact:
url: https://teem.com/developers/
email: support@teem.com
# the domain of the service
host: app.teem.com
# will be prefixed to all paths
basePath: /api/scim
# array of all schemes that your API supports
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
eventboard:
type: oauth2
authorizationUrl: https://app.teem.com/oauth/authorize/
tokenUrl: https://app.teem.com/oauth/token/
flow: accessCode
scopes:
users: read and modify your users and groups
x-documentation: https://app.teem.com/oauth/applications/
security:
- eventboard:
- users
paths:
/Users:
get:
summary: Teem Users
description: |
The Users endpoint implements the SCIM 2.0 API and Schema for Users.
tags:
- Users
security:
- eventboard:
- users
responses:
200:
description: An array of users
schema:
type: object
properties:
totalResults:
type: integer
format: int32
schemas:
type: array
items:
type: string
Resources:
type: array
items:
$ref: '#/definitions/Users'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users.
schema:
$ref: '#/definitions/PermissionDenied'
post:
summary: Create an Teem User
description: Creates and Returns an Teem User.
tags:
- Users
security:
- eventboard:
- users
parameters:
- in: body
name: body
description: User object to be added
required: true
schema:
$ref: "#/definitions/Users"
responses:
201:
description: The user that was just created
schema:
type: object
items:
$ref: '#/definitions/Users'
400:
description: Invalid data supplied. Will contain a key for each invalid field supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing oauth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
409:
description: Uniqueness Error. Conflicting externalId or other unique field.
schema:
$ref: '#/definitions/UniquenessError'
/Users/{id}:
get:
summary: A single Teem User
description: |
The Users/id endpoint implements the SCIM 2.0 Schema for Users.
tags:
- Users
security:
- eventboard:
- users
responses:
200:
description: A user instance
schema:
type: object
items:
$ref: '#/definitions/Users'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
patch:
summary: Update a single Eventboard User
description: |
The Users/id endpoint implements the SCIM 2.0 Schema for Users.
tags:
- Users
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
- in: body
name: body
description: User object to be replaced
required: true
schema:
$ref: "#/definitions/Users"
responses:
200:
description: A user instance
schema:
type: object
items:
$ref: '#/definitions/Users'
400:
description: Invalid data supplied. Will contain a key for each invalid field supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
409:
description: Uniqueness Error. Conflicting externalId or other unique field.
schema:
$ref: '#/definitions/UniquenessError'
delete:
summary: Delete an Teem User
description: Deletes an Teem User.
tags:
- Users
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
responses:
204:
description: Notification that the delete was successful.
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
/Users/{id}/groups:
patch:
summary: Update the list of groups on an Teem User
description: Update the list of groups on an Teem User
tags:
- Users
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
- name: group_ids
in: body
required: true
description: the list of group ids
schema:
$ref: '#/definitions/GroupIdPayload'
responses:
200:
description: A user instance
schema:
type: object
items:
$ref: '#/definitions/Users'
400:
description: Invalid data supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
put:
summary: Replace the list of groups on an Teem User
description: Replace the list of groups on an Teem User
tags:
- Users
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
- name: group_ids
in: body
required: true
description: the list of group ids
schema:
$ref: '#/definitions/GroupIdPayload'
responses:
200:
description: A user instance
schema:
type: object
items:
$ref: '#/definitions/Users'
400:
description: Invalid data supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
/Groups:
get:
summary: Teem Groups
tags:
- Groups
security:
- eventboard:
- users
responses:
200:
description: An array of groups
schema:
type: object
properties:
totalResults:
type: integer
format: int32
schemas:
type: array
items:
type: string
Resources:
type: array
items:
$ref: '#/definitions/Groups'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
post:
summary: Create an Teem Group
description: Creates and Returns an Teem Group.
tags:
- Groups
security:
- eventboard:
- users
parameters:
- in: body
name: body
description: Group object to be added
required: true
schema:
$ref: "#/definitions/Groups"
responses:
201:
description: The group that was just created
schema:
type: object
items:
$ref: '#/definitions/Groups'
400:
description: Invalid data supplied. Will contain a key for each invalid field supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
409:
description: Uniqueness Error. Conflicting externalId or other unique field.
schema:
$ref: '#/definitions/UniquenessError'
/Groups/{id}:
get:
summary: A single Teem Group
tags:
- Groups
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the Group id
type: integer
format: int32
responses:
200:
description: A Teem Group
schema:
type: object
items:
$ref: '#/definitions/Groups'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
patch:
summary: Update a single Teem Group
tags:
- Groups
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the Group id
type: integer
format: int32
- in: body
name: body
description: the Group object to be replaced
required: true
schema:
$ref: "#/definitions/Groups"
responses:
200:
description: A user instance
schema:
type: object
items:
$ref: '#/definitions/Groups'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
422:
description: Invalid data supplied. Will contain a key for each invalid field supplied.
schema:
$ref: '#/definitions/Error'
409:
description: Uniqueness Error. Conflicting externalId or other unique field.
schema:
$ref: '#/definitions/UniquenessError'
delete:
summary: Delete an Teem Group
tags:
- Groups
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the Group id
type: integer
format: int32
responses:
204:
description: Notification that the delete was successful.
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
/Groups/{id}/users:
patch:
summary: Update the list of users on an Teem group
description: Update the list of users on an Teem group
tags:
- Groups
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the group id
type: integer
format: int32
- name: group_ids
in: body
required: true
description: the list of group ids
schema:
$ref: '#/definitions/UserIdPayload'
responses:
200:
description: A group instance
schema:
type: object
items:
$ref: '#/definitions/Groups'
400:
description: Invalid data supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
put:
summary: Replace the list of users on an Teem group
description: Replace the list of users on an Teem group
tags:
- Groups
security:
- eventboard:
- users
parameters:
- name: id
in: path
required: true
description: the group id
type: integer
format: int32
- name: group_ids
in: body
required: true
description: the list of group ids
schema:
$ref: '#/definitions/UserIdPayload'
responses:
200:
description: A group instance
schema:
type: object
items:
$ref: '#/definitions/Groups'
400:
description: Invalid data supplied.
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized. Missing OAuth authentication token
schema:
$ref: '#/definitions/Unauthorized'
403:
description: Permissions Denied. The accessing user must have write permissions for Users and Groups.
schema:
$ref: '#/definitions/PermissionDenied'
definitions:
Users:
properties:
id:
type: integer
format: int32
default: 1
description: Unique identifier for the user.
externalId:
type: string
description: Unique identifier provided from an extrnal source.
active:
type: boolean
description: is the user active
userName:
type: string
description: The user's email address.
displayName:
type: object
properties:
familyName:
type: string
givenName:
type: string
formatted:
type: string
name:
type: object
description: The user's name.
properties:
familyName:
type: string
givenName:
type: string
formatted:
type: string
emails:
type: array
items:
type: object
properties:
value:
type: string
description: The email address
'type':
type: string
example: other
primary:
type: boolean
phoneNumbers:
type: array
items:
type: object
properties:
value:
type: string
description: The phone number
'type':
type: string
example: other
primary:
type: boolean
groups:
type: array
readOnly: true
items:
type: object
properties:
value:
type: integer
format: int32
description: The group id.
display:
type: string
description: The group name.
ref:
type: string
description: The uri for the group.
meta:
type: object
properties:
resourceType:
type: string
default: 'User'
created:
type: string
format: dateTime
location:
type: string
description: uri for this User.
version:
type: string
description: e-tag for this User.
schemas:
type: array
items:
type: string
format: string
required:
- externalId
- emails
- userName
- name
- active
Groups:
properties:
id:
type: integer
format: int32
displayName:
type: string
format: string
device:
type: boolean
description:
type: string
format: string
memebers:
type: array
items:
type: object
properties:
value:
type: integer
format: int32
description: the user id of the group member
ref:
type: string
description: the uri of the user
meta:
type: object
properties:
resourceType:
type: string
default: 'User'
created:
type: string
format: dateTime
location:
type: string
description: uri for this Group.
version:
type: string
description: e-tag for this Group.
schemas:
type: array
items:
type: string
format: string
required:
- displayName
GroupIdPayload:
properties:
group_ids:
type: array
items:
type: integer
format: int32
description: Eventboard group id
required:
- group_ids
UserIdPayload:
properties:
user_ids:
type: array
items:
type: integer
format: int32
description: Eventboard user id
required:
- user_ids
Error:
properties:
status:
type: integer
format: int32
example: 400
schemas:
type: array
items:
type: string
example: ['urn:ietf:params:scim:api:messages:2.0:Error']
field_name:
type: array
items:
type: string
example: ['Email is a required field.']
Unauthorized:
properties:
status:
type: integer
format: int32
example: 401
description: HTTP status code
schemas:
type: array
items:
type: string
example: ['urn:ietf:params:scim:api:messages:2.0:Error']
detail:
type: string
UniquenessError:
properties:
status:
type: integer
format: int32
example: 409
description: HTTP status code
schemas:
type: array
items:
type: string
example: ['urn:ietf:params:scim:api:messages:2.0:Error']
scimType:
type: string
detail:
type: string
PermissionDenied:
properties:
status:
type: integer
format: int32
example: 403
description: HTTP status code
schemas:
type: array
items:
type: string
example: ['urn:ietf:params:scim:api:messages:2.0:Error']
detail:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment