mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
a0c40ba462
* chore(license): update copyright notices Add CI check for non go files to check that the files contain a license Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> * fix(ci): log failed files When the CI fails during check for license header, log the failed file to console so that someone can check on the actual file. Also simplify the grep check to make it more human readable and understandable Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> --------- Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
117 lines
2.9 KiB
YAML
117 lines
2.9 KiB
YAML
# Copyright (c) Abstract Machines
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
openapi: 3.0.1
|
|
info:
|
|
title: Magistrala Provision service
|
|
description: |
|
|
HTTP API for Provision service
|
|
Some useful links:
|
|
- [The Magistrala repository](https://github.com/absmach/magistrala)
|
|
contact:
|
|
email: info@mainflux.com
|
|
license:
|
|
name: Apache 2.0
|
|
url: https://github.com/absmach/magistrala/blob/master/LICENSE
|
|
version: 0.14.0
|
|
|
|
servers:
|
|
- url: http://localhost:9016
|
|
- url: https://localhost:9016
|
|
|
|
tags:
|
|
- name: provision
|
|
description: Everything about your Provision
|
|
externalDocs:
|
|
description: Find out more about provision
|
|
url: http://docs.mainflux.io/
|
|
|
|
paths:
|
|
/mapping:
|
|
post:
|
|
summary: Adds new device to proxy
|
|
description: Adds new device to proxy
|
|
tags:
|
|
- provision
|
|
requestBody:
|
|
$ref: "#/components/requestBodies/ProvisionReq"
|
|
responses:
|
|
'201':
|
|
description: Created
|
|
'400':
|
|
description: Failed due to malformed JSON.
|
|
"401":
|
|
description: Missing or invalid access token provided.
|
|
'500':
|
|
$ref: "#/components/responses/ServiceError"
|
|
get:
|
|
summary: Gets current mapping.
|
|
description: Gets current mapping. This can be used in UI
|
|
so that when bootstrap config is created from UI matches
|
|
configuration created with provision service.
|
|
tags:
|
|
- provision
|
|
responses:
|
|
'200':
|
|
$ref: "#/components/responses/ProvisionRes"
|
|
"401":
|
|
description: Missing or invalid access token provided.
|
|
'500':
|
|
$ref: "#/components/responses/ServiceError"
|
|
/health:
|
|
get:
|
|
summary: Retrieves service health check info.
|
|
tags:
|
|
- health
|
|
responses:
|
|
'200':
|
|
$ref: "#/components/responses/HealthRes"
|
|
'500':
|
|
$ref: "#/components/responses/ServiceError"
|
|
|
|
components:
|
|
requestBodies:
|
|
ProvisionReq:
|
|
description: MAC address of device or other identifier
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- external_id
|
|
- external_key
|
|
properties:
|
|
external_id:
|
|
type: string
|
|
external_key:
|
|
type: string
|
|
name:
|
|
type: string
|
|
|
|
responses:
|
|
ServiceError:
|
|
description: Unexpected server-side error occurred.
|
|
ProvisionRes:
|
|
description: Current mapping JSON representation.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
HealthRes:
|
|
description: Service Health Check.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "./schemas/HealthInfo.yml"
|
|
|
|
securitySchemes:
|
|
bearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
description: |
|
|
* Users access: "Authorization: Bearer <user_token>"
|
|
|
|
security:
|
|
- bearerAuth: []
|