- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Description
Returns items from a view.
URL parameters
URL parameter ordering
The URL parameters below are listed in the order they should be entered in the API URL.
Name | Required | Type | Description |
---|---|---|---|
ViewID | True | numeric | Unique identifier of the view. |
CollectionID | False | numeric | Unique identifier of the collection. REQUIRED if the view is a shared view in an agent group. |
ItemStatusIncludeColumn | False | boolean | Yes, No – Yes to include the column in the data file. Default is No. See additional options below. |
PageNumber | False | numeric | Page number you want returned. |
PageItemCount | False | numeric | Numbers of items to show per page. |
ViewParameter.JobID | False | string | The JobID that you want the items pulled from. |
ViewParameter.<ParameterName> | False | string | Used for dynamic view criteria. E.g. criterion: Name Equals %NameValue% can be set with ViewParameter.NameValue=Michael . |
Optional parameters for ItemStatusInclude
Name | Required | Type | Description |
---|---|---|---|
ItemStatusIncludeAdded | False | boolean | Yes, No. Include added items. |
ItemStatusIncludeChanged | False | boolean | Yes, No. Include changed items. |
ItemStatusIncludeUnchanged | False | boolean | Yes, No. Include unchanged items. |
ItemStatusIncludeDeleted | False | boolean | Yes, No. Include deleted items. |
ItemStatusRangeStart | False | boolean | yyyy-MM-dd HH:mm:ss – The beginning date to calculate the items that should be included with the view. |
ItemStatusRangeEnd | False | boolean | yyyy-MM-dd HH:mm:ss – The ending date to calculate the items that should be included with the view. |
ItemStatusIncludeChangeMarkup | False | boolean | Yes, No. Include a column with the changed markup. |
Note
These item status filtering options have no effect unless ItemStatusIncludeColumn
is true. See the Additional Information section below for usage.
Responses
Name | Type | Description |
---|---|---|
Result | string | Success if the operation was successful. |
PageItemCount | numeric | Items per page. |
PageNumber | numeric | Page number. |
PageCount | numeric | Total number of pages in the view. |
Item | Item | Fields and values for items in the view. |
Note
A maximum of 1,000 items will be returned even if the specified PageItemCount
parameter is greater than 1000.
Sample request
curl -X GET 'https://api.mozenda.com/rest?WebServiceKey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&Service=Mozenda10&Operation=View.GetItems&ViewID=1022&ViewParameter.JobID=04E2DA-DF22-4239-A343-DE685AF54EC6&PageNumber=1&PageItemCount=20&ViewParameter.Name=Michael'
Sample responses
XML
<?xml version="1.0" encoding="utf-8" ?>
<ViewGetItemsResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Result>Success</Result>
<PageItemCount>2</PageItemCount>
<PageNumber>2</PageNumber>
<PageCount>106</PageCount>
<ItemList>
<Item>
<ItemID>1092</ItemID>
<Year>2000</Year>
<Make>BMW</Make>
<Model>328CI</Model>
<Price>$7490</Price>
<Telephone>4049141131</Telephone>
<AreaCode>404</AreaCode>
<Source>A1Cars</Source>
</Item>
<Item>
<ItemID>1103</ItemID>
<Year>2003</Year>
<Make>BMW</Make>
<Model>525i</Model>
<Price>$14850</Price>
<Telephone>8606342015</Telephone>
<AreaCode>860</AreaCode>
<Source>A1Cars</Source>
</Item>
</ItemList>
</ViewGetItemsResponse>
JSON (add &ResponseFormat=JSON
)
{
"PageItemCount": 2,
"PageNumber": 1,
"PageCount": 25,
"Item": [
{
"ItemID": 1001,
"State": "Alabama",
"Initial": "AL"
},
{
"ItemID": 1002,
"State": "Alaska",
"Initial": "AK"
}
],
"JsonResult": {
"Command": "View.GetItems",
"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
}
}
}
Additional Information
ItemStatusInclude options
- If any item status filtering options are set to true, the results will only include items with those statuses.
- If no item status filtering option is set to true, and any are set to false, the results will include items with all statuses not set to false.
- Finally, if no item status filtering options are set at all, the results will include items with statuses of Added, Changed, and UnChanged, but not Deleted.
ItemStatusRange options
- If the ItemStatusRangeStart and ItemStatusRangeEnd values are not provided, the system uses the start and end times of the supplied JobID.
- If no JobID is supplied, the system will get this range from the most recently created job for this Agent.
Was this article helpful?