Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"right_value":"0","priority":2,"pause":0,"op":"==","note":"this is a test exp","max_step":3,"func":"all(#3)","expression":"each(metric=agent.alive endpoint=docker-agent)","action":{"url":"http://localhost:1234/callback","uic":["test"],"callback":1,"before_callback_sms":1,"before_callback_mail":0,"after_callback_sms":1,"after_callback_mail":0}}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"expression created"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
Content-Type application/json
X-Forwarded-For 127.0.0.1

Request Body

{"right_value":"0","priority":2,"pause":1,"op":"==","note":"this is a test exp","max_step":3,"id":5,"func":"all(#3)","expression":"each(metric=agent.alive endpoint=docker-agent)","action":{"url":"http://localhost:1234/callback","uic":["test","test2"],"callback":0,"before_callback_sms":1,"before_callback_mail":0,"after_callback_sms":1,"after_callback_mail":0}}

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"expression:5 has been updated"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"action":{"id":5,"uic":"taipei","url":"","callback":0,"before_callback_sms":0,"before_callback_mail":0,"after_callback_sms":0,"after_callback_mail":0},"expression":{"id":5,"expression":"each(metric=agent.alive endpoint=docker-agent)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":2,"note":"this is a test exp","action_id":177,"create_user":"root","pause":1}}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

{"message":"expression:5 has been deleted"}

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

[{"id":2,"expression":"each(metric=? xx=yy)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":0,"note":"","action_id":18,"create_user":"root","pause":0},{"id":3,"expression":"each(metric=ss.close.wait endpoint=docker-A)","func":"all(#1)","op":"!=","right_value":"0","max_step":1,"priority":4,"note":"boss docker-A 连接数大于10","action_id":91,"create_user":"root","pause":0},{"id":4,"expression":"each(metric=agent.alive endpoint=docker-agent)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":2,"note":"this is a test exp","action_id":176,"create_user":"root","pause":1}]

Request Headers

Key Value
Apitoken {"name":"root","sig":"427d6803b78311e68afd0242ac130006"}
X-Forwarded-For 127.0.0.1

URL Params

Key Value
limit 2
page 1

Response Code

200

Response Headers

Key Value
Access-Control-Allow-Credentials true
Access-Control-Allow-Headers Content-Type, Content-Length, Apitoken
Access-Control-Allow-Methods POST, GET, OPTIONS, PUT, DELETE, UPDATE
Access-Control-Allow-Origin *
Access-Control-Expose-Headers Content-Length
Access-Control-Max-Age 86400
Content-Type application/json; charset=utf-8

Response Body

[{"id":2,"expression":"each(metric=? xx=yy)","func":"all(#3)","op":"==","right_value":"0","max_step":3,"priority":0,"note":"","action_id":18,"create_user":"root","pause":0},{"id":3,"expression":"each(metric=ss.close.wait endpoint=docker-A)","func":"all(#1)","op":"!=","right_value":"0","max_step":1,"priority":4,"note":"boss docker-A 连接数大于10","action_id":91,"create_user":"root","pause":0}]