Marketing API Version

Ad Study Userpermissions

Reading

User permissions for the lift study

Graph API Explorer
GET /v2.10/{ad-study-id}/userpermissions HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{ad-study-id}/userpermissions'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{ad-study-id}/userpermissions",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{ad-study-id}/userpermissions",
    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:@"/{ad-study-id}/userpermissions"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

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

data

A list of AdStudyAdsAssetUserPermissions nodes.

paging

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

Validation Rules

ErrorDescription
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.

Creating

You can make a POST request to userpermissions edge from the following paths:
When posting to this edge, an AdStudy will be created.

Parameters

NameDescription
business
numeric string or integer

business

email
string

email

role
enum {ADMIN, ANALYST}

role

Required
user
int

user

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter

Updating

You can't perform this operation on this endpoint.

Deleting

You can dissociate an AdStudy from an AdStudy by making a DELETE request to /{ad_study_id}/userpermissions.

Parameters

NameDescription
business
numeric string or integer

business

email
string

email

user
int

user

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter