Message 1 of 3
POST /api/checklists - Detailed Guidance
Not applicable
02-12-2019
05:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to upload a new checklist via the API for 360 Field. I have a template checklist setup in a project, see below:
{
"template_id": "2347c055-66a7-4119-b831-d3f222a92e95",
"name": "API Checklist Type 2",
"description": null,
"tags": null,
"auto_create_issue": false,
"company_id": null,
"priority": null,
"updated_at": "2019-02-12 12:46:29 +0000",
"checklist_type": "QA/QC",
"header": "",
"footer": "",
"issue_type_id": "d713cd28-8b3f-4468-811e-4c6494f14273",
"custom_field_values": [],
"template_items": [
{
"template_item_id": "990d1376-4892-45a3-ae14-bd0c8bdffa67",
"number": "",
"position": 1,
"item_text": "Automatically Populated?",
"more_info": "",
"is_section": false,
"template_id": "2347c055-66a7-4119-b831-d3f222a92e95",
"company_id": null,
"response_type_id": "24e6efab-0f52-446f-9cc5-db49caaa1ce3",
"default_answer": "",
"spec_ref": "",
"attachments": [],
"document_references": [],
"document_folder_references": [],
"uri_references": [],
"root_cause_id": null,
"issue_description": "",
"response_type": {
"response_type_id": "24e6efab-0f52-446f-9cc5-db49caaa1ce3",
"display_type": "drop-down",
"name": "True, False, N/A",
"required": false,
"position": 782,
"possible_values": [
"True",
"False",
"N/A"
]
}
}
]
}
I'm using the POST /api/checklists endpoint to try and upload a new checklist. I'm sending the following data as a string in a checklists parameter:
[
{
"tags":"",
"template_id":"2347c055-66a7-4119-b831-d3f222a92e95",
"status":"Open",
"identifier":null,
"name":"API Checklist - Febru",
"checklist_type":"QA/QC",
"description":"",
"area_id":null,
"source_id":null,
"source_type":null,
"company_id":null,
"checklist_items":[
{
"template_item_id":"990d1376-4892-45a3-ae14-bd0c8bdffa67",
"comment":"",
"position":1,
"spec_ref":"",
"response":"True",
"location_detail":null,
"company_id":null,
"area_id":null
}
]
}
]
When I run this I get a code 500 server error and nothing other meaningful error message. If I check the Field 360 website I note that a checklist has been created; of sorts - it only includes the header data, no other fields are included:
What needs to be sent to ensure that fields are populated when creating a checklist using the API?
If I reduce the fields to a bare minimum, I still get the same result, a 500 error.
ANY help would be greatly appreciated!