A

Fyber reporting API

public
andrei.k Nov 01, 2023 Never 64
Clone
cURL paste1.txt 22 lines (22 loc) | 507 Bytes
This code is making a cURL request to the URL 'https://reporting.fyber.com/api/v1/report/offerwall?format=csv' with various headers and data parameters. The headers being sent with the request are: - 'Accept: application/json' to specify that the client expects a JSON response from the server. - 'Content-Type: application/json' to specify that the data being sent in the request body is in JSON format. - 'Authorization: Bearer YWxs...' to authenticate the request with a bearer token. The token value is not included in the provided code. The data being sent in the request body is a JSON object containing the following parameters: - "source": "event" specifies the source of the report data. - "dateRange": {"start": "2023-10-30", "end": "2023-10-30"} specifies the date range for the report. In this case, it is set to a single day, October 30, 2023. - "metrics": ["Advertiser Spend", "Advertiser ARPU", "Offer Impressions", "Offer Clicks"] specifies the metrics to include in the report. - "splits": ["Date", "Country"] specifies how the report data should be split or grouped. In this case, it will be split by both date and country. - "filters": [] specifies any additional filters to apply to the report. In this case, no filters are specified, so all data will be included. By executing this code, it will send a cURL request to the specified URL with the provided headers and data. The server should respond with the requested report data in a JSON format, as requested in the "Accept" header.
1
curl --location 'https://reporting.fyber.com/api/v1/report/offerwall?format=csv' \
2
--header 'Accept: application/json' \
3
--header 'Content-Type: application/json' \
4
--header 'Authorization: Bearer YWxs...' \
5
--data '{
6
"source": "event",
7
"dateRange": {
8
"start": "2023-10-30",
9
"end": "2023-10-30"
10
},
11
"metrics": [
12
"Advertiser Spend",
13
"Advertiser ARPU",
14
"Offer Impressions",
15
"Offer Clicks"
16
],
17
"splits": [
18
"Date",
19
"Country"
20
],
21
"filters": []
22
}'