{"_id":"5548466dd2c8410d006c2149","category":{"_id":"5548466cd2c8410d006c2147","pages":["5548466dd2c8410d006c2149","554a695e58f5650d00ae43fe","554a69b358f5650d00ae4402","55720c258956493700aae278","5579fc70a7e7ab35006a095b","558d84e24cd25f0d00b7ec05","558d85924cd25f0d00b7ec08","558d85f3beb7c719007f62c5","558d8626beb7c719007f62c7","558dab327afc102f008ed84e","558dae0f7afc102f008ed859","558db4a07afc102f008ed878","558db5547afc102f008ed87d","558db64e4cd25f0d00b7ecbd","55ca4fda241e790d004f47c4"],"project":"5548466bd2c8410d006c2143","version":"5548466bd2c8410d006c2146","__v":15,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-05T04:26:20.318Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"__v":22,"parentDoc":null,"user":"55484649b2581a0d00913ff3","version":{"_id":"5548466bd2c8410d006c2146","project":"5548466bd2c8410d006c2143","__v":8,"createdAt":"2015-05-05T04:26:19.796Z","releaseDate":"2015-05-05T04:26:19.796Z","categories":["5548466cd2c8410d006c2147","554a69ba0b54d30d007fe128","554a7f3338e3620d0082192e","5565162e03b6710d00916942","55651a0c65a1130d00400c2b","55651d4565a1130d00400c2f","55651e0165a1130d00400c32","5565217903b6710d0091695f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"5548466bd2c8410d006c2143","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-05T04:26:21.069Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The ProjectManager.com API responds to HTTP calls using the standard RESTful syntax: `GET`, `PUT`, `POST` and `DELETE`.\n\nEach endpoint has a different URL, however the base URL for all requests is `https://api.projectmanager.com/api/v1`. All responses are in JSON format. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you see `:variableName` in a URL this means there's a required variable you need to insert at this point.\",\n  \"title\": \"Important\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authentication\"\n}\n[/block]\nAll requests require an API key to be present, and it must be specified in the HTTP header of the request.  You can find your API key under the API tab on the Account page in ProjectManager.com.\n\nAPI keys are issued per-user, therefore all features available via this API are limited to what the user has available on the product. \n\nPermissions can be changed from the Security tab in ProjectManager.com, to enable more features.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$.ajax({\\n      type: 'GET',\\n      url: 'https://api.projectmanager.com/api/v1/projects.json',\\n      headers: {\\n        'apiKey': '6120fce4-376c-4602-ad3e-e3e7480ec13d'\\n      }\\n}).done(function(data) {\\n  \\t\\tlog(data);\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"jQuery\"\n    },\n    {\n      \"code\": \"<?\\n$context = stream_context_create(array(\\n  'http'=>array(\\n    'method'=>\\\"GET\\\",\\n    'header'=>\\\"apiKey: 6120fce4-376c-4602-ad3e-e3e7480ec13d\\\")\\n));\\n$data = file_get_contents('https://api.projectmanager.com/api/v1/projects.json', false, $context);\\nprint_r(json_decode($data));\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Error Codes\"\n}\n[/block]\nWhen everything goes right we'll send you a 200 response code, if something goes wrong we'll return one of the following:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Explanation\",\n    \"0-1\": \"This indicates a validation error. It is most likely that your request parameters are incorrect, or we can't find the data you're trying to access. For example, an incorrect resource Id is specified.\",\n    \"0-0\": \"400\",\n    \"1-0\": \"401\",\n    \"1-1\": \"Indicates unauthorized access. You may be using an API key that is incorrect or disabled.\",\n    \"2-0\": \"409\",\n    \"2-1\": \"Usage limit reached. You may only perform each action every 2 seconds.\",\n    \"3-0\": \"500\",\n    \"3-1\": \"This is a general error. It is most likely that some invalid data has been sent, but an exception is not caught on our end. In the response body we will provide a logId; please send this to support at support:::at:::projectmanager.com so that we can provide you with more information.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","excerpt":"","slug":"introduction","type":"basic","title":"API Basics"}
The ProjectManager.com API responds to HTTP calls using the standard RESTful syntax: `GET`, `PUT`, `POST` and `DELETE`. Each endpoint has a different URL, however the base URL for all requests is `https://api.projectmanager.com/api/v1`. All responses are in JSON format. [block:callout] { "type": "info", "body": "If you see `:variableName` in a URL this means there's a required variable you need to insert at this point.", "title": "Important" } [/block] [block:api-header] { "type": "basic", "title": "Authentication" } [/block] All requests require an API key to be present, and it must be specified in the HTTP header of the request. You can find your API key under the API tab on the Account page in ProjectManager.com. API keys are issued per-user, therefore all features available via this API are limited to what the user has available on the product. Permissions can be changed from the Security tab in ProjectManager.com, to enable more features. [block:code] { "codes": [ { "code": "$.ajax({\n type: 'GET',\n url: 'https://api.projectmanager.com/api/v1/projects.json',\n headers: {\n 'apiKey': '6120fce4-376c-4602-ad3e-e3e7480ec13d'\n }\n}).done(function(data) {\n \t\tlog(data);\n});", "language": "javascript", "name": "jQuery" }, { "code": "<?\n$context = stream_context_create(array(\n 'http'=>array(\n 'method'=>\"GET\",\n 'header'=>\"apiKey: 6120fce4-376c-4602-ad3e-e3e7480ec13d\")\n));\n$data = file_get_contents('https://api.projectmanager.com/api/v1/projects.json', false, $context);\nprint_r(json_decode($data));\n?>", "language": "php" } ] } [/block] [block:api-header] { "type": "basic", "title": "Error Codes" } [/block] When everything goes right we'll send you a 200 response code, if something goes wrong we'll return one of the following: [block:parameters] { "data": { "h-0": "Code", "h-1": "Explanation", "0-1": "This indicates a validation error. It is most likely that your request parameters are incorrect, or we can't find the data you're trying to access. For example, an incorrect resource Id is specified.", "0-0": "400", "1-0": "401", "1-1": "Indicates unauthorized access. You may be using an API key that is incorrect or disabled.", "2-0": "409", "2-1": "Usage limit reached. You may only perform each action every 2 seconds.", "3-0": "500", "3-1": "This is a general error. It is most likely that some invalid data has been sent, but an exception is not caught on our end. In the response body we will provide a logId; please send this to support at support@projectmanager.com so that we can provide you with more information." }, "cols": 2, "rows": 4 } [/block]