Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/Wfaim_ejkpdiRkQb0Lbe/comments 200 { "comments": [ { "id": 1, "message": "Sample comment for tests", "updated_at": "2023-09-22T05:57:20.557Z", "user": { "id": 83, "email": "admin-user-70@example.com", "first_name": null, "last_name": null, "avatar_url": null }, "mentioned_users": [] } ] }
// If :project_id is not found GET /api/v2/projects/not-found-id/comments 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
comment required |
Comment content Validations:
|
// Successful request POST /api/v2/projects/NXf3YeFdCDcd5gh2VKdk/comments { "comment": "new comment" } 200 { "comment": { "id": 2, "message": "new comment", "updated_at": "2023-09-22T05:57:21.102Z", "user": { "id": 85, "email": "admin-user-72@example.com", "first_name": null, "last_name": null, "avatar_url": null }, "mentioned_users": [] } }
// If :project_id is not found POST /api/v2/projects/not-found-id/comments { "comment": "new comment" } 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
comment required |
Comment content Validations:
|
// Successful request POST /api/v2/projects/aaPEqnZspdsIglLjBdQH/comments/3 { "comment": "new updated comment" } 200 { "comment": { "message": "new updated comment", "id": 3, "updated_at": "2023-09-22T05:57:21.702Z", "user": { "id": 87, "email": "admin-user-74@example.com", "first_name": null, "last_name": null, "avatar_url": null }, "mentioned_users": [] } }
// If :project_id is not found POST /api/v2/projects/not-found-id/comments/4 { "comment": "new updated comment" } 404 { "error": "project not found" }
// If :comment_id is not found POST /api/v2/projects/0aM7rK90Bto043oMmJ7B/comments/not-found-id { "comment": "new updated comment" } 404 { "error": "Couldn't find Comment with 'id'=not-found-id [WHERE \"comments\".\"target_id\" = $1 AND \"comments\".\"target_type\" = $2]" }
// If current user is not a owner of the comment POST /api/v2/projects/J8eVjDwkRQcX4s0xMh2X/comments/5 { "comment": "new updated comment" } 403 { "error": "Not allowed to perform this action" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/projects/LVRkCDLcrHOpe30_cqdZ/comments/6 200 { "ok": "comment deleted" }
// If :project_id is not found DELETE /api/v2/projects/not-found-id/comments/7 404 { "error": "project not found" }
// If :comment_id is not found DELETE /api/v2/projects/_yPGoD6m99vhC161Lna3/comments/not-found-id 404 { "error": "Couldn't find Comment with 'id'=not-found-id [WHERE \"comments\".\"target_id\" = $1 AND \"comments\".\"target_type\" = $2]" }
// If current user is not a owner of the comment DELETE /api/v2/projects/u1pmmrcFCS3e7F-ZBLEs/comments/8 403 { "error": "Not allowed to perform this action" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/BhDl3zOj3NAoYYQTCtEe/comments/9 200 { "comment": { "id": 9, "message": "Sample comment for tests", "updated_at": "2023-09-22T05:57:23.956Z", "user": { "id": 97, "email": "admin-user-84@example.com", "first_name": null, "last_name": null, "avatar_url": null }, "mentioned_users": [] } }
// If :project_id is not found GET /api/v2/projects/not-found-id/comments/10 404 { "error": "project not found" }
// If :comment_id is not found GET /api/v2/projects/08bDOMx7adcFAOs12EKF/comments/not-found-id 404 { "error": "Couldn't find Comment with 'id'=not-found-id [WHERE \"comments\".\"target_id\" = $1 AND \"comments\".\"target_type\" = $2]" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request POST /api/v2/projects/vFy6_w1tQhy1DIraz16y/public 200 { "is_public": true }
// If :project_id is not found POST /api/v2/projects/not-found-id/public 404 { "error": "project not found" }
// Is public already POST /api/v2/projects/Gk0xOyeL90McTp6hHGC6/public 400 { "error": "Project is public already" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request POST /api/v2/projects/XyVo5BZ0G5cG24dWvR3R/private 200 { "is_public": false }
// If :project_id is not found POST /api/v2/projects/not-found-id/private 404 { "error": "project not found" }
// Is private already POST /api/v2/projects/7MP17vyufwI7aR8Sw_s9/private 400 { "error": "Project is private already" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/z8pvYigCuZckkRaeBt9j/all_users 200 { "users": [ { "id": 106, "first_name": null, "last_name": null, "email": "admin-user-93@example.com", "user_role": { "name": "admin" } } ] }
// If :project_id is not found GET /api/v2/projects/not-found-id/all_users 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/GeKH7zKJ52IrUTZpdNUI/users 200 { "users": [ { "id": 108, "first_name": null, "last_name": null, "email": "admin-user-95@example.com", "user_role": { "name": "admin" } } ] }
// If :project_id is not found GET /api/v2/projects/not-found-id/users 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request POST /api/v2/projects/a_A19M3NwJP9TA_5Zz92/users/111 200 { "ok": "User 111 was added succesfully" }
// User is already added POST /api/v2/projects/vjz4wFjUwYSqgxVSxXwg/users/113 400 { "error": "User is already member of this Project" }
// If :project_id is not found POST /api/v2/projects/not-found-id/users/114 404 { "error": "project not found" }
// If :user_id is not found POST /api/v2/projects/bFkR_E048TzfdOWl2vxO/users/not-found-id 404 { "error": "Couldn't find User with 'id'=not-found-id" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/projects/PMyuYqmWL3LFZgMBOiOy/users/118 200 { "ok": "User 118 was removed succesfully" }
// User does not belong to entity DELETE /api/v2/projects/CxSIuWhRcaEC7VxCPTgy/users/120 400 { "error": "User is not a member of this Project" }
// If :project_id is not found DELETE /api/v2/projects/not-found-id/users/121 404 { "error": "project not found" }
// If :user_id is not found DELETE /api/v2/projects/wnezLIfcBEjifrDdCH5m/users/not-found-id 404 { "error": "Couldn't find User with 'id'=not-found-id" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
email required |
Validations:
|
// Successful request POST /api/v2/projects/4G0o1TkB5PyNXlolYJzw/guests { "email": "example-email@example.com" } 200 { "users": [ { "id": 124, "first_name": null, "last_name": null, "email": "admin-user-111@example.com", "user_role": { "name": "admin" } }, { "id": 125, "first_name": null, "last_name": null, "email": "example-email@example.com", "user_role": { "name": "guest" } } ] }
// Successful request POST /api/v2/projects/eSy4_08RXHWWGQ_xSNse/guests { "email": "admin-user-112@example.com" } 400 { "error": "User already exists" }
// If :project_id is not found POST /api/v2/projects/not-found-id/guests { "email": "example-email@example.com" } 404 { "error": "project not found" }
// Failed request POST /api/v2/projects/not-found-id/guests 404 { "error": "project not found" }
// Successful request POST /api/v2/projects/9FOS615rjRhOGHdY36-G/guests { "email": "testiemail@tvtools.fi" } 200 { "users": [ { "id": 162, "first_name": null, "last_name": null, "email": "admin-user-148@example.com", "user_role": { "name": "admin" } }, { "id": 163, "first_name": null, "last_name": null, "email": "testiemail@tvtools.fi", "user_role": { "name": "guest" } } ] }
// User with given email does not already exist POST /api/v2/projects/_4AUsrmvOWEKxNPgVSOb/guests { "email": "testiemail@tvtools.fi" } 200 { "users": [ { "id": 164, "first_name": null, "last_name": null, "email": "admin-user-149@example.com", "user_role": { "name": "admin" } }, { "id": 165, "first_name": null, "last_name": null, "email": "testiemail@tvtools.fi", "user_role": { "name": "guest" } } ] }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/xtiZWQSEDMoaMLyJfD0g/user_groups 200 { "user_groups": [ { "id": 1, "name": "user-group-1", "description": "Sample user group for tests", "created_at": "2023-09-22T05:57:31.398Z", "updated_at": "2023-09-22T05:57:31.398Z", "users": [] } ] }
// If :project_id is not found GET /api/v2/projects/not-found-id/user_groups 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request POST /api/v2/projects/HnDs4PGnwCQLP8rQ6K71/user_groups/2 200 { "ok": "User group 2 was added succesfully" }
// User group is already added POST /api/v2/projects/LG1rlXN4NWomt8dM805u/user_groups/3 400 { "error": "User group with id 3 is already part of this Project" }
// If :project_id is not found POST /api/v2/projects/not-found-id/user_groups/4 404 { "error": "project not found" }
// If :user_group_id is not found POST /api/v2/projects/U1uzJzZaljG5BQ8ldWHh/user_groups/not-found-id 404 { "error": "Couldn't find UserGroup with 'id'=not-found-id" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/projects/a2I1AV5DojLaQ96f-T8q/user_groups/5 200 { "ok": "User group 5 was removed succesfully" }
// User does not belong to entity DELETE /api/v2/projects/w8jNQrRHg8byXmJHxuLh/user_groups/6 400 { "error": "User group with id 6 is not part of this Project" }
// If :project_id is not found DELETE /api/v2/projects/not-found-id/user_groups/7 404 { "error": "project not found" }
// If :user_group_id is not found DELETE /api/v2/projects/srFfZY1fi9dXS3u1BJqh/user_groups/not-found-id 404 { "error": "Couldn't find UserGroup with 'id'=not-found-id" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/l9edLJkmEKvKMin51xZY/history/0 200 { "history": { "results": [ { "id": 139, "user_id": 0, "event_type": "USER_LINKED", "created_at": "2023-09-22T05:57:34.136Z", "updated_at": "2023-09-22T05:57:34.136Z", "event_targets": [ { "target_type": "User", "target": { "id": 138, "first_name": null, "last_name": null } }, { "target_type": "Project", "target": { "id": 52, "elasticsearch_id": "l9edLJkmEKvKMin51xZY", "title": "Sample Project" } } ] }, { "id": 138, "user_id": 138, "event_type": "PROJECT_ADDED", "created_at": "2023-09-22T05:57:34.112Z", "updated_at": "2023-09-22T05:57:34.112Z", "event_targets": [ { "target_type": "Project", "target": { "id": 52, "elasticsearch_id": "l9edLJkmEKvKMin51xZY", "title": "Sample Project" } } ] } ], "next_cursor": null } }
// If :project_id is not found GET /api/v2/projects/-1/history/0 404 { "error": "project not found" }
// Unprocessable entity GET /api/v2/projects/_hTqOEkbQF_UHrHPNNIr/history/test 422 { "error": "Invalid parameter 'cursor' value \"test\": Invalid cursor" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects 200 { "projects": [] }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
// Project is not found GET /api/v2/projects/not-found-id 404 { "error": "project not found" }
// Successful request GET /api/v2/projects/6NXFuqJU0-9ikeoBl26n 200 { "project": { "id": "6NXFuqJU0-9ikeoBl26n", "external_id": null, "project_id": null, "owner": "admin-user-129@example.com", "title": "Sample Project", "description": "Sample project description.", "category": "test project category", "tags": [ "test", "tag" ], "media_type": "project", "isPublic": false, "thumbnail_asset_id": null, "created_date": "2023-09-22T05:57:35.057Z", "modification_date": "2023-09-22T05:57:35.057Z", "deleted": null, "original_title": "Sample Project" } }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Project not found GET /api/v2/projects/not-found-id/projects 404 { "error": "project not found" }
// Successful request GET /api/v2/projects/QsVclwpQxDNQ7nlzYDlf/projects 200 { "projects": [] }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
// Project not found GET /api/v2/projects/not-found-id/assets 404 { "error": "project not found" }
// Succesful request GET /api/v2/projects/8BNNxVGFCMyxVpUQwbC2/assets 200 { "assets": [], "subprojects": [], "stats": { "assets": 0, "projects": 0, "total_size": 0, "media_types": { "placeholder": 0, "video": 0, "image": 0, "audio": 0, "article": 0, "document": 0, "other": 0, "processing": 0, "project": 0 } } }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
// Project not found GET /api/v2/projects/not-found-id/stats 404 { "error": "project not found" }
// Succesful request GET /api/v2/projects/KaK2oDqQnWzNJVRKTfk4/stats 200 { "stats": { "assets": 0, "projects": 0, "total_size": 0, "media_types": { "placeholder": 0, "video": 0, "image": 0, "audio": 0, "article": 0, "document": 0, "other": 0, "processing": 0, "project": 0 } } }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
title required |
Title Validations:
|
description optional |
Description Validations:
|
category optional |
Category Validations:
|
tags optional |
Tags Validations:
|
external_id optional |
External ID Validations:
|
// Successful request POST /api/v2/projects { "title": "Sample Project", "description": "Sample project from API V2", "category": "Sample", "tags": [ "sample", "test" ] } 200 { "project": { "id": "KKrkUITzDVG9jj5B5ep4", "external_id": null, "project_id": null, "owner": "admin-user-136@example.com", "title": "Sample Project", "description": "Sample project from API V2", "category": "sample", "tags": [ "sample", "test" ], "media_type": "project", "isPublic": false, "thumbnail_asset_id": null, "created_date": "2023-09-22T05:57:36.556Z", "modification_date": "2023-09-22T05:57:36.556Z", "deleted": null, "original_title": "Sample Project" } }
// Missing required parameters POST /api/v2/projects { "description": "Sample project from API V2", "category": "Sample", "tags": [ "sample", "test" ] } 422 { "error": "Missing parameter title" }
// With invalid parameters POST /api/v2/projects { "title": "Testing too long title: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } 400 { "error": "Title is too long (maximum is 255 characters)" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
title optional |
Title Validations:
|
description optional |
Description Validations:
|
category optional |
Category Validations:
|
tags optional |
Tags Validations:
|
external_id optional |
External ID Validations:
|
// Drop folder not found PUT /api/v2/projects/not-found-id { "title": "Modified Sample Drop Folder", "description": "Modified Description" } 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Project not found POST /api/v2/projects/not-found-id/trash_bin 404 { "error": "project not found" }
// Successful request POST /api/v2/projects/zJqWAbM9JUI01i0G25Y3/trash_bin 200 { "ok": "ok" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
// Failed request POST /api/v2/projects/not-found-id/restore 404 { "error": "project not found" }
// Trying to restore project that is not in trash bin POST /api/v2/projects/4kiJD6kAroPWNSFdOuh0/restore 400 { "error": "Can not restore projects that is not in trash bin" }
// Successful request POST /api/v2/projects/KAcxKzAGy3Fw_RSORMfn/restore 200 { "ok": "ok" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
// Failed request DELETE /api/v2/projects/not-found-id 404 { "error": "project not found" }
// Successful request DELETE /api/v2/projects/BfT22B5pru09d19_fzVj 200 { "ok": "ok" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
to_project_id required |
Project ID Validations:
|
// Failed request POST /api/v2/projects/not-found-id/assign 404 { "error": "project not found" }
// Succesful request POST /api/v2/projects/RjoxKpVepQDHwy-RwmKs/assign { "to_project_id": "4e6ZZMfzRl3RX95xCTxG" } 200 { "ok": "ok" }
// Project with to_project_id id does not exist POST /api/v2/projects/O0TNxWPEV3XAFOlriy8g/assign { "to_project_id": "not-found-id" } 200 { "error": "Project not found." }
// Trying to assign project to self POST /api/v2/projects/TIUggDWlO7vHAc167aSA/assign { "to_project_id": "TIUggDWlO7vHAc167aSA" } 400 { "error": "A project cannot be its own parent project." }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Failed request DELETE /api/v2/projects/not-found-id/unassign 404 { "error": "project not found" }
// Successful request DELETE /api/v2/projects/PzfpvX0BNBUyJOSNm2uA/unassign 200 { "ok": "ok" }
// Trying to unassign project which has no parent project DELETE /api/v2/projects/FHEEYQvtTME7xlOg9nQw/unassign 200 { "error": "FHEEYQvtTME7xlOg9nQw does not have a parent project" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID of project to add thumbnail to Validations:
|
thumbnail_asset_id required |
ID of asset which should be set as thumbnail image Validations:
|
// Invalid project_id PUT /api/v2/projects/not-found-id/thumbnail { "thumbnail_asset_id": "liFQwp9o0EOiZ7l3Hb-0" } 404 { "error": "project not found" }
// Asset with thumbnail_asset_id is not found PUT /api/v2/projects/cWZpaB7vehTTtJ4GXUqq/thumbnail { "thumbnail_asset_id": "not_found_id" } 404 { "error": "Could not find asset with id not_found_id" }
// Thumbnail asset is from different project PUT /api/v2/projects/sMVQGNmfFOn2FaY8oYPX/thumbnail { "thumbnail_asset_id": "P5Or5RQ0sFUM4sU5_1We" } 400 { "error": "Thumbnail asset must belong to the given project" }
// Thumbnail asset is not an image PUT /api/v2/projects/ISK6TjDB2vH5g3KqV5FO/thumbnail { "thumbnail_asset_id": "NGsgoPx957rd_Oh6sfwk" } 400 { "error": "Thumbnail asset must be an image" }
// Successful request PUT /api/v2/projects/6yIMrix7CITjJO2NO0Od/thumbnail { "thumbnail_asset_id": "Y3trW1WxOWTB-QmYOuP7" } 200 { "message": "Succesfully added asset Y3trW1WxOWTB-QmYOuP7 as projects thumbnail image" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID of project to remove thumbnail from Validations:
|
// Invalid project_id DELETE /api/v2/projects/not-found-id/thumbnail 404 { "error": "project not found" }
// Successful request DELETE /api/v2/projects/EPQGlncJtD5y3f_8xY6R/thumbnail 200 { "message": "Succesfully removed thumbnail from project" }
// When thumbnail_asset_id is already nil DELETE /api/v2/projects/VyYnC0ST67tJ8KG1ZKOZ/thumbnail 400 { "error": "Project has no thumbnail asset" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
title required |
Title Validations:
|
description optional |
Description Validations:
|
category optional |
Category Validations:
|
tags optional |
Tags Validations:
|
external_id optional |
External ID Validations:
|
media_type optional |
Type. During asset creation, only used for articles. Defaults to placeholder with no media. Validations:
|
url optional |
Media from URL Validations:
|
url[file_url] required |
File URL Validations:
|
url[filename] required |
Filename Validations:
|
s3 optional |
Media from S3 Validations:
|
s3[s3_key] required |
File URL Validations:
|
s3[filename] required |
Filename Validations:
|
// Failed request POST /api/v2/projects/not-found-id/assets 404 { "error": "project not found" }
// Failed request, missing required "title" parameter POST /api/v2/projects/H1yGW5qBVmFoUpqSnjUK/assets { "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ] } 422 { "error": "Missing parameter title" }
// Failed request, invalid media type POST /api/v2/projects/7_o6HR9IZIjepR96ifA6/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ], "media_type": "image" } 422 { "error": "Invalid parameter 'media_type' value \"image\": Must be one of: <code>article</code>." }
// Successful request POST /api/v2/projects/BSP7fGJwRjJxoWsLAxCp/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ] } 200 { "asset": { "id": "jDYSvoZZwdV3-MEyXhUX", "external_id": null, "parent_id": null, "project_id": "BSP7fGJwRjJxoWsLAxCp", "owner": "admin-user-170@example.com", "title": "Sample Asset", "description": "Sample asset from API V2", "category": "sample", "tags": [ "sample", "test" ], "ai_tags": [], "status": "open", "media_type": "placeholder", "original_filename": null, "drop_folder_id": null, "md5_sum": null, "created_date": "2023-09-22T05:57:46.842Z", "modification_date": "2023-09-22T05:57:46.903Z", "deleted": null } }
// Successful request, valid media type POST /api/v2/projects/oZNIqFK3Elv8cYcis1eS/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ], "media_type": "article" } 200 { "asset": { "id": "OPUzhVYVrccYlG1Dy0we", "external_id": null, "parent_id": null, "project_id": "oZNIqFK3Elv8cYcis1eS", "owner": "admin-user-171@example.com", "title": "Sample Asset", "description": "Sample asset from API V2", "category": "sample", "tags": [ "sample", "test" ], "ai_tags": [], "status": "open", "media_type": "article", "original_filename": null, "drop_folder_id": null, "md5_sum": null, "created_date": "2023-09-22T05:57:47.261Z", "modification_date": "2023-09-22T05:57:47.438Z", "deleted": null } }
// HTTP file url POST /api/v2/projects/1Gs86rY1bh7zBONsHMrH/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ], "url": { "file_url": "http://www.example.com/jpgfile.jpg", "filename": "jpgfile.jpg" } } 200 { "asset": { "id": "eLm3sIRn0LtT_Uli6mcU", "external_id": null, "parent_id": null, "project_id": "1Gs86rY1bh7zBONsHMrH", "owner": "admin-user-172@example.com", "title": "Sample Asset", "description": "Sample asset from API V2", "category": "sample", "tags": [ "sample", "test" ], "ai_tags": [], "status": "open", "media_type": "processing", "original_filename": "jpgfile.jpg", "drop_folder_id": null, "md5_sum": null, "created_date": "2023-09-22T05:57:47.775Z", "modification_date": "2023-09-22T05:57:47.926Z", "deleted": null } }
// HTTPS file url POST /api/v2/projects/u7MdGdIEewMclOp-vmmL/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ], "url": { "file_url": "https://www.example.com/jpgfile.jpg", "filename": "jpgfile.jpg" } } 200 { "asset": { "id": "TZopLcwQ5B4sMn0aZdFR", "external_id": null, "parent_id": null, "project_id": "u7MdGdIEewMclOp-vmmL", "owner": "admin-user-173@example.com", "title": "Sample Asset", "description": "Sample asset from API V2", "category": "sample", "tags": [ "sample", "test" ], "ai_tags": [], "status": "open", "media_type": "processing", "original_filename": "jpgfile.jpg", "drop_folder_id": null, "md5_sum": null, "created_date": "2023-09-22T05:57:48.258Z", "modification_date": "2023-09-22T05:57:48.400Z", "deleted": null } }
// Invalid file url POST /api/v2/projects/WS_lQnm2GIGIpd4mvX9s/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ], "url": { "file_url": "/local/downloads/myfile.jpg", "filename": "jpgfile.jpg" } } 200 { "error": "Asset kX8dWQXv3pCzwCokTgG6 created, adding media to asset failed: not a valid HTTP URL" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
project_id required |
Project ID Validations:
|
title required |
Title Validations:
|
description optional |
Description Validations:
|
category optional |
Category Validations:
|
tags optional |
Tags Validations:
|
external_id optional |
External ID Validations:
|
// Failed request POST /api/v2/projects/not-found-id/projects 404 { "error": "project not found" }
// Failed request, missing required "title" parameter POST /api/v2/projects/ubDfGSlWuNz8-RGBk_FY/projects { "description": "Sample project from API V2", "category": "Sample" } 422 { "error": "Missing parameter title" }
// Successful request POST /api/v2/projects/RaSs_G40oBuXcfZWJ83s/projects { "title": "Sample Project", "description": "Sample project from API V2", "category": "Sample" } 200 { "project": { "id": "QQnOb34oVFCH_vyRwqmG", "external_id": null, "project_id": "RaSs_G40oBuXcfZWJ83s", "owner": "admin-user-177@example.com", "title": "Sample Project", "description": "Sample project from API V2", "category": "sample", "tags": [], "media_type": "project", "isPublic": false, "thumbnail_asset_id": null, "created_date": "2023-09-22T05:57:49.397Z", "modification_date": "2023-09-22T05:57:49.489Z", "deleted": null, "original_title": "Sample Project" } }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |