※ 現在APIはベータ版です。仕様が変更になる可能性がありますのでご了承ください。
POST /api/v1/time_entries
Create a time entry
サポートフォーマット
json例
POST /api/v1/time_entries { "task": { "key": "http://ward-cruickshank.test/cathryn", "parent_id": "196", "team_id": "99", "title": "Esse velit commodi earum.", "url": "http://ward-cruickshank.test/cathryn" } } 200 { "id": 22, "started_at": "2023-10-02T05:53:42.000Z", "stopped_at": null, "time_trackable_id": 197, "time_trackable_type": "Task", "time_tracker_id": 92, "time_tracker_type": "User", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.000Z", "deleted_at": null, "duration": 0.705859109, "amount": 0, "team_id": 99, "input_type": "realtime", "stopped_at_seconds": 0, "deleted_at_seconds": 0, "formatted_duration": "00:00", "html_url": "http://test.host/app/mytasks/197/edit", "user": { "id": 92, "nickname": "Laine Moore", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.000Z", "deleted_at": null, "options": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "profile": null, "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": "2023-10-02T05:53:42.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": { "id": 197, "key": "http://ward-cruickshank.test/cathryn", "title": "Esse velit commodi earum.", "url": "http://ward-cruickshank.test/cathryn", "team_id": 99, "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.000Z", "deleted_at": null, "description": null, "category": { "id": 196, "key": "key58", "title": "key58", "url": null, "team_id": 99, "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.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": 3, "deleted_at_seconds": 0, "key_md5": "abd0df7f6e92e1ca80a44b9d13e5cdc3", "archived": false }, "sequential_id": null, "state": "open", "bill": 0, "ancestry": "196", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "e793290c3ca5c598a23375aca60c4c1a", "archived": false, "team": { "id": 99, "name": "Ohio gnomes", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.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", "tasks_readonly": false } }, "comment": null, "attachment": null, "team": { "id": 99, "name": "Ohio gnomes", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.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", "tasks_readonly": false }, "category": { "id": 196, "key": "key58", "title": "key58", "url": null, "team_id": 99, "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:42.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": 3, "deleted_at_seconds": 0, "key_md5": "abd0df7f6e92e1ca80a44b9d13e5cdc3", "archived": false } }
POST /api/v1/time_entries { "parent": { "key": "key61", "title": "key61", "url": "https://example.com" }, "task": { "key": "http://boyle.test/larita", "parent_id": "199", "team_id": "100", "title": "Sed eos qui autem.", "url": "http://boyle.test/larita" } } 200 { "id": 23, "started_at": "2023-10-02T05:53:43.000Z", "stopped_at": null, "time_trackable_id": 202, "time_trackable_type": "Task", "time_tracker_id": 93, "time_tracker_type": "User", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.000Z", "deleted_at": null, "duration": 0.174743341, "amount": 0, "team_id": 100, "input_type": "realtime", "stopped_at_seconds": 0, "deleted_at_seconds": 0, "formatted_duration": "00:00", "html_url": "http://test.host/app/mytasks/202/edit", "user": { "id": 93, "nickname": "Sen. Lani Goodwin", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:43.000Z", "deleted_at": null, "options": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "profile": null, "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": "2023-10-02T05:53:42.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": { "id": 202, "key": "http://boyle.test/larita", "title": "Sed eos qui autem.", "url": "http://boyle.test/larita", "team_id": 100, "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.000Z", "deleted_at": null, "description": null, "category": { "id": 199, "key": "key59", "title": "key59", "url": null, "team_id": 100, "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:43.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": "abaa7d430409339e96b89987e883ed1b", "archived": false }, "sequential_id": null, "state": "open", "bill": 0, "ancestry": "199", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "8658879ec1feb264b8fdbe7b95c960e1", "archived": false, "team": { "id": 100, "name": "Vermont birds", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:43.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", "tasks_readonly": false } }, "comment": null, "attachment": null, "team": { "id": 100, "name": "Vermont birds", "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:43.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", "tasks_readonly": false }, "category": { "id": 199, "key": "key59", "title": "key59", "url": null, "team_id": 100, "created_at": "2023-10-02T05:53:42.000Z", "updated_at": "2023-10-02T05:53:43.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": "abaa7d430409339e96b89987e883ed1b", "archived": false } }
POST /api/v1/time_entries { "parent": { "key": "key64", "title": "key64", "url": "https://example.com" }, "task": { "key": "http://schmidt-schumm.example/dessie_ferry", "parent_id": "204", "team_id": "101", "title": "Molestias consequatur vel ea.", "url": "https://www.chatwork.com/#!rid123456-123456789012345678" } } 200 { "id": 24, "started_at": "2023-10-02T05:53:43.000Z", "stopped_at": null, "time_trackable_id": 208, "time_trackable_type": "Task", "time_tracker_id": 94, "time_tracker_type": "User", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.000Z", "deleted_at": null, "duration": 0.672453025, "amount": 0, "team_id": 101, "input_type": "realtime", "stopped_at_seconds": 0, "deleted_at_seconds": 0, "formatted_duration": "00:00", "html_url": "http://test.host/app/mytasks/208/edit", "user": { "id": 94, "nickname": "Nancie Brakus", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.000Z", "deleted_at": null, "options": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "profile": null, "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": "2023-10-02T05:53:43.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": { "id": 208, "key": "https://www.chatwork.com/#!rid123456-123456789012345678", "title": "Molestias consequatur vel ea.", "url": "https://www.chatwork.com/#!rid123456-123456789012345678", "team_id": 101, "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.000Z", "deleted_at": null, "description": null, "category": { "id": 207, "key": "https://example.com", "title": "key64", "url": null, "team_id": 101, "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.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": 4, "deleted_at_seconds": 0, "key_md5": "c984d06aafbecf6bc55569f964148ea3", "archived": false }, "sequential_id": null, "state": "open", "bill": 0, "ancestry": "207", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "4596a21023f5981ae2c5d023c42466f7", "archived": false, "team": { "id": 101, "name": "Kansas kangaroos", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.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", "tasks_readonly": false } }, "comment": null, "attachment": null, "team": { "id": 101, "name": "Kansas kangaroos", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.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", "tasks_readonly": false }, "category": { "id": 207, "key": "https://example.com", "title": "key64", "url": null, "team_id": 101, "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:43.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": 4, "deleted_at_seconds": 0, "key_md5": "c984d06aafbecf6bc55569f964148ea3", "archived": false } }
POST /api/v1/time_entries { "parent": { "key": "key67", "title": "key67", "url": "https://example.com" }, "task": { "key": "http://greenfelder.test/cathi", "parent_id": "210", "team_id": "102", "title": "Quo necessitatibus quas temporibus.", "url": "https://kcw.kddi.ne.jp/#!rid123456-123456789012345678" } } 200 { "id": 25, "started_at": "2023-10-02T05:53:44.000Z", "stopped_at": null, "time_trackable_id": 214, "time_trackable_type": "Task", "time_tracker_id": 95, "time_tracker_type": "User", "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.000Z", "deleted_at": null, "duration": 0.292577426, "amount": 0, "team_id": 102, "input_type": "realtime", "stopped_at_seconds": 0, "deleted_at_seconds": 0, "formatted_duration": "00:00", "html_url": "http://test.host/app/mytasks/214/edit", "user": { "id": 95, "nickname": "Elenora Hoppe", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:44.000Z", "deleted_at": null, "options": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "profile": null, "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": "2023-10-02T05:53:43.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": { "id": 214, "key": "https://kcw.kddi.ne.jp/#!rid123456-123456789012345678", "title": "Quo necessitatibus quas temporibus.", "url": "https://kcw.kddi.ne.jp/#!rid123456-123456789012345678", "team_id": 102, "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.000Z", "deleted_at": null, "description": null, "category": { "id": 213, "key": "https://example.com", "title": "key67", "url": null, "team_id": 102, "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.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": 4, "deleted_at_seconds": 0, "key_md5": "c984d06aafbecf6bc55569f964148ea3", "archived": false }, "sequential_id": null, "state": "open", "bill": 0, "ancestry": "213", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "e77522b6b66d893e2e207478ae663f1b", "archived": false, "team": { "id": 102, "name": "Arizona dolphins", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:44.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", "tasks_readonly": false } }, "comment": null, "attachment": null, "team": { "id": 102, "name": "Arizona dolphins", "created_at": "2023-10-02T05:53:43.000Z", "updated_at": "2023-10-02T05:53:44.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", "tasks_readonly": false }, "category": { "id": 213, "key": "https://example.com", "title": "key67", "url": null, "team_id": 102, "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.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": 4, "deleted_at_seconds": 0, "key_md5": "c984d06aafbecf6bc55569f964148ea3", "archived": false } }
POST /api/v1/time_entries { "time_entry": { "started_at": "1696139624", "stopped_at": "1696222424", "time_trackable_id": "217" } } 200 { "id": 26, "started_at": "2023-10-01T05:53:44.000Z", "stopped_at": "2023-10-02T04:53:44.000Z", "time_trackable_id": 217, "time_trackable_type": "Task", "time_tracker_id": 96, "time_tracker_type": "User", "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.000Z", "deleted_at": null, "duration": 82800.0, "amount": 0, "team_id": 103, "input_type": "realtime", "stopped_at_seconds": 1696222424, "deleted_at_seconds": 0, "formatted_duration": "23:00", "html_url": "http://test.host/app/mytasks/217/edit", "user": { "id": 96, "nickname": "Fr. Cliff Heathcote", "image": "https://lh5.googleusercontent.com/-vLvFHrocJuk/AAAAAAAAAAI/AAAAAAAAAEQ/CZsQXc7B2EM/photo.jpg?sz=50", "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.000Z", "deleted_at": null, "options": null, "avatar": null, "daily": true, "daily_time": "2000-01-01T08:00:00.000Z", "weekly": true, "time_zone": "UTC", "locale": "en", "profile": null, "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": "2023-10-02T05:53:44.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": { "id": 217, "key": "http://kutch.example/samantha", "title": "Sit maiores esse quae.", "url": "http://kutch.example/samantha", "team_id": 103, "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.000Z", "deleted_at": null, "description": null, "category": { "id": 216, "key": "key68", "title": "key68", "url": null, "team_id": 103, "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.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": "70667241a503bb4f291ca9837c168038", "archived": false }, "sequential_id": null, "state": "open", "bill": 0, "ancestry": "216", "ancestry_depth": 1, "closed_at": null, "color": 1, "position": null, "deleted_at_seconds": 0, "key_md5": "33add00aeb9dba286e246e11813efec4", "archived": false, "team": { "id": 103, "name": "Alabama lions", "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.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", "tasks_readonly": false } }, "comment": null, "attachment": null, "team": { "id": 103, "name": "Alabama lions", "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.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", "tasks_readonly": false }, "category": { "id": 216, "key": "key68", "title": "key68", "url": null, "team_id": 103, "created_at": "2023-10-02T05:53:44.000Z", "updated_at": "2023-10-02T05:53:44.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": "70667241a503bb4f291ca9837c168038", "archived": false } }
POST /api/v1/time_entries { "task": { "key": "http://will.example/willard.pfannerstill", "team_id": "104", "title": "Necessitatibus qui maxime maiores.", "url": "http://will.example/willard.pfannerstill" } } 422 { "messages": [ "選択中のチームでタスクの作成・編集・削除は許可されていません" ] }
POST /api/v1/time_entries { "task": { "key": "http://hammes.example/lonna", "parent_id": "220", "team_id": "105", "title": "Fugit repellat commodi sit.", "url": "http://hammes.example/lonna" } } 422 { "messages": [ "1 error prohibited this Task from being saved. ", "Category is already deleted." ] }