> ## 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 Actions On Players In Segment Task Instance

> Get information about a ActionsOnPlayersInSegment task instance.

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| ProductDisabledForTitle | 1609 |
| TaskInstanceNotFound | 1262 |




## OpenAPI

````yaml post /Admin/GetActionsOnPlayersInSegmentTaskInstance
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Admin API
  description: >-
    APIs for managing title configurations, uploaded Game Server code
    executables, and user data
  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: Account Management
    description: Account Management APIs
  - name: Authentication
    description: Authentication APIs
  - name: Characters
    description: Characters APIs
  - name: Content
    description: Content Service APIs
  - name: Custom Server Management
    description: Custom Server Management APIs
  - name: Matchmaking
    description: Matchmaking APIs
  - name: Player Data Management
    description: Player Data Management APIs
  - name: Player Item Management
    description: Player Item Management APIs
  - name: PlayStream
    description: PlayStream Management APIs
  - name: ScheduledTask
    description: Task management APIs
  - name: Segments
    description: Segment management APIs
  - name: Server-Side Cloud Script
    description: Server-Side Cloud Script APIs
  - name: Shared Group Data
    description: Shared Group Data APIs
  - name: Title-Wide Data Management
    description: Title-Wide Data Management APIs
  - name: Xbox Store
    description: Xbox Store APIs
