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

Collection.GetViews

  • Dark
    Light
  • PDF

Article summary

Description

Gets a list of views for a particular collection.

URL parameters

NameRequiredTypeDescription
CollectionIDTruestringUnique identifier of the collection.

Responses

A list of the views that is currently in the system for a particular collection.

NameTypeDescription
ResultstringSuccess if the operation was successful.
ViewViewObject representing a view.

Sample request

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

Sample responses

XML

<?xml version="1.0" encoding="utf-8" ?>
<CollectionGetViewsResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Result>Success</Result>
	<ViewList>
		<View>
			<ViewID>801</ViewID>
			<CollectionID>801</CollectionID>
			<Name>All ZipCodes</Name>
			<Description>All items in the ZipCodes collection.</Description>
            <IsSystem>True</IsSystem>
            <IsAgentGroup>False</IsAgentGroup>
		</View>
	</ViewList>
</CollectionGetViewsResponse>

JSON (add &ResponseFormat=JSON)

{
    "View": [
        {
            "ViewID": 5490,
            "CollectionID": 5351,
            "Name": "Default",
            "Description": "Default view for the NewWorld agent.",
            "IsSystem": true,
            "IsAgentGroup": false
        },
        {
            "ViewID": 5494,
            "CollectionID": 5354,
            "Name": "Default",
            "Description": "Default view for the Regions agent group.",
            "IsSystem": true,
            "IsAgentGroup": true
        }
    ],
    "JsonResult": {
        "Command": "Collection.GetViews",
        "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?