Retrieve all segments or a filtered list of segments
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
)
Company ID. If an environment variable called AW_COMPANY_ID
exists in .Renviron
or
elsewhere and no company_id
argument is provided, then the AW_COMPANY_ID
value will be used.
Use get_me
to get a list of available company_id
values.
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")
").
Use aw_get_reportsuites
to get a list of available rsid
values.
Filter list to only include segments in the list of segment IDs (comma-delimited)
The locale that segment details should be returned in. The default is en_US
.
Filter the list to only include segments that contain the specified name. This is case-insensitive and is a simple, single string match.
Filter the list to only include segments that contain one of the tags.
Filter the list to only include segments where the published field is set to one of the allowable values:
all
(the default), TRUE
, or FALSE
.
The number of results to return per page. This argument works in conjunction with the
page
argument. The default is 10.
The "page" of results to display. This works in conjunction with the limit
argument and is
zero-based. For instance, if limit = 20
and page = 1
, the results returned would be 21 through 40.
The sort direction for the results: ASC
(default) for ascending or DESC
for
descending. (This is case insensitive, so asc
and desc
work as well.)
The property to sort the results by. Currently available values are id
(default), name
,
and modified_date
. Note that setting expansion = modified
returns results with a column added called
modified
, which is the last date the calculated metric was modified. When using this value for sortProperty
,
though, the name of the argument is modified_date
, because why would we expect locked-in consistency
from Adobe?
Additional segment metadata fields to include in the results: reportSuiteName
,
ownerFullName
, modified
, tags
, compatibility
, definition
, publishingStatus
, definitionLastModified
,
and categories
. This argument takes a single value (e.g., expansion = "modified"
)
or a vector of values (e.g., expansion = c("modified", "ownerFullName")
).
Include additional segments not owned by the user. Available values are all
(default),
shared
, and templates
. The all
option takes precedence over "shared".
Include the output and input of the api call in the console for debugging. Default is FALSE
A data frame of segments and their meta data.