paths:
  /Admin/GetActionsOnPlayersInSegmentTaskInstance:
    post:
      tags:
        - ScheduledTask
      summary: Get Actions On Players In Segment Task Instance
      description: |
        Get information about a ActionsOnPlayersInSegment task instance.

        ## Error codes

        This operation may return the following PlayFab errors:

        | Error | Code |
        | --- | --- |
        | ProductDisabledForTitle | 1609 |
        | TaskInstanceNotFound | 1262 |
      operationId: GetActionsOnPlayersInSegmentTaskInstance
      requestBody:
        $ref: '#/components/requestBodies/GetTaskInstanceRequest'
      responses:
        '200':
          $ref: >-
            #/components/responses/GetActionsOnPlayersInSegmentTaskInstanceResult
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - SecretKey: []
components:
  requestBodies:
    GetTaskInstanceRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetTaskInstanceRequest'
      description: >-
        The result includes detail information that's specific to a CloudScript
        task. Only CloudScript tasks configured as "Run Cloud Script function
        once" will be retrieved. To get a list of task instances by task,
        status, or time range, use GetTaskInstances.
  responses:
    GetActionsOnPlayersInSegmentTaskInstanceResult:
      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/GetActionsOnPlayersInSegmentTaskInstanceResult
            example:
              code: 200
              status: OK
              data:
                Summary:
                  TaskInstanceId: B67ACA247F49EF47-8
                  StartedAt: '2016-08-23T12:33:14'
                  Status: InProgress
                  PercentComplete: 67
                  EstimatedSecondsRemaining: 893
                  TotalPlayersInSegment: 325901
                  TotalPlayersProcessed: 218354
                Parameter:
                  SegmentId: 502FD30E8C78F826
                  Actions:
                    - GrantItemContent:
                        CatalogVersion: foo
                        ItemId: bar
                        ItemQuantity: 1
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  schemas:
    GetTaskInstanceRequest:
      description: >-
        The result includes detail information that's specific to a CloudScript
        task. Only CloudScript tasks configured as "Run Cloud Script function
        once" will be retrieved. To get a list of task instances by task,
        status, or time range, use GetTaskInstances.
      type: object
      properties:
        TaskInstanceId:
          description: ID of the requested task instance.
          type: string
      required:
        - TaskInstanceId
      example:
        TaskInstanceId: E52531B47B1761C7-4
    GetActionsOnPlayersInSegmentTaskInstanceResult:
      type: object
      properties:
        Parameter:
          allOf:
            - $ref: '#/components/schemas/ActionsOnPlayersInSegmentTaskParameter'
          description: Parameter of this task instance
        Summary:
          allOf:
            - $ref: '#/components/schemas/ActionsOnPlayersInSegmentTaskSummary'
          description: Status summary of the actions-on-players-in-segment task instance
      example:
        Summary:
          TaskInstanceId: B67ACA247F49EF47-8
          StartedAt: '2016-08-23T12:33:14'
          Status: InProgress
          PercentComplete: 67
          EstimatedSecondsRemaining: 893
          TotalPlayersInSegment: 325901
          TotalPlayersProcessed: 218354
        Parameter:
          SegmentId: 502FD30E8C78F826
          Actions:
            - GrantItemContent:
                CatalogVersion: foo
                ItemId: bar
                ItemQuantity: 1
    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
    ActionsOnPlayersInSegmentTaskParameter:
      type: object
      properties:
        Actions:
          description: >-
            List of actions to perform on each player in a segment. Each action
            object can contain only one action type.
          type: array
          items:
            $ref: '#/components/schemas/Action'
          x-isclass: true
        SegmentId:
          description: ID of the segment to perform actions on.
          type: string
      required:
        - SegmentId
      example:
        SegmentId: 502FD30E8C78F826
        Actions:
          - GrantItemContent:
              CatalogVersion: foo
              ItemId: bar
              ItemQuantity: 1
    ActionsOnPlayersInSegmentTaskSummary:
      type: object
      properties:
        CompletedAt:
          description: UTC timestamp when the task completed.
          type: string
        ErrorMessage:
          description: Error message for last processing attempt, if an error occured.
          type: string
        ErrorWasFatal:
          description: >-
            Flag indicating if the error was fatal, if false job will be
            retried.
          type: boolean
        EstimatedSecondsRemaining:
          description: Estimated time remaining in seconds.
          type: number
          x-actualtype: double
        PercentComplete:
          description: Progress represented as percentage.
          type: number
          x-actualtype: double
        ScheduledByUserId:
          description: If manually scheduled, ID of user who scheduled the task.
          type: string
        StartedAt:
          description: UTC timestamp when the task started.
          type: string
        Status:
          allOf:
            - $ref: '#/components/schemas/TaskInstanceStatus'
          description: Current status of the task instance.
        TaskIdentifier:
          allOf:
            - $ref: '#/components/schemas/NameIdentifier'
          description: Identifier of the task this instance belongs to.
        TaskInstanceId:
          description: ID of the task instance.
          type: string
        TotalPlayersInSegment:
          description: Total players in segment when task was started.
          type: number
          x-actualtype: int32
        TotalPlayersProcessed:
          description: Total number of players that have had the actions applied to.
          type: number
          x-actualtype: int32
      required:
        - StartedAt
      example:
        TaskInstanceId: B67ACA247F49EF47-8
        StartedAt: '2016-08-23T12:33:14'
        Status: InProgress
        PercentComplete: 67
        EstimatedSecondsRemaining: 893
        TotalPlayersInSegment: 325901
        TotalPlayersProcessed: 218354
    Action:
      description: The work to be performed on each entity which can only be of one type.
      type: object
      properties:
        AddInventoryItemV2Content:
          allOf:
            - $ref: '#/components/schemas/AddInventoryItemV2Content'
          description: Action content to add inventory item v2
        BanPlayerContent:
          allOf:
            - $ref: '#/components/schemas/BanPlayerContent'
          description: Action content to ban player
        DeleteInventoryItemV2Content:
          allOf:
            - $ref: '#/components/schemas/DeleteInventoryItemV2Content'
          description: Action content to delete inventory item v2
        DeletePlayerContent:
          allOf:
            - $ref: '#/components/schemas/DeletePlayerContent'
          description: Action content to delete player
        ExecuteCloudScriptContent:
          allOf:
            - $ref: '#/components/schemas/ExecuteCloudScriptContent'
          description: Action content to execute cloud script
        ExecuteFunctionContent:
          allOf:
            - $ref: '#/components/schemas/ExecuteFunctionContent'
          description: Action content to execute azure function
        GrantItemContent:
          allOf:
            - $ref: '#/components/schemas/GrantItemContent'
          description: Action content to grant item
        GrantVirtualCurrencyContent:
          allOf:
            - $ref: '#/components/schemas/GrantVirtualCurrencyContent'
          description: Action content to grant virtual currency
        IncrementPlayerStatisticContent:
          allOf:
            - $ref: '#/components/schemas/IncrementPlayerStatisticContent'
          description: Action content to increment player statistic
        PushNotificationContent:
          allOf:
            - $ref: '#/components/schemas/PushNotificationContent'
          description: Action content to send push notification
        SendEmailContent:
          allOf:
            - $ref: '#/components/schemas/SendEmailContent'
          description: Action content to send email
        SubtractInventoryItemV2Content:
          allOf:
            - $ref: '#/components/schemas/SubtractInventoryItemV2Content'
          description: Action content to subtract inventory item v2
    TaskInstanceStatus:
      type: string
      enum:
        - Succeeded
        - Starting
        - InProgress
        - Failed
        - Aborted
        - Stalled
    NameIdentifier:
      description: >-
        Identifier by either name or ID. Note that a name may change due to
        renaming, or reused after being deleted. ID is immutable and unique.
      type: object
      properties:
        Id:
          description: Id Identifier, if present
          type: string
        Name:
          description: Name Identifier, if present
          type: string
      example:
        Name: MyTask
        Id: d739e188-22f6-4d13-a4d5-df2e93d4d2f7
    AddInventoryItemV2Content:
      type: object
      properties:
        Amount:
          description: Amount of the item to be granted to a player
          type: number
          x-actualtype: int32
        CollectionId:
          description: >-
            The collection id for where the item will be granted in the player
            inventory
          type: string
        DurationInSeconds:
          description: >-
            The duration in seconds of the subscription to be granted to a
            player
          type: number
          x-actualtype: int32
        ItemId:
          description: The id of item to be granted to the player
          type: string
        StackId:
          description: >-
            The stack id for where the item will be granted in the player
            inventory
          type: string
    BanPlayerContent:
      type: object
      properties:
        BanDurationHours:
          description: >-
            Duration(in hours) to ban a player. If not provided, the player will
            be banned permanently.
          type: number
          x-actualtype: int32
        BanReason:
          description: Reason to ban a player
          type: string
    DeleteInventoryItemV2Content:
      type: object
      properties:
        CollectionId:
          description: >-
            The collection id for where the item will be removed from the player
            inventory
          type: string
        ItemId:
          description: The id of item to be removed from the player
          type: string
        StackId:
          description: >-
            The stack id for where the item will be removed from the player
            inventory
          type: string
    DeletePlayerContent:
      type: object
      properties: {}
    ExecuteCloudScriptContent:
      type: object
      properties:
        CloudScriptMethodArguments:
          description: Arguments(JSON) to be passed into the cloudscript method
          type: string
        CloudScriptMethodName:
          description: Cloudscript method name
          type: string
        PublishResultsToPlayStream:
          description: Publish cloudscript results as playstream event
          type: boolean
      required:
        - CloudScriptMethodName
        - CloudScriptMethodArguments
        - PublishResultsToPlayStream
    ExecuteFunctionContent:
      type: object
      properties:
        CloudScriptFunctionArguments:
          description: Arguments(JSON) to be passed into the cloudscript azure function
          type: string
        CloudScriptFunctionName:
          description: Cloudscript azure function name
          type: string
        PublishResultsToPlayStream:
          description: >-
            Publish results from executing the azure function as playstream
            event
          type: boolean
      required:
        - CloudScriptFunctionName
        - CloudScriptFunctionArguments
        - PublishResultsToPlayStream
    GrantItemContent:
      type: object
      properties:
        CatalogVersion:
          description: The catalog version of the item to be granted to the player
          type: string
        ItemId:
          description: The id of item to be granted to the player
          type: string
        ItemQuantity:
          description: Quantity of the item to be granted to a player
          type: number
          x-actualtype: int32
      required:
        - ItemQuantity
    GrantVirtualCurrencyContent:
      type: object
      properties:
        CurrencyAmount:
          description: Amount of currency to be granted to a player
          type: number
          x-actualtype: int32
        CurrencyCode:
          description: Code of the currency to be granted to a player
          type: string
      required:
        - CurrencyCode
        - CurrencyAmount
    IncrementPlayerStatisticContent:
      type: object
      properties:
        StatisticChangeBy:
          description: Amount(in whole number) to increase the player statistic by
          type: number
          x-actualtype: int32
        StatisticName:
          description: Name of the player statistic to be incremented
          type: string
      required:
        - StatisticName
        - StatisticChangeBy
    PushNotificationContent:
      type: object
      properties:
        Message:
          description: Text of message to send.
          type: string
        PushNotificationTemplateId:
          description: Id of the push notification template.
          type: string
        Subject:
          description: Subject of message to send (may not be displayed in all platforms)
          type: string
    SendEmailContent:
      type: object
      properties:
        EmailTemplateId:
          description: The email template id of the email template to send.
          type: string
      required:
        - EmailTemplateId
    SubtractInventoryItemV2Content:
      type: object
      properties:
        Amount:
          description: Amount of the item to removed from the player
          type: number
          x-actualtype: int32
        CollectionId:
          description: >-
            The collection id for where the item will be removed from the player
            inventory
          type: string
        DurationInSeconds:
          description: >-
            The duration in seconds to be removed from the subscription in the
            players inventory
          type: number
          x-actualtype: int32
        ItemId:
          description: The id of item to be removed from the player
          type: string
        StackId:
          description: >-
            The stack id for where the item will be removed from the player
            inventory
          type: string
  securitySchemes:
    SecretKey:
      type: apiKey
      in: header
      name: X-SecretKey
      description: >-
        This API requires a title secret key, available to title admins, from
        PlayFab Game Manager.

````

## Related topics

- [Get Actions On Players In Segment Task Instance](/api-reference/scheduledtask/get-actions-on-players-in-segment-task-instance.md)
- [Get Task Instances](/services/playfab/api-references/rest/admin/scheduled-task/get-task-instances.md)
- [Content & Configuration Reads Meter API Description](/services/playfab/pricing/meters/file-reads.md)
- [Create Actions On Players In Segment Task](/services/playfab/api-references/rest/admin/scheduled-task/create-actions-on-players-in-segment-task.md)
- [Bulk Actions for an entire Player Segment](/services/playfab/data-analytics/acting-data/action-rules-bulk-actions-for-an-entire-player-segment.md)
