{"_id":"56c35c58c0c4630d004e8652","type":"basic","api":{"params":[],"results":{"codes":[]},"settings":"","url":"","auth":"required"},"createdAt":"2016-02-16T17:28:56.423Z","hidden":false,"link_external":false,"sync_unique":"","title":"Getting Started with the Buzz API","user":"56c35c45c4796b0d007eefdf","category":"56c35c57c0c4630d004e8650","excerpt":"","githubsync":"","slug":"getting-started","order":0,"project":"56c35c56c0c4630d004e864c","updates":[],"__v":8,"isReference":true,"link_url":"","body":"The Buzz API uses a REST interface over http to view, create, update and delete objects. You can access the REST API on the command line using cURL or through a client built in whichever language you prefer. Throughout this documentation we show examples using cURL. The typical syntax for a Buzz request using cURL is:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -X [method] [path]/rest/[object_name] -b cookies.txt -d '{JSON payload}'\",\n \"language\": \"curl\"\n }\n ]\n}\n[/block]\nExplanation of the cURL command:\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"`-X`\",\n \"0-1\": \"Tells CURL to use the [method] instead of defaulting to GET\",\n \"1-0\": \"`[method]`\",\n \"2-0\": \"`[object_name]`\",\n \"3-0\": \"`-b cookies.txt`\",\n \"4-0\": \"`-d '{JSON payload}'`\",\n \"1-1\": \"`GET` = gets object\\n`POST` = writes new object\\n`PUT` = updates existing object\\n`DELETE` = deletes object\",\n \"2-1\": \"Corresponds to the object you wish to manipulate, examples include `user`, `advertiser`, `line_item`, etc. Object names are lowercase and words are separated with an underscore. A complete list of objects is in the [API Reference](doc:advertisers) section.\",\n \"3-1\": \"Tells curl to read session cookies from a file called `cookies.txt`, more on this in [Authentication](doc:authentication-1).\",\n \"4-1\": \"The JSON payload should contain whatever data needs to be sent to the API for querying the system, pushing new data, etc.\"\n },\n \"cols\": 2,\n \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Getting Help\"\n}\n[/block]\nTo get help on the command line and see all available objects use the \"help\" object:\n```curl -X GET \"[path]/buzz/rest/help\"```\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Working with Modules\"\n}\n[/block]\nThe API is also used to work with modules that define [Targeting](doc:targeting-module), [Creative Attributes](doc:creative-attributes), and [Bidding Strategies](doc:bidding-strategies). Each of these can have many different modules installed in Buzz, and as a developer you will need to GET available fields from them, and validate whether your inputs are acceptable.\n\nThe chart below summarizes these modules:\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Module Type\",\n \"h-1\": \"What is it?\",\n \"h-2\": \"Example API Request\",\n \"0-0\": \"Targeting\",\n \"0-1\": \"Available targeting criteria for use with a Targeting Template.\",\n \"0-2\": \"```curl -X [method] [path]/rest/targeting/[module_name] -b cookies.txt -d '{JSON payload}'```\",\n \"1-0\": \"Creative Attributes\",\n \"1-1\": \"Attributes associated with a Creative to allow proper matching with available inventory.\",\n \"1-2\": \"```curl -X [method] [path]/rest/attributes/[module_name] -b cookies.txt -d '{JSON payload}'```\",\n \"2-0\": \"Bidding Strategies\",\n \"2-1\": \"Instructions for the ad server/bidding agent to determine the proper delivery (bid) of the ad\",\n \"2-2\": \"```curl -X [method] [path]/rest/bidding/[module_name] -b cookies.txt -d '{JSON payload}'```\"\n },\n \"cols\": 3,\n \"rows\": 3\n}\n[/block]","parentDoc":null,"version":"56c35c56c0c4630d004e864f","childrenPages":[]}