# REST Resource: applications

- [Resource: Application](https://developer.android.com/games/services/web/api/rest/v1/applications#Application)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#Application.SCHEMA_REPRESENTATION)
- [ApplicationCategory](https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationCategory)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationCategory.SCHEMA_REPRESENTATION)
- [ImageAsset](https://developer.android.com/games/services/web/api/rest/v1/applications#ImageAsset)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#ImageAsset.SCHEMA_REPRESENTATION)
- [Instance](https://developer.android.com/games/services/web/api/rest/v1/applications#Instance)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#Instance.SCHEMA_REPRESENTATION)
- [PlatformType](https://developer.android.com/games/services/web/api/rest/v1/applications#PlatformType)
- [InstanceAndroidDetails](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceAndroidDetails)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceAndroidDetails.SCHEMA_REPRESENTATION)
- [InstanceIosDetails](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceIosDetails)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceIosDetails.SCHEMA_REPRESENTATION)
- [InstanceWebDetails](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceWebDetails)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceWebDetails.SCHEMA_REPRESENTATION)
- [ApplicationFeature](https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationFeature)
- [Methods](https://developer.android.com/games/services/web/api/rest/v1/applications#METHODS_SUMMARY)

## Resource: Application

The Application resource.

|                                                                                                                                                                                                                                                                                                                                            JSON representation                                                                                                                                                                                                                                                                                                                                             |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "id": string, "name": string, "author": string, "description": string, "category": { object (https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationCategory) }, "assets": [ { object (https://developer.android.com/games/services/web/api/rest/v1/applications#ImageAsset) } ], "instances": [ { object (https://developer.android.com/games/services/web/api/rest/v1/applications#Instance) } ], "kind": string, "lastUpdatedTimestamp": string, "achievement_count": integer, "leaderboard_count": integer, "enabledFeatures": [ enum (https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationFeature) ], "themeColor": string } ``` |

|                                                                                                        Fields                                                                                                        ||
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `id`                   | `string` The ID of the application.                                                                                                                                                          |
| `name`                 | `string` The name of the application.                                                                                                                                                        |
| `author`               | `string` The author of the application.                                                                                                                                                      |
| `description`          | `string` The description of the application.                                                                                                                                                 |
| `category`             | `object (`[ApplicationCategory](https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationCategory)`)` The category of the application.                           |
| `assets[]`             | `object (`[ImageAsset](https://developer.android.com/games/services/web/api/rest/v1/applications#ImageAsset)`)` The assets of the application.                                               |
| `instances[]`          | `object (`[Instance](https://developer.android.com/games/services/web/api/rest/v1/applications#Instance)`)` The instances of the application.                                                |
| `kind`                 | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#application`.                                                                                 |
| `lastUpdatedTimestamp` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The last updated timestamp of the application.                                                           |
| `achievement_count`    | `integer` The number of achievements visible to the currently authenticated player.                                                                                                          |
| `leaderboard_count`    | `integer` The number of leaderboards visible to the currently authenticated player.                                                                                                          |
| `enabledFeatures[]`    | `enum (`[ApplicationFeature](https://developer.android.com/games/services/web/api/rest/v1/applications#ApplicationFeature)`)` A list of features that have been enabled for the application. |
| `themeColor`           | `string` A hint to the client UI for what color to use as an app-themed color. The color is given as an RGB triplet (e.g. "E0E0E0").                                                         |

## ApplicationCategory

An application category object.

|                        JSON representation                         |
|--------------------------------------------------------------------|
| ``` { "primary": string, "secondary": string, "kind": string } ``` |

|                                                              Fields                                                               ||
|-------------|----------------------------------------------------------------------------------------------------------------------|
| `primary`   | `string` The primary category.                                                                                       |
| `secondary` | `string` The secondary category.                                                                                     |
| `kind`      | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#applicationCategory`. |

## ImageAsset

An image asset object.

|                                      JSON representation                                       |
|------------------------------------------------------------------------------------------------|
| ``` { "name": string, "width": integer, "height": integer, "url": string, "kind": string } ``` |

|                                                        Fields                                                         ||
|----------|-------------------------------------------------------------------------------------------------------------|
| `name`   | `string` The name of the asset.                                                                             |
| `width`  | `integer` The width of the asset.                                                                           |
| `height` | `integer` The height of the asset.                                                                          |
| `url`    | `string` The URL of the asset.                                                                              |
| `kind`   | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#imageAsset`. |

## Instance

The Instance resource.

|                                                                                                                                                                                                                                                                                                     JSON representation                                                                                                                                                                                                                                                                                                      |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "platformType": enum (https://developer.android.com/games/services/web/api/rest/v1/applications#PlatformType), "name": string, "turnBasedPlay": boolean, "realtimePlay": boolean, "androidInstance": { object (https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceAndroidDetails) }, "iosInstance": { object (https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceIosDetails) }, "webInstance": { object (https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceWebDetails) }, "acquisitionUri": string, "kind": string } ``` |

|                                                                                               Fields                                                                                               ||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `platformType`    | `enum (`[PlatformType](https://developer.android.com/games/services/web/api/rest/v1/applications#PlatformType)`)` The platform type.                                            |
| `name`            | `string` Localized display name.                                                                                                                                                |
| `turnBasedPlay`   | `boolean` Flag to show if this game instance supports turn based play.                                                                                                          |
| `realtimePlay`    | `boolean` Flag to show if this game instance supports realtime play.                                                                                                            |
| `androidInstance` | `object (`[InstanceAndroidDetails](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceAndroidDetails)`)` Platform dependent details for Android. |
| `iosInstance`     | `object (`[InstanceIosDetails](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceIosDetails)`)` Platform dependent details for iOS.             |
| `webInstance`     | `object (`[InstanceWebDetails](https://developer.android.com/games/services/web/api/rest/v1/applications#InstanceWebDetails)`)` Platform dependent details for Web.             |
| `acquisitionUri`  | `string` URI which shows where a user can acquire this instance.                                                                                                                |
| `kind`            | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#instance`.                                                                       |

## PlatformType

Possible platform types.

|                Enums                ||
|-----------|--------------------------|
| `ANDROID` | Instance is for Android. |
| `IOS`     | Instance is for iOS.     |
| `WEB_APP` | Instance is for Web App. |

## InstanceAndroidDetails

The Android instance details resource.

|                                          JSON representation                                          |
|-------------------------------------------------------------------------------------------------------|
| ``` { "packageName": string, "kind": string, "enablePiracyCheck": boolean, "preferred": boolean } ``` |

|                                                                    Fields                                                                    ||
|---------------------|-------------------------------------------------------------------------------------------------------------------------|
| `packageName`       | `string` Android package name which maps to Google Play URL.                                                            |
| `kind`              | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#instanceAndroidDetails`. |
| `enablePiracyCheck` | `boolean` Flag indicating whether the anti-piracy check is enabled.                                                     |
| `preferred`         | `boolean` Indicates that this instance is the default for new installations.                                            |

## InstanceIosDetails

The iOS details resource.

|                                                                                     JSON representation                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "bundleIdentifier": string, "itunesAppId": string, "supportIphone": boolean, "supportIpad": boolean, "preferredForIphone": boolean, "preferredForIpad": boolean } ``` |

|                                                                  Fields                                                                   ||
|----------------------|---------------------------------------------------------------------------------------------------------------------|
| `kind`               | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#instanceIosDetails`. |
| `bundleIdentifier`   | `string` Bundle identifier.                                                                                         |
| `itunesAppId`        | `string` iTunes App ID.                                                                                             |
| `supportIphone`      | `boolean` Flag to indicate if this instance supports iPhone.                                                        |
| `supportIpad`        | `boolean` Flag to indicate if this instance supports iPad.                                                          |
| `preferredForIphone` | `boolean` Indicates that this instance is the default for new installations on iPhone devices.                      |
| `preferredForIpad`   | `boolean` Indicates that this instance is the default for new installations on iPad devices.                        |

## InstanceWebDetails

The Web details resource.

|                          JSON representation                          |
|-----------------------------------------------------------------------|
| ``` { "launchUrl": string, "kind": string, "preferred": boolean } ``` |

|                                                              Fields                                                              ||
|-------------|---------------------------------------------------------------------------------------------------------------------|
| `launchUrl` | `string` Launch URL for the game.                                                                                   |
| `kind`      | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#instanceWebDetails`. |
| `preferred` | `boolean` Indicates that this instance is the default for new installations.                                        |

## ApplicationFeature

Possible application features.

|                 Enums                 ||
|-------------|--------------------------|
| `SNAPSHOTS` | Saved Games (snapshots). |

|                                                                                                                           ## Methods                                                                                                                            ||
|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| ### [get](https://developer.android.com/games/services/web/api/rest/v1/applications/get)                 | Retrieves the metadata of the application with the given ID.                                                                                          |
| ### [getEndPoint](https://developer.android.com/games/services/web/api/rest/v1/applications/getEndPoint) | Returns a URL for the requested end point type.                                                                                                       |
| ### [played](https://developer.android.com/games/services/web/api/rest/v1/applications/played)           | Indicate that the currently authenticated user is playing your application.                                                                           |
| ### [verify](https://developer.android.com/games/services/web/api/rest/v1/applications/verify)           | Verifies the auth token provided with this request is for the application with the specified ID, and returns the ID of the player it was granted for. |