Giter VIP home page Giter VIP logo

ql-api's Introduction

所有API:

一:获取环境变量的值

1.首先获取token,在ql/config/auto.json中,token的值(现已可自动获取,必须将脚本放到ql/scricp目录下)
2.发送请求的目标url格式:http://ip:端口/api/envs
3.请求头格式:header={'Authorization':'Bearer '+token},token的值是1中获取到的,可以不使用UA。
4.向url发送get请求,获取到环境变量的值,类型如下:
{"code": 200,
"data": [{
	"value": "pt_key=xxxx; pt_pin=xxxx;",
	"_id": "xxxxx",
	"created": xxxxxxx,
	"status": 1,
	"timestamp": "Wed Sep xx 2021 xx:xx:xx GMT+0800 (**标准时间)",
	"position": 4999999999.5,
	"name": "xxxxx",
	"remarks": "xxxxxxxx"
}, {
	"value": "pt_key=xxxx; pt_pin=xxxx;",
	"_id": "xxxxx",
	"created": xxxxxxx,
	"status": 1,
	"timestamp": "Wed Sep xx 2021 xx:xx:xx GMT+0800 (**标准时间)",
	"position": 4999999999.5,
	"name": "xxxxx",
	"remarks": "xxxxxxxx"
}]
}
value:环境变量的值
_id:值标识
created:创建时间
status:当前状态(1表示禁用,2表示启用)
timestamp:最后一次更改时间
name:环境变量的名称
remarks:备注

二:更改状态

1.发送请求的目标url格式:http://ip:端口/api/envs/disable
2.请求体格式:body = _id (_id是第一步中获取到的,body的格式一定要是List格式!!!)
3.向目标url发送PUT请求,要特别注意,是PUT请求。
4.启用格式和禁用一样

二:添加变量值

1.发送请求的目标url格式:http://ip:端口/api/envs
2.请求体格式如下: (_id是第一步中获取到的,body的格式一定要是List格式!!!)

[{
    "value": "222",
    "name": "111",
    "remarks": "333"
}]

3.向目标url发送POST请求,POST请求!!!

三:移动顺序

2.header不变,body是json格式,如下:
{
    "fromIndex": 遍历第一步中的data时,data数组的下标
    "toIndex": 想要移动的位置
}
3.发送PUT请求!!!!!

如果有什么不懂的可以讨论,因为用jd脚本的比较多,所以本人写了个py来检测到期并通知(目前仅添加了企业微信机器人通知,如有需要或者bug可以提案)

ql-api's People

Contributors

jialede avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.