oute-services-deployment-route-sdk
v0.0.16
Published
- Initialization
Downloads
7
Readme
This module expose helper functions
- Initialization
params = {
url: @server url
token: @access token
}
DeploymentRoute = require("oute-services-deployment-route-sdk")
deployment_route_instance = new DeploymentRoute(params)
Cache functions
Core functions
- Save route
body = {
"_id": "vaPyYqHZD",
"deployment_id": "vaPyYqHZD",
"route": "/service/v0/test",
"method": "GET",
"flow_id": "test",
"state": "ACTIVE"
"auth_flow_id": null,
"inputs": [
{
"key": "start_var",
"value": "http_path_val",
"type": "STRING",
"required": false,
"regex": null,
"location": null
}
],
"is_public": true
}
await deployment_route_instance.save(body)
- Find One
query = {
"_id": "vaPyYqHZD"
}
await deployment_route_instance.findOne(query)
- get list
query = {
"deployment_id" : "vaPyYqHZD"
}
await deployment_route_instance.list(query)
- delete route
deployment_route_id = "vaPyYqHZD"
await deployment_route_instance.delete(deployment_route_id)