@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api groov View Public API
@version R4.2a
@auth ApiKey api_key in query
@endpoints 10
@toc info(1), whoami(1), data-store(6), logging(2)

@group info
@endpoint GET /info
@desc Get information about groov View. No authorization required.
@returns(200) OK

@endgroup

@group whoami
@endpoint GET /whoami
@desc Get information about the user you are authenticated as. Authorized for admins, editors, operators, and kiosk.
@returns(200) OK

@endgroup

@group data-store
@endpoint GET /v1/data-store/devices
@desc List devices available in the data store. Authorized for admins and editors.
@returns(200) OK

@endpoint GET /v1/data-store/devices/{id}/tags
@desc List tags of the given device. Authorized for admins and editors.
@returns(200) OK

@endpoint GET /v1/data-store/tags
@desc List all data store tags defined in the project. Authorized for admins and editors.
@returns(200) OK

@endpoint POST /v1/data-store/read
@desc Read selected tags from the data store. Authorized for admins and editors.
@returns(200) OK

@endpoint GET /v1/data-store/read/{id}
@desc Read the current value of a single tag. Authorized for admins and editors.
@returns(200) OK

@endpoint POST /v1/data-store/write/{id}
@desc Writes a new value to the given tag. Authorized for admins and editors.
@returns(200) OK

@endgroup

@group logging
@endpoint GET /v1/logging/groovLogs.txt
@desc Downloads the complete groov View log. Added in groov View R4.2a.
@optional {minimum-log-level: any # How verbose the log should be., last-timestamp: any # The earliest time to include in the log. Value is milliseconds since January 1, 1970 UTC., filter: any # Optional string to search for in the log.}
@returns(200) Downloaded log file.

@endpoint GET /v1/logging/groovLogs.json
@desc Downloads the complete groov View log in JSON format. Added in groov View R4.2a.
@optional {minimum-log-level: any # How verbose the log should be., last-timestamp: any # The earliest time to include in the log. Value is milliseconds since January 1, 1970 UTC., filter: any # Optional string to search for in the log.}
@returns(200) Downloaded log file.

@endgroup

@end
