リストアイテムの取得
リストのアイテム全部を取得する場合
- URL : /checklists/[checklist_id]/tasks.(json|xml)
- Method : get
- HTTP パラメータ
- with_notes : If set, the result will contain information about notes added to the tasks
- order : id:asc or id:desc or updated_at:asc - allows to override the sorting
- Responce : タスクはCheckvistのようなツリー構造ではなくて、タスクリストの形式で返ってくる
- 並び順は 親id、位置 で決まる。
- Checkvistのツリー上で一番上の階層が固まって並ぶことになる。
- For JSON, returns a javascript array of items. For XML, returns a structure like below:
<tasks>
<task1>
<task2>
<taskN>
</tasks>
リスト中の特定のアイテムだけを取得する場合
- URL : /checklists/[checklist_id]/tasks/[task_id].(json|xml)
- 通信メソッド : get
- HTTP パラメータ : with_notes のみ
- with_notes - If set, the result will contain information about notes added to the tasks
- Responce : 指定したタスクだけでなく、その「先祖」タスクも返ってくる。
- 並び順は、選択したアイテム → 親 → 親の親 → ・・・ → ルート
<tasks>
<task>
<task_parent>
<task_parent_parent>
<task_root_parent>
</tasks>
See task fields and XML sample.
Create list items
URL Method HTTP parameters Response
/checklists/checklist_id/tasks.(json|xml) post
task[content] - task text
task[parent_id] - id of the parent task (optional)
task[tags] - comma-separated list of tags to set on the task
task[due_date] - due for the task, in Checkvist's smart syntax format'
task[position] - 1-based position of the task (omit to add to the end of the list)
task[status] - task status (optional)
[[JSON]]/XML representation for the created task.
See task fields and XML sample.
/checklists/checklist_id/import.(json|xml) post
add_files[1],add_files[2] - can contain file attachment data for PRO users
checklist_id - May have format 'tag:tagname' in this case the first user list tagged with tagname will be chosen for the operation
import_content - list items in the same format, as supported by Checkvist's import function.
import_content_note - If present, content of the field becomes the note for the first created list item
parent_id - Optional ID of the parent list item
parse_tasks - If present, recognize ^due and #tags syntax in imported list items
position - Optional 1-based position for the first imported list item
replace_existing - danger - replace the whole content of the list with imported content
separate_with_empty_line - if set to 'singleItem', all text is imported as a single list item. If set to any other value, import will separate the list items with an empty line. By default (not set), each line is treated as a separate list item
status - Optional status for the first imported task; can be 0,1,2
Created list items, organized to hierarchy according to input data.
List items are added to the beginning of the target list.
For JSON, returns a javascript array of tasks. For XML, returns a structure like below:
<tasks>
<task1>
<task2>
<taskN>
</tasks>
See task fields and XML sample.
リストアイテムの情報更新
- URL : /checklists/checklist_id/tasks/task_id.(json|xml)
- Method : PUT
- PUTの場合は、GETと同じように、URLにパラメータを含める?
- HTTP parameters
- task[content] : new task text
- task[parent_id] : new parent_id task
- task[tags] : comma-separated list of tags to set on the task
- task[due_date] : due for the task, in Checkvist's smart syntax format'
- task[position] : 1-based position of the task
- parse : If true, recognize ^due and #tags syntax in the updated item
Response
Updates the task information and returns JSON/XML representation for it. This method won't change task status.
See task fields and XML sample.
Close/open/invalidate
The following actions allow to change task status. You can
change status of individual task (for leaf tasks only)
for non-leaf tasks, status of its children will be changed. In Checkvist, the status of a non-leaf task is defined as a cumulative status of its children.
Available status change actions are
close
invalidate (in Checkvist UI, such tasks are marked with italics)
reopen
These actions are presented in the final part of action URL below, like close.xml or invalidate.json. The performed action corresponds to the action name.
URL Method Response
/checklists/checklist_id/tasks/task_id/action.(json|xml) post Updates the task status and returns representation for it and for its children. XML sample:
<tasks>
<changed_task>
<child1>
<child2>
<childN>
</tasks>
For JSON, javascript array of tasks is returned. If there are no children, only one element is returned under the tasks node and only one element in resulting JSON array.
See task fields and XML sample.
Set repeating task information
URL Method HTTP parameters Response
/checklists/checklist_id/tasks/task_id/repeat.(json|xml) post
repeat[period] - daily|weekly|monthly|yearly
repeat[period_count] - it is '5' in repeat every 5 weeks (optional, default 1)
repeat[start_date] - the start date for the first repeating due
repeat[end_date] - the end date for the repeating due (optional)
Sets the repeating task information and returns the updated task.
See task fields and XML sample.
Delete list item
URL Method Response
/checklists/checklist_id/tasks/task_id.(json|xml) delete Deletes the list item including its children and returns the deleted list item representation.
See task fields and XML sample.
最終更新:2015年09月21日 09:27