Request Headers

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

Request Body

{"name":"testhostgroup"}

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":343,"grp_name":"testhostgroup","create_user":"root"}

Request Headers

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

Request Body

{"hosts":["testhostgroup","agent_test"],"hostgroup_id":342}

Response Code

417

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

{"error":"record not found"}

Request Headers

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

Request Body

{"hosts":["testhostgroup","agent_test"],"hostgroup_id":343}

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":"[9312 9313] bind to hostgroup: 343"}

Request Headers

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

Request Body

{"hostgroup_id":343,"host_id":9312}

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":"unbind host:9312 of hostgroup: 343"}

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

{"hostgroup":{"id":343,"grp_name":"testhostgroup","create_user":"root"},"hosts":[{"id":9313,"hostname":"agent_test","ip":"","agent_version":"","plugin_version":"","maintain_begin":0,"maintain_end":0}]}

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":3,"grp_name":"hostnameA","create_user":"UserA"},{"id":5,"grp_name":"TAI","create_user":"UserB"},{"id":8,"grp_name":"ForTestHostG","create_user":"root"}]

Request Headers

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

URL Params

Key Value
limit 10
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":3,"grp_name":"docker-A","create_user":"user-A"},{"id":5,"grp_name":"docker-T","create_user":"cheminlin"},{"id":8,"grp_name":"docker-F","create_user":"root"},{"id":9,"grp_name":"docker-B","create_user":"root"},{"id":11,"grp_name":"docker-D","create_user":"user-C"},{"id":12,"grp_name":"docker-E","create_user":"user-C"},{"id":14,"grp_name":"docker-G","create_user":"user-C"},{"id":15,"grp_name":"docker-G2","create_user":"user-C"},{"id":16,"grp_name":"docker-H","create_user":"user-C"},{"id":17,"grp_name":"tools","create_user":"user-C"}]

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":"hostgroup:343 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

{"hostgroup":{"id":3,"grp_name":"hostgroupA","create_user":"root"},"templates":[{"id":5,"tpl_name":"TplA","parent_id":0,"action_id":12,"create_user":"root"},{"id":91,"tpl_name":"TplB","parent_id":0,"action_id":59,"create_user":"userA"},{"id":94,"tpl_name":"TplB","parent_id":0,"action_id":62,"create_user":"userA"},{"id":103,"tpl_name":"TplC","parent_id":0,"action_id":74,"create_user":"root"},{"id":104,"tpl_name":"TplD","parent_id":0,"action_id":75,"create_user":"root"},{"id":105,"tpl_name":"TplE","parent_id":0,"action_id":76,"create_user":"root"},{"id":116,"tpl_name":"TplG","parent_id":0,"action_id":87,"create_user":"root"},{"id":125,"tpl_name":"TplH","parent_id":0,"action_id":99,"create_user":"root"},{"id":126,"tpl_name":"http","parent_id":0,"action_id":100,"create_user":"root"},{"id":127,"tpl_name":"TplJ","parent_id":0,"action_id":101,"create_user":"root"},{"id":194,"tpl_name":"TplK","parent_id":0,"action_id":153,"create_user":"root"},{"id":208,"tpl_name":"PT_TEST","parent_id":0,"action_id":163,"create_user":"userO"}]}

Request Headers

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

Request Body

{"tpl_id":5,"grp_id":3}

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":"template: 5 is unbind of HostGroup: 3"}

Request Headers

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

Request Body

{"tpl_id":5,"grp_id":3}

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

{"grp_id":3,"tpl_id":5,"bind_user":2}