Optimizely Scheduled Changes API
APIs to interact with Scheduled Change of a flag
APIs to interact with Scheduled Change of a flag
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/optimizely-scheduled-changes-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: Optimizely Flags Scheduling Scheduled Changes API
version: 1.0.0
description: "This page documents how to use Optimizely Flags Scheduling API. These APIs allow you to turn a flag on/off, turn a \nrule on/off, change the traffic allocation of a rule and change the audience conditions of a rule.\n"
x-logo:
url: https://app.optimizely.com/static/img/rebrand/logo.svg
servers:
- url: http://localhost:3002/
description: Local server
- url: https://api.app.optimizely.com/flags-scheduling
description: Production server
tags:
- name: Scheduled Changes
description: APIs to interact with Scheduled Change of a flag
paths:
/projects/{project_id}/flags/{flag_key}/schedules:
get:
tags:
- Scheduled Changes
summary: List Scheduled changes of a flag
description: 'List Scheduled changes of a flag
'
operationId: list_scheduled_changes
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedSchedulesResponse'
'401':
description: Not Authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
details: Not authenticated
status: 401
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
parameters:
- description: The id of the project for which the schedule is set.
required: true
schema:
title: Project Id
type: integer
description: The id of the project for which the schedule is set.
name: project_id
in: path
- description: The key of the flag for which the schedule is set.
required: true
schema:
title: Flag Key
type: string
description: The key of the flag for which the schedule is set.
name: flag_key
in: path
- description: The key of the environment for which the schedule is set.
required: false
schema:
title: Environment
type: string
description: Filter the schedule by environment key
name: environment
example: development
in: query
- description: Specify UTC the timestamp and get the list of the jobs which are scheduled after.
required: false
schema:
title: Scheduled From
type: string
description: Specify UTC the timestamp and get the list of the jobs which are scheduled after.
format: date-time
example: 2023-04-15T20:14+0000
name: scheduled_from
in: query
- description: Specify UTC the timestamp and get the list of the jobs which are scheduled before.
required: false
schema:
title: Scheduled Till
type: string
description: Specify UTC the timestamp and get the list of the jobs which are scheduled before.
format: date-time
example: 2023-04-15T20:14+0000
name: scheduled_till
in: query
- description: Pagination argument that specifies the page to return. The default value is 1.
required: false
schema:
title: Page No
minimum: 1
type: integer
description: Pagination argument that specifies the page to return. The default value is 1.
default: 1
name: page_no
in: query
- description: " Pagination argument that specifies the maximum number of objects to return per request.\n Must be between 1 and 1000. The default value is 100."
required: false
schema:
title: Page Size
maximum: 1000
minimum: 1
type: integer
description: " Pagination argument that specifies the maximum number of objects to return per request.\n Must be between 1 and 1000. The default value is 100."
default: 100
name: page_size
in: query
- description: 'Filter scheduled changes by actions which apply to a specific rule.
For filtering scheduled changes which apply to a specific rule, use the rule key.
'
required: false
schema:
title: Applies To
type: string
description: Rule Key.
name: applies_to
in: query
- description: Order of sorting. Ascending or Descending value in short hand form (`asc` or `desc`)
required: false
schema:
title: Sort order
$ref: '#/components/schemas/SortOrder'
description: Ascending or Descending value in short hand form (asc or desc). Always orders by schedule time.
example: asc
name: order
in: query
post:
tags:
- Scheduled Changes
summary: Create a Schedule Change for a flag in an environment
description: 'Create a Scheduled Change for a flag in an environment
The schedule change contains a set of actions to update the flag in that environment at a specific time
'
operationId: create_scheduled_change
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ScheduledChange'
'401':
description: Not Authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
details: Not authenticated
status: 401
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
parameters:
- name: project_id
in: path
schema:
type: integer
required: true
- name: flag_key
in: path
schema:
type: string
required: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ScheduledChangeCreateRequest'
required: true
components:
schemas:
ScheduleAction:
title: ScheduleAction
required:
- subject
- changed_element
- value
type: object
properties:
subject:
type: object
description: The entity this action will apply to
properties:
key:
type: string
description: The identifier of the subject
type:
type: string
description: The type of subject. Can be a flag or a rule of the flag
enum:
- flag
- rule
changed_element:
type: string
enum:
- status
- percentage_included
- audience_conditions
value:
description: Value of the action. Can be of any type.
type: object
$ref: '#/components/schemas/ActionValue'
SortOrder:
title: SortOrder
type: string
enum:
- asc
- desc
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
status:
title: Status
type: integer
description: Status code of the response.
example: 422
PaginatedSchedulesResponse:
title: PaginatedSchedulesResponse
required:
- items
- total
- has_more
type: object
properties:
items:
title: Scheduled Changes
type: array
items:
$ref: '#/components/schemas/ScheduledChange'
description: List of scheduled changes.
total:
title: Total
type: integer
description: Total number of scheduled changes.
has_more:
title: Has More
type: boolean
description: Boolean that indicates whether there are still any schedules left in the next page.
ErrorResponse:
title: ErrorResponse
required:
- details
- status
type: object
properties:
details:
title: Details
type: string
description: Details of Error.
status:
title: Status
type: integer
description: Status code of the response.
example: 400
ActionValue:
title: ActionValue
description: "The value of a schedule action.\n\nFor status change, value can be on/off. \n\nFor changing traffic percentage, value should be integer. For example, for 40% traffic, value should be 4000.\n"
anyOf:
- type: string
enum:
- 'on'
- 'off'
- type: integer
example: 5000
ScheduledTime:
title: ScheduledTime
required:
- time_zone
- time
- date
type: object
properties:
time:
title: Time
type: string
description: 'The schedule will run at this time. Expected format: hh:MM (24 hour)'
example: '20:14'
time_zone:
title: Time Zone
type: string
description: The timezone information for the scheduled time. Must be an IANA timezone.
example: Etc/UTC
date:
title: Date
type: string
description: 'The schedule will run at this date. Expected format: yyyy-mm-dd.'
example: '2023-07-30'
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
anyOf:
- type: string
- type: integer
description: Path to the invalid value
msg:
title: Message
type: string
description: Error message
type:
title: Error Type
type: string
description: Error type
ScheduledChange:
title: ScheduledChange
type: object
required:
- id
- account_id
- project_id
- flag_key
- environment
- actions
- schedule
- status
- completed_at
- created_at
- updated_at
- updated_by
- created_by
properties:
id:
title: Id
type: integer
description: The unique identifier for the schedule.
account_id:
title: Account Id
type: integer
description: The account the Project is associated with.
project_id:
title: Project Id
type: integer
description: The id of the project for which the schedule is set.
flag_key:
title: Flag Key
type: string
description: The Flag identifier
environment:
title: Environment
type: string
description: The Environment of the flag
actions:
title: Actions
type: array
items:
$ref: '#/components/schemas/ScheduleAction'
description: Schedule actions.
schedule:
title: Schedule
allOf:
- $ref: '#/components/schemas/ScheduledTimeWithUTC'
description: Schedule details.
status:
title: Status
type: string
description: The status of the scheduled job.
completed_at:
title: Completed At
type:
- string
- 'null'
description: The UTC timestamp when the schedule is completed.
format: date-time
example: 2023-04-15T20:14+0000
updated_at:
title: Updated At
type: string
description: The UTC timestamp when the schedule is updated.
format: date-time
example: 2023-04-15T20:14+0000
created_at:
title: Created At
type: string
description: The UTC timestamp when the schedule is created.
format: date-time
example: 2023-04-15T20:14+0000
updated_by:
title: Updated By
type: string
description: The user who updated the schedule.
created_by:
title: Created By
type: string
description: The user who created the schedule.
ScheduledTimeWithUTC:
title: ScheduledTimeWithUTC
required:
- time_zone
- time
- date
- utc_time
type: object
properties:
time:
title: Time
type: string
description: 'The schedule will run at this time. Expected format: hh:MM (24 hour)'
example: 07:02
time_zone:
title: Time Zone
type: string
description: The timezone information for the scheduled time. Must be an IANA timezone.
example: Etc/UTC
date:
title: Date
type: string
description: 'The schedule will run at this date. Expected format: yyyy-mm-dd.'
example: '2023-07-30'
utc_time:
title: UTC Time
type: string
description: The utc timestamp when the scheduled job will be executed.
example: 2023-07-30T07:02:00+0000
ScheduledChangeCreateRequest:
title: ScheduledChangeCreateRequest
required:
- account_id
- actions
- schedule
- environment
type: object
properties:
account_id:
title: Account Id
type: integer
description: The account the Project is associated with.
actions:
title: Actions
type: array
items:
$ref: '#/components/schemas/ScheduleAction'
description: Schedule action details.
schedule:
title: Schedule
allOf:
- $ref: '#/components/schemas/ScheduledTime'
description: Schedule details.
environment:
title: Environment
type: string
securitySchemes:
BearerAuth:
description: To get a personal token, see https://docs.developers.optimizely.com/web/docs/personal-token
type: http
scheme: bearer
x-readme:
explorer-enabled: true
proxy-enabled: true