Created
August 6, 2015 10:50
-
-
Save ni5ni6/d57956fadbd112bd8dba 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
| #%RAML 0.8 | |
| --- | |
| title: Activity | |
| baseUri: http://api.smartliving.io | |
| mediaType: application/json | |
| # Me | |
| /me/notifications: | |
| displayName: Your notifications | |
| get: | |
| displayName: List your notifications | |
| description: | | |
| Gives overview of `unread` notifications (the ones to be picked up) so you have peace of mind not to miss anything important | |
| queryParameters: | |
| all: | |
| type: boolean | |
| description: | | |
| If `true`, show notifications marked as read. Default: `false` | |
| required: false | |
| responses: | |
| 200: | |
| body: | |
| example: | | |
| { | |
| "items": [ | |
| { | |
| "at": "2015-08-01T00:00:00Z", | |
| "value": { | |
| "event": "DeviceAssetStateChanged", | |
| "data": { | |
| "asset": { | |
| "id": "rocket_flightPhase" | |
| }, | |
| "state": { | |
| "value": "prepare", | |
| "at": "2015-08-01T00:00:00Z" | |
| } | |
| }, | |
| "where": "playground", | |
| "isRead": false | |
| } | |
| }, | |
| { | |
| "at": "2015-08-01T00:00:00Z", | |
| "value": { | |
| "event": "DeviceAssetStateChanged", | |
| "data": { | |
| "asset": { | |
| "id": "rocket_flightPhase" | |
| }, | |
| "state": { | |
| "value": "takeoff", | |
| "at": "2015-08-01T00:00:05Z" | |
| } | |
| }, | |
| "where": "playground", | |
| "isRead": false | |
| } | |
| }, | |
| { | |
| "at": "2015-08-01T00:00:00Z", | |
| "value": { | |
| "event": "DeviceAssetStateChanged", | |
| "data": { | |
| "asset": { | |
| "id": "rocket_flightPhase" | |
| }, | |
| "state": { | |
| "value": "flying", | |
| "at": "2015-08-01T00:00:10Z" | |
| } | |
| }, | |
| "where": "playground", | |
| "isRead": false | |
| } | |
| } | |
| ] | |
| } | |
| schema: !include schemas/notification.schema.json | |
| 401: | |
| body: | |
| schema: !include schemas/error.schema.json | |
| patch: | |
| displayName: Mark notifications as read | |
| description: | | |
| - Provide 'at' in the body with exact timestamp of the notification you want to mark as read | |
| - Omit 'at' to mark ALL notifications as read | |
| /me/subscriptions: | |
| get: | |
| displayName: List your subscriptions | |
| description: Currently only ground activity subscriptions are listed | |
| responses: | |
| 200: | |
| body: | |
| example: | | |
| { | |
| "items": [ | |
| "ground/garage/activity", | |
| "ground/playground/activity" | |
| ] | |
| } | |
| /ground/{id}/activity: | |
| displayName: Ground activity | |
| get: List ground activity | |
| /ground/{id}/subscription: | |
| put: | |
| displayName: Subscribe to notifications about ground activity | |
| description: | | |
| Subscribe for ground activity so you are adequatley informed about activity going on in a ground you contribute | |
| delete: | |
| displayName: Unsubscribe from notifications about ground activity | |
| description: | | |
| Unsubscribe from ground activity so you stop being informed about activity going on in a ground you contribute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment