# Applications API

## createApplication

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

계정에 새 애플리케이션을 생성합니다.

#### 요청 본문 (Request Body)

| 이름 | 유형 | 설명 |
| --- | --- | --- |
| authorize\_all\_tokens | boolean | 모든 API 토큰이 이 앱과 통신하도록 허용합니다. |
| auth\* | string | Pushwoosh 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| icon | string | png 파일의 Base64 인코딩된 바이너리 콘텐츠. |
| sdk\_ios | string | iOS SDK 유형입니다. 가능한 값: "pw" 또는 "corona". Corona의 경우 푸시 페이로드가 다릅니다. |
| sdk\_android | string | Android SDK 유형입니다. 가능한 값: "pw", "corona", "phonegap". AppPresser 사용자는 "phonegap"을 선택합니다. |
| title\* | string | Pushwoosh의 새 앱 제목입니다. |

응답 예시:
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "application": "1DC69-73EDB"
  }
}
```

코드 예시:
```
{
  "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 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| application\* | string | [Pushwoosh 애플리케이션 코드](/ko/developer/api-reference/api-identifiers/#application-code) |
| icon | string | png 파일의 Base64 인코딩된 바이너리 콘텐츠. |
| 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>

```text 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 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| application\* | string | [Pushwoosh 애플리케이션 코드](/ko/developer/api-reference/api-identifiers/#application-code) |

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

```text 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 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| application\* | string | [Pushwoosh 애플리케이션 코드](/ko/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>

```text
{
  "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`

계정의 애플리케이션 목록을 가져옵니다. 페이지네이션을 포함한 결과를 반환할 수 있습니다.

#### 요청 본문 (Request Body)

| 이름 | 유형 | 설명 |
| --- | --- | --- |
| auth\* | string | Pushwoosh 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| page | integer | 페이지네이션을 위한 페이지 번호입니다. |

#### 요청 예시

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

#### 응답

계정에 100개 이상의 애플리케이션이 있는 경우, 응답에 `current page`(현재 페이지)와 `total amount of pages`(총 페이지 수)가 포함됩니다.

#### 응답 예시

```text
{
  "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 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| application\* | string | [Pushwoosh 애플리케이션 코드](/ko/developer/api-reference/api-identifiers/#application-code) |
| file\* | string | 검색할 파일의 식별자입니다. 아래 값을 참조하십시오. |

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

```text 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"       |

**응답 예시**:

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

## setApplicationPlatformStatus

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

앱의 플랫폼 상태를 변경합니다.

#### 요청 본문 (Request Body)

| 이름 | 유형 | 설명 |
| --- | --- | --- |
| auth\* | string | Pushwoosh 컨트롤 패널의 [API 액세스 토큰](/ko/developer/api-reference/api-identifiers/#api-access-token). |
| application\* | string | [Pushwoosh 애플리케이션 코드](/ko/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>

```text 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"
  }
}
```