Endpoint - /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports
There is a POST and GET call to this endpoint.
Questions a) What is the purpose of this API b) Where is the CSV created by this API located ? Does it come back in the API response ? c) What are the columns in the CSV ? can you provide some samples ?
The profile-exports creates an audience report for a campaign. The report will contain profile details for impressions and clickthrough data for the campaign.
As an example, you could expect something like this: Username, Identifier, First Name, Last Name, Email, Phone, Impression recorded (True/False), Clickthrough recorded (True/False)
POST /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports
This endpoint will initiate the request to create the report. A successful request will return something like this:
The important part of the response is the
profileExportId
which we will need for the next request.GET /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports
Will return an array of all exports for the campaign. The response will look like this:
The
createdAt
field will be a DateTime when the report CSV is created and ready for download via the csv endpoint. This value will be NULL until the report is ready.Once the report is ready you can use the next endpoint to retrieve it.
GET /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports/{profileExportId}.csv
This endpoint will retrieve the generated report based on the
profileExportId