Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/projects/nE9H0mK3N1Yvskmzaz0m/comments 200 { "comments": [ { "id": 11, "message": "Sample comment for tests", "updated_at": "2023-11-27T09:43:11.194Z", "user": { "id": 178, "email": "admin-user-155@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/-Ghq8n5DKp87bH0Eok0b/comments { "comment": "new comment" } 200 { "comment": { "id": 12, "message": "new comment", "updated_at": "2023-11-27T09:43:11.769Z", "user": { "id": 180, "email": "admin-user-157@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/69FoBmXIGthLHT4Wm0g6/comments/13 { "comment": "new updated comment" } 200 { "comment": { "message": "new updated comment", "id": 13, "updated_at": "2023-11-27T09:43:12.320Z", "user": { "id": 182, "email": "admin-user-159@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/14 { "comment": "new updated comment" } 404 { "error": "project not found" }
// If :comment_id is not found POST /api/v2/projects/YhJfRmq8pKTfGH-CcAZe/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/QEGwnlhtPfodmppV_gNr/comments/15 { "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/AJ0Ljs_KsE_ENa-M3YTx/comments/16 200 { "ok": "comment deleted" }
// If :project_id is not found DELETE /api/v2/projects/not-found-id/comments/17 404 { "error": "project not found" }
// If :comment_id is not found DELETE /api/v2/projects/ZDuRN0Lm1uctjqimQIiZ/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/e4jYqhAOQ4CXNK9Du-7F/comments/18 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/yA04HDYuui-MVY9iynvA/comments/19 200 { "comment": { "id": 19, "message": "Sample comment for tests", "updated_at": "2023-11-27T09:43:14.191Z", "user": { "id": 192, "email": "admin-user-169@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/20 404 { "error": "project not found" }
// If :comment_id is not found GET /api/v2/projects/njlIZYr_I_muI7iAbmru/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/LOTJyQNIKPQTYUXxT8k_/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/VFqD3BbZNmK8s40rgcP0/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/8lMsjCqIFyrFpZt4oMbv/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/6MKBdzL65moYN9DzLclP/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/on8P4uT55cKbWzH7d390/all_users 200 { "users": [ { "id": 201, "first_name": null, "last_name": null, "email": "admin-user-178@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/Rl4jZlxDRvUOn1TI1s5D/users 200 { "users": [ { "id": 203, "first_name": null, "last_name": null, "email": "admin-user-180@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/gix_mwgYAT_fTKSiACiL/users/206 200 { "ok": "User 206 was added succesfully" }
// User is already added POST /api/v2/projects/O47KoWEaEppYUqao4Djx/users/208 400 { "error": "User is already member of this Project" }
// If :project_id is not found POST /api/v2/projects/not-found-id/users/209 404 { "error": "project not found" }
// If :user_id is not found POST /api/v2/projects/HJNqfZ0xeI3iTqaNHA6L/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/b1yK_68AMh-iCRZOXBzi/users/213 200 { "ok": "User 213 was removed succesfully" }
// User does not belong to entity DELETE /api/v2/projects/eJUe1tpUaukgRhP9clNg/users/215 400 { "error": "User is not a member of this Project" }
// If :project_id is not found DELETE /api/v2/projects/not-found-id/users/216 404 { "error": "project not found" }
// If :user_id is not found DELETE /api/v2/projects/hq6nbqJodogrzhhqZVMB/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/0O14orO4PSoLZU1QvXHw/guests { "email": "example-email@example.com" } 200 { "users": [ { "id": 219, "first_name": null, "last_name": null, "email": "admin-user-196@example.com", "user_role": { "name": "admin" } }, { "id": 220, "first_name": null, "last_name": null, "email": "example-email@example.com", "user_role": { "name": "guest" } } ] }
// Successful request POST /api/v2/projects/SYBQQiFShbgAV5idNHzl/guests { "email": "admin-user-197@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/O8zNZ3CM91FA7-Avctks/guests { "email": "testiemail@tvtools.fi" } 200 { "users": [ { "id": 255, "first_name": null, "last_name": null, "email": "admin-user-231@example.com", "user_role": { "name": "admin" } }, { "id": 256, "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/AxnLBj3C1qeCy7-p1wI1/guests { "email": "testiemail@tvtools.fi" } 200 { "users": [ { "id": 257, "first_name": null, "last_name": null, "email": "admin-user-232@example.com", "user_role": { "name": "admin" } }, { "id": 258, "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/6QfB7lwFMz8HyKzQeMye/user_groups 200 { "user_groups": [ { "id": 8, "name": "user-group-8", "description": "Sample user group for tests", "created_at": "2023-11-27T09:43:20.159Z", "updated_at": "2023-11-27T09:43:20.159Z", "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/xHcpzL3Am6DtIS6ytY2V/user_groups/9 200 { "ok": "User group 9 was added succesfully" }
// User group is already added POST /api/v2/projects/Dr9XP0st6zZv9jm5F2IU/user_groups/10 400 { "error": "User group with id 10 is already part of this Project" }
// If :project_id is not found POST /api/v2/projects/not-found-id/user_groups/11 404 { "error": "project not found" }
// If :user_group_id is not found POST /api/v2/projects/lcPu6QpUT4XPCT9MkQVl/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/JM0cIqtPkW3FpeR7S_Fo/user_groups/12 200 { "ok": "User group 12 was removed succesfully" }
// User does not belong to entity DELETE /api/v2/projects/RZmpAwQPyzOMI4SifILf/user_groups/13 400 { "error": "User group with id 13 is not part of this Project" }
// If :project_id is not found DELETE /api/v2/projects/not-found-id/user_groups/14 404 { "error": "project not found" }
// If :user_group_id is not found DELETE /api/v2/projects/jwJ01jZ3agzXFGSsV8Sv/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/S89BR4d6ElIRVfIVPqeV/history/0 200 { "history": { "results": [ { "id": 327, "user_id": 0, "event_type": "USER_LINKED", "created_at": "2023-11-27T09:43:22.769Z", "updated_at": "2023-11-27T09:43:22.769Z", "event_targets": [ { "target_type": "User", "target": { "id": 233, "first_name": null, "last_name": null } }, { "target_type": "Project", "target": { "id": 50, "elasticsearch_id": "S89BR4d6ElIRVfIVPqeV", "title": "Sample Project" } } ] }, { "id": 326, "user_id": 233, "event_type": "PROJECT_ADDED", "created_at": "2023-11-27T09:43:22.738Z", "updated_at": "2023-11-27T09:43:22.738Z", "event_targets": [ { "target_type": "Project", "target": { "id": 50, "elasticsearch_id": "S89BR4d6ElIRVfIVPqeV", "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/hU_DWQMIfcRwsHkUzRXh/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/Gri9DeG1yV5jD2n2nlJF 200 { "project": { "id": "Gri9DeG1yV5jD2n2nlJF", "external_id": null, "project_id": null, "owner": "admin-user-214@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-11-27T09:43:23.700Z", "modification_date": "2023-11-27T09:43:23.700Z", "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/3PITVAW9sSU0xZUVgtR0/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/stats 404 { "error": "project not found" }
// Succesful request GET /api/v2/projects/s3wOBvkQAyOydBY3WcEe/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": "xPTGCww83_GqB8yO5fXR", "external_id": null, "project_id": null, "owner": "admin-user-219@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-11-27T09:43:24.619Z", "modification_date": "2023-11-27T09:43:24.619Z", "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" }
// Project not found PUT /api/v2/projects/not-found-id { "title": "Modified Sample Project", "description": "Modified Description", "category": "Modified Category", "tags": [ "Test", "Tags", "Here" ], "external_id": "modified_external_id" } 404 { "error": "project not found" }
// Successful request PUT /api/v2/projects/JUyeBPY-GcdBEEP5vZrx { "title": "Modified Sample Project", "description": "Modified Description", "category": "Modified Category", "tags": [ "Test", "Tags", "Here" ], "external_id": "modified_external_id" } 200 { "project": { "id": "JUyeBPY-GcdBEEP5vZrx", "external_id": "modified_external_id", "project_id": null, "owner": "admin-user-223@example.com", "title": "Modified Sample Project", "description": "Modified Description", "category": "modified category", "tags": [ "test", "tags", "here" ], "media_type": "project", "isPublic": false, "thumbnail_asset_id": null, "created_date": "2023-11-27T09:43:25.157Z", "modification_date": "2023-11-27T09:43:25.269Z", "deleted": null, "original_title": "Sample Project" } }
// With invalid parameters PUT /api/v2/projects/KNfufO5QsfNY-WLbbflv { "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 |
// Project not found POST /api/v2/projects/not-found-id/trash_bin 404 { "error": "project not found" }
// Successful request POST /api/v2/projects/0EPLsmTkvQaQupEMw_lQ/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/66KPmH8VF505i174ZgEh/restore 400 { "error": "Can not restore Projects that is not in trash bin" }
// Successful request POST /api/v2/projects/Qtk0JBjs4kb5J9GSNxlA/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/rDKsxSyn3Xs522yVf_eq 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/chHpSA_SqaBbbAhs9LbE/assign { "to_project_id": "huBLOT9gBrqVNQhEvUUQ" } 200 { "ok": "ok" }
// Project with to_project_id id does not exist POST /api/v2/projects/hYMAiztyarINygTWht0u/assign { "to_project_id": "not-found-id" } 200 { "error": "Project not found." }
// Trying to assign project to self POST /api/v2/projects/fnCETW2owYzcJInDZn8e/assign { "to_project_id": "fnCETW2owYzcJInDZn8e" } 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/O9z1OnZPYogSKiwNeCzc/unassign 200 { "ok": "ok" }
// Trying to unassign project which has no parent project DELETE /api/v2/projects/xt7wR2rWQJciWjONUzyz/unassign 200 { "error": "xt7wR2rWQJciWjONUzyz 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": "dJ8rY4vgqDB7rUUNfGAI" } 404 { "error": "project not found" }
// Asset with thumbnail_asset_id is not found PUT /api/v2/projects/3-tMEl0MjmmlilcnmcNk/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/i-bKtGfDlcmli-WBPv_A/thumbnail { "thumbnail_asset_id": "jWCasdAF3340p7CKa2dM" } 400 { "error": "Thumbnail asset must belong to the given project" }
// Thumbnail asset is not an image PUT /api/v2/projects/aRY1K_xfU3WE5cawv8Ol/thumbnail { "thumbnail_asset_id": "lTQg8pXkYPibF8O3KTnD" } 400 { "error": "Thumbnail asset must be an image" }
// Successful request PUT /api/v2/projects/oBhbDeN5wG29AnyZVKwv/thumbnail { "thumbnail_asset_id": "CA-UabKLc5PsfXHbNv4c" } 200 { "message": "Succesfully added asset CA-UabKLc5PsfXHbNv4c 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/I1adq7YZETRIxtUGYpTS/thumbnail 200 { "message": "Succesfully removed thumbnail from project" }
// When thumbnail_asset_id is already nil DELETE /api/v2/projects/SD4Uf18UJB-D5Yw-npP4/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/M3v-xrSG70BGtqli0xy7/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/qehefpq_b_S2POV3_YTf/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 without media POST /api/v2/projects/DtialUGXI36apS40-0cE/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ] } 200 { "asset": { "id": "v_Fa1CZTS56Vkgdoyo4e", "external_id": null, "parent_id": null, "project_id": "DtialUGXI36apS40-0cE", "owner": "admin-user-253@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-11-27T09:43:34.166Z", "modification_date": "2023-11-27T09:43:34.223Z", "deleted": null } }
// Successful request for article POST /api/v2/projects/RDYDzeg1NxHJFf7qJMMv/assets { "title": "Sample Asset", "description": "Sample asset from API V2", "category": "Sample", "tags": [ "sample", "test" ], "media_type": "article" } 200 { "asset": { "id": "Yr6Bnp1zBqP0RdSi8p1K", "external_id": null, "parent_id": null, "project_id": "RDYDzeg1NxHJFf7qJMMv", "owner": "admin-user-254@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-11-27T09:43:34.545Z", "modification_date": "2023-11-27T09:43:34.725Z", "deleted": null } }
// Successful request with HTTP file URL POST /api/v2/projects/s_N169fyG8lY-sFjGGJ9/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": "McC66LDIygdLGTdqRs9E", "external_id": null, "parent_id": null, "project_id": "s_N169fyG8lY-sFjGGJ9", "owner": "admin-user-255@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-11-27T09:43:35.050Z", "modification_date": "2023-11-27T09:43:35.194Z", "deleted": null } }
// Successful request with HTTPS file URL POST /api/v2/projects/LtOOWFo7cxi-ob7PeT8w/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": "eGsHkJULCQHevHyiw4lZ", "external_id": null, "parent_id": null, "project_id": "LtOOWFo7cxi-ob7PeT8w", "owner": "admin-user-256@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-11-27T09:43:35.523Z", "modification_date": "2023-11-27T09:43:35.646Z", "deleted": null } }
// Invalid file URL POST /api/v2/projects/IChVAhYnVIBcwdQr-8Me/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" } } 400 { "error": "Asset t5_jeMYGzfkYEdDNzbI9 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/08mb7Knu21Ao_K3QCkCO/projects { "description": "Sample project from API V2", "category": "Sample" } 422 { "error": "Missing parameter title" }
// Successful request POST /api/v2/projects/VYCUPaelp7MOb48nGZyE/projects { "title": "Sample Project", "description": "Sample project from API V2", "category": "Sample" } 200 { "project": { "id": "362mHh5xY0q-hu9O-YM9", "external_id": null, "project_id": "VYCUPaelp7MOb48nGZyE", "owner": "admin-user-260@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-11-27T09:43:36.691Z", "modification_date": "2023-11-27T09:43:36.774Z", "deleted": null, "original_title": "Sample Project" } }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |