--- title: "Samsung DSP Reporting Service API examples" slug: "samsung-dsp-reporting-service-api-examples" updated: 2023-07-13T00:02:42Z published: 2023-07-13T00:02:42Z canonical: "help.dsp.samsungads.com/samsung-dsp-reporting-service-api-examples" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.dsp.samsungads.com/llms.txt > Use this file to discover all available pages before exploring further. # Samsung DSP Reporting Service API examples ## Initial setup & documentation First, you need to generate your API Key: [API Documentation](/v1/docs/api-documentation) The full documentation is located here: [Reporting Service API](/v1/docs/reporting-service-api) ## Examples using cURL [cURL](https://curl.haxx.se/) is an open source command line tool and library for transferring data with URL syntax. ### Queries (Get Data) In the example below, replace `__API_KEY__` with your **Samsung DSP API Key**, `__USERNAME__` with your username and `__QUERY_HERE__` with the actual JSON query. ```json curl -X POST -H 'Authorization: Bearer __USERNAME__:__API_KEY__' -H 'Content-Type: application/json' --data '__JSON_HERE__' 'https://reporting.trader.adgear.com/v1/reports' ``` #### CURL example with a file With cURL, you can also send a file with the data instead of having it all in the command. In the example below, replace `__API_KEY__` with your **Samsung DSP API Key**, `__USERNAME__` with your username and `__FILE_HERE__` with the JSON file. ```json curl -X POST -H 'Authorization: Bearer __USERNAME__:__API_KEY__' -H 'Content-Type: application/json' -d@__FILE_HERE__ 'https://reporting.trader.adgear.com/v1/reports' ``` #### Simple report query In the example below, replace `__USER_ID__`with your Samsung DSP User ID and `__USERNAME__` with your username. The query will get a delivery report of all campaigns of the account, with impressions and clicks for the day of 2016-04-01, in the time zone America/New_York. In this example, we also limit the result to 10, send a notification email to [noreply@example.com](mailto:noreply@example.com) and the output will be a csv, without compression. **Simple report JSON** ```json { "title": "testReport", "author_id" : __USER_ID__, "author_name" : "__USERNAME__", "query": { "type": "trader_delivery_all", "start_date": "2016-04-01T00:00:00Z", "end_date": "2016-04-01T23:59:59Z", "time_zone": "America/New_York", "dimensions": [ "campaign_id" ], "metrics": [ "impressions", "clicks" ], "limit": 10 }, "output_formats": [ {"format": "csv", "compression": "none"} ], "notification": { "emails": [ "noreply@example.com" ] } } ``` Note that the examples above only show a subset of the available fields. Please check the documentation for more info on which fields are available (and how to include them in your JSON)