Difference between revisions of "Get Custom List By List Key"

From MyMobileWorkers API
Jump to: navigation, search
(Created page with "== Summary == {| border="1" class="wikitable" ! Jobs ! colspan="2" | |- ! URL | colspan="2" | https://:base_url/:api_path/:version/lists/list?api_key=YOUR_KEY |- ! Type | c...")
 
(→‎Example response)
 
Line 47: Line 47:
 
         "created_at": "2017-07-14T15:45:53+00:00",
 
         "created_at": "2017-07-14T15:45:53+00:00",
 
         "updated_at": "2017-07-14T15:45:53+00:00",
 
         "updated_at": "2017-07-14T15:45:53+00:00",
−
         "order_position": 5
+
         "order_position": 5,
 +
        "triggers": "photo,fail,note"
 
       },
 
       },
 
       {
 
       {
Line 55: Line 56:
 
         "created_at": "2017-07-14T15:00:14+00:00",
 
         "created_at": "2017-07-14T15:00:14+00:00",
 
         "updated_at": "2017-07-14T15:00:14+00:00",
 
         "updated_at": "2017-07-14T15:00:14+00:00",
−
         "order_position": 6
+
         "order_position": 6,
 +
        "triggers": "photo"
 
       },
 
       },
 
       {
 
       {
Line 63: Line 65:
 
         "created_at": "2017-07-20T16:22:21+00:00",
 
         "created_at": "2017-07-20T16:22:21+00:00",
 
         "updated_at": "2017-07-20T16:22:21+00:00",
 
         "updated_at": "2017-07-20T16:22:21+00:00",
−
         "order_position": 0
+
         "order_position": 0,
 +
        "triggers": ""
 
       }
 
       }
 
     ]
 
     ]

Latest revision as of 11:36, 12 March 2018

[edit] Summary

Jobs
URL https://:base_url/:api_path/:version/lists/list?api_key=YOUR_KEY
Type GET
Params: api_key required
list_key required
branch optional
Response JSON

The get custom list method returns a list corresponding to the list_key supplied in the request

A custom list cannot be created within the API it has be be created within the workflow implementation so that it corresponds with a custom list within a workflow template correctly.

[edit] Example response

[
  {
    "name": "Delivery sites",
    "description": "A list of delivery sites in the area",
    "branch": null,
    "created_at": "2017-07-11T09:40:42+00:00",
    "updated_at": "2017-07-20T16:22:21+00:00",
    "list_key": "delivery_site1",
    "list_items": [
      {
        "name": "Aldcliffe Site",
        "notes": "small",
        "external_id": "12",
        "created_at": "2017-07-14T15:45:53+00:00",
        "updated_at": "2017-07-14T15:45:53+00:00",
        "order_position": 5,
        "triggers": "photo,fail,note"
      },
      {
        "name": "Bond Estate",
        "notes": "medium",
        "external_id": "13",
        "created_at": "2017-07-14T15:00:14+00:00",
        "updated_at": "2017-07-14T15:00:14+00:00",
        "order_position": 6,
        "triggers": "photo"
      },
      {
        "name": "Beech Centre",
        "notes": "Small",
        "external_id": "",
        "created_at": "2017-07-20T16:22:21+00:00",
        "updated_at": "2017-07-20T16:22:21+00:00",
        "order_position": 0,
        "triggers": ""
      }
    ]
  }
]

[edit] Example curl request

curl "https://api.mymobileworkers.com:8181/api/1/lists/list?api_key=TESTKEY&list_key=LISTKEY"
curl "https://api.mymobileworkers.com:8181/api/1/lists/list?api_key=TESTKEY&list_key=LISTKEY&branch=BRANCHNAME"
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox