一連のAPI呼び出しを行います。
Request
POST /api/batch
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json; charset=UTF-8;
...
[
{
uri: "/api/groups/list",
method: "GET"
},
...
{
uri: "/api/group/",
method: "POST",
headers: {
"Content-Type": "application/json; charset=UTF-8;""
},
body: {
"name": "batchtest",
"color": "FFFFFF",
"extendprop": {
"client_id": "implicit.testapp.jp",
"data": {test: "ok"}
}
}
}
]
パラメータ名 | 説明 | 例 |
---|---|---|
callback [任意] | JSONP使用する場合コールバック関数名を指定します | /api/batch/?callback=func_name |
項目名 | 説明 |
---|---|
val[i].uri | APIのURI |
val[i].method | APIのMethodを指定(GET, POST, PUT, DELETE) |
val[i].headers | ヘッダーを指定[任意] |
val[i].body | Bodyを指定[任意] |
Response
HTTP/1.1 200 OK
...
[
{
"uri": "/api/groups/list",
"headers": {
"Content-Length": "3159",
"Content-Type": "text/html; charset=UTF-8"
}
status: 200,
"body": '[{"updated_by":2,"color":"000000","updated_at":"2014-06-30T05:24:26.390373Z","id":"53b0f4 ....'
},
...
{
"uri": "/api/group/",
"headers": {
"Content-Length": "398",
"Content-Type": "text/html; charset=UTF-8"
},
status: 200,
"body": '{"updated_by":2,"color":"FFFFFF","updated_at":"2014-07-09T08:56...'
}
]
項目名 | 説明 |
---|---|
val[i].uri | APIのURI |
val[i].headers | レスポンスヘッダー |
val[i].status | レスポンスコード |
val[i].body | レスポンスBody |