Update the API documentation of manager service
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
This commit is contained in:
parent
5899177f57
commit
52ab91c275
|
@ -56,24 +56,6 @@ paths:
|
||||||
Failed due to malformed JSON or using an invalid credentials.
|
Failed due to malformed JSON or using an invalid credentials.
|
||||||
500:
|
500:
|
||||||
$ref: "#/responses/ServiceError"
|
$ref: "#/responses/ServiceError"
|
||||||
/identity:
|
|
||||||
post:
|
|
||||||
summary: Identity retrieval
|
|
||||||
description: |
|
|
||||||
Retrieves the entity identifier given its secret key.
|
|
||||||
tags:
|
|
||||||
- identity
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/Authorization"
|
|
||||||
responses:
|
|
||||||
200:
|
|
||||||
description: ID retrieved
|
|
||||||
headers:
|
|
||||||
X-Client-Id:
|
|
||||||
type: string
|
|
||||||
description: ID of the entity
|
|
||||||
403:
|
|
||||||
description: Missing or invalid access token provided.
|
|
||||||
/clients:
|
/clients:
|
||||||
post:
|
post:
|
||||||
summary: Adds new client
|
summary: Adds new client
|
||||||
|
@ -320,41 +302,46 @@ paths:
|
||||||
description: Missing or invalid access token provided.
|
description: Missing or invalid access token provided.
|
||||||
500:
|
500:
|
||||||
$ref: "#/responses/ServiceError"
|
$ref: "#/responses/ServiceError"
|
||||||
/channels/{id}/messages:
|
/access-grant:
|
||||||
get:
|
get:
|
||||||
summary: Checks whether a message can be read
|
summary: Checks the token validity
|
||||||
description: |
|
description: |
|
||||||
Performs permission check on read request(s) redirected from message
|
Internal endpoint used to verify requests forwarded by stateful adapters
|
||||||
reader service. Based on the response, the reader should either respond
|
like MQTT. If the request is made using valid token, an identifier bound
|
||||||
with stored messages, or reject the request.
|
to that token will be returned.
|
||||||
tags:
|
tags:
|
||||||
- messaging
|
- access control
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/parameters/Authorization"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: ID retrieved
|
||||||
|
headers:
|
||||||
|
X-client-id:
|
||||||
|
type: string
|
||||||
|
description: ID of the entity bound to the provided access key.
|
||||||
|
403:
|
||||||
|
description: Missing or invalid access token provided.
|
||||||
|
/channels/{id}/access-grant:
|
||||||
|
get:
|
||||||
|
summary: Checks channel accessibility
|
||||||
|
description: |
|
||||||
|
Internal endpoint used to determine whether or not a channel can be
|
||||||
|
accessed using credentials provided as part of the request.
|
||||||
|
tags:
|
||||||
|
- access control
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/parameters/Authorization"
|
- $ref: "#/parameters/Authorization"
|
||||||
- $ref: "#/parameters/Id"
|
- $ref: "#/parameters/Id"
|
||||||
responses:
|
responses:
|
||||||
202:
|
200:
|
||||||
description: Message can be read from the channel.
|
description: Client can access the channel.
|
||||||
|
headers:
|
||||||
|
X-client-id:
|
||||||
|
type: string
|
||||||
|
description: ID of the entity bound to the provided access key.
|
||||||
403:
|
403:
|
||||||
description: Message cannot be read from the channel.
|
description: Client cannot access the channel.
|
||||||
500:
|
|
||||||
$ref: "#/responses/ServiceError"
|
|
||||||
post:
|
|
||||||
summary: Checks whether a message can be written
|
|
||||||
description: |
|
|
||||||
Performs permission check on write request(s) redirected from protocol
|
|
||||||
adapter(s). Based on the response, the adapter should either emit the
|
|
||||||
event, or reject the request.
|
|
||||||
tags:
|
|
||||||
- messaging
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/Authorization"
|
|
||||||
- $ref: "#/parameters/Id"
|
|
||||||
responses:
|
|
||||||
202:
|
|
||||||
description: Message can be written to the channel.
|
|
||||||
403:
|
|
||||||
description: Message cannot be written to the channel.
|
|
||||||
500:
|
500:
|
||||||
$ref: "#/responses/ServiceError"
|
$ref: "#/responses/ServiceError"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version string = "1.0.0"
|
const version string = "1.0.0-rc.1"
|
||||||
|
|
||||||
type response struct {
|
type response struct {
|
||||||
Version string
|
Version string
|
||||||
|
|
Loading…
Reference in New Issue