Scheduled Task - Create Actions On Players In Segment Task

Create an ActionsOnPlayersInSegment task, which iterates through all players in a segment to execute action.

POST https://titleId.playfabapi.com/Admin/CreateActionsOnPlayersInSegmentTask

Request Header

Name Required Type Description
X-SecretKey True
  • string

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Request Body

Name Required Type Description
IsActive True
  • boolean

Whether the schedule is active. Inactive schedule will not trigger task execution.

Name True
  • string

Name of the task. This is a unique identifier for tasks in the title.

Parameter True

Task details related to segment and action

CustomTags
  • object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Description
  • string

Description the task

Schedule
  • string

Cron expression for the run schedule of the task. The expression should be in UTC.

Responses

Name Type Description
200 OK
400 Bad Request

This is the outer wrapper for all responses with errors

Security

X-SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

ActionsOnPlayersInSegmentTaskParameter
ApiErrorWrapper

The basic wrapper around every failed API response

CreateActionsOnPlayerSegmentTaskRequest

Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many create-task requests within a short time will cause a create conflict error.

CreateTaskResult

ActionsOnPlayersInSegmentTaskParameter

Name Type Description
ActionId
  • string

ID of the action to perform on each player in segment.

SegmentId
  • string

ID of the segment to perform actions on.

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • integer

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • integer

Numerical PlayFab error code

errorDetails
  • object

Detailed description of individual issues with the request object

errorMessage
  • string

Description for the PlayFab errorCode

status
  • string

String HTTP code

CreateActionsOnPlayerSegmentTaskRequest

Task name is unique within a title. Using a task name that's already taken will cause a name conflict error. Too many create-task requests within a short time will cause a create conflict error.

Name Type Description
CustomTags
  • object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Description
  • string

Description the task

IsActive
  • boolean

Whether the schedule is active. Inactive schedule will not trigger task execution.

Name
  • string

Name of the task. This is a unique identifier for tasks in the title.

Parameter

Task details related to segment and action

Schedule
  • string

Cron expression for the run schedule of the task. The expression should be in UTC.

CreateTaskResult

Name Type Description
TaskId
  • string

ID of the task

Error Codes

Name Code
InvalidScheduledTaskName 1256
InvalidTaskSchedule 1257
ScheduledTaskCreateConflict 1255
ScheduledTaskNameConflict 1254