# Applications API

## createApplication

`POST` `https://api.pushwoosh.com/json/1.3/createApplication`

खाते पर एक नया एप्लिकेशन बनाता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| authorize\_all\_tokens | boolean | सभी API टोकन को इस ऐप के साथ संचार करने की अनुमति देता है। |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| icon | string | png फ़ाइल की Base64-encoded बाइनरी सामग्री। |
| sdk\_ios | string | iOS SDK प्रकार। संभावित मान: "pw" या "corona"। Corona के लिए, पुश पेलोड अलग होता है। |
| sdk\_android | string | Android SDK प्रकार। संभावित मान: "pw", "corona", "phonegap"। AppPresser उपयोगकर्ता "phonegap" चुनें। |
| title\* | string | Pushwoosh में नए ऐप के लिए शीर्षक। |

Example response:
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "application": "1DC69-73EDB"
  }
}
```

Example code:
```javascript
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",          // required. API access token from Pushwoosh Control Panel
    "icon": "iVBORw0KGgoAAAANSUhEUgAAA...",  // optional. Base-64 encoded binary content of png file 
    "authorize_all_tokens": true,            // optional. If true, allows all api tokens to communicate with this app
    "sdk_ios": "pw",                         // optional. Possible values are "pw" or "corona"
    "sdk_android": "pw",                     // optional. Possible values are "pw", "corona", or "phonegap"
    "title": "APP_TITLE"                     // required. Title for the new app in Pushwoosh
  }
}
```

## updateApplication

`POST` `https://api.pushwoosh.com/json/1.3/updateApplication`

एप्लिकेशन सेटिंग्स को अपडेट करता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |
| icon | string | png फ़ाइल की Base64-encoded बाइनरी सामग्री। |
| sdk\_ios | string | iOS SDK प्रकार। संभावित मान: "pw" या "corona"। Corona के लिए, पुश पेलोड अलग होता है। |
| sdk\_android | string | Android SDK प्रकार। संभावित मान: "pw", "corona", "phonegap"। AppPresser उपयोगकर्ता "phonegap" चुनें। |
| title | string | Pushwoosh में ऐप के लिए नया शीर्षक। |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": null
}
```
</TabItem>
</Tabs>

```javascript title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",     // required. API access token from Pushwoosh Control Panel
    "application": "XXXXX-XXXXX",       // required. application code of the app you want to update
    "icon": "iVBORw0KGgoAAAANSUD6...",  // optional. Base-64 encoded binary content of png file 
    "sdk_ios": "pw",                    // optional. Possible values are "pw" or "corona"
    "sdk_android": "pw",                // optional. Possible values are "pw", "corona", or "phonegap"
    "title": "APP_TITLE"                // optional. New title for the app in Pushwoosh
  }
}
```

## deleteApplication

`POST` `https://api.pushwoosh.com/json/1.3/deleteApplication`

खाते से ऐप को हटाता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": null
}
```
</TabItem>
</Tabs>

```javascript title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
    "application": "XXXXX-XXXXX"    // required. Pushwoosh application code
  }
}
```

## getApplication

`POST` `https://api.pushwoosh.com/json/1.3/getApplication`

ऐप के बारे में विवरण प्राप्त करता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "application": {
      "adm_cid": "",
      "adm_secret": "",
      "android_api_type": "x31",
      "android_gcm_api_key": "x7836363631366236353566366236353739",
      "android_sdk": "x7077",
      "icon_url": null,
      "ios_gateway": "x783330",
      "ios_key_management_type": "x783631373537343666",
      "ios_key_password": "x7836353336363236353335333736353333",
      "ios_sdk": "x7077",
      "title": "0 Application For test",
      "providers": {
        "ios": true,
        "amazon": false,
        "android": false,
        "baidu_android": false,
        "chrome": false,
        "email": false,
        "firefox": false,
        "huawei_android": false,
        "internet_explorer": false,
        "osx": false,
        "safari": false,
        "sms": false,
        "web": false,
        "whats_app": false,
        "windows": false
      },
      "languages": {
        "en": "34",
        "zh": "12",
        "sv": "7",
        "de": "6",
        "pt": "6"
      }
    }
  }
}
```
</TabItem>
</Tabs>

```javascript
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // required API access token from Pushwoosh Control Panel
    "application": "XXXXX-XXXXX"    // required. Pushwoosh application code
  }
}
```

## getApplications

`POST` `https://api.pushwoosh.com/json/1.3/getApplications`

