Skip to content

Commit

Permalink
Update api docs
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
  • Loading branch information
nyagamunene committed Sep 25, 2024
1 parent 6f419aa commit 2bb9f74
Show file tree
Hide file tree
Showing 17 changed files with 280 additions and 270 deletions.
22 changes: 15 additions & 7 deletions api/openapi/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tags:
url: https://docs.magistrala.abstractmachines.fr/

paths:
/things/configs:
/domains/{domainID}/things/configs:
post:
operationId: createConfig
summary: Adds new config
Expand Down Expand Up @@ -70,6 +70,7 @@ paths:
tags:
- configs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/State"
Expand All @@ -85,7 +86,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/things/configs/{configId}:
/domains/{domainID}/things/configs/{configId}:
get:
operationId: getConfig
summary: Retrieves config info (with channels).
Expand Down Expand Up @@ -118,6 +119,7 @@ paths:
tags:
- configs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ConfigId"
requestBody:
$ref: "#/components/requestBodies/ConfigUpdateReq"
Expand Down Expand Up @@ -147,6 +149,7 @@ paths:
tags:
- configs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ConfigId"
responses:
"204":
Expand All @@ -161,7 +164,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/things/configs/certs/{configId}:
/domains/{domainID}/things/configs/certs/{configId}:
patch:
operationId: updateConfigCerts
summary: Updates certs
Expand All @@ -171,6 +174,7 @@ paths:
tags:
- configs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ConfigId"
requestBody:
$ref: "#/components/requestBodies/ConfigCertUpdateReq"
Expand All @@ -192,7 +196,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/things/configs/connections/{configId}:
/domains/{domainID}/things/configs/connections/{configId}:
put:
operationId: updateConfigConnections
summary: Updates channels the thing is connected to
Expand All @@ -202,6 +206,7 @@ paths:
tags:
- configs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ConfigId"
requestBody:
$ref: "#/components/requestBodies/ConfigConnUpdateReq"
Expand All @@ -222,7 +227,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/things/bootstrap/{externalId}:
/domains/{domainID}/things/bootstrap/{externalId}:
get:
operationId: getBootstrapConfig
summary: Retrieves configuration.
Expand All @@ -233,6 +238,7 @@ paths:
security:
- bootstrapAuth: []
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ExternalId"
responses:
"200":
Expand All @@ -247,7 +253,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/things/bootstrap/secure/{externalId}:
/domains/{domainID}/things/bootstrap/secure/{externalId}:
get:
operationId: getSecureBootstrapConfig
summary: Retrieves configuration.
Expand All @@ -258,6 +264,7 @@ paths:
security:
- bootstrapEncAuth: []
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ExternalId"
responses:
"200":
Expand All @@ -273,7 +280,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/things/state/{configId}:
/domains/{domainID}/things/state/{configId}:
put:
operationId: updateConfigState
summary: Updates Config state.
Expand All @@ -283,6 +290,7 @@ paths:
tags:
- configs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ConfigId"
requestBody:
$ref: "#/components/requestBodies/ConfigStateUpdateReq"
Expand Down
11 changes: 8 additions & 3 deletions api/openapi/certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ tags:
url: https://docs.magistrala.abstractmachines.fr/

paths:
/certs:
/domains/{domainID}/certs:
post:
operationId: createCert
summary: Creates a certificate for thing
description: Creates a certificate for thing
tags:
- certs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
requestBody:
$ref: "#/components/requestBodies/CertReq"
responses:
Expand All @@ -51,7 +53,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/certs/{certID}:
/domains/{domainID}/certs/{certID}:
get:
operationId: getCert
summary: Retrieves a certificate
Expand All @@ -60,6 +62,7 @@ paths:
tags:
- certs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/CertID"
responses:
"200":
Expand All @@ -85,6 +88,7 @@ paths:
tags:
- certs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/CertID"
responses:
"200":
Expand All @@ -100,7 +104,7 @@ paths:
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/serials/{thingID}:
/domains/{domainID}/serials/{thingID}:
get:
operationId: getSerials
summary: Retrieves certificates' serial IDs
Expand All @@ -109,6 +113,7 @@ paths:
tags:
- certs
parameters:
- $ref: "auth.yml#/components/parameters/DomainID"
- $ref: "#/components/parameters/ThingID"
responses:
"200":
Expand Down
Loading

0 comments on commit 2bb9f74

Please sign in to comment.