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...")

Revision as of 11:31, 27 July 2017

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.

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
      },
      {
        "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
      },
      {
        "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
      }
    ]
  }
]

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