Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACK-3011] Document the device_logs metadata and content endpoints. #120

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ build
.idea/
/node_modules/
/tools/
.DS_Store
Session.vim
30 changes: 30 additions & 0 deletions reference/blob.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ paths:
parameters:
- $ref: ./blob/parameters/start-at.v1.yaml
- $ref: ./blob/parameters/end-at.v1.yaml
- $ref: ./common/parameters/paginationpage.v1.yaml
- $ref: ./common/parameters/paginationsize.v1.yaml
responses:
'200':
$ref: '#/components/responses/DeviceLogsMetadataList'
Expand All @@ -103,6 +105,28 @@ paths:
tags:
- Device Logs

'/v1/device_logs/{deviceLogId}/content':
parameters:
- $ref: './blob/parameters/device-log-id.v1.yaml'
get:
operationId: GetDeviceLogContent
summary: Get the content of a single device log.
description: >-
Retrieves the content of the device log.
responses:
'200':
$ref: '#/components/responses/DeviceLogContent'
'400':
$ref: './common/responses/badrequest.v1.yaml'
'401':
$ref: './common/responses/unauthorized.v1.yaml'
'403':
$ref: './common/responses/forbidden.v1.yaml'
'404':
$ref: './common/responses/notfound.v1.yaml'
tags:
- Device Logs

'/v1/users/{userId}/blobs':
parameters:
- $ref: ./common/parameters/tidepooluserid.yaml
Expand Down Expand Up @@ -280,6 +304,12 @@ components:
'*/*':
schema:
$ref: './blob/models/content.v1.yaml'
DeviceLogContent:
description: Device log content.
content:
application/json:
schema:
$ref: ./blob/models/device-log-content-list.v1.yaml
DeviceLogsMetadata:
description: Device logs metadata
content:
Expand Down
16 changes: 16 additions & 0 deletions reference/blob/models/device-log-content-list.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Contents of a device log.
type: array
minItems: 0
items:
$ref: './device-log-content.v1.yaml'
example:
- type: send
managerIdentifier: 'Devicey McDeviceface'
deviceIdentifier: 'MMT-1711:12345678'
timestamp: '2017-02-06T02:37:46Z'
message: 'sent something ...'
- type: connection
managerIdentifier: 'Devicey McDeviceface'
deviceIdentifier: 'MMT-1711:12345678'
timestamp: '2017-02-06T02:36:50Z'
message: 'establishing connection ...'
7 changes: 7 additions & 0 deletions reference/blob/parameters/device-log-id.v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: >-
DeviceLog ID
name: deviceLogId
in: path
required: true
schema:
$ref: '../models/id.v1.yaml'
2 changes: 1 addition & 1 deletion reference/blob/parameters/end-at.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ description: >-
End At Datetime
name: endAtTime
in: query
required: true
required: false
schema:
$ref: '../../common/models/datetime.v1.yaml'
2 changes: 1 addition & 1 deletion reference/blob/parameters/start-at.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ description: >-
Start At Datetime
name: startAtTime
in: query
required: true
required: false
schema:
$ref: '../../common/models/datetime.v1.yaml'
Loading