Create Datalist
Creates a new datalist
POST/api/restricted/datalist
curl --request POST 'https://api.globalpatron.com/api/restricted/datalist' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX' \
--header 'Content-Type: application/json' \
--data '{ JSON_PAYLOAD_HERE }'
Response 200 OK
{ "settings": { "list_name": "My datalists name", "list_description": "This datalist will store a list of datalist entry items", "list_type": "alphanumeric" }, "id": "096fcf82-8feb-4cc0-9b36-cc507b266c1e", "created_date_utc": "2023-10-27T23:00:55.695166Z", "modified_date_utc": "0001-01-01T00:00:00" }
Update Datalist
Updates an existing datalist
POST/api/restricted/datalist/{datalistId}
curl --request POST 'https://api.globalpatron.com/api/restricted/datalist/{096fcf82-8feb-4cc0-9b36-cc507b266c1e}' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX' \
--header 'Content-Type: application/json' \
--data '{ JSON_PAYLOAD_HERE }'
Response 200 OK
{ "settings": { "list_name": "New datalists name", "list_description": "New datalist description", "list_type": "alphanumeric" }, "id": "096fcf82-8feb-4cc0-9b36-cc507b266c1e", "created_date_utc": "2023-10-27T23:00:55.695166Z", "modified_date_utc": "2023-11-27T23:00:55.695166Z" }
Delete Datalist
Deletes an existing datalist and all of its datalist entry items
POST/api/restricted/datalist/{datalistId}?for_deletion=1
curl --request POST 'https://api.globalpatron.com/api/restricted/datalist/{096fcf82-8feb-4cc0-9b36-cc507b266c1e}?for_deletion=1' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX' \
--header 'Content-Type: application/json' \
--data '{ JSON_PAYLOAD_HERE }'
Response 200 OK
{ "settings": { "list_name": "New datalists name", "list_description": "New datalist description", "list_type": "alphanumeric" }, "id": "096fcf82-8feb-4cc0-9b36-cc507b266c1e", "created_date_utc": "2023-10-27T23:00:55.695166Z", "modified_date_utc": "2023-11-27T23:00:55.695166Z" }
List Accessible Datalists
Lists all datalists that you have access to
GET/api/restricted/user/datalist
curl --request GET 'https://api.globalpatron.com/api/restricted/user/datalist' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX' \
Response 200 OK
{ "results": [ { "settings": { "list_name": "New datalist", "list_description": "Description goes here", "list_type": "alphanumeric" }, "id": "f2490339-0bf8-4ca1-8721-6643ebfad238", "created_date_utc": "2023-10-28T04:37:54.3811243Z", "modified_date_utc": "0001-01-01T00:00:00" }, { "settings": { "list_name": "Registered Serial Numbers", "list_description": "List of all serial numbers which have been registered", "list_type": "alphanumeric" }, "id": "6f218592-4ac8-41f7-bdfa-c2c40f50c22b", "created_date_utc": "2022-09-13T05:05:03.2228619Z", "modified_date_utc": "0001-01-01T00:00:00" }, { "settings": { "list_name": "Product Serial Numbers", "list_description": "List of all valid product serial numbers", "list_type": "alphanumeric" }, "id": "1f50de48-9725-42da-9e9f-f316fc44e43d", "created_date_utc": "2022-06-09T10:25:17.2291997Z", "modified_date_utc": "2022-09-13T03:35:38.0362849Z" } ], "accessible_datalist_ids_edit_access": [ "f2490339-0bf8-4ca1-8721-6643ebfad238", "6f218592-4ac8-41f7-bdfa-c2c40f50c22b", "1f50de48-9725-42da-9e9f-f316fc44e43d" ], "accessible_datalist_ids_account_management_access": [ "f2490339-0bf8-4ca1-8721-6643ebfad238", "6f218592-4ac8-41f7-bdfa-c2c40f50c22b", "1f50de48-9725-42da-9e9f-f316fc44e43d" ], "accessible_datalist_ids_full_reporting_access": [ "f2490339-0bf8-4ca1-8721-6643ebfad238", "6f218592-4ac8-41f7-bdfa-c2c40f50c22b", "1f50de48-9725-42da-9e9f-f316fc44e43d" ] }
Create Datalist Entry Item
Adds a new entry item to an existing datalist
POST/api/restricted/datalist/{datalistId}/entry
curl --request POST 'https://api.globalpatron.com/api/restricted/datalist/{096fcf82-8feb-4cc0-9b36-cc507b266c1e}/entry' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX' \
--header 'Content-Type: application/json' \
--data '{ JSON_PAYLOAD_HERE }'
Response 200 OK
Example response when a single entry item has been inserted into the datalist:
Example response when multiple entry items have been inserted into the datalist:
["da618b5c-23ac-4f5c-8eb2-5467c4125c1a"]
Example response when multiple entry items have been inserted into the datalist:
[ "8a66ad61-5d49-4de3-8bec-e59404a30261", "2c484f50-c42e-461d-a9ef-baaed0db5dd4", "8c6abaec-a1f9-451c-90f6-a2c4baf7ed02", "0af2bebd-8803-40d6-bf77-0ea58481b123", "784b6ea7-de16-401f-8ade-f286986940a9", "d78067b7-6a01-4593-9d07-ad3751179fd6", "b2dc0c04-f360-4892-a6ce-e148d00b6b32", "4e7ff4a9-0c9d-4910-9532-f01d00c907c3", "4e4ade49-ae6a-45aa-8749-522a8d4d5724", "6b35596d-cb31-4b15-9fcc-146772cfcb89" ]
Delete Datalist Entry Item
Deletes a specific entry item within a datalist
DELETE/api/restricted/datalist/{datalistId}/entry/{datalistEntryId}
curl --request DELETE 'https://api.globalpatron.com/api/restricted/datalist/{6f218592-4ac8-41f7-bdfa-c2c40f50c22b}/entry/{6b35596d-cb31-4b15-9fcc-146772cfcb89}' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX'
Response 200 OK
{ "message": "Datalist Entry has been deleted successfully", "datalist_entry_deleted": true }
List Datalist Entry Items
Lists all entry items within a datalist
GET/api/restricted/datalist/{datalistId}/entries
curl --request GET 'https://api.globalpatron.com/api/restricted/datalist/{6f218592-4ac8-41f7-bdfa-c2c40f50c22b}/entries' \
--header 'TokenId: XXXXX' \
--header 'TokenSecret: XXXXX' \
Response 200 OK
{ "results": [ { "datalist_id": "f2490339-0bf8-4ca1-8721-6643ebfad238", "created_by_verified_email_address": "[email protected]", "created_by_device": { "client_ip_address": "111.22.33.44", "client_ip_country_code": "AU" }, "sort_order": 1, "entry_value": "one", "id": "2b3fcf60-0c69-442c-a195-49b8a1db0d32", "created_date_utc": "2023-10-28T04:38:51.6886147Z", "modified_date_utc": "0001-01-01T00:00:00" }, { "datalist_id": "f2490339-0bf8-4ca1-8721-6643ebfad238", "created_by_verified_email_address": "[email protected]", "created_by_device": { "client_ip_address": "111.22.33.44", "client_ip_country_code": "AU" }, "sort_order": 2, "entry_value": "two", "id": "772a0b0f-9ff7-4549-9443-7bfd01fe508d", "created_date_utc": "2023-10-28T04:38:51.6886147Z", "modified_date_utc": "0001-01-01T00:00:00" }, { "datalist_id": "f2490339-0bf8-4ca1-8721-6643ebfad238", "created_by_verified_email_address": "[email protected]", "created_by_device": { "client_ip_address": "111.22.33.44", "client_ip_country_code": "AU" }, "sort_order": 3, "entry_value": "three", "id": "5940d3fc-c27b-4aa6-bc04-f52b38c77ed6", "created_date_utc": "2023-10-28T04:38:51.6886147Z", "modified_date_utc": "0001-01-01T00:00:00" }, { "datalist_id": "f2490339-0bf8-4ca1-8721-6643ebfad238", "created_by_verified_email_address": "[email protected]", "created_by_device": { "client_ip_address": "111.22.33.44", "client_ip_country_code": "AU" }, "sort_order": 4, "entry_value": "four", "id": "713997ae-f410-4a09-b3c0-b3524bd1e9d7", "created_date_utc": "2023-10-28T04:38:51.6886147Z", "modified_date_utc": "0001-01-01T00:00:00" }, { "datalist_id": "f2490339-0bf8-4ca1-8721-6643ebfad238", "created_by_verified_email_address": "[email protected]", "created_by_device": { "client_ip_address": "111.22.33.44", "client_ip_country_code": "AU" }, "sort_order": 5, "entry_value": "five", "id": "5a4e57d7-279c-4b8f-8428-3a9724792153", "created_date_utc": "2023-10-28T04:38:51.6886147Z", "modified_date_utc": "0001-01-01T00:00:00" } ], "has_edit_access": true }