movies
movies/
では、動画一覧の取得や登録ができます。
Important
リクエストする際には各種エンドポイントの末尾に / を付与してしてください。
具体的には、 /movies/123 という URL に対するリクエストは /movies/123/ としてリクエストをします。
GET /movies
これまでにアップロードした動画ファイルの一覧情報を取得できます。
リクエスト
HTTPリクエスト
| GET https://api.customer.jp/anymotion/v1/movies/
|
リクエストヘッダー
リクエストヘッダー |
説明 |
Authorization |
Bearer <アクセストークン> |
リクエストパラメータ
パラメータ |
説明 |
必須 |
page |
ページ番号 |
- |
size |
ページサイズ |
- |
レスポンス
レスポンスボディ
プロパティ |
タイプ |
説明 |
next |
String |
次ページの URL |
previous |
String |
前ページの URL |
maxPage |
Integer |
最大ページ番号 |
data |
String |
データ一覧 |
data[].id |
Integer |
動画 ID |
data[].name |
String |
動画の名前 |
data[].createAt |
String |
作成時刻 |
data[].updateAt |
String |
更新時刻 |
サンプルレスポンス
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 | {
"next": "https://api.anymotion.jp/api/v1/movies/?page=3&size=2",
"previous": "https://api.anymotion.jp/api/v1/movies/?page=1&size=2",
"maxPage": 10,
"data": [
{
"id": 47,
"name": "動画名",
"createdAt": "2019-06-21T04:46:26.911992Z",
"updatedAt": "2019-06-21T04:46:26.912045Z"
},
{
"id": 46,
"name": "動画名",
"createdAt": "2019-06-22T04:46:26.911992Z",
"updatedAt": "2019-06-22T04:46:26.912045Z"
},
...
]
}
|
GET /movies/:id
動画の詳細情報を取得します。
リクエスト
HTTPリクエスト
| GET https://api.customer.jp/anymotion/v1/movies/:id/
|
リクエストヘッダー
リクエストヘッダー |
説明 |
Authorization |
Bearer <アクセストークン> |
リクエストパラメータ
レスポンス
レスポンスボディ
プロパティ |
タイプ |
説明 |
id |
Integer |
動画 ID |
name |
String |
動画の名前 |
height |
Integer |
動画の高さ |
width |
Integer |
動画の幅 |
frame |
Integer |
動画のフレーム数 |
fps |
Integer |
動画の FPS |
time |
String |
動画時間
HH:MM:SS の形式で表されます。 |
text |
String |
動画の説明文 |
contentMd5 |
String |
ファイルの MD5 値 |
createAt |
String |
作成時刻 |
updateAt |
String |
更新時刻 |
サンプルレスポンス
1
2
3
4
5
6
7
8
9
10
11
12 | {
"id": 1,
"name": "baseball.mp4",
"height": 300,
"width": 480,
"fps": 30.0,
"time": "00:00:10",
"text": "動画の説明文",
"contentMd5": "ecWkdCSrnAa9+EYREt/fbg==",
"createdAt": "2018-10-29T05:34:03.009965Z",
"updatedAt": "2018-10-29T05:34:03.010018Z"
}
|
POST /movies
動画情報を登録します。
リクエスト
HTTPリクエスト
| POST https://api.customer.jp/anymotion/v1/movies/
|
リクエストヘッダー
リクエストヘッダー |
説明 |
Authorization |
Bearer <アクセストークン> |
Content-Type |
application/json |
リクエストボディ
フィールド |
タイプ |
説明 |
必須 |
name |
String |
動画の名前 |
- |
text |
String |
動画の説明文 |
- |
contentMd5 |
String |
ファイルの MD5 値 |
● |
サンプルリクエスト
| {
"name": "baseball.mp4",
"text": "動画の説明",
"contentMd5": "ecWkdCSrnAa9+EYREt/fbg=="
}
|
レスポンス
レスポンスボディ
プロパティ |
タイプ |
説明 |
id |
Integer |
動画 ID |
uploadUrl |
String |
アップロード URL |
name |
String |
動画の名前 |
text |
String |
動画の説明文 |
contentMd5 |
String |
ファイルの MD5 値 |
createAt |
String |
作成時刻 |
updateAt |
String |
更新時刻 |
Hint
レスポンスとして得られるuploadUrl
に対して動画をアップロードしてください。
サンプルレスポンス
| {
"id": 36,
"uploadUrl": "https://example.com",
"name": "baseball.mp4",
"text": "動画の説明文",
"contentMd5": "ecWkdCSrnAa9+EYREt/fbg==",
"createdAt": "2019-06-18T08:09:35.169278Z",
"updatedAt": "2019-06-18T08:09:35.169335Z"
}
|