--- title: "Examples (Trader API v1)" slug: "examples-trader-api-v1" updated: 2023-06-26T07:44:20Z published: 2023-06-26T07:44:20Z canonical: "help.dsp.samsungads.com/examples-trader-api-v1" --- > ## 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. # Examples (Trader API v1) ## Examples using cURL [cURL](https://curl.haxx.se) is an open source command line tool and library for transferring data with URL syntax ### Create a Report [/v1/reports/] input.json: ```actionscript { "title": "testReport", "author_id" : 1, "author_name" : "username", "query": { "type": "adgear_publisher_delivery", "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": "tsv", "compression": "gzip"} ], "notification": { "emails": [ "noreply@blah.com" ] } } ``` submit command: ```actionscript curl -X POST -H 'Authorization: Bearer testuser:ABCDE123' -H 'Content-Type: application/json' -d@input.json 'https://reporting.trader.adgear.com/v1/reports' ``` output: ```actionscript { "id" : 6, "public_id" : "a97ffe7f-ed42-4d14-bdfa-86f9244ea914", "status" : "scheduled", "created_at" : "2016-04-26T19:36:04.499Z", "updated_at" : "2016-04-26T19:36:04.499Z", "author_id" : 1, "author_name" : "username", "title" : "testReport", "query" : { "type" : "adgear_publisher_delivery", "start_date" : "2016-04-01T00:00:00.000Z", "end_date" : "2016-04-01T23:59:59.000Z", "time_zone" : "America/New_York", "dimensions" : [ "campaign_id" ], "metrics" : [ "impressions", "clicks" ], "limit" : 10 }, "report_url" : "https://reporting.trader.adgear.com/reports/6", "report_public_url" : "https://reporting.trader.adgear.com/reports/public/a97ffe7f-ed42-4d14-bdfa-86f9244ea914", "output_formats" : [ { "compression" : "gzip", "output_format" : "tsv" } ] } ``` ### Retrieve a Report [/v1/reports/{id}] get command: ```actionscript curl -X GET -H 'Authorization: Bearer testuser:ABCDE123' -H 'Content-Type: application/json' 'https://reporting.trader.adgear.com/v1/reports/6' ``` output: ```actionscript { "id" : 6, "public_id" : "a97ffe7f-ed42-4d14-bdfa-86f9244ea914", "status" : "completed", "urls" : [ "http://reporting.trader.adgear.com/completed/27axad90-f474-4f39-b16b-4bdc2088f010/test_report_2016-04-01-00_2016-04-01-23_America_New_York.csv.gz" ], "secure_urls" : [ "https://reporting.trader.adgear.com/completed/27axad90-f474-4f39-b16b-4bdc2088f010/test_report_2016-04-01-00_2016-04-01-23_America_New_York.csv.gz" ], "created_at" : "2016-04-26T19:36:04.499Z", "updated_at" : "2016-04-26T19:36:08.548Z", "completed_at" : "2016-04-26T19:40:00.000Z", "author_id" : 1, "author_name" : "username", "title" : "testReport", "query" : { "type" : "adgear_publisher_delivery", "start_date" : "2016-04-01T00:00:00.000Z", "end_date" : "2016-04-01T23:59:59.000Z", "time_zone" : "America/Montreal", "dimensions" : [ "campaign_id" ], "metrics" : [ "impressions", "impressions_dropped" ], "order_fields" : [ ], "limit" : 10 }, "report_url" : "https://reporting.trader.adgear.com/reports/6", "report_public_url" : "https://reporting.trader.adgear.com/reports/public/27axad90-f474-4f39-b16b-4bdc2088f010", "output_formats" : [ { "compression" : "gzip", "output_format" : "tsv" } ] } ``` ### Delete a Report [/v1/reports/{id}] get command: ```actionscript curl -X DELETE -H 'Authorization: Bearer testuser:ABCDE123' -H 'Content-Type: application/json' 'https://reporting.trader.adgear.com/v1/reports/6' ``` ### List reports [/v1/reports] get command: ```actionscript curl -X GET -H 'Authorization: Bearer testuser:ABCDE123' -H 'Content-Type: application/json' 'https://reporting.trader.adgear.com/v1/reports?limit=1&offset=5' ``` output: ```actionscript [ { "id" : 6, "public_id" : "a97ffe7f-ed42-4d14-bdfa-86f9244ea914", "status" : "completed", "urls" : [ "http://reporting.trader.adgear.com/completed/27axad90-f474-4f39-b16b-4bdc2088f010/test_report_2016-04-01-00_2016-04-01-23_America_New_York.csv.gz" ], "secure_urls" : [ "https://reporting.trader.adgear.com/completed/27axad90-f474-4f39-b16b-4bdc2088f010/test_report_2016-04-01-00_2016-04-01-23_America_New_York.csv.gz" ], "created_at" : "2016-04-26T19:36:04.499Z", "updated_at" : "2016-04-26T19:36:08.548Z", "completed_at" : "2016-04-26T19:40:00.000Z", "author_id" : 1, "author_name" : "username", "title" : "testReport", "query" : { "type" : "adgear_publisher_delivery", "start_date" : "2016-04-01T00:00:00.000Z", "end_date" : "2016-04-01T23:59:59.000Z", "time_zone" : "America/Montreal", "dimensions" : [ "campaign_id" ], "metrics" : [ "impressions", "impressions_dropped" ], "order_fields" : [ ], "limit" : 10 }, "report_url" : "https://reporting.trader.adgear.com/reports/6", "report_public_url" : "https://reporting.trader.adgear.com/reports/public/27axad90-f474-4f39-b16b-4bdc2088f010", "output_formats" : [ { "compression" : "gzip", "output_format" : "tsv" } ] } ] ```