> ## 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.

# Set Performance

> Sets the Insights performance level value for the title.

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| InsightsManagementDatabaseNotFound | 1482 |
| InsightsManagementErrorPendingOperationExists | 1484 |
| InsightsManagementSetPerformanceLevelInvalidParameter | 1485 |
| PaidInsightsFeaturesNotEnabled | 1493 |
| TitleNotOnUpdatedPricingPlan | 9000 |




## OpenAPI

````yaml /services/playfab/api-references/rest/insights/insights.openapi.json post /Insights/SetPerformance
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Insights API
  description: Manage the Insights performance level and data storage retention settings.
  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: Analytics
    description: Analytics APIs
paths:
  /Insights/SetPerformance:
    post:
      tags:
        - Analytics
      summary: Set Performance
      description: |
        Sets the Insights performance level value for the title.

        ## Error codes

        This operation may return the following PlayFab errors:

        | Error | Code |
        | --- | --- |
        | InsightsManagementDatabaseNotFound | 1482 |
        | InsightsManagementErrorPendingOperationExists | 1484 |
        | InsightsManagementSetPerformanceLevelInvalidParameter | 1485 |
        | PaidInsightsFeaturesNotEnabled | 1493 |
        | TitleNotOnUpdatedPricingPlan | 9000 |
      operationId: SetPerformance
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightsSetPerformanceRequest'
        description: >-
          Sets the performance level to the requested value. Use the GetLimits
          method to get the allowed values.
      responses:
        '200':
          $ref: '#/components/responses/InsightsOperationResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - EntityToken: []
components:
  schemas:
    InsightsSetPerformanceRequest:
      description: >-
        Sets the performance level to the requested value. Use the GetLimits
        method to get the allowed values.
      type: object
      properties:
        CustomTags:
          description: >-
            The optional custom tags associated with the request (e.g. build
            number, external trace identifiers, etc.).
          type: object
        PerformanceLevel:
          description: The Insights performance level to apply to the title.
          type: number
          x-actualtype: int32
      required:
        - PerformanceLevel
      example:
        PerformanceLevel: 3
    InsightsOperationResponse:
      type: object
      properties:
        Message:
          description: Optional message related to the operation details.
          type: string
        OperationId:
          description: Id of the Insights operation.
          type: string
        OperationType:
          description: The type of operation, SetPerformance or SetStorageRetention.
          type: string
    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
  responses:
    InsightsOperationResponse:
      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/InsightsOperationResponse'
    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

- [Set Performance](/services/playfab/api-references/rest/insights/analytics/set-performance.md)
- [Get Pending Operations](/services/playfab/api-references/rest/insights/analytics/get-pending-operations.md)
- [Get Operation Status](/services/playfab/api-references/rest/insights/analytics/get-operation-status.md)
- [Performance and retention](/services/playfab/data-analytics/legacy/insights/performance-retention.md)
- [Balancing performance and power efficiency](/build/gdk-and-engines/handheld/handheld-performance.md)
