123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- #
- # Copyright 2016-present the original author or authors.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # https://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- #
- ### --------------------- Gateway User Api ---------------------
- ### 注册用户
- #/api/v3/register
- POST http://{{dc3-gateway}}/api/v3/register
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "name": "dc3",
- "password": "dc3dc3dc3",
- "description": "平台开发者账号"
- }
- ### --------------------- Gateway Token Api---------------------
- ### 生成用户 Salt
- #/api/v3/token/salt
- GET http://{{dc3-gateway}}/api/v3/token/salt
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "name": "pnoker"
- }
- ### 生成用户 Token 令牌
- #/api/v3/token/generate
- POST http://{{dc3-gateway}}/api/v3/token/generate
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "name": "pnoker",
- "password": "900eb6ba49ffd909b74b71da2a395824"
- }
- ### 检测用户 Token 令牌是否有效
- #/api/v3/token/check
- GET http://{{dc3-gateway}}/api/v3/token/check
- Accept: */*
- Content-Type: application/x-www-form-urlencoded
- Cache-Control: no-cache
- username=pnoker&token=eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJwbm9rZXIiLCJpYXQiOjE1OTIwNTgyMTEsImV4cCI6MTU5MjA3OTgxMX0.nJ2fmItykFVqaRIbjIeqNVc4vDAOP5lPyNZtfcfNzgg
- ### 注销用户 Token 令牌
- #/api/v3/token/cancel
- GET http://{{dc3-gateway}}/api/v3/token/cancel
- Accept: */*
- Content-Type: application/x-www-form-urlencoded
- Cache-Control: no-cache
- username=pnoker
- ### --------------------- Gateway Driver Api---------------------
- ### 新增 Driver
- #/manager/driver/add
- POST http://{{dc3-gateway}}/api/v3/manager/driver/add
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "name": "测试驱动",
- "serviceName": "dc3-driver-test",
- "host": "127.0.0.1",
- "port": 8799,
- "description": "测试驱动"
- }
- ### 批量新增 Driver
- #/manager/driver/batch_import
- POST http://{{dc3-gateway}}/api/v3/manager/driver/batch_import
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- < ../../files/batch-import.json
- ### 修改 Driver
- #/api/v3/manager/driver/update
- POST http://{{dc3-gateway}}/api/v3/manager/driver/update
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "id": 1,
- "name": "测试驱动",
- "serviceName": "dc3-driver-test",
- "host": "127.0.0.1",
- "port": 8799,
- "description": "测试驱动"
- }
- ### 根据 ID 查询 Driver
- #/api/v3/manager/driver/id/:id
- GET http://{{dc3-gateway}}/api/v3/manager/driver/id/1
- Accept: */*
- Cache-Control: no-cache
- ### 查询 Driver 服务状态
- #/api/v3/manager/driver/driverStatus,支持name\serverName\host模糊查询,port精准查询
- POST http://{{dc3-gateway}}/api/v3/manager/driver/driverStatus
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "name": "",
- "page": {
- "current": 1,
- "orders": [
- {
- "column": "id",
- "asc": false
- }
- ]
- }
- }
- ### 分页查询 Driver
- #/api/v3/manager/driver/list,支持name\serverName\host模糊查询,port精准查询
- POST http://{{dc3-gateway}}/api/v3/manager/driver/list
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "name": "",
- "page": {
- "current": 1,
- "orders": [
- {
- "column": "id",
- "asc": false
- }
- ]
- }
- }
- ### 根据 ID 删除 Driver
- #/api/v3/manager/driver/delete/:id
- POST http://{{dc3-gateway}}/api/v3/manager/driver/delete/1
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- ### --------------------- Gateway Driver Attribute ---------------------
- ### 新增 DriverAttribute
- #/api/v3/manager/driver_attribute/add
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute/add
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "displayName": "测试IP",
- "name": "ip",
- "type": "string",
- "value": "localhost",
- "driverId": -1,
- "description": "测试驱动属性"
- }
- ### 修改 DriverAttribute
- #/api/v3/manager/driver_attribute/update
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute/update
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "id": 1,
- "displayName": "测试IP",
- "name": "ip",
- "type": "string",
- "value": "localhost",
- "driverId": -1,
- "description": "测试驱动属性"
- }
- ### 根据 ID 查询 DriverAttribute
- #/api/v3/manager/driver_attribute/id/:id
- GET http://{{dc3-gateway}}/api/v3/manager/driver_attribute/id/1
- Accept: */*
- Cache-Control: no-cache
- ### 分页查询 DriverAttribute
- #/api/v3/manager/driver_attribute/list,支持displayName模糊查询,name\type\driverId精准查询
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute/list
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "displayName": "",
- "page": {
- "current": 1,
- "orders": [
- {
- "column": "id",
- "asc": false
- }
- ]
- }
- }
- ### 根据 ID 删除 DriverAttribute
- #/api/v3/manager/driver_attribute/delete/:id
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute/delete/1
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- ### --------------------- Gateway Driver Attribute Config ---------------------
- ### 新增 DriverInfo
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute_config/add
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "driverAttributeId": 1,
- "value": "localhost",
- "profileId": -1,
- "description": "测试驱动配置"
- }
- ### 修改 DriverInfo
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute_config/update
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "id": 1,
- "driverAttributeId": 1,
- "value": "localhost",
- "profileId": -1,
- "description": "测试驱动配置"
- }
- ### 根据 ID 查询 DriverInfo
- GET http://{{dc3-gateway}}/api/v3/manager/driver_attribute_config/id/1
- Accept: */*
- Cache-Control: no-cache
- ### 分页查询 DriverInfo
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute_config/list
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- {
- "page": {
- "current": 1,
- "orders": [
- {
- "column": "id",
- "asc": false
- }
- ]
- }
- }
- ### 根据 ID 删除 DriverInfo
- POST http://{{dc3-gateway}}/api/v3/manager/driver_attribute_config/delete/1
- Accept: */*
- Content-Type: application/json
- Cache-Control: no-cache
- ###
|