> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Objects

> Retrieves objects from an entity's profile.



## OpenAPI

````yaml /services/playfab/api-references/rest/data/data.openapi.json post /Object/GetObjects
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Data API
  description: >-
    Store arbitrary data associated with an entity. Objects are small (~1KB)
    JSON-compatible objects which are stored directly on the entity profile.
    Objects are made available for use in other PlayFab contexts, such as
    PlayStream events and CloudScript functions. Files can efficiently store
    data of any size or format. Both objects and files support a flexible
    permissions system to control read and write access by other entities.
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: File
    description: File Management APIs
  - name: Object
    description: Entity Object Management APIs
paths:
  /Object/GetObjects:
    post:
      tags:
        - Object
      summary: Get Objects
      description: Retrieves objects from an entity's profile.
      operationId: GetObjects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetObjectsRequest'
        description: 'Gets JSON objects from an entity profile and returns it. '
      responses:
        '200':
          $ref: '#/components/responses/GetObjectsResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    GetObjectsRequest:
      description: 'Gets JSON objects from an entity profile and returns it. '
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        Entity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The entity to perform this action on.
        EscapeObject:
          description: >-
            Determines whether the object will be returned as an escaped JSON
            string or as a un-escaped JSON object. Default is JSON object.
          type: boolean
      required:
        - Entity
      example:
        Entity:
          Id: ABC90712ABC
          Type: title_player_account
          TypeString: title_player_account
    EntityKey:
      description: >-
        Combined entity type and ID structure which uniquely identifies a single
        entity.
      type: object
      properties:
        Id:
          description: Unique ID of the entity.
          type: string
        Type:
          description: >-
            Entity type. See
            https://learn.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types
          type: string
      required:
        - Id
    GetObjectsResponse:
      type: object
      properties:
        Entity:
          allOf:
            - $ref: '#/components/schemas/EntityKey'
          description: The entity id and type.
        Objects:
          allOf:
            - $ref: '#/components/schemas/ObjectResult'
          description: Requested objects that the calling entity has access to
        ProfileVersion:
          description: >-
            The current version of the profile, can be used for concurrency
            control during updates.
          type: number
          x-actualtype: int32
      required:
        - ProfileVersion
      example:
        ProfileVersion: 17
        Objects:
          gameState:
            ObjectName: gameState
            EscapedDataObject: '{ "Property": { "ValueName": 5 } }'
        Entity:
          Id: ABC1234ABC
          Type: title_player_account
          TypeString: title_player_account
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    ObjectResult:
      type: object
      properties:
        DataObject:
          description: Un-escaped JSON object, if EscapeObject false or default.
          type: object
        EscapedDataObject:
          description: Escaped string JSON body of the object, if EscapeObject is true.
          type: string
        ObjectName:
          description: >-
            Name of the object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and
            '.'
          type: string
      example:
        ObjectName: SaveSate
        EscapedDataObject: >-
          {"PlayerDetails":{"LastMissionSuccess":"2017-06-15T11:05:19Z","LastMissionFailure":"2017-06-12T11:05:19Z","MapPosition":[22.0,37.78],"IsPaidUpgrade":true},"GameSettings":{"Screen":"FriendsList","Favorites":["Place
          1","Place
          2"]},"Social":{"Facebook":{"LikedPage":true,"PostedShare":true}}}
  responses:
    GetObjectsResponse:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/GetObjectsResponse'
            example:
              code: 200
              status: OK
              data:
                ProfileVersion: 17
                Objects:
                  gameState:
                    ObjectName: gameState
                    EscapedDataObject: '{ "Property": { "ValueName": 5 } }'
                Entity:
                  Id: ABC1234ABC
                  Type: title_player_account
                  TypeString: title_player_account
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    EntityToken:
      type: apiKey
      in: header
      name: X-EntityToken
      description: >-
        This API requires an Entity Session Token, available from the Entity
        GetEntityToken method.

````

## Related topics

- [Get Objects](/services/playfab/api-references/rest/data/object/get-objects.md)
- [PFDataGetObjectsAsync](/services/playfab/api-references/c/pfdata/functions/pfdatagetobjectsasync.md)
- [PFDataGetObjectsGetResult](/services/playfab/api-references/c/pfdata/functions/pfdatagetobjectsgetresult.md)
- [PFDataGetObjectsRequest](/services/playfab/api-references/c/pfdatatypes/structs/pfdatagetobjectsrequest.md)
- [Set Objects](/api-reference/object/set-objects.md)
