swagger: '2.0' info: version: "0.0.4" title: Time-lapse API paths: /api/1.0/account: get: summary: Account Information description: | Retrieve account information. This includes info for the current user, any client accounts associated with this user, a list of projects belonging to the client, and camera details for these projects. responses: 200: description: Successful response schema: type: object properties: request_time: type: integer result: $ref: '#/definitions/AccountInformation' 400: description: Bad request - check header and URL 401: description: Unauthorized - username or password invalid 500: description: Internal error - please try again later /api/1.0/dates/project/{project_id}/camera/{camera_id}: parameters: - $ref: '#/parameters/project_id' - $ref: '#/parameters/camera_id' - $ref: '#/parameters/format' get: summary: Date Range description: | Retrieve the range of dates over which a particular camera has captured images, this includes disabled dates for which no images were captured. responses: 200: description: Successful response schema: type: object properties: request_time: type: integer result: type: object properties: start: $ref: '#/definitions/ISO8601_Date' finish: $ref: '#/definitions/ISO8601_Date' disabled: type: array items: $ref: '#/definitions/ISO8601_Date' 400: description: Bad request - check header and URL 401: description: Unauthorized - username or password invalid 403: description: Forbidden - access to this resource is not allowed for this user 500: description: Internal error - please try again later /api/1.0/dates/project/{project_id}/camera/{camera_id}/{date}: parameters: - $ref: '#/parameters/project_id' - $ref: '#/parameters/camera_id' - $ref: '#/parameters/date' - $ref: '#/parameters/format' get: summary: Images by Date description: | Retrieve a timestamped list of images a particular camera captured over a specified date. responses: 200: description: Successful response schema: type: object properties: request_time: type: integer result: type: array items: $ref: '#/definitions/Image' 400: description: Bad request - check header and URL 401: description: Unauthorized - username or password invalid 403: description: Forbidden - access to this resource is not allowed for this user 500: description: Internal error - please try again later /api/1.0/images/project/{project_id}/camera/{camera_id}/{image_name}: parameters: - $ref: '#/parameters/project_id' - $ref: '#/parameters/camera_id' - $ref: '#/parameters/image_name' - $ref: '#/parameters/image_type' get: summary: Date Range description: | Retrieve the binary data for a specified image. The HTTP response format is 'image/jpeg'. responses: 200: description: Successful response 400: description: Bad request - check header and URL 401: description: Unauthorized - username or password invalid 403: description: Forbidden - access to this resource is not allowed for this user 404: description: Not Found - could not find the requested image 500: description: Internal error - please try again later /api/1.0/timelapse/project/{project_id}/camera/{camera_id}: parameters: - $ref: '#/parameters/project_id' - $ref: '#/parameters/camera_id' - $ref: '#/parameters/video_type' - $ref: '#/parameters/video_format' get: summary: Date Range description: | Retrieve the binary data for a specified timelapse film. The HTTP response format is 'video/mp4' or 'video/webm' depending on the video_format parameter. responses: 200: description: Successful response 400: description: Bad request - check header and URL 401: description: Unauthorized - username or password invalid 403: description: Forbidden - access to this resource is not allowed for this user 404: description: Not Found - could not find the requested video 500: description: Internal error - please try again later # Parameters parameters: project_id: name: project_id in: path description: Identifies a project for a particular client type: number required: true camera_id: name: camera_id in: path description: Identifies a camera for a particular project type: number required: true date: name: date in: path description: The image date to look up in ISO8601 format (eg YYY-MM-DD) required: true type: string image_name: name: image_name in: path description: The name of the requested image as returned by the Date endpoint required: true type: string image_type: name: type in: query description: Size of image to return [standard, thumb] type: string default: standard video_type: name: type in: query description: Time-lapse asset type [video, poster] type: string default: video video_format: name: video_format in: query description: Format for the returned data [mp4, webm] type: string default: mp4 format: name: format in: query description: Format for the returned data [json, xml] required: false type: string default: json # Definitions definitions: AccountInformation: type: object properties: user: $ref: '#/definitions/User' client: $ref: '#/definitions/Client' User: type: object properties: username: type: string settings: $ref: '#/definitions/UserSettings' UserSettings: type: object properties: timelapse: type: boolean Client: type: object properties: # Unsure of the difference between logo and logo_url as the former contains a URL in some examples logo: type: string logo_url: type: string name: type: string project: type: array items: $ref: '#/definitions/Project' Project: type: object properties: id: type: integer name: type: string coordinates: type: string location: type: string # Unsure of the function here. The example lists this value as "no" logo: type: string camera: type: array items: $ref: '#/definitions/Camera' Camera: type: object properties: id: type: integer ISO8601_Date: type: string ISO8601_DateTime: type: string Image: type: object properties: image: type: string datetime: $ref: '#/definitions/ISO8601_DateTime' exif: $ref: '#/definitions/Exif' Exif: type: object properties: ShutterSpeed: type: number format: float Aperture: type: number format: float CreatedDate: type: string Width: type: number Height: type: number