oas_list: List Items in API Database

Description Usage Arguments Value Note Examples

Description

This function returns a data.frame listing items in Xaxis for Publishers. Only the most important details are returned. Certain search criteria may be added to the request to narrow the results returned.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
oas_list(credentials, 
                    request_type=c('Advertiser', 'AdvertiserCategory', 'Affiliate',
                                   'Agency', 'CampaignGroup', 'CompanionPosition',
                                   'CompetitiveCategory', 'ConversionProcess', 
                                   'CreativeType',
                                   'Event', 'InsertionOrder', 'Notification',
                                   'Page', 'Product', 'RichMediaTemplate', 
                                   'SalesPerson', 'Section', 'Site',
                                   'SiteGroup', 'Transaction', 'Position',
                                   'Keyword', 'Keyname', 'Publisher', 
                                   'Campaign', 
                                   'CreativeTarget', 'Creative'),
                     campaign_id = NULL,
                     parentcampaign_id = NULL,
                     search_criteria_attributes = c(pageIndex="-1", pageSize="1000"), 
                     search_criteria = NULL, verbose = FALSE)

Arguments

credentials

a character string as returned by oas_build_credentials

request_type

a character string in one of the supported object types for the API database list action

campaign_id

a character string exactly matching the ID of a campaign. This parameter is only utilized for request type "Notification" because Campaign Notifications cannot be listed/searched across Campaigns. The Campaign Id must be specified exactly with no wildcard characters. Thus, CampaignId is not part of the SearchCriteria element and there is a specialized AdXML structure required for LIST Notification.

parentcampaign_id

a character string exactly matching the ID of a campaign. This parameter is only utilized for a request type "CreativeTarget" because Creative Targets cannot be listed/searched across Campaigns. The ParentCampaignId must be used and exact attribute has to be set to "true" .

search_criteria_attributes

a named character vector of attributes to add to the SearchCriteria node. Acceptable parameters are pageSize and pageIndex to support paginated requests. Default pageSize for request types Campaign, CampaignGroup, and Creatives is: 30,000, while all others have a default pageSize of 1000.

search_criteria

an XML document specifying the children to be added to the SearchCriteria Node in the request

verbose

a boolean indicating whether to print the request XML as a message

Value

A data.frame listing all objects of the specified type that also met the supplied search criteria

Note

Most objects have a unique list of searchable criteria. Please consult the API documentation for a complete coverage. Here are the options for Campaigns:

The condition attribute values of "EQ, GE, LE, GT, LT" stand for equality operators

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
my_credentials <- build_credentials('myaccount', 
                                    'myusername', 
                                    'mypassword')
list_of_sites <- oas_list(credentials=my_credentials, request_type='Site')
list_of_100_pages <- oas_list(credentials=my_credentials, request_type='Page',
                                  search_criteria_attributes = c(pageSize="100"))
list_campaigns <- oas_list(credentials=my_credentials, request_type='Campaign', 
                               search_criteria_attributes = c(pageSize="100"), 
                               search_criteria=list(newXMLNode("EndDate", 
                                                    attrs = c(condition = "GT"), 
                                                    '2014-12-31')))
list_by_criteria <- oas_list(credentials=my_credentials, 
                                 request_type='Page',
                                 search_criteria_attributes = c(pageSize="100"), 
                                 search_criteria=list(newXMLNode("Domain", "mySite"), 
                                                      newXMLNode("Url", "001"), 
                                                      newXMLNode("SectionId", "Ar%ves"), 
                                                      newXMLNode("SiteId", "ApiSite"),
                                                      newXMLNode("Description", "My Page"), 
                                                      newXMLNode("LocationKey", "7"), 
                                                      newXMLNode("WhenCreated", 
                                                                 attrs = c(condition = "GT"), 
                                                                 '2014-12-31'),
                                                      newXMLNode("WhenModified", 
                                                                 attrs = c(condition = "GT"), 
                                                                 '2013-12-31')))

## End(Not run)

ReportMort/roas documentation built on May 9, 2019, 9:45 a.m.