Skip to content

Instantly share code, notes, and snippets.

@LucasRoesler
Last active September 22, 2015 01:31
Show Gist options
  • Save LucasRoesler/665a65cf24f034c3526b to your computer and use it in GitHub Desktop.
Save LucasRoesler/665a65cf24f034c3526b to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: Eventboard API
version: 4.0.0
contact:
url: https://eventboard.io/developers/
email: [email protected]
host: eventboard.io
basePath: /api/v4
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
eventboard:
type: oauth2
authorizationUrl: https://eventboard.io/oauth/authorize/
tokenUrl: https://eventboard.io/oauth/token/
flow: accessCode
scopes:
reservations: the ability to read and modify room reservations
x-documentation: https://eventboard.io/oauth/applications/
definitions:
ReservationInstance:
properties:
id:
type: integer
format: int32
default: 1
description: Unique id for the reservation
title:
type: string
description:
type: string
starts_at:
type: integer
format: int32
ends_at:
type: integer
format: int32
created_at:
type: string
description: Timestamp
updated_at:
type: string
description: Timestamp
calendar_id:
type: integer
description: The id of the calendar the event belongs to.
identifier:
type: string
description: external id of the event
participant_ids:
type: array
items:
type: integer
format: int32
example:
id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
NotFound:
properties:
detail:
type: string
description: Error message
example: Not Found
Unauthorized:
properties:
detail:
type: string
description: Error message
example: Authentication credentials were not provided.
PermissionDenied:
properties:
detail:
type: string
description: Error message
example: You do not have permission to perform this action.
ValidationError:
properties:
field_name:
type: string
description: 'Error message for this field, multiple field names can occur.
'
paths:
/calendars/reservations:
get:
summary: Eventboard reservations
description: 'The reservations api allows your to view or create new resource
reservations. These events will be synced to the organizations
calendar system.
'
tags:
- reservations
security:
- eventboard:
- reservations
parameters:
- name: include[]
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
description: 'Select fields to sideload, parameter can be repeated.
Choices: `participants`
'
- name: room_id
in: query
required: false
type: integer
format: int32
description: Filter the reservations on the room calendar.
- name: calendar_id
in: query
required: false
type: integer
format: int32
description: Filter the reservations on the calendar.
- name: user_id
in: query
required: false
type: integer
format: int32
description: Filter the reservations by the participant list.
- name: per_page
in: query
required: false
type: integer
format: int32
default: 10
- name: page
in: query
required: false
type: integer
format: int32
default: 1
responses:
'200':
description: An array of reservation instances
schema:
type: object
properties:
reservations:
type: array
items:
properties:
id:
type: integer
format: int32
default: 1
description: Unique id for the reservation
title:
type: string
description:
type: string
starts_at:
type: integer
format: int32
ends_at:
type: integer
format: int32
created_at:
type: string
description: Timestamp
updated_at:
type: string
description: Timestamp
calendar_id:
type: integer
description: The id of the calendar the event belongs to.
identifier:
type: string
description: external id of the event
participant_ids:
type: array
items:
type: integer
format: int32
example:
id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
meta:
type: object
properties:
total:
type: integer
format: int32
examples:
application/json:
reservations:
- id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
meta:
total: 1
'401':
description: Unauthorized
schema:
properties:
detail:
type: string
description: Error message
example: Authentication credentials were not provided.
'403':
description: Permission Denied
schema:
properties:
detail:
type: string
description: Error message
example: You do not have permission to perform this action.
'500':
description: Server Error
post:
summary: Create Eventboard reservations
description: 'Create a new reservation instance.
'
tags:
- reservations
security:
- eventboard:
- reservations
parameters:
- name: room_id
in: query
required: true
type: integer
format: int32
description: the room the reservation is for.
- name: include[]
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
description: 'Select fields to sideload, parameter can be repeated.
Choices: `participants`
'
- in: body
name: body
description: the reservation details
required: true
schema:
type: object
properties:
reservation:
properties:
id:
type: integer
format: int32
default: 1
description: Unique id for the reservation
title:
type: string
description:
type: string
starts_at:
type: integer
format: int32
ends_at:
type: integer
format: int32
created_at:
type: string
description: Timestamp
updated_at:
type: string
description: Timestamp
calendar_id:
type: integer
description: The id of the calendar the event belongs to.
identifier:
type: string
description: external id of the event
participant_ids:
type: array
items:
type: integer
format: int32
example:
id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
responses:
'201':
description: reservation successfully created
schema:
type: object
properties:
reservations:
type: array
items:
properties:
id:
type: integer
format: int32
default: 1
description: Unique id for the reservation
title:
type: string
description:
type: string
starts_at:
type: integer
format: int32
ends_at:
type: integer
format: int32
created_at:
type: string
description: Timestamp
updated_at:
type: string
description: Timestamp
calendar_id:
type: integer
description: The id of the calendar the event belongs to.
identifier:
type: string
description: external id of the event
participant_ids:
type: array
items:
type: integer
format: int32
example:
id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
meta:
type: object
properties:
total:
type: integer
format: int32
'401':
description: Unauthorized
schema:
properties:
detail:
type: string
description: Error message
example: Authentication credentials were not provided.
'403':
description: Permission Denied
schema:
properties:
detail:
type: string
description: Error message
example: You do not have permission to perform this action.
'422':
description: Validation Error
schema:
properties:
field_name:
type: string
description: 'Error message for this field, multiple field names can
occur.
'
'500':
description: Server Error
/calendars/reservations/{id}/:
get:
summary: A single Eventboard reservation instance
description: 'The reservations api allows your to view a resource
reservations. These events will be synced to the organizations
calendar system.
'
tags:
- reservations
security:
- eventboard:
- reservations
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
- name: include[]
in: query
required: false
type: array
items:
type: string
collectionFormat: multi
description: 'Select fields to sideload, parameter can be repeated.
Choices: `participants`
'
responses:
'200':
description: A user instance
schema:
type: object
properties:
reservation:
properties:
id:
type: integer
format: int32
default: 1
description: Unique id for the reservation
title:
type: string
description:
type: string
starts_at:
type: integer
format: int32
ends_at:
type: integer
format: int32
created_at:
type: string
description: Timestamp
updated_at:
type: string
description: Timestamp
calendar_id:
type: integer
description: The id of the calendar the event belongs to.
identifier:
type: string
description: external id of the event
participant_ids:
type: array
items:
type: integer
format: int32
example:
id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
meta:
type: object
properties:
total:
type: integer
format: int32
'401':
description: Unauthorized
schema:
properties:
detail:
type: string
description: Error message
example: Authentication credentials were not provided.
'403':
description: Permission Denied
schema:
properties:
detail:
type: string
description: Error message
example: You do not have permission to perform this action.
'404':
description: Not Found
schema:
properties:
detail:
type: string
description: Error message
example: Not Found
'500':
description: Server Error
patch:
summary: A single Eventboard reservation instance
description: 'The reservations api allows your to modify a resource
reservations. These events will be synced to the organizations
calendar system.
'
tags:
- reservations
security:
- eventboard:
- reservations
parameters:
- name: id
in: path
required: true
description: the user id
type: integer
format: int32
- name: body
in: body
required: true
schema:
type: object
properties:
reservation:
properties:
id:
type: integer
format: int32
default: 1
description: Unique id for the reservation
title:
type: string
description:
type: string
starts_at:
type: integer
format: int32
ends_at:
type: integer
format: int32
created_at:
type: string
description: Timestamp
updated_at:
type: string
description: Timestamp
calendar_id:
type: integer
description: The id of the calendar the event belongs to.
identifier:
type: string
description: external id of the event
participant_ids:
type: array
items:
type: integer
format: int32
example:
id: 135
title: Test Event
ends_at: 1442518200
start_at: 1442520000
created_at: '2015-09-17T19:06:38.965208Z'
update_at: '2015-09-17T19:06:38.965208Z'
calendar_id: 389
identifier: gl9p664ea4i6ruhbn3g7k4u9k4
participant_ids:
- 3919
responses:
'204':
description: Reservation updated
'401':
description: Unauthorized
schema:
properties:
detail:
type: string
description: Error message
example: Authentication credentials were not provided.
'403':
description: Permission Denied
schema:
properties:
detail:
type: string
description: Error message
example: You do not have permission to perform this action.
'404':
description: Not Found
schema:
properties:
detail:
type: string
description: Error message
example: Not Found
'422':
description: Validation Error
schema:
properties:
field_name:
type: string
description: 'Error message for this field, multiple field names can
occur.
'
'500':
description: Server Error
delete:
summary: A single Eventboard reservation instance
description: 'The reservations api allows your to delete a resource
reservations. These events will be synced to the organizations
calendar system.
'
tags:
- reservations
security:
- eventboard:
- reservations
parameters:
- name: id
in: path
required: true
type: integer
format: int32
responses:
'204':
description: the user id
'401':
description: Unauthorized
schema:
properties:
detail:
type: string
description: Error message
example: Authentication credentials were not provided.
'403':
description: Permission Denied
schema:
properties:
detail:
type: string
description: Error message
example: You do not have permission to perform this action.
'404':
description: Not Found
schema:
properties:
detail:
type: string
description: Error message
example: Not Found
'500':
description: Server Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment