※ 現在APIはベータ版です。仕様が変更になる可能性がありますのでご了承ください。
POST /api/v1/time_entries/:id/comments
Create a comment
サポートフォーマット
json例
POST /api/v1/time_entries/2053/comments { "comment": { "content": "Comment😊" } } 200 { "id": 2053, "started_at": "2024-04-17T23:31:06.000Z", "stopped_at": "2024-04-18T00:31:06.000Z", "time_trackable_id": 7512, "time_trackable_type": "Task", "time_tracker_id": 3091, "time_tracker_type": "User", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "duration": 3600.0, "amount": 0, "team_id": 3040, "input_type": "realtime", "stopped_at_seconds": 1713400266, "deleted_at_seconds": 0, "formatted_duration": "01:00", "html_url": "http://test.host/app/mytasks/7512/edit", "user": { "id": 3091, "nickname": "Dennis Greenfelder MD", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "domain": "timecrowd.net", "reset_password_sent_at": null, "remember_created_at": null, "sign_in_count": 0, "current_sign_in_at": null, "last_sign_in_at": null, "confirmed_at": "2024-04-17T23:31:06.000Z", "confirmation_sent_at": null, "notify_exported": true, "deactivated_at": null, "calendar_zoom_rate": 1, "avatar_url": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50" }, "task": { "state": "open", "updated_at": "2024-04-17T23:31:06.000Z", "id": 7512, "key": "http://wintheiser.test/antonia_stehr", "title": "Consectetur qui voluptas qui.", "url": "http://wintheiser.test/antonia_stehr", "team_id": 3040, "created_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "description": null, "category": { "id": 7511, "key": "key75", "title": "key75", "url": null, "team_id": 3040, "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "description": null, "category": true, "sequential_id": null, "state": "open", "bill": 0, "ancestry": null, "ancestry_depth": 0, "closed_at": null, "color": 1, "position": 2, "deleted_at_seconds": 0, "key_md5": "a3952e3b2382183ea8afc424796e4a54", "archived": false }, "sequential_id": null, "bill": 0, "ancestry": "7511", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "60433dd07d1ae0749f46be25bce518f3", "archived": false, "team": { "id": 3040, "name": "South Carolina ghosts", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "time_limit": 0, "avatar": null, "personal": false, "premium": false, "ancestry": null, "rounding": "floor", "capacity": null, "hierarchized": false, "default_duration": 15, "tasks_readonly_role": "none", "workspaces_workspace_id": null, "tasks_readonly": false } }, "comment": { "id": 47, "content": "Comment😊", "commentable_id": 2053, "commentable_type": "ActsAsTimeTrackable::ActiveRecordStores::TimeEntry", "user_id": 3091, "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "attachment": null }, "attachment": null, "team": { "id": 3040, "name": "South Carolina ghosts", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "time_limit": 0, "avatar": null, "personal": false, "premium": false, "ancestry": null, "rounding": "floor", "capacity": null, "hierarchized": false, "default_duration": 15, "tasks_readonly_role": "none", "workspaces_workspace_id": null, "tasks_readonly": false }, "category": { "id": 7511, "key": "key75", "title": "key75", "url": null, "team_id": 3040, "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "description": null, "category": true, "sequential_id": null, "state": "open", "bill": 0, "ancestry": null, "ancestry_depth": 0, "closed_at": null, "color": 1, "position": 2, "deleted_at_seconds": 0, "key_md5": "a3952e3b2382183ea8afc424796e4a54", "archived": false } }
POST /api/v1/time_entries/2054/comments { "comment": { "content": "Comment_2" } } 200 { "id": 2054, "started_at": "2024-04-17T23:31:06.000Z", "stopped_at": "2024-04-18T00:31:06.000Z", "time_trackable_id": 7515, "time_trackable_type": "Task", "time_tracker_id": 3092, "time_tracker_type": "User", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "duration": 3600.0, "amount": 0, "team_id": 3041, "input_type": "realtime", "stopped_at_seconds": 1713400266, "deleted_at_seconds": 0, "formatted_duration": "01:00", "html_url": "http://test.host/app/mytasks/7515/edit", "user": { "id": 3092, "nickname": "Miss Tandy Hartmann", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "domain": "timecrowd.net", "reset_password_sent_at": null, "remember_created_at": null, "sign_in_count": 0, "current_sign_in_at": null, "last_sign_in_at": null, "confirmed_at": "2024-04-17T23:31:06.000Z", "confirmation_sent_at": null, "notify_exported": true, "deactivated_at": null, "calendar_zoom_rate": 1, "avatar_url": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50" }, "task": { "state": "open", "updated_at": "2024-04-17T23:31:06.000Z", "id": 7515, "key": "http://welch.example/barbie", "title": "Inventore iusto similique est.", "url": "http://welch.example/barbie", "team_id": 3041, "created_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "description": null, "category": { "id": 7514, "key": "key76", "title": "key76", "url": null, "team_id": 3041, "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "description": null, "category": true, "sequential_id": null, "state": "open", "bill": 0, "ancestry": null, "ancestry_depth": 0, "closed_at": null, "color": 1, "position": 2, "deleted_at_seconds": 0, "key_md5": "0a506ee2684d9e695efbbfcad0001755", "archived": false }, "sequential_id": null, "bill": 0, "ancestry": "7514", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "c9ef59e9cd7f1950e84420caf9d1d563", "archived": false, "team": { "id": 3041, "name": "Nebraska dragons", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "time_limit": 0, "avatar": null, "personal": false, "premium": false, "ancestry": null, "rounding": "floor", "capacity": null, "hierarchized": false, "default_duration": 15, "tasks_readonly_role": "none", "workspaces_workspace_id": null, "tasks_readonly": false } }, "comment": { "id": 48, "content": "Comment_2", "commentable_id": 2054, "commentable_type": "ActsAsTimeTrackable::ActiveRecordStores::TimeEntry", "user_id": 3092, "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "attachment": null }, "attachment": null, "team": { "id": 3041, "name": "Nebraska dragons", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "time_limit": 0, "avatar": null, "personal": false, "premium": false, "ancestry": null, "rounding": "floor", "capacity": null, "hierarchized": false, "default_duration": 15, "tasks_readonly_role": "none", "workspaces_workspace_id": null, "tasks_readonly": false }, "category": { "id": 7514, "key": "key76", "title": "key76", "url": null, "team_id": 3041, "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:06.000Z", "deleted_at": null, "description": null, "category": true, "sequential_id": null, "state": "open", "bill": 0, "ancestry": null, "ancestry_depth": 0, "closed_at": null, "color": 1, "position": 2, "deleted_at_seconds": 0, "key_md5": "0a506ee2684d9e695efbbfcad0001755", "archived": false } }
POST /api/v1/time_entries/2055/comments { "comment": { "content": "Comment😊", "attachment": "<FILE CONTENT 'blank.png'>" } } 200 { "id": 2055, "started_at": "2024-04-17T23:31:07.000Z", "stopped_at": "2024-04-18T00:31:07.000Z", "time_trackable_id": 7518, "time_trackable_type": "Task", "time_tracker_id": 3093, "time_tracker_type": "User", "created_at": "2024-04-17T23:31:07.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "duration": 3600.0, "amount": 0, "team_id": 3042, "input_type": "realtime", "stopped_at_seconds": 1713400267, "deleted_at_seconds": 0, "formatted_duration": "01:00", "html_url": "http://test.host/app/mytasks/7518/edit", "user": { "id": 3093, "nickname": "Eilene Walter", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2024-04-17T23:31:06.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "domain": "timecrowd.net", "reset_password_sent_at": null, "remember_created_at": null, "sign_in_count": 0, "current_sign_in_at": null, "last_sign_in_at": null, "confirmed_at": "2024-04-17T23:31:06.000Z", "confirmation_sent_at": null, "notify_exported": true, "deactivated_at": null, "calendar_zoom_rate": 1, "avatar_url": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50" }, "task": { "state": "open", "updated_at": "2024-04-17T23:31:07.000Z", "id": 7518, "key": "http://adams.test/abel_murphy", "title": "Et et harum accusamus.", "url": "http://adams.test/abel_murphy", "team_id": 3042, "created_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "description": null, "category": { "id": 7517, "key": "key77", "title": "key77", "url": null, "team_id": 3042, "created_at": "2024-04-17T23:31:07.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "description": null, "category": true, "sequential_id": null, "state": "open", "bill": 0, "ancestry": null, "ancestry_depth": 0, "closed_at": null, "color": 1, "position": 2, "deleted_at_seconds": 0, "key_md5": "1baf1cb70cb4b1e37ad4fbff93ef2730", "archived": false }, "sequential_id": null, "bill": 0, "ancestry": "7517", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "8cdba606fd49929df927f0d7e2a2a519", "archived": false, "team": { "id": 3042, "name": "New York vampires", "created_at": "2024-04-17T23:31:07.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "time_limit": 0, "avatar": null, "personal": false, "premium": false, "ancestry": null, "rounding": "floor", "capacity": null, "hierarchized": false, "default_duration": 15, "tasks_readonly_role": "none", "workspaces_workspace_id": null, "tasks_readonly": false } }, "comment": { "id": 49, "content": "Comment😊", "commentable_id": 2055, "commentable_type": "ActsAsTimeTrackable::ActiveRecordStores::TimeEntry", "user_id": 3093, "created_at": "2024-04-17T23:31:07.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "attachment": "blank.png" }, "attachment": "https://development-timecrowd.s3.ap-northeast-1.amazonaws.com/uploads/comment/attachment/49/blank.png?X-Amz-Expires=600&X-Amz-Date=20240417T233107Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARAC7GHMAJNI3HJVF%2F20240417%2Fap-northeast-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=68608e435def241520ac31565274a68b27106a91cf12aaf7ab90c59e2b1b3008", "team": { "id": 3042, "name": "New York vampires", "created_at": "2024-04-17T23:31:07.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "time_limit": 0, "avatar": null, "personal": false, "premium": false, "ancestry": null, "rounding": "floor", "capacity": null, "hierarchized": false, "default_duration": 15, "tasks_readonly_role": "none", "workspaces_workspace_id": null, "tasks_readonly": false }, "category": { "id": 7517, "key": "key77", "title": "key77", "url": null, "team_id": 3042, "created_at": "2024-04-17T23:31:07.000Z", "updated_at": "2024-04-17T23:31:07.000Z", "deleted_at": null, "description": null, "category": true, "sequential_id": null, "state": "open", "bill": 0, "ancestry": null, "ancestry_depth": 0, "closed_at": null, "color": 1, "position": 2, "deleted_at_seconds": 0, "key_md5": "1baf1cb70cb4b1e37ad4fbff93ef2730", "archived": false } }