Files
MConnectSDK/docs/mconnect-api-mconnectsdk.yaml
2019-03-01 18:01:56 +01:00

215 lines
5.1 KiB
YAML

swagger: '2.0'
info:
version: 1.0.0
title: MConnect
description: mconnect-api for maestroconnect SDK
host: api.maestroconnect.scmgroup.com
basePath: /api
schemes:
- http
consumes:
- application/json
- application/vnd.maestroconnect.username-login+json
- application/vnd.maestroconnect.email-login+json
produces:
- application/json
tags:
- name: Auth
- name: User
securityDefinitions:
Bearer:
description: Access with JWT
type: apiKey
name: Authorization
in: header
X-Api-Key:
description: Access with Api-Key
type: apiKey
name: Authorization
in: header
paths:
'/organizations/{organizationCode}/users':
get:
description: Get all organization users
operationId: getOrganizationUsers
security:
- Bearer: []
parameters:
- name: organizationCode
in: path
description: BusinessCode of organization
required: true
type: string
tags:
- User
responses:
'200':
description: Organization users
schema:
type: array
items:
properties:
status:
type: string
statusCode:
type: integer
format: int64
total:
type: integer
format: int64
count:
type: integer
format: int64
message:
type: string
result:
type: array
items:
properties:
Id:
type: string
Username:
type: string
'400':
description: Bad request
'401':
description: Unauthorized
'403':
description: Resource Forbidden
'/{organizationCode}/auth/login':
post:
description: User authentication
operationId: loginUser
tags:
- Auth
consumes:
- application/vnd.maestroconnect.username-login+json
- application/vnd.maestroconnect.email-login+json
parameters:
- name: organizationCode
in: path
description: BusinessCode of customer organization
required: true
type: string
- in: body
name: login
description: Login object
schema:
type: object
required:
- Username
- Password
properties:
Username:
type: string
Password:
type: string
responses:
'200':
description: User authenticated
schema:
type: object
properties:
status:
type: string
statusCode:
type: integer
format: int64
message:
type: string
result:
type: object
properties:
user:
$ref: '#/definitions/User'
token:
type: string
refreshToken:
type: string
'400':
description: Bad request
schema:
$ref: '#/definitions/ErrorResponse'
'401':
description: Unauthorized
schema:
$ref: '#/definitions/ErrorResponse'
'403':
description: Resource Forbidden
schema:
$ref: '#/definitions/ErrorResponse'
'404':
description: Not found
schema:
$ref: '#/definitions/ErrorResponse'
'500':
description: Connection refused from 3PSP (third party service provider)
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
User:
type: object
properties:
Id:
type: string
IsActive:
type: boolean
IsAdmin:
type: boolean
Username:
type: string
Email:
type: string
Firstname:
type: string
Lastname:
type: string
Password:
type: string
Image_Url:
type: string
Language:
type: string
Role_Ids:
type: array
items:
properties:
Id:
type: string
Label:
type: string
Name:
type: string
Machine_Group_Ids:
type: array
items:
properties:
Id:
type: string
Name:
type: string
OrganizationCode:
type: string
Controller_Id:
type: string
Controller_Pwd:
type: string
ErrorResponse:
type: object
properties:
status:
type: string
statusCode:
type: number
message:
type: string
result:
properties:
error:
type: string
url:
type: string
label:
type: string