Tasks - Approvals API
Tasks - Approvals API
Заголовок раздела «Tasks - Approvals API»List all approvals of a task
Заголовок раздела «List all approvals of a task»List all approvals of the task with a specific ID:
GET /tasks/:id/approvalsFiltering
Заголовок раздела «Filtering»Filtering is available for the following fields :
status
Response
Заголовок раздела «Response»Status: 200 OK[ { "approver": { "id": 390, "name": "Mark Camillo", "account": { "id": "wna", "name": "Widget North America" } }, "attachment": { "name": "workflow-1709-summary-for-mark-camillo.pdf", "uri": "https://itrp.s3.amazonaws.com/attachments/workflow-1709-summary-for-mark-camillo.pdf?AWSAccessKeyId=TN5W...DR3Q&Signature=VY2t...GnT&Expires=1409976714", "size": 27649 }, "created_at": "2014-09-04T23:04:16-05:00", "id": 84, "planned_effort": 120, "status": "assigned", "updated_at": "2014-09-04T23:04:16-05:00", "account": { "id": "wna", "name": "Widget North America" } }, { "approver": { "id": 5, "name": "Howard Tanner" }, "attachment": { "name": "workflow-1709-summary-for-howard-tanner.pdf", "uri": "https://itrp.s3.amazonaws.com/attachments/task_approvals/workflow-1709-summary-for-howard-tanner.pdf?AWSAccessKeyId=TDRH...EO3P&Signature=WW6z...FkU&Expires=1409976714", "size": 26984 }, "created_at": "2014-09-04T23:04:16-05:00", "id": 85, "planned_effort": 120, "status": "approved", "updated_at": "2014-09-04T23:04:42-05:00" }, "..."]The response contains these fields by default.
Add an approval to a task
Заголовок раздела «Add an approval to a task»Add an approval to a task with a specific ID.
POST /tasks/:id/approvalsWhen creating a new approval for a task these fields are available.
Response
Заголовок раздела «Response»Status: 200 OK{ "approver": { "id": 390, "name": "Mark Camillo", "account": { "id": "wna", "name": "Widget North America" } }, "attachment": { "name": "workflow-1709-summary-for-mark-camillo.pdf", "uri": "https://itrp.s3.amazonaws.com/attachments/workflow-1709-summary-for-mark-camillo.pdf?AWSAccessKeyId=TN5W...DR3Q&Signature=VY2t...GnT&Expires=1409976714", "size": 27649 }, "created_at": "2014-09-04T23:04:16-05:00", "id": 84, "planned_effort": 120, "status": "assigned", "updated_at": "2014-09-04T23:04:16-05:00", "account": { "id": "wna", "name": "Widget North America" }}Update an approval of a task
Заголовок раздела «Update an approval of a task»Update an approval of a task with a specific ID.
PATCH /tasks/:id/approvals/:approval_idWhen updating an existing approval for a task these fields are available.
Response
Заголовок раздела «Response»Status: 200 OK{ "status": "registered", "...": "..."}Remove an approval from a task
Заголовок раздела «Remove an approval from a task»Remove an approval with a specific ID from a task with a specific ID.
DELETE /tasks/:id/approvals/:approval_idResponse
Заголовок раздела «Response»Status: 204 No ContentRemove all approvals from a task
Заголовок раздела «Remove all approvals from a task»Remove all approval from a task with a specific ID.
DELETE /tasks/:id/approvals/Response
Заголовок раздела «Response»Status: 204 No Contentapprover_id
Required reference to Person — The ID of the person who is selected as the approver for the approval.
attachment
Readonly
link to Workflow Summary
— The hyperlink to the Workflow Summary PDF file that was generated for the approver when the approval was last set to the status
assigned
.
created_at
Readonly datetime — The date and time at which the approval was created.
id
Readonly integer — The unique ID of the approval.
planned_effort
Optional integer (max 600000) — The Planned effort field is used to specify the number of minutes the approver is expected to spend working on the task.
status
Readonly enum — The status of the approval. Valid values are:
registeredassignedrejectedapprovedcanceled
updated_at
Readonly
datetime
— The date and time of the last update of the approval. If the approval has had no updates it contains the
created_at
value.