Move and Copy between Projects
Lets create a copy of the note:
Response: HTTP 200, application/json (Hide)
PUT /projects/1/notes/1/move-to-project
Payload:
1 2 3 4
{ "project_id": 1, "copy": true }
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
{ "single": { "id": 4, "class": "Note", "url_path": "\/projects\/1\/notes\/4", "name": "First Document", "comments_count": 0, "attachments": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "project_id": 1, "is_hidden_from_clients": false, "body": "First document", "body_formatted": "First document", "body_plain_text": "First document", "created_on": 1430164179, "created_by_id": 1, "updated_on": 1430164181, "updated_by_id": 1, "note_id": 0, "is_subnote": false, "subnotes_count": 2, "is_in_collection": true, "position": 0, "contributor_ids": [ 1 ] }, "subscribers": [ 1 ], "comments": [], "subnotes": [ { "id": 5, "class": "Note", "url_path": "\/projects\/1\/notes\/5", "name": "First Subnote", "comments_count": 0, "attachments": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "project_id": 1, "is_hidden_from_clients": false, "body": "First subnote", "body_formatted": "First subnote", "body_plain_text": "First subnote", "created_on": 1430164180, "created_by_id": 1, "updated_on": 1430164180, "updated_by_id": 1, "note_id": 4, "is_subnote": true, "subnotes_count": 0, "is_in_collection": true, "position": 2, "contributor_ids": [ 1 ] }, { "id": 6, "class": "Note", "url_path": "\/projects\/1\/notes\/6", "name": "Second Subnote", "comments_count": 0, "attachments": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "project_id": 1, "is_hidden_from_clients": false, "body": "Second subnote", "body_formatted": "Second subnote", "body_plain_text": "Second subnote", "created_on": 1430164180, "created_by_id": 1, "updated_on": 1430164180, "updated_by_id": 1, "note_id": 4, "is_subnote": true, "subnotes_count": 0, "is_in_collection": true, "position": 3, "contributor_ids": [ 1 ] } ] }
Now, lets move this copy to a target project:
Response: HTTP 200, application/json (Hide)
PUT /projects/1/notes/4/move-to-project
Payload:
1 2 3
{ "project_id": 2 }
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
{ "single": { "id": 4, "class": "Note", "url_path": "\/projects\/2\/notes\/4", "name": "First Document", "comments_count": 0, "attachments": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "project_id": 2, "is_hidden_from_clients": false, "body": "First document", "body_formatted": "First document", "body_plain_text": "First document", "created_on": 1430164179, "created_by_id": 1, "updated_on": 1430164181, "updated_by_id": 1, "note_id": 0, "is_subnote": false, "subnotes_count": 2, "is_in_collection": true, "position": 0, "contributor_ids": [ 1 ] }, "subscribers": [ 1 ], "comments": [], "subnotes": [ { "id": 5, "class": "Note", "url_path": "\/projects\/2\/notes\/5", "name": "First Subnote", "comments_count": 0, "attachments": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "project_id": 2, "is_hidden_from_clients": false, "body": "First subnote", "body_formatted": "First subnote", "body_plain_text": "First subnote", "created_on": 1430164180, "created_by_id": 1, "updated_on": 1430164181, "updated_by_id": 1, "note_id": 4, "is_subnote": true, "subnotes_count": 0, "is_in_collection": true, "position": 1, "contributor_ids": [ 1 ] }, { "id": 6, "class": "Note", "url_path": "\/projects\/2\/notes\/6", "name": "Second Subnote", "comments_count": 0, "attachments": [], "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "project_id": 2, "is_hidden_from_clients": false, "body": "Second subnote", "body_formatted": "Second subnote", "body_plain_text": "Second subnote", "created_on": 1430164180, "created_by_id": 1, "updated_on": 1430164181, "updated_by_id": 1, "note_id": 4, "is_subnote": true, "subnotes_count": 0, "is_in_collection": true, "position": 2, "contributor_ids": [ 1 ] } ] }