comparisons
comparisons/
では、比較一覧の取得や登録ができます。
Important
APIをリクエストする際には各種エンドポイントの末尾に / を付与してリクエストしてください。
具体的には /comparisons/123
というURLに対するリクエストは /comparisons/123/
としてリクエストをします。
GET /comparisons
これまでの比較処理一覧を取得できます。
リクエスト
HTTPリクエスト
| GET https://api.customer.jp/anymotion/v1/comparisons/
|
リクエストヘッダー
リクエストヘッダー |
説明 |
Authorization |
Bearer <アクセストークン> |
リクエストパラメータ
パラメータ |
説明 |
必須 |
page |
ページ番号 |
- |
size |
ページサイズ |
- |
execStatus |
比較ステータスを指定
UNPROCESSED PROCESSING SUCCESS FAILURE のいずれかを指定 |
- |
レスポンス
レスポンスボディ
プロパティ |
タイプ |
説明 |
next |
String |
次ページの URL |
previous |
String |
前ページの URL |
maxPage |
Integer |
最大ページ番号 |
data[].id |
Integer |
比較 ID |
data[].source |
Integer |
比較元キーポイント ID |
data[].target |
Integer |
比較対象キーポイント ID |
data[].execStatus |
String |
実行ステータス |
data[].createdAt |
String |
作成時刻 |
data[].updatedAt |
String |
更新時刻 |
サンプルレスポンス
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | {
"next": null,
"previous": null,
"maxPage": 1,
"data": [
{
"id": 2,
"source": 3,
"target": 5,
"execStatus": "UNPROCESSED",
"createdAt": "2019-06-18T00:51:22.228948Z",
"updatedAt": "2019-06-18T00:51:22.229022Z"
},
...
]
}
|
GET /comparisons/:id
比較の詳細情報を取得します。
リクエスト
HTTPリクエスト
| GET https://api.customer.jp/anymotion/v1/comaprisons/:id/
|
リクエストヘッダー
リクエストヘッダー |
説明 |
Authorization |
Bearer <アクセストークン> |
リクエストパラメータ
レスポンス
レスポンスボディ
プロパティ |
タイプ |
説明 |
id |
Integer |
比較 ID |
source |
Integer |
比較元キーポイント ID |
target |
Integer |
比較対象キーポイント ID |
difference |
Array |
比較元キーポイントと比較対象キーポイントのずれ |
execStatus |
String |
実行ステータス |
failureDetail |
String |
FAILUREの詳細 |
createdAt |
String |
作成時刻 |
updatedAt |
String |
更新時刻 |
サンプルレスポンス
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 | {
"id": 7,
"source": 5,
"target": 9,
"difference": [
{
"nose": {
"distance": 0.4,
"direction": 30
},
"leftEye": {
"distance": 0.2,
"direction": 280
},
...
}
],
"execStatus": "SUCCESS",
"failureDetail": null,
"createdAt": "2019-06-16T11:43:07.553214Z",
"updatedAt": "2019-06-16T11:43:07.553400Z"
}
|
Note
execStatus
がFAILURE
場合はこちらよりお問い合わせください。
POST /comparisons
比較処理を実行します。
リクエスト
HTTPリクエスト
| POST https://api.customer.jp/anymotion/v1/comparisons/
|
リクエストヘッダー
リクエストヘッダー |
説明 |
Authorization |
Bearer <アクセストークン> |
Content-Type |
application/json |
リクエストボディ
プロパティ |
タイプ |
説明 |
必須 |
sourceId |
Integer |
比較元キーポイントID |
● |
targetId |
Integer |
比較対象キーポイントID |
● |
サンプルリクエスト
| {
"sourceId": 5,
"targetId": 3
}
|
レスポンス
レスポンスボディ
プロパティ |
タイプ |
説明 |
id |
Integer |
比較ID |
source |
Integer |
比較元キーポイントID |
target |
Integer |
比較対象キーポイントID |
difference |
Array |
比較元キーポイントと比較対象キーポイントのずれ |
execStatus |
String |
実行ステータス |
createdAt |
String |
作成時刻 |
updatedAt |
String |
更新時刻 |
サンプルレスポンス
| {
"id": 6,
"source": 5,
"target": 3,
"difference": null,
"execStatus": "UNPROCESSED",
"createdAt": "2019-06-18T07:09:03.989458Z",
"updatedAt": "2019-06-18T07:09:03.989721Z"
}
|