Dataset

Add assets

POST
Add images and/or videos to an existing dataset

Path parameters

dataset_idstringRequired
The unique identifier for the dataset

Request

This endpoint expects an object.
images
list of objectsOptional
A list of assets to add with optional metadata
videos
list of objectsOptional
Videos to add to the dataset. Maximum allowed resolution is 1080p, higher resolutions will not be processed.
dataPath
stringOptional
A S3 path prefix for all images and videos to add to the dataset
csvPath
stringOptional
A path to a previously uploaded CSV file containing data paths

Response

This endpoint returns an object
requestGroupId
string
Unique request id for this group of assets.
images
list of objectsOptional
List of added images.
videos
list of objectsOptional
List of added videos.
POST
1curl -X POST https://app.coactive.ai/api/v1/datasets/string/assets \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "images": [
6 {
7 "path": "s3://coactive-public/logo.png",
8 "id": "kingslanding_041711",
9 "metadata": {
10 "artist": "Marc Simonetti"
11 }
12 }
13 ],
14 "videos": [
15 {
16 "path": "s3://your-s3-bucket/path/to/video.mp4",
17 "metadata": {
18 "show": "The Boys",
19 "season": 1,
20 "episode": 1,
21 "title": "The Name of the Game"
22 }
23 }
24 ],
25 "dataPath": "s3://your-s3-bucket/path/prefix",
26 "csvPath": "path/to/file.csv"
27}'
200
Successful
1{
2 "requestGroupId": "5b9a8217-2c73-41cf-9b3c-8a10b6ade206",
3 "images": [
4 {
5 "createdUserId": "user_example",
6 "createdDt": "2018-09-11T15:11:45.456777",
7 "updatedUserId": "user_example",
8 "updatedDt": "2018-09-11T15:11:45.456777",
9 "coactiveImageId": "a6894d72-612d-4c20-b4d0-8f3f21c2bb10",
10 "path": "s3://your-s3-bucket/path/to/video.mp4",
11 "requestId": "dd631c39-daba-4f46-be46-ab6c38a02e0f",
12 "requestDt": "2018-09-11T15:11:45.456777",
13 "id": "some-id",
14 "metadata": {
15 "artist": "Marc Simonetti"
16 }
17 }
18 ],
19 "videos": [
20 {
21 "createdUserId": "user_example",
22 "createdDt": "2018-09-11T15:11:45.456777",
23 "updatedUserId": "user_example",
24 "updatedDt": "2018-09-11T15:11:45.456777",
25 "coactiveVideoId": "5cf18348-8336-4db7-bb35-db7fbfe8951d",
26 "requestId": "dd631c39-daba-4f46-be46-ab6c38a02e0f",
27 "requestDt": "2018-09-11T15:11:45.456777",
28 "path": "s3://your-s3-bucket/path/to/video.mp4",
29 "metadata": {
30 "show": "The Boys",
31 "season": 1,
32 "episode": 1,
33 "title": "The Name of the Game"
34 }
35 }
36 ]
37}