Collection.GetList
  • 14 May 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Collection.GetList

  • Dark
    Light
  • PDF

Article summary

Description

Returns a list of collections for an account.

URL parameters

None

Responses

A list of the collections in an account.

NameTypeDescription
ResultstringSuccess if the operation was successful.
CollectionCollectionAn object representing a collection.

Sample request

curl -X GET 'https://api.mozenda.com/rest?WebServiceKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&Service=Mozenda10&Operation=Collection.GetList'

Sample responses

XML

<?xml version="1.0" encoding="utf-8" ?>
<CollectionGetListResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Result>Success</Result>
	<CollectionList>
		<Collection>
			<CollectionID>1005</CollectionID>
			<Name>My First Collection</Name>
			<Description>Sample description of 'My 1st Collection'.</Description>
			<DefaultViewID>1003</DefaultViewID>
			<AgentID>1002</AgentID>
		</Collection>
		<Collection>
			<CollectionID>1067</CollectionID>
			<Name>ZipCodes</Name>
			<Description>Sample description of the 'ZipCodes' repository.</Description>
			<DefaultViewID>1036</DefaultViewID>
		</Collection>
	</CollectionList>
</CollectionGetListResponse>

JSON (add &ResponseFormat=JSON)

{
  "Collection": [
    {
      "CollectionID": 5303,
      "Name": "100MileZipList",
      "Description": "Sample description of the Collection.",
      "DefaultViewID": 5407,
      "AgentID": null
    },
    {
      "CollectionID": 5347,
      "Name": "QuarterlyProducts",
      "Description": "Sample description of the Collection.",
      "DefaultViewID": 5486,
      "AgentID": 5163
    }
  ],
  "JsonResult": {
    "Command": "Collection.GetList",
    "AutoLoggedIn": false,
    "WebConsoleKey": "",
    "Result": "Success",
    "ErrorCode": "",
    "ErrorDescription": "",
    "ErrorList": [],
    "ExecutionTime": {
      "Ticks": 0,
      "Days": 0,
      "Hours": 0,
      "Milliseconds": 0,
      "Minutes": 0,
      "Seconds": 0,
      "TotalDays": 0,
      "TotalHours": 0,
      "TotalMilliseconds": 0,
      "TotalMinutes": 0,
      "TotalSeconds": 0
    }
  }
}

Was this article helpful?