openapi: 3.2.0 info: description: 'Stack Moxie is a QA Automation platform for Marketing, Sales, and Enterprise Business technologists. This REST API can be used by developers like you to further automate, extend, and integrate quality into the workflows that matter most to you. Don''t have an account? [Sign up here](https://app.stackmoxie.com). # Authentication The Stack Moxie REST API uses HTTP Bearer Authentication, in the form of a JWT token, across all endpoints for authentication. You can manage your API tokens on your account settings page. ' title: 'Stack Moxie REST How To: Automate API' x-logo: url: https://app.stackmoxie.com/api/logo.png altText": Stack Moxie Logo servers: - url: https://app.stackmoxie.com/api/ security: - jwtBearerAuth: [] tags: - name: 'How To: Automate' description: 'Use these calls to Schedule Scenario runs. ' paths: /v1/organizations/{org}/schedules: get: summary: List Schedules description: 'Retrieves a list of this Organization''s Schedules. ' tags: - 'How To: Automate' parameters: - $ref: '#/components/parameters/OrgPathParam' responses: '200': description: Returns a list of the Organization's Schedules. content: application/json: schema: type: array items: $ref: '#/components/schemas/Schedule' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' post: summary: Create a Schedule description: 'Creates a Schedule. ' tags: - 'How To: Automate' parameters: - $ref: '#/components/parameters/OrgPathParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Schedule' responses: '200': description: Returns the Schedule just created. content: application/json: schema: $ref: '#/components/schemas/Schedule' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /v1/organizations/{org}/schedules/{id}: get: summary: Get a Schedule description: 'Retrieves an individual Schedule by ID. ' tags: - 'How To: Automate' parameters: - $ref: '#/components/parameters/OrgPathParam' - name: id in: path description: Schedule's ID. required: true schema: type: integer responses: '200': description: Returns the Schedule. content: application/json: schema: $ref: '#/components/schemas/Schedule' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' patch: summary: Update a Schedule description: 'Updates an individual Schedule by ID. ' tags: - 'How To: Automate' parameters: - $ref: '#/components/parameters/OrgPathParam' - name: id in: path description: Schedule's ID. required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Schedule' responses: '200': description: Returns the updated Schedule. content: application/json: schema: $ref: '#/components/schemas/Schedule' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' delete: summary: Delete a Schedule description: 'Deletes an individual Schedule by ID. ' tags: - 'How To: Automate' parameters: - $ref: '#/components/parameters/OrgPathParam' - name: id in: path description: Schedule's ID. required: true schema: type: integer responses: '204': description: Schedule successfully deleted. '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' components: schemas: LinkedScenarios: description: Scenarios that should run based on the outcome of this scenario. properties: onPass: $ref: '#/components/schemas/LinkedScenarioOutcome' onFail: $ref: '#/components/schemas/LinkedScenarioOutcome' Steps: type: array items: type: object required: - cog - stepId properties: cog: type: string description: The name of the Cog (e.g. vendor/cog-name) stepId: type: string description: The ID of the step to be executed. name: type: string description: The human-readable name of the step. data: type: object description: Data to be supplied to the step during step execution. waitFor: type: integer default: 0 description: The amount of time (in seconds) to wait before executing the step. failAfter: type: integer default: 0 description: The amount of time (in seconds) to retry this step before considering the scenario run to have failed. Folder: required: - name type: object properties: name: type: string description: Folder Name description: type: string description: Brief description of the Folder's purpose or intention. uuid: type: string format: uuid readOnly: true description: An identifier for this Folder in the form of a UUID. id: type: integer readOnly: true description: A numeric identifier for this Folder. createdBy: readOnly: true oneOf: - type: integer - $ref: '#/components/schemas/User' description: The ID or User who created this Folder. lastUpdatedBy: readOnly: true oneOf: - type: integer - $ref: '#/components/schemas/User' description: The ID or User who last updated this Folder. createdAt: type: integer readOnly: true description: Unix timestamp (ms) of this Folder's creation. updatedAt: type: integer readOnly: true description: Unix timestamp (ms) of when this Folder was last updated. Scenario: required: - definition - name type: object properties: name: type: string description: The name of the Scenario. description: type: string description: A brief description of the Scenario. definition: $ref: '#/components/schemas/ScenarioDefinition' type: type: string description: The type of scenario. Determines how the scenario will be used and how it is handled in the UI. enum: - default - template - from-template severity: type: integer description: Issue severity status of the scenario, 1 being the most severe and 4 being the least. enum: - 1 - 2 - 3 - 4 dashboardSetting: type: string description: Value that indicates whether to include this scenario in the Status Dashboard or not. enum: - default - include - exclude feature: description: The ID or Folder object under which this Scenario lives (if any). oneOf: - type: integer - $ref: '#/components/schemas/Folder' schedule: description: The ID or Schedule object associated with this Scenario (if any). oneOf: - type: integer - $ref: '#/components/schemas/Folder' notificationGroups: description: The Notification Groups that will be notified for scenario run results. type: - array - 'null' items: type: object $ref: '#/components/schemas/NotificationGroup' instructions: type: string description: For templates only. Additional guidelines on how to work with this scenarios. exposedToApis: type: boolean description: For templates only. Value that indicates whether to include this scenario when querying the exposedTemplates endpoint. isLinkable: type: boolean description: For templates only. Indicates whether this scenario can be chained onto other scenarios. uuid: type: string format: uuid readOnly: true description: An identifier for this Scenario in the form of a UUID. id: type: integer readOnly: true description: A numeric identifier for this Scenario. createdAt: type: integer readOnly: true description: Unix timestamp (ms) of this Scenario's creation. updatedAt: type: integer readOnly: true description: Unix timestamp (ms) of this Scenario's last update. createdBy: readOnly: true oneOf: - type: integer - $ref: '#/components/schemas/User' description: The ID or User object who created this Scenario. lastUpdatedBy: readOnly: true oneOf: - type: integer - $ref: '#/components/schemas/User' description: The ID or User object who last updated this Scenario. ScenarioDefinition: required: - steps type: object properties: scenario: type: string description: The name of the scenario. description: type: string description: Description of the scenario's purpose. steps: type: array $ref: '#/components/schemas/Steps' linkedScenarios: type: object description: Scenarios that should run based on the outcome of this scenario. $ref: '#/components/schemas/LinkedScenarios' Error: type: object properties: name: type: string message: type: string Schedule: description: Represents a Schedule on which an associated Scenario will be run. required: - interval - scheduledModel - scheduledScenario type: object properties: interval: type: integer description: Frequency (in seconds) at which this Schedule runs. scheduledModel: type: string enum: - scenario description: The type of object to be scheduled. Currently, only Scenarios are supported. scheduledScenario: oneOf: - type: integer - $ref: '#/components/schemas/Scenario' description: If `scheduledModel` is set to Scenario, this is the ID or Scenario object to be run on the given interval. uuid: type: string format: uuid readOnly: true description: An identifier for this Schedule in the form of a UUID. id: type: integer readOnly: true description: A numeric identifier for this Schedule. createdAt: type: integer readOnly: true description: Unix timestamp (ms) of this Schedule's creation. updatedAt: type: integer readOnly: true description: Unix timestamp (ms) of when this Schedule was last updated. lastRanAt: type: integer readOnly: true description: Unix timestamp (ms) of when this Schedule last ran. createdBy: readOnly: true oneOf: - type: integer - $ref: '#/components/schemas/Scenario' description: The ID or User object who created this schedule. User: required: - emailAddress - fullName - password type: object properties: uuid: type: string emailAddress: maxLength: 200 type: string emailStatus: type: string emailChangeCandidate: type: string password: type: string fullName: maxLength: 120 type: string notificationSetting: type: string notificationOverride: maxLength: 200 type: string maxTrials: type: string isSuperAdmin: type: boolean passwordResetToken: type: string passwordResetTokenExpiresAt: type: string emailProofToken: type: string emailProofTokenExpiresAt: type: string tosAcceptedByIp: type: string lastSeenAt: type: string LinkedScenarioOutcome: description: The scenario that should run based on the outcome of this scenario. type: object properties: templateId: type: integer description: Id of the template scenario that should be run. steps: type: array $ref: '#/components/schemas/Steps' NotificationGroup: description: Represents a notification group that can be notified during a scenario run. required: - name type: object properties: name: type: string description: Notification Group name. email: type: - string - 'null' description: The email alias of the notification group. members: description: The users that are members of this notification group. type: - array - 'null' items: type: object $ref: '#/components/schemas/User' id: type: integer readOnly: true description: A numeric identifier for this Notification Group. uuid: type: string readOnly: true description: An identifier for this Notification Group in the form of a UUID. createdAt: type: string readOnly: true description: Unix timestamp (ms) of this Notification Group's creation. updatedAt: type: string readOnly: true description: Unix timestamp (ms) of when this Notification Group was last modified. createdBy: readOnly: true oneOf: - type: integer - $ref: '#/components/schemas/User' description: The ID or User object who created this Notification Group. parameters: OrgPathParam: name: org in: path description: Organization's UUID (to scope the API call). required: true schema: type: string format: uuid responses: Forbidden: description: 'Returned if the authenticated user isn''t allowed to perform this action. ' content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: 'Returned when there may be a problem with your API token. ' content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: jwtBearerAuth: type: http scheme: bearer bearerFormat: JWT