Retrieve all segments or a filtered list of segments
Usage
aw_get_segments(
company_id = Sys.getenv("AW_COMPANY_ID"),
rsids = NULL,
segmentFilter = NULL,
locale = "en_US",
name = NULL,
tagNames = NULL,
filterByPublishedSegments = "all",
limit = 10,
page = 0,
sortDirection = "ASC",
sortProperty = "id",
expansion = NULL,
includeType = "all",
debug = FALSE
)Arguments
- company_id
Company ID. If an environment variable called
AW_COMPANY_IDexists in.Renvironor elsewhere and nocompany_idargument is provided, then theAW_COMPANY_IDvalue will be used. Useget_meto get a list of availablecompany_idvalues.- rsids
Filter the list to only include segments tied to a specified RSID or list of RSIDs. Specify multiple RSIDs as a vector (i.e., "
rsids = c("rsid_1", rsid_2",...rsid_n")"). Useaw_get_reportsuitesto get a list of availablersidvalues.- segmentFilter
Filter list to only include segments in the list of segment IDs (comma-delimited)
- locale
The locale that segment details should be returned in. The default is
en_US.- name
Filter the list to only include segments that contain the specified name. This is case-insensitive and is a simple, single string match.
- tagNames
Filter the list to only include segments that contain one of the tags.
- filterByPublishedSegments
Filter the list to only include segments where the published field is set to one of the allowable values:
all(the default),TRUE, orFALSE.- limit
The number of results to return per page. This argument works in conjunction with the
pageargument. The default is 10.- page
The "page" of results to display. This works in conjunction with the
limitargument and is zero-based. For instance, iflimit = 20andpage = 1, the results returned would be 21 through 40.- sortDirection
The sort direction for the results:
ASC(default) for ascending orDESCfor descending. (This is case insensitive, soascanddescwork as well.)- sortProperty
The property to sort the results by. Currently available values are
id(default),name, andmodified_date. Note that settingexpansion = modifiedreturns results with a column added calledmodified, which is the last date the calculated metric was modified. When using this value forsortProperty, though, the name of the argument ismodified_date, because why would we expect locked-in consistency from Adobe?- expansion
Additional segment metadata fields to include in the results:
reportSuiteName,ownerFullName,modified,tags,compatibility,definition,publishingStatus,definitionLastModified, andcategories. This argument takes a single value (e.g.,expansion = "modified") or a vector of values (e.g.,expansion = c("modified", "ownerFullName")).- includeType
Include additional segments not owned by the user. Available values are
all(default),shared, andtemplates. Thealloption takes precedence over "shared".- debug
Include the output and input of the api call in the console for debugging. Default is FALSE
