mirror of
https://gitlab.com/spaceti-app/integrations/acs/colnod-connector.git
synced 2026-07-12 12:00:37 +02:00
restapi: added info about endpoinst + openapi 3.0 description
This commit is contained in:
parent
88f86c8268
commit
1bb07f0227
34
README.md
34
README.md
@ -1,6 +1,34 @@
|
||||
# colnod-connector
|
||||
|
||||
|
||||
## Colnod
|
||||
|
||||
Acces Management System of Colsys: [Product info](http://produkty.colsys.cz/colnod/)
|
||||
|
||||
## RestAPI definitions
|
||||
|
||||
- `openapi.yaml` ( editor `VSCode` with `Swagger Viewer` extension - ⌘+⇧+P `Preview Swagger` )
|
||||
|
||||
## Colnod Test server
|
||||
|
||||
[Colnod server: confluence](https://spaceti.atlassian.net/wiki/spaces/IN/pages/97320961/Colsys+-+Colnod)
|
||||
|
||||
- URL: `192.168.1.3:8843`
|
||||
- `!!! No license!!!` - server will shutdown after 8 hours.
|
||||
- restart: `sudo service cndserver start`
|
||||
- check `nmap -p8443 192.168.1.3` or `nc -zvw3 192.168.1.3 8443`
|
||||
- user: `spaceti`
|
||||
- password: ``
|
||||
- sha512: `E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0`
|
||||
|
||||
```bash
|
||||
curl -k --user "spaceti:E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0" -d '{"password":"E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0","username":"spaceti"}' -H "Content-Type: application/json" https://192.168.1.3:8443/AaaManager/authSession
|
||||
```
|
||||
|
||||
## Colnod Penta server
|
||||
|
||||
- Acces through: `penta-master` IP:`172.16.3.4`
|
||||
- URL: `192.168.254.11:8443`
|
||||
- Port forwarding: `ssh -L 8443:192.168.254.11:8443 penta-master`
|
||||
- `!!! does not work !!!`
|
||||
|
||||
```bash
|
||||
curl -k --user "spaceti:E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0" -d '{"password":"E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0","username":"spaceti"}' -H "Content-Type: application/json" https://192.168.254.11:8443/AaaManager/authSession
|
||||
```
|
||||
|
||||
117
openapi-testserver.yaml
Normal file
117
openapi-testserver.yaml
Normal file
@ -0,0 +1,117 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
description: "Colnod system: [Product information](http://produkty.colsys.cz/colnod)
|
||||
Jira issues:
|
||||
[Communicaiton with
|
||||
Colnod](https://spaceti.atlassian.net/secure/RapidBoard.jspa?rapidView=78&p\
|
||||
rojectKey=INT&modal=detail&selectedIssue=INT-3563)"
|
||||
version: 1.0.0
|
||||
title: Colnod server
|
||||
contact:
|
||||
name: Filip Bucek
|
||||
email: filip.bucek@spaceti.com
|
||||
|
||||
servers:
|
||||
- url: http://192.168.1.3:8443
|
||||
|
||||
tags:
|
||||
- name: login
|
||||
description: Login information ( token )
|
||||
- name: user
|
||||
description: Operations about user
|
||||
- name: token
|
||||
description: Working with tokens ( keys )
|
||||
paths:
|
||||
/AaaManager/authSession:
|
||||
post:
|
||||
summary: Login user
|
||||
description: Loging using sha512 hash
|
||||
requestBody:
|
||||
description: Optional description in *Markdown*
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Login'
|
||||
# content:
|
||||
# "*/*":
|
||||
# schema:
|
||||
# $ref: "#/components/schemas/Login"
|
||||
tags:
|
||||
- login
|
||||
# parameters:
|
||||
# username: spaceti
|
||||
# password: E7FEA07DBC82FB9BA34B2E453E2EFE89F0583E7187543507EF11E84726071FE428445372F2E46B455EB0C79747C51E362F403CE39473A2A8C2DFA0CE5C9826C0
|
||||
responses:
|
||||
"200":
|
||||
description: Login success
|
||||
content:
|
||||
"*/*":
|
||||
schema:
|
||||
$ref: "#/components/schemas/Token"
|
||||
"400":
|
||||
description: ""
|
||||
content:
|
||||
"*/*":
|
||||
schema:
|
||||
$ref: "#/components/schemas/Token"
|
||||
/SubjectManager/getSubjects:
|
||||
get:
|
||||
summary: Get subjects
|
||||
tags:
|
||||
- user
|
||||
responses:
|
||||
"200":
|
||||
description: xxxxx
|
||||
/TokenManager/getTokens:
|
||||
get:
|
||||
tags:
|
||||
- token
|
||||
responses:
|
||||
"200":
|
||||
description: xxxxx
|
||||
/TokenManager/setTokens:
|
||||
delete:
|
||||
tags:
|
||||
- token
|
||||
responses:
|
||||
"200":
|
||||
description: xxxxx
|
||||
components:
|
||||
securitySchemes:
|
||||
basicAuth: # <-- arbitrary name for the security scheme
|
||||
type: http
|
||||
scheme: basic
|
||||
|
||||
|
||||
# petstore_auth:
|
||||
# type: oauth2
|
||||
# flows:
|
||||
# implicit:
|
||||
# authorizationUrl: http://petstore.swagger.io/oauth/dialog
|
||||
# scopes:
|
||||
# write:pets: modify pets in your account
|
||||
# read:pets: read your pets
|
||||
# api_key:
|
||||
# type: apiKey
|
||||
# name: api_key
|
||||
# in: header
|
||||
schemas:
|
||||
Login:
|
||||
type: object
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
|
||||
Token:
|
||||
type: object
|
||||
properties:
|
||||
tokenType:
|
||||
type: string
|
||||
tokenBits:
|
||||
type: integer
|
||||
|
||||
# security:
|
||||
# - basicAuth: [d] # <-- use the same name here
|
||||
Loading…
x
Reference in New Issue
Block a user