# Applications API

## createApplication

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

Erstellt eine neue Anwendung im Konto.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| authorize\_all\_tokens | Boolean | Erlaubt allen API-Tokens, mit dieser App zu kommunizieren. |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| icon | String | Base64-codierter binärer Inhalt einer PNG-Datei. |
| sdk\_ios | String | iOS SDK-Typ. Mögliche Werte: „pw“ oder „corona“. Für Corona ist der Push-Payload anders. |
| sdk\_android | String | Android SDK-Typ. Mögliche Werte: „pw“, „corona“, „phonegap“. AppPresser-Benutzer wählen „phonegap“. |
| title\* | String | Titel für die neue App in Pushwoosh. |

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

Beispielcode:
```javascript
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",          // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "icon": "iVBORw0KGgoAAAANSUhEUgAAA...",  // optional. Base64-codierter binärer Inhalt einer PNG-Datei
    "authorize_all_tokens": true,            // optional. Wenn true, dürfen alle API-Tokens mit dieser App kommunizieren
    "sdk_ios": "pw",                         // optional. Mögliche Werte sind „pw“ oder „corona“
    "sdk_android": "pw",                     // optional. Mögliche Werte sind „pw“, „corona“ oder „phonegap“
    "title": "APP_TITLE"                     // erforderlich. Titel für die neue App in Pushwoosh
  }
}
```

## updateApplication

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

Aktualisiert die Anwendungseinstellungen.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| application\* | String | [Pushwoosh-Anwendungscode](/de/developer/api-reference/api-identifiers/#application-code) |
| icon | String | Base64-codierter binärer Inhalt einer PNG-Datei. |
| sdk\_ios | String | iOS SDK-Typ. Mögliche Werte: „pw“ oder „corona“. Für Corona ist der Push-Payload anders. |
| sdk\_android | String | Android SDK-Typ. Mögliche Werte: „pw“, „corona“, „phonegap“. AppPresser-Benutzer wählen „phonegap“. |
| title | String | Neuer Titel für die App in Pushwoosh. |

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

```javascript title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",     // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "application": "XXXXX-XXXXX",       // erforderlich. Anwendungscode der App, die Sie aktualisieren möchten
    "icon": "iVBORw0KGgoAAAANSUD6...",  // optional. Base64-codierter binärer Inhalt einer PNG-Datei
    "sdk_ios": "pw",                    // optional. Mögliche Werte sind „pw“ oder „corona“
    "sdk_android": "pw",                // optional. Mögliche Werte sind „pw“, „corona“ oder „phonegap“
    "title": "APP_TITLE"                // optional. Neuer Titel für die App in Pushwoosh
  }
}
```

## deleteApplication

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

Löscht die App aus dem Konto.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| application\* | String | [Pushwoosh-Anwendungscode](/de/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", // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "application": "XXXXX-XXXXX"    // erforderlich. Pushwoosh-Anwendungscode
  }
}
```

## getApplication

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

Ruft Details zur App ab.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| application\* | String | [Pushwoosh-Anwendungscode](/de/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", // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "application": "XXXXX-XXXXX"    // erforderlich. Pushwoosh-Anwendungscode
  }
}
```

## getApplications

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

Ruft die Liste der Anwendungen im Konto ab. Kann Ergebnisse mit Paginierung zurückgeben.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| page | Integer | Die Seitennummer für die Paginierung. |

#### Beispielanfrage

```javascript
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",  // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "page": 2                        // optional. Die Seitennummer für die Paginierung
  }
}
```

#### Antwort

Wenn mehr als 100 Anwendungen im Konto vorhanden sind, enthält die Antwort `current page` (aktuelle Seite) und `total amount of pages` (Gesamtanzahl der Seiten).

#### Beispielantwort

```javascript
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "page": 1,   // Aktuelle Seite
    "total": 2,  // Gesamtanzahl der Seiten
    "applications": [{
      "APPLICATION_CODE": "MyApp1"
    }, {
      "APPLICATION_CODE": "MyApp2"
    }]
  }
}
```

## getApplicationFile

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

Ruft die Konfigurationsdateien der App ab.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| application\* | String | [Pushwoosh-Anwendungscode](/de/developer/api-reference/api-identifiers/#application-code) |
| file\* | String | Bezeichner der Datei, die abgerufen werden soll. Siehe Werte unten. |

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

```javascript title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",  // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "application": "XXXXX-XXXXX",    // erforderlich. Pushwoosh-Anwendungscode
    "file": "ios_auto_privatekey"    // erforderlich. Bezeichner der Datei, die abgerufen werden soll. Siehe Werte unten
  }
}
```

#### Mögliche Werte für den Parameter „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"       |

**Beispielantwort**:

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

## setApplicationPlatformStatus

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

Ändert den Plattformstatus der App.

#### Request Body

| Name | Typ | Beschreibung |
| --- | --- | --- |
| auth\* | String | [API-Zugriffstoken](/de/developer/api-reference/api-identifiers/#api-access-token) aus dem Pushwoosh Control Panel. |
| application\* | String | [Pushwoosh-Anwendungscode](/de/developer/api-reference/api-identifiers/#application-code) |
| platform\* | Integer | Der Plattformtyp. Siehe Liste der Plattformtypen unten. |
| status\* | String | „enable“ oder „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",   // erforderlich. Pushwoosh-Anwendungscode
    "auth": "yxoPUlwqm…………pIyEX4H", // erforderlich. API-Zugriffstoken aus dem Pushwoosh Control Panel
    "platform": 1,                  // erforderlich. 1 — iOS; 3 — Android; 7 — Mac OS X; 8 — Windows;
                                    //           9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox;
    "status": "disable"             // erforderlich. „disable“ oder „enable“
  }
}
```