The Get List Definitions command allows you to get a list of all List Definitions in the Realm and the properties of each.
GET /lists
https://[siteurl]/rest/lists/getListDefinitions
Request Body Parameters
The Get List Definitions command requires only the URI call. No additional fields are required in the JSON.
Request Body Example
Using Get List Definitions:
curl --request GET \
--url 'https://mail.mydomain.com/rest/lists/getListDefinitions' \
--header 'authorization: Basic bXlBY2NvdW50Onh5enB3ZDEyMw==' \
--header 'accept: application/vnd.whatcounts-v1+json' \
--header 'content-type: application/json' \
--include
Response Body
The response returns all API available List Properties in JSON format for each List Definition in the Realm. If more than 500 results are found, the first 500 are displayed, and you must use the "skip" value to view the next 500.
For example, to find the three groups of 500 Lists in an Realm with 1455 Lists, the URIs would be formatted as:
- https://[siteurl]/rest/lists?skip=0
- https://[siteurl]/rest/lists?skip=500
- https://[siteurl]/rest/lists?skip=1000
For more information about "skip", see Pagination.
Based on the example above, and two Lists in the Realm, the response returns:
HTTP/1.1 200 OK
Server: serverName
Content-Type: application/json
Link: <https://mail.mydomain.com/rest/lists/getListDefinitions>;
Date: Fri, 12 Mar 2021 12:54:44 GMT
{
"listFromAddress": "from@mydomain.com"
"listReplyToAddress": "replyto@mydomain.com"
"listMailFromAddress": "bounce??EMAIL_REF??@mail.mydomain.com"
"listDescription": "My Subscriber List"
"listAdminEmail": "myemail@mydomain.com"
"listCreatedDate": "Jun 17, 2016 12:54:44 PM"
"listUpdatedDate": "Jun 17, 2016 12:54:44 PM"
"parentTemplateId": 0
"isTemplate": true
"listSubscribeEmailTemplateId": 0
"listUnsubscribeEmailTemplateId": 0
"listConfirmSubs": false
"listSendCourtesySubsEmail": false
"listSendCourtesyUnsubsEmail": false
"listConfirmationSubGoto": ""
"listConfirmationUnsubGoto": ""
"listTrackingReadEnabled": true
"listTrackingClickthroughEnabled": true
"listUseStickyCampaign": false
"ftafUseListFromAddress": false
"vmtaId": 0
"baseUrlId": 0
"unsubscribeHeaderEnabled": false
"defaultLifecycleCampaignId": 0
"defaultLifecycle": false
"unsubHeaderHttpValue": ""
"unsubHeaderEmailValue": ""
"listId": 15
"listRealmId": 1561
"listTemplateId": 0
"type": 0
"listName": "myOtherListDefinition"
"listFolderId": 0
"subscriberCountTotal": 0
"subscriberCountPlain": 0
"subscriberCountHtml": 0
"subscriberCountRss": 0
"subscriberCountMime": 0
"skip": 1
"max": 0
}
{
"listFromAddress": "from@mydomain.com"
"listReplyToAddress": "replyto@mydomain.com"
"listMailFromAddress": "bounce??EMAIL_REF??@mail.mydomain.com"
"listDescription": "My List Definition"
"listAdminEmail": "myemail@mydomain.com"
"listCreatedDate": "Jun 17, 2016 12:54:44 PM"
"listUpdatedDate": "Jun 17, 2016 12:54:44 PM"
"parentTemplateId": 0
"isTemplate": true
"listSubscribeEmailTemplateId": 0
"listUnsubscribeEmailTemplateId": 0
"listConfirmSubs": false
"listSendCourtesySubsEmail": false
"listSendCourtesyUnsubsEmail": false
"listConfirmationSubGoto": ""
"listConfirmationUnsubGoto": ""
"listTrackingReadEnabled": true
"listTrackingClickthroughEnabled": true
"listUseStickyCampaign": false
"ftafUseListFromAddress": false
"vmtaId": 0
"baseUrlId": 0
"unsubscribeHeaderEnabled": false
"defaultLifecycleCampaignId": 0
"defaultLifecycle": false
"unsubHeaderHttpValue": ""
"unsubHeaderEmailValue": ""
"listId": 9
"listRealmId": 1561
"listTemplateId": 0
"type": 0
"listName": "myListDefinition"
"listFolderId": 0
"subscriberCountTotal": 0
"subscriberCountPlain": 0
"subscriberCountHtml": 0
"subscriberCountRss": 0
"subscriberCountMime": 0
"skip": 0
"max": 0
}
Error Response
Error Response Codes include both Client Errors (4xx) and Server Errors (5xx). Descriptions of each can be found in Response Codes.
For example, if the Authorization is incorrect, the error would appear as:
{
"error": "Unauthorized"
"status": "Unauthorized"
"statusCode": 401
}
*Feature added in v16.05