{"_id":"56f1685a2a85600e00ea3dca","category":{"_id":"57a9ce2fac6db30e000d7efd","__v":0,"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-09T12:35:59.736Z","from_sync":false,"order":8,"slug":"push-messages","title":"Push messages"},"__v":2,"parentDoc":null,"project":"54eb50e5615ffc1900305a16","editedParams2":true,"version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"editedParams":true,"user":"5683bbad70331a0d00484b27","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-22T15:44:26.745Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"[\n {\n  \"applicationCode\": \"233623e3c860b49ec69a464834343481-8bj4el4a-256d-23fd-56ad-b5bc3d568b53\",\n  \"name\": \"Push Test 1\",\n  \"description\": \"PUSH test application 1\",\n  \"registrationsCount\": 45655,\n  \"apns\": {\n    \"enabled\": true\n  },\n  \"gcm\": {\n    \"enabled\": false\n  }\n },\n {\n  \"applicationCode\": \"26581d19d889e4867b997e386ea0e222-b8325bdd-3d56-76e1-d104-6a5c48234bc8\",\n  \"name\": \"Push Test 2\",\n  \"description\": \"PUSH test application 2\",\n  \"registrationsCount\": 35698,\n   \"apns\": {\n    \"enabled\": true\n  },\n  \"gcm\": {\n    \"enabled\": true\n  }\n }\n]","name":""},{"status":400,"language":"json","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"BAD_REQUEST\",\n      \"text\": \"Bad request\"\n    }\n  }\n}","name":""},{"code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"APPLICATION_NOT_FOUND\",\n      \"text\": \"Application with given id cannot be found.\"\n    }\n  }\n}","language":"json","status":404},{"code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"THROTTLE_EXCEPTION\",\n      \"text\": \"Too many requests. Try again later.\"\n    }\n  }\n}","language":"json","status":429}]},"settings":"554860d6d2c8410d006c215e","examples":{"codes":[{"language":"json","code":"GET /push/1/applications HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json","name":""}]},"method":"get","auth":"required","params":[{"_id":"56210bdd6e20d40d00731095","ref":"","in":"path","required":false,"desc":"PUSH application code is optional. If not supplied, all applications will be returned.","default":"","type":"string","name":"applicationCode"}],"url":"/push/:version/applications/:applicationCode"},"isReference":true,"order":6,"body":"## Response format\n\nOn success, the response header HTTP status code will be `200 OK`. \n\nIf there is an error, you will receive an [error response status code](doc:2fa-status-codes-and-error-details) in the header and the response body will contain an [error object](doc:2fa-status-codes-and-error-details). If you try to create an application when you do not have the user’s authorization, you will receive the `401` Unauthorized error.\n\n### Response\n\n|Parameter|Type|Description|\n|-|-|-|\n|*applicationCode*|String|Push application code.|\n|*name*|String|Push application name.|\n|*description*|String|Push application description.|\n|*registrationsCount*|Long|Number of Push application registrations.|\n|*apns.enabled*|Boolean|Whether sending messages via APNS is enabled for this application.|\n|*gcm.enabled*|Boolean|Whether sending messages via GCM is enabled for this application.|\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Additional example\"\n}\n[/block]\nThe following method allows you to get all of your applications on a single account.\n\n## Get single Push application by `applicationCode`\n\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /push/1/applications/233623e3c860b49ec69a464834343481-8bj4el4a-256d-23fd-56ad-b5bc3d568b53 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"applicationCode\\\": \\\"233623e3c860b49ec69a464834343481-8bj4el4a-256d-23fd-56ad-b5bc3d568b53\\\",\\n  \\\"name\\\": \\\"Push Test 1\\\",\\n  \\\"description\\\": \\\"PUSH test applicaiton 1\\\",\\n  \\\"registrationsCount\\\": 456655,\\n  \\\"apns\\\": {\\n    \\\"enabled\\\": false\\n  },\\n  \\\"gcm\\\": {\\n    \\\"enabled\\\": true\\n  }\\n }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n### **Next:** [Send your first Push message](doc:send-push-notifications).","excerpt":"This method allows you to get PUSH applications for your account identified by `applicationCode`.","slug":"push-application-get","type":"endpoint","title":"Application: Get"}

getApplication: Get

This method allows you to get PUSH applications for your account identified by `applicationCode`.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

applicationCode:
string
PUSH application code is optional. If not supplied, all applications will be returned.

Examples


Result Format


Documentation

## Response format On success, the response header HTTP status code will be `200 OK`. If there is an error, you will receive an [error response status code](doc:2fa-status-codes-and-error-details) in the header and the response body will contain an [error object](doc:2fa-status-codes-and-error-details). If you try to create an application when you do not have the user’s authorization, you will receive the `401` Unauthorized error. ### Response |Parameter|Type|Description| |-|-|-| |*applicationCode*|String|Push application code.| |*name*|String|Push application name.| |*description*|String|Push application description.| |*registrationsCount*|Long|Number of Push application registrations.| |*apns.enabled*|Boolean|Whether sending messages via APNS is enabled for this application.| |*gcm.enabled*|Boolean|Whether sending messages via GCM is enabled for this application.| [block:api-header] { "type": "basic", "title": "Additional example" } [/block] The following method allows you to get all of your applications on a single account. ## Get single Push application by `applicationCode` **Request** [block:code] { "codes": [ { "code": "GET /push/1/applications/233623e3c860b49ec69a464834343481-8bj4el4a-256d-23fd-56ad-b5bc3d568b53 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json", "language": "json" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"applicationCode\": \"233623e3c860b49ec69a464834343481-8bj4el4a-256d-23fd-56ad-b5bc3d568b53\",\n \"name\": \"Push Test 1\",\n \"description\": \"PUSH test applicaiton 1\",\n \"registrationsCount\": 456655,\n \"apns\": {\n \"enabled\": false\n },\n \"gcm\": {\n \"enabled\": true\n }\n }", "language": "json" } ] } [/block] ### **Next:** [Send your first Push message](doc:send-push-notifications).