# Method: achievementDefinitions.list

- [HTTP request](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#body.HTTP_TEMPLATE)
- [Query parameters](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#body.QUERY_PARAMETERS)
- [Request body](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#body.request_body)
- [Response body](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#body.response_body)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#body.ListAchievementDefinitionsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#body.aspect)
- [AchievementDefinition](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementDefinition)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementDefinition.SCHEMA_REPRESENTATION)
- [AchievementType](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType)
- [InitialAchievementState](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState)
- [Try it!](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#try-it)

Lists all the achievement definitions for your application.

### HTTP request

`GET https://games.googleapis.com/games/v1/achievements`

### Query parameters

|                                                                                                            Parameters                                                                                                             ||
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `language`   | `string` The preferred language to use for strings returned by this method.                                                                                                                                         |
| `maxResults` | `integer` The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified`maxResults`. |
| `pageToken`  | `string` The token returned by the previous request.                                                                                                                                                                |

### Request body

The request body must be empty.

### Response body

A list of achievement definition objects.

If successful, the response body contains data with the following structure:

|                                                                                      JSON representation                                                                                      |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "nextPageToken": string, "items": [ { object (https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementDefinition) } ] } ``` |

|                                                                                               Fields                                                                                               ||
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`          | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#achievementDefinitionsListResponse`.                                               |
| `nextPageToken` | `string` Token corresponding to the next page of results.                                                                                                                         |
| `items[]`       | `object (`[AchievementDefinition](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementDefinition)`)` The achievement definitions. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/games`
- `
  https://www.googleapis.com/auth/games_lite`

For more information, see the[OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## AchievementDefinition

An achievement definition object.

|                                                                                                                                                                                                                                                                              JSON representation                                                                                                                                                                                                                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "id": string, "name": string, "description": string, "achievementType": enum (https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType), "totalSteps": integer, "formattedTotalSteps": string, "revealedIconUrl": string, "isRevealedIconUrlDefault": boolean, "unlockedIconUrl": string, "isUnlockedIconUrlDefault": boolean, "initialState": enum (https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState), "experiencePoints": string } ``` |

|                                                                                                          Fields                                                                                                          ||
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`                     | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#achievementDefinition`.                                                                       |
| `id`                       | `string` The ID of the achievement.                                                                                                                                                          |
| `name`                     | `string` The name of the achievement.                                                                                                                                                        |
| `description`              | `string` The description of the achievement.                                                                                                                                                 |
| `achievementType`          | `enum (`[AchievementType](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#AchievementType)`)` The type of the achievement.                          |
| `totalSteps`               | `integer` The total steps for an incremental achievement.                                                                                                                                    |
| `formattedTotalSteps`      | `string` The total steps for an incremental achievement as a string.                                                                                                                         |
| `revealedIconUrl`          | `string` The image URL for the revealed achievement icon.                                                                                                                                    |
| `isRevealedIconUrlDefault` | `boolean` Indicates whether the revealed icon image being returned is a default image, or is provided by the game.                                                                           |
| `unlockedIconUrl`          | `string` The image URL for the unlocked achievement icon.                                                                                                                                    |
| `isUnlockedIconUrlDefault` | `boolean` Indicates whether the unlocked icon image being returned is a default image, or is game-provided.                                                                                  |
| `initialState`             | `enum (`[InitialAchievementState](https://developer.android.com/games/services/web/api/rest/v1/achievementDefinitions/list#InitialAchievementState)`)` The initial state of the achievement. |
| `experiencePoints`         | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Experience points which will be earned when unlocking this achievement.                                  |

## AchievementType

Possible achievement types.

|                          Enums                           ||
|---------------|-------------------------------------------|
| `STANDARD`    | Achievement is either locked or unlocked. |
| `INCREMENTAL` | Achievement is incremental.               |

## InitialAchievementState

Possible initial states of an achievement.

|                Enums                 ||
|------------|--------------------------|
| `HIDDEN`   | Achievement is hidden.   |
| `REVEALED` | Achievement is revealed. |
| `UNLOCKED` | Achievement is unlocked. |