Gremlin schedules API

Get, create, and delete schedules

OpenAPI Specification

gremlin-schedules-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Gremlin agents schedules API
  description: The API for interacting with the Gremlin Failure-as-a-Service platform
  termsOfService: https://www.gremlin.com/terms_of_service_2017_03_24
  contact:
    name: Gremlin Support
    email: support@gremlin.com
  license:
    name: Gremlin License
    url: https://www.gremlin.com/license_2017_03_24
  version: '1.0'
servers:
- url: https://api.gremlin.com/v1
  description: Gremlin API v1
tags:
- name: schedules
  description: Get, create, and delete schedules
paths:
  /schedules/attacks:
    get:
      tags:
      - schedules
      summary: Get all active experiment schedules. This functionality has moved to GET /schedules/attacks/paged.
      description: Requires the privilege [`EXPERIMENTS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getAttackSchedules
      parameters:
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      deprecated: true
      security:
      - privilege:
        - EXPERIMENTS_READ
    post:
      tags:
      - schedules
      summary: Create an attack schedule.
      description: Requires the privilege [`EXPERIMENTS_RUN`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: createAttackSchedule
      parameters:
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input'
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_RUN'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - EXPERIMENTS_RUN
  /schedules:
    post:
      tags:
      - schedules
      summary: This functionality has moved to POST /schedules/attacks.
      description: Requires the privilege [`EXPERIMENTS_RUN`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: createAttackScheduleLegacy
      parameters:
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input'
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_RUN'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      deprecated: true
      security:
      - privilege:
        - EXPERIMENTS_RUN
  /schedules/scenarios:
    get:
      tags:
      - schedules
      summary: Get all scenario schedules. This functionality has moved to GET /schedules/scenarios/paged.
      description: Requires the privilege [`SCENARIOS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getScenarioSchedules_1
      parameters:
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScenarioScheduleResponse'
        '403':
          description: 'User requires privilege for target team: SCENARIOS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      deprecated: true
      security:
      - privilege:
        - SCENARIOS_READ
    post:
      tags:
      - schedules
      summary: Create a scenario schedule.
      description: Requires the privilege [`SCENARIOS_RUN`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: createScenarioSchedule
      parameters:
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScenarioScheduleRequest'
      responses:
        default:
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ScenarioSchedule'
        '403':
          description: 'User requires privilege for target team: SCENARIOS_RUN'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_RUN
  /schedules/attacks/{guid}:
    get:
      tags:
      - schedules
      summary: Get an attack schedule.
      description: Requires the privilege [`EXPERIMENTS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getSingleAttackSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - EXPERIMENTS_READ
    delete:
      tags:
      - schedules
      summary: Delete an attack schedule.
      description: Requires the privilege [`HALT_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: deleteAttackSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            text/plain: {}
        '403':
          description: 'User requires privilege for target team: HALT_WRITE'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - HALT_WRITE
  /schedules/{guid}:
    get:
      tags:
      - schedules
      summary: This functionality has moved to GET /schedules/attacks/{guid}.
      description: Requires the privilege [`EXPERIMENTS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getSingleAttackScheduleLegacy
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      deprecated: true
      security:
      - privilege:
        - EXPERIMENTS_READ
    delete:
      tags:
      - schedules
      summary: This functionality has moved to DELETE /schedules/attacks/{guid}
      description: Requires the privilege [`HALT_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: deleteAttackScheduleLegacy
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            text/plain: {}
        '403':
          description: 'User requires privilege for target team: HALT_WRITE'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      deprecated: true
      security:
      - privilege:
        - HALT_WRITE
  /schedules/scenarios/{guid}:
    get:
      tags:
      - schedules
      summary: Get a scenario schedule.
      description: Requires the privilege [`SCENARIOS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getSingleScenarioSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioScheduleResponse'
        '403':
          description: 'User requires privilege for target team: SCENARIOS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_READ
    put:
      tags:
      - schedules
      summary: Update a scenario schedule.
      description: Requires the privilege [`SCENARIOS_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: updateScenarioSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScenarioScheduleRequest'
      responses:
        default:
          content:
            '*/*':
              schema:
                type: string
        '403':
          description: 'User requires privilege for target team: SCENARIOS_WRITE'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_WRITE
    delete:
      tags:
      - schedules
      summary: Delete a scenario schedule.
      description: Requires the privilege [`SCENARIOS_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: deleteScenarioSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            text/plain: {}
        '403':
          description: 'User requires privilege for target team: SCENARIOS_WRITE'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_WRITE
  /schedules/scenarios/{guid}/enabled:
    post:
      tags:
      - schedules
      summary: Enable a scenario schedule.
      description: Requires the privilege [`SCENARIOS_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: enableScenarioSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            text/plain: {}
        '403':
          description: 'User requires privilege for target team: SCENARIOS_WRITE'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_WRITE
    delete:
      tags:
      - schedules
      summary: Disable a scenario schedule.
      description: Requires the privilege [`SCENARIOS_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: disableScenarioSchedule
      parameters:
      - name: guid
        in: path
        description: This value represents the globally unique identifier of the record to fetch.
        required: true
        schema:
          type: string
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            text/plain: {}
        '403':
          description: 'User requires privilege for target team: SCENARIOS_WRITE'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_WRITE
  /schedules/active:
    get:
      tags:
      - schedules
      summary: This functionality has moved to GET /schedules/attacks.
      description: Requires the privilege [`EXPERIMENTS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getAttackSchedulesLegacy
      parameters:
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      deprecated: true
      security:
      - privilege:
        - EXPERIMENTS_READ
  /schedules/attacks/paged:
    get:
      tags:
      - schedules
      summary: Paginated endpoint for listing a team's experiment schedules ordered by trigger time.
      description: Requires the privilege [`EXPERIMENTS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getPaginatedAttackSchedules
      parameters:
      - name: pageSize
        in: query
        description: This value determines how many results will be returned per call.
        schema:
          type: integer
          format: int32
        example: None (unlimited)
      - name: pageToken
        in: query
        description: Pass the pageToken to get the next page of experiment schedules
        schema:
          type: string
        example: None (returns first page)
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseScheduleResponse'
        '403':
          description: 'User requires privilege for target team: EXPERIMENTS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - EXPERIMENTS_READ
  /schedules/scenarios/paged:
    get:
      tags:
      - schedules
      summary: Paginated endpoint for listing a team's scenario schedules ordered by trigger time.
      description: Requires the privilege [`SCENARIOS_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getPaginatedScenarioSchedules
      parameters:
      - name: pageSize
        in: query
        description: This value determines how many results will be returned per call.
        schema:
          type: integer
          format: int32
        example: None (unlimited)
      - name: pageToken
        in: query
        description: Pass the pageToken to get the next page of scenario schedules
        schema:
          type: string
        example: None (returns first page)
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseScenarioScheduleResponse'
        '403':
          description: 'User requires privilege for target team: SCENARIOS_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SCENARIOS_READ
  /schedules/services/paged:
    get:
      tags:
      - schedules
      summary: Paginated endpoint for listing a team's service schedules ordered by trigger time.
      description: Requires the privilege [`SERVICES_READ`](https://www.gremlin.com/docs/user-management/access-control/#privileges)
      operationId: getPaginatedServiceSchedules
      parameters:
      - name: pageSize
        in: query
        description: This value determines how many results will be returned per call.
        schema:
          type: integer
          format: int32
        example: None (unlimited)
      - name: pageToken
        in: query
        description: Pass the pageToken to get the next page of service schedules
        schema:
          type: string
        example: None (returns first page)
      - name: teamId
        in: query
        description: Required when using company session token.
        required: true
        schema:
          type: string
      responses:
        default:
          description: default response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponseServiceScheduleResponse'
        '403':
          description: 'User requires privilege for target team: SERVICES_READ'
        '401':
          description: Authorization header missing or malformed. Please provide proper credentials in the authorization header.
      security:
      - privilege:
        - SERVICES_READ
components:
  schemas:
    CreateScenarioScheduleRequest:
      title: ScenarioSchedule.Input
      type: object
      properties:
        trigger:
          type: object
          properties:
            windowType:
              type: string
              enum:
              - Once
              - Random
            type:
              type: string
            templateId:
              type: string
            optionalTemplateId:
              type: string
            empty:
              type: boolean
          additionalProperties:
            type: object
        enabled:
          type: boolean
        scenarioId:
          type: string
    PagedResponseScenarioScheduleResponse:
      type: object
      properties:
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          description: 'The size of the page requested. If none was supplied this is a default value (depending on the endpoint).

            If the length of items is less than this number that means there are _no_ more pages to request.


            NOTE: if the length *is* equal there may or may not be additional pages to request, it is unknowable until they are requested

            '
          format: int32
        pageToken:
          type: string
          description: Supply this token on successive requests to retrieve the next page if there is one
        items:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioScheduleResponse'
    Strategy:
      type: object
      properties:
        type:
          type: string
          enum:
          - Exact
          - RandomCount
          - RandomPercent
        tags:
          type: object
          additionalProperties:
            type: string
        multiSelectLabels:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        labels:
          type: object
          additionalProperties:
            type: string
        allHosts:
          type: boolean
        allContainers:
          type: boolean
        hostIds:
          type: array
          items:
            type: string
        containerIds:
          type: array
          items:
            type: string
        multiSelectTags:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ServiceScheduleResponse:
      type: object
      properties:
        teamId:
          type: string
        serviceId:
          type: string
        serviceName:
          type: string
        nextReliabilityTestId:
          type: string
        nextReliabilityTestName:
          type: string
        nextReliabilityDependencyId:
          type: string
        nextReliabilityDependencyName:
          type: string
        nextFailureFlagName:
          type: string
        nextTestTriggerSource:
          type: string
          enum:
          - MANUAL
          - RUN_ALL
          - SCHEDULED
          - RECURRING_SCHEDULE
        nextTestTriggeredBy:
          type: string
        nextTriggerTime:
          type: string
          format: date-time
    ScenarioSchedule:
      type: object
      properties:
        orgId:
          type: string
        guid:
          type: string
        scenarioId:
          type: string
        scenarioName:
          type: string
        targets:
          type: array
          items:
            $ref: '#/components/schemas/ServiceTarget'
        failureFlagTargets:
          type: array
          items:
            $ref: '#/components/schemas/FailureFlagTarget'
        trigger:
          type: object
          properties:
            windowType:
              type: string
              enum:
              - Once
              - Random
            type:
              type: string
            templateId:
              type: string
            optionalTemplateId:
              type: string
            empty:
              type: boolean
          additionalProperties:
            type: object
        createSource:
          type: string
          enum:
          - WebApp
          - Api
          - Scheduled
          - Manual
          - Spinnaker
          - Concord
          - GremlinFeeder
          - GremlinSdkPython
          - Scenario
          - Chao
          - K8sBackend
          - Website
          - Neotys
          - IntegrationClient
          - Validation
        createdBy:
          type: string
        enabled:
          type: boolean
        nextWindowTriggerTimes:
          type: object
          additionalProperties:
            type: string
        nextTriggerTime:
          type: string
          format: date-time
        lastScenarioRun:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        companyId:
          type: string
        triggerSource:
          type: string
          enum:
          - MANUAL
          - RUN_ALL
          - SCHEDULED
          - RECURRING_SCHEDULE
        serviceIds:
          type: array
          items:
            type: string
        window:
          $ref: '#/components/schemas/Window'
        nextWindowTriggerTimesAfterConverting:
          type: object
          additionalProperties:
            type: string
          writeOnly: true
        triggerTimesLeft:
          type: array
          writeOnly: true
          items:
            type: integer
            format: int32
    PagedResponseServiceScheduleResponse:
      type: object
      properties:
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          description: 'The size of the page requested. If none was supplied this is a default value (depending on the endpoint).

            If the length of items is less than this number that means there are _no_ more pages to request.


            NOTE: if the length *is* equal there may or may not be additional pages to request, it is unknowable until they are requested

            '
          format: int32
        pageToken:
          type: string
          description: Supply this token on successive requests to retrieve the next page if there is one
        items:
          type: array
          items:
            $ref: '#/components/schemas/ServiceScheduleResponse'
    Window:
      type: object
      properties:
        type:
          type: string
          enum:
          - Once
          - Random
        triggerTimesLeft:
          type: array
          items:
            type: integer
            format: int32
        end:
          type: string
          format: date-time
        start:
          type: string
          format: date-time
        interval:
          $ref: '#/components/schemas/Interval'
        maxRunsPerWindow:
          type: integer
          format: int32
    ServiceTarget:
      required:
      - targetingStrategy
      type: object
      properties:
        serviceId:
          type: string
        targetingStrategy:
          $ref: '#/components/schemas/TargetingStrategy'
    Chronology:
      type: object
      properties:
        zone:
          $ref: '#/components/schemas/DateTimeZone'
    DateTimeZone:
      type: object
      properties:
        id:
          type: string
        fixed:
          type: boolean
    ScenarioScheduleResponse:
      type: object
      properties:
        orgId:
          type: string
        guid:
          type: string
        scenarioId:
          type: string
        scenarioName:
          type: string
        trigger:
          type: object
          properties:
            windowType:
              type: string
              enum:
              - Once
              - Random
            type:
              type: string
            templateId:
              type: string
            optionalTemplateId:
              type: string
            empty:
              type: boolean
          additionalProperties:
            type: object
        createdBy:
          type: string
        createSource:
          type: string
          enum:
          - WebApp
          - Api
          - Scheduled
          - Manual
          - Spinnaker
          - Concord
          - GremlinFeeder
          - GremlinSdkPython
          - Scenario
          - Chao
          - K8sBackend
          - Website
          - Neotys
          - IntegrationClient
          - Validation
        triggerSource:
          type: string
          enum:
          - MANUAL
          - RUN_ALL
          - SCHEDULED
          - RECURRING_SCHEDULE
        enabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        nextTriggerTime:
          type: string
          format: date-time
        targets:
          type: array
          items:
            $ref: '#/components/schemas/ServiceTarget'
        failureFlagTargets:
          type: array
          items:
            $ref: '#/components/schemas/FailureFlagTarget'
    TargetSampling:
      required:
      - type
      type: object
      properties:
        type:
          type: string
      discriminator:
        propertyName: type
    ScheduleResponse:
      type: object
      properties:
        orgId:
          type: string
        guid:
          type: string
        trigger:
          type: object
          properties:
            windowType:
              type: string
              enum:
              - Once
              - Random
            type:
              type: string
            templateId:
              type: string
            optionalTemplateId:
              type: string
            empty:
              type: boolean
          additionalProperties:
            type: object
        target:
          type: object
          properties:
            multiSelectTags:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
            strategyInput:
              $ref: '#/components/schemas/TargetStrategy'
            multiSelectLabels:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
            type:
              type: string
            templateId:
              type: string
            optionalTemplateId:
              type: string
            empty:
              type: boolean
            tags:
              type: object
              additionalProperties:
                type: string
              writeOnly: true
          additionalProperties:
            type: object
        command:
          type: object
          properties:
            providers:
              type: array
              items:
                type: string
            args:
              type: array
              items:
                type: string
            trafficImpactMapping:
              $ref: '#/components/schemas/TaskTrafficImpactMappingInput'
            trafficImpactFromWithSelectTags:
       

# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gremlin/refs/heads/main/openapi/gremlin-schedules-api-openapi.yml