Graph API Version

Atlas Tracking Connection Ad Sets

Reading

Returns the Ad Sets which are being tracked with this Connection

Example

Graph API Explorer
GET /v5.0/{atlas-tracking-connection-id}/ad_sets HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{atlas-tracking-connection-id}/ad_sets',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{atlas-tracking-connection-id}/ad_sets",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{atlas-tracking-connection-id}/ad_sets",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{atlas-tracking-connection-id}/ad_sets"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
filter_by
JSON-encoded string

Filters that affect the which objects are returned, including both filters that depend on the fields of the node, and filters that depend on metrics associated with the node.

metric_scope
JSON object

Filters that scope the time period for which metrics are returned. Defined as a shape with the properties "filters", "should_include_prior_period", and "time_period".

date_range

filters
dictionary { enum {CLICK_LOOKBACK_WINDOW, LOOKBACK_WINDOW, VERSION_ID, VIEW_LOOKBACK_WINDOW, VISIT_CONFIGURATION} : <string> }
Default value: {}

should_include_prior_period
boolean
Default value: false

time_period
enum {ALL_AVAILABLE, ALL_DATES, CUSTOM, DATE_RANGE, FIFTEEN_DAYS, LAST_FOURTEEN_DAYS, LAST_HUNDRED_FOURTY_FOUR_HOURS, LAST_MONTH, LAST_NINETY_DAYS, LAST_QUARTER, LAST_SEVEN_DAYS, LAST_SIXTY_DAYS, LAST_THIRTY_DAYS, LAST_TWENTY_FOUR_HOURS, LAST_YEAR, MONTH_TO_DATE, QUARTER_TO_DATE, SEVEN_DAYS, THIRTY_DAYS, THIS_MONTH_WHOLE_DAYS, TODAY, WEEK_TO_DATE, YEAR_TO_DATE, YESTERDAY}
Default value: all_dates

metric_context
JSON object

business_unit_id
string

business_unit_id

active_pane
string

active_pane

order_by
JSON-encoded string

Field to order results by

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {}, "summary": {} }

data

A list of AtlasAdSet nodes.

paging

For more details about pagination, see the Graph API guide.

summary

Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=count).

FieldDescription
count
unsigned int32

Number of objects associated with the parent

metric_date_range
AtlasMetricDateRange

The calculated date range for the requested time period and prior time period

Validation Rules

ErrorDescription
100Invalid parameter

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.