新手求教fusioncompute如何使用curl调用其restful api
新手求教,只是简单的想用curl来调用fusioncompute提供的restful api来做些维护工作,例如:
查询角色详情
请求形式
Get < role_uri >/query/< roleName > HTTP/1.1
Host: https://<ip>:<port>
Accept: application/json;version=<version>; charset=UTF-8
Content-Type: application/json; charset=UTF-8
X-Auth-Token: <Authen_TOKEN>
响应形式
HTTP/1.1 200 OKAY
Date: Mon, 12 Nov 2007 15:55:01 GMT
Content-Length: xxx
Content-Type: application/json; charset=UTF-8
{
"description":"String",
"userName":"String;String",
"roleName":"String",
"rightType":integer,
"popedom":
[
{
" rightId ":"String",
" rightName ": String,
}
]
"createTime":"1339074358",
"userNum":"String"
}
如果只是用curl,那该如何写了?请老师们帮我看看?谢谢。