खाते पर एप्लिकेशन्स की सूची प्राप्त करता है। पेजिनेशन (pagination) के साथ परिणाम लौटा सकता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| page | integer | पेजिनेशन के लिए पृष्ठ संख्या। |

#### Example request

```javascript
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",  // required. API access token from Pushwoosh Control Panel
    "page": 2                        // optional. The page number for pagination
  }
}
```

#### Response

यदि खाते में 100 से अधिक एप्लिकेशन हैं, तो प्रतिक्रिया में `current page` और `total amount of pages` शामिल होते हैं।

#### Example Response

```javascript
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "page": 1,   // Current page
    "total": 2,  // Total amount of pages
    "applications": [{
      "APPLICATION_CODE": "MyApp1"
    }, {
      "APPLICATION_CODE": "MyApp2"
    }]
  }
}
```

## getApplicationFile

`POST` `https://api.pushwoosh.com/json/1.3/getApplicationFile`

ऐप से संबंधित कॉन्फ़िगरेशन फ़ाइलें प्राप्त करता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |
| file\* | string | पुनर्प्राप्त करने के लिए फ़ाइल का पहचानकर्ता (Identifier)। नीचे मान देखें। |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": null
}
```
</TabItem>
</Tabs>

```javascript title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",  // required. API access token from Pushwoosh Control Panel
    "application": "XXXXX-XXXXX",    // required. Pushwoosh application code
    "file": "ios_auto_privatekey"    // required. identifier of the file to retrieve. See values below
  }
}
```

#### "file" पैरामीटर के लिए संभावित मान:

`"ios_auto_privatekey" | "ios_manual_privatekey" | "ios_auto_certificate" | "ios_manual_certificate"       | "ios_push_certificate" | "ios_provisioning_profile" | "macos_manual_privatekey" | "macos_manual_certificate"       | "macos_push_certificate" | "safari_manual_privatekey" | "safari_push_certificate" | "safari_push_package"       |

**Response example**:

```
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
```

## setApplicationPlatformStatus

`POST` `https://api.pushwoosh.com/json/1.3/setApplicationPlatformStatus`

ऐप की प्लेटफ़ॉर्म स्थिति (status) को बदलता है।

#### Request Body

| नाम | प्रकार | विवरण |
| --- | --- | --- |
| auth\* | string | Pushwoosh Control Panel से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |
| platform\* | integer | प्लेटफ़ॉर्म प्रकार। नीचे प्लेटफ़ॉर्म प्रकारों की सूची देखें। |
| status\* | string | "enable" या "disable" |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "message": "iOS pushes are disabled",
    "available_platforms": {
      "iOS": false,
      "Android": true,
      "OS X": false,
      "Windows": false,
      "Amazon": false,
      "Safari": false,
      "Chrome": true,
      "Firefox": false,
    }
  }
}
```
</TabItem>
</Tabs>

```javascript title="Example"
{
  "request": {
    "application": "XXXXX-XXXXX",   // required. Pushwoosh application code
    "auth": "yxoPUlwqm…………pIyEX4H", // required. API access token from Pushwoosh Control Panel
    "platform": 1,                  // required. 1 — iOS; 3 — Android; 7 — Mac OS X; 8 — Windows;
                                    //           9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox;
    "status": "disable"             // required. "disable" or "enable"
  }
}
```