openapi: 3.0.0 info: description: This API is used to manage the execution of OneCloud chains and fetch metadata about your OneCloud workspaces. version: v1 title: OneCloud API license: name: Apache 2.0 url: 'http://www.apache.org/licenses/LICENSE-2.0.html' x-logo: url: 'https://statics-onecloud-io.s3.amazonaws.com/OneCloudLogo_Color.png' backgroundColor: transparent altText: OneCloud logo contact: name: Workiva Inc url: 'https://www.workiva.com' email: platformsupport@workiva.com termsOfService: 'https://developers.workiva.com' servers: - url: 'https://h.app.wdesk.com/s/wdata/oc/api' description: US - url: 'https://h.eu.wdesk.com/s/wdata/oc/api' description: EU - url: 'https://h.apac.wdesk.com/s/wdata/oc/api' description: APAC externalDocs: description: Developer documentation for Workiva Inc. url: 'https://developers.workiva.com' tags: - name: chain description: The Chain API endpoints provide an interface for getting information about chains and their commands. - name: workspace description: The Workspace API endpoints provide an interface for getting information about Chain workspaces. - name: environment description: The Environment API endpoints provide an interface for getting information about Chain environments. - name: execution description: 'The Execution API endpoints provide an interface for getting information about a chain''s execution, such as when it starts and stops, its status, and run history.' - name: security description: The Security API endpoints provide an interface for interacting with security-related objects and actions. - name: dataprep description: The Data Prep API endpoints provide an interface to update and publish mapping groups. components: parameters: page: name: page in: query description: Page number to retrieve in the paginated results (0-based index). required: false schema: type: integer example: 3 pageSize: name: pageSize in: query description: Limit number of results returned (Max 100). required: false schema: type: integer example: 10 schemas: WorkspacesResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Workspace' WorkspaceResponse: type: object properties: data: type: object $ref: '#/components/schemas/Workspace' EnvironmentsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Environment' EnvironmentResponse: type: object properties: data: type: object $ref: '#/components/schemas/Environment' ChainsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Chain' ChainResponse: type: object properties: data: type: object $ref: '#/components/schemas/Chain' CommandsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Command' ChainRunResponse: type: object properties: data: type: object $ref: '#/components/schemas/ChainRun' ChainRunPageResponse: type: object properties: data: type: object $ref: '#/components/schemas/ChainRunPage' ChainRunWithNodesResponse: type: object properties: data: type: object $ref: '#/components/schemas/ChainRunWithNodes' LoginActivityResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/LoginActivity' ActivityResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Activity' UsersResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/User' UserResponse: type: object properties: data: type: object $ref: '#/components/schemas/User' UserGroupsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/UserGroup' UserGroupResponse: type: object properties: data: type: object $ref: '#/components/schemas/UserGroup' PermissionsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Permission' SingleError: type: object properties: error: type: string error_description: type: string ID: description: The unique identifier of a resource (can be a GUID). type: string example: '74' RuntimeVariables: type: object additionalProperties: {} Activity: description: An object representing an event within chains. type: object properties: id: $ref: '#/components/schemas/ID' trackable_type: type: string trackable_id: $ref: '#/components/schemas/ID' owner_type: type: string owner_id: $ref: '#/components/schemas/ID' key: type: string parameters: properties: id: $ref: '#/components/schemas/ID' type: object recipient_type: type: string recipient_id: $ref: '#/components/schemas/ID' created_at: type: string updated_at: type: string LoginActivity: description: Information about a particular login event. type: object properties: id: $ref: '#/components/schemas/ID' identity: type: string context: type: string success: type: boolean failure_reason: type: string user_id: $ref: '#/components/schemas/ID' ip: type: string city: type: string region: type: string country: type: string created_at: type: string Chain: type: object properties: id: $ref: '#/components/schemas/ID' internal_id: description: The unique identifier of the chain resource in the Chains environment. type: integer example: 74 name: description: The name of the chain. type: string example: Monitoring Chain description: description: A brief summary of what the chain does. type: string example: Sends an email when new changes are made to a Workiva spreadsheet. created_at: description: A timestamp representing the original creation time of the chain. type: string example: '2018-03-14 20:10:39.520585' updated_at: description: A timestamp representing the last updated time of the chain. type: string example: '2018-03-14 20:10:39.520585' disabled: description: Whether or not the chain is disabled. type: boolean example: false concurrency_enabled: description: Whether or not the chain will execute commands in parallel. type: boolean example: true default: false runtime_inputs: description: Variables available for user input for each execution. type: array items: type: object properties: vuid: description: The unique identifier of the variable. type: string example: 45072337-72ee-4c52-9428-0b2ae21ac73c data_type: description: The data type of the variable. type: string example: file schedules: description: An array describing the automated schedule for a chain run. type: array items: $ref: '#/components/schemas/ChainSchedule' ChainSchedule: type: object properties: enabled: type: boolean start_at: type: string end_at: type: string properties: type: object properties: days_of_month: type: array items: type: string days_of_week: type: array items: type: string recurring_interval: type: integer recurring_type: type: string run_at_hours: type: integer run_at_minutes: type: integer run_at_seconds: type: integer zone: type: string Command: type: object properties: id: $ref: '#/components/schemas/ID' link_id: description: The link ID associated with the command. type: string name: description: The name of the command. type: string description: description: A brief summary of what the command does. type: string ChainRun: type: object properties: id: $ref: '#/components/schemas/ID' chainId: $ref: '#/components/schemas/ID' envId: $ref: '#/components/schemas/ID' userId: $ref: '#/components/schemas/ID' userName: description: The user that triggered the chain run. type: string startAt: description: The timestamp at which the chain run started. type: string endAt: description: The timestamp at which the chain run completed. type: string pausedAt: description: The timestamp at which the chain run was paused. type: string resumedAt: description: The timestamp at which the chain run was resumed. type: string state: description: The state of the chain run. type: string enum: - sleeping - enqueueing - paused - errored - warned - all_succeeded - stopped launchType: description: The type of event that triggered the chain run. type: string enum: - manual - api - schedule - trigger - slack - trigger_event resultText: description: The result of the chain run. type: string ChainRunWithNodes: description: A chain run object with details about all of the command nodes used in that run. $ref: '#/components/schemas/ChainRun' ChainRunNode: type: object properties: id: $ref: '#/components/schemas/ID' name: type: string nodeType: type: string enum: - command - event state: type: string enum: - sleeping - paused - skipped - errored - warned - succeeded iterable: type: boolean nodeId: $ref: '#/components/schemas/ID' startAt: type: string endAt: type: string results: type: array items: $ref: '#/components/schemas/ChainRunNodeResult' ChainRunNodeResult: type: object properties: id: $ref: '#/components/schemas/ID' iteratorValue: type: string outputVariables: type: object properties: data: type: string path: type: string state: type: string enum: - active - errored - skipped - warned - succeeded - stopped outputLogUrl: type: string ChainRunPage: type: object properties: cursor: description: Cursor value indicating page information for the data to retrieve. type: string chainExecutors: description: An array of the chain runs. type: array items: $ref: '#/components/schemas/ChainRun' Workspace: type: object properties: id: $ref: '#/components/schemas/ID' company_id: $ref: '#/components/schemas/ID' external_id: $ref: '#/components/schemas/ID' name: description: The name of the workspace. type: string description: description: A description of the workspace. type: string variables: description: A list of the workspace's variables. type: array items: $ref: '#/components/schemas/Variable' Environment: description: An object containing information about a particular workspace environment. type: object properties: id: $ref: '#/components/schemas/ID' name: type: string description: type: string position: type: integer format: int64 color: type: string chains_count: type: integer format: int64 variables: type: array items: $ref: '#/components/schemas/Variable' settings: type: object properties: color: type: string created_at: type: string updated_at: type: string Variable: type: object properties: key: type: string label: type: string defaultValue: type: string value: type: string encrypted: type: boolean User: description: An object containing information about a particular user in Chains. type: object properties: id: $ref: '#/components/schemas/ID' email: type: string first_name: type: string nullable: true last_name: type: string nullable: true sso_enabled: type: boolean last_sign_in_at: type: string nullable: true created_at: type: string UserGroup: description: An object containing information about a particular group in Chains. type: object properties: id: $ref: '#/components/schemas/ID' name: type: string default: type: boolean created_at: type: string Permission: description: An object containing information about access permission to particular chains resources. type: object properties: id: $ref: '#/components/schemas/ID' object_id: $ref: '#/components/schemas/ID' object_type: type: string object_name: type: string name: type: string enum: - read - execute - write - create - admin user_groups: type: array items: $ref: '#/components/schemas/UserGroup' MappingRule: description: An object containing information about a mapping rule. type: object properties: id: type: integer mappingGroupGuid: $ref: '#/components/schemas/ID' type: type: string enum: - LIKE - EXACT - REGEX source: type: string target: type: string position: type: integer conditions: $ref: '#/components/schemas/Conditions' Conditions: type: object properties: combinator: $ref: '#/components/schemas/Combinator' rules: type: array items: $ref: '#/components/schemas/ConditionGroup' ConditionGroup: type: object properties: combinator: $ref: '#/components/schemas/Combinator' rules: type: array items: $ref: '#/components/schemas/Condition' Condition: type: object properties: field: type: string operator: $ref: '#/components/schemas/ConditionalOperator' value: type: array items: type: string Combinator: type: string enum: - AND - OR ConditionalOperator: type: string enum: - 'NULL' - NOT_NULL - EQUALS - NOT_EQUALS - CONTAINS - BEGINS_WITH - ENDS_WITH - DOES_NOT_CONTAIN - DOES_NOT_BEGIN_WITH - DOES_NOT_END_WITH - LESS_THAN - GREATER_THAN - LESS_THAN_OR_EQUAL_TO - GREATER_THAN_OR_EQUAL_TO ErrorWithLineNumber: type: object properties: error: type: string lineNumber: type: integer ErrorWithoutLineNumber: type: object properties: error: type: string MappingRuleUploadResult: type: object properties: mappingRules: type: array items: $ref: '#/components/schemas/MappingRule' errors: type: array items: $ref: '#/components/schemas/ErrorWithLineNumber' callbacks: {} links: {} securitySchemes: oauth2: type: oauth2 flows: clientCredentials: tokenUrl: 'https://api.onecloud.io/oauth/token' scopes: {} paths: /v1/metadata/chains/search: get: operationId: searchChains summary: Search chains description: | Returns a list of all chains that match the provided criteria. The name of the change is fuzzy matched; it matches any chain name that contains the provided string. The workspace, external workspace, and environment IDs all help filter down the results to a particular setting. Setting the parallel execution enabled flag will only return chains whose commands run in parallel. tags: - chain security: - oauth2: [] parameters: - name: workspace_id description: The ID of the workspace to search for chains. in: query required: false schema: type: integer example: 66 - name: external_workspace_id description: The ID of the associated Workiva workspace to search for chains. in: query required: false schema: type: string example: '201' - name: environment_id description: The ID of the environment to search for chains. in: query required: false schema: type: integer example: 193 - name: name description: The fuzzy name of the chain to search for. in: query required: false schema: type: string example: Monthly Reports - name: parallel_execution_enabled description: Whether or not to return only chains that run in parallel or serially. in: query required: false schema: type: boolean example: false responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainsResponse' example: | { "data": [ { "id": "1", "internal_id": 0, "name": "File Utils Chain", "description": "Test a directory", "created_at": "2018-03-14 20:10:39.520585", "updated_at": "2018-03-14 20:10:39.520585", "disabled": true, "concurrency_enabled": false, "runtime_inputs": [ { "vuid": "45072337-72ee-4c52-9428-0b2ae21ac73c", "data_type": "file" } ], "schedules": [ { "enabled": true, "start_at": "2019-02-08 06:25:00", "end_at": "2019-02-08 06:25:00", "properties": { "days_of_month": [ "1", "2", "10" ], "days_of_week": null, "recurring_interval": 1, "recurring_type": "monthly", "run_at_hours": 14, "run_at_minutes": 0, "run_at_seconds": 0, "zone": "America/New_York" } } ] } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/metadata/workspace: get: operationId: getWorkspaces summary: Return a list of workspaces description: Retrieves a list of workspaces for a company. tags: - workspace security: - oauth2: [] parameters: [] responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/WorkspacesResponse' example: | { "data": [ { "id": "1", "company_id": "140", "external_id": "2", "name": "Workspace A", "description": "Primary workspace for operations", "variables": [ { "key": "workspaces", "label": "Workspaces", "defaultValue": "", "value": null, "encrypted": true } ] } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/metadata/workspace/{workspace_id}': get: operationId: getWorkspace summary: Return workspace properties description: 'Returns properties for a workspace with the provided ID, or a 404 if no such workspace is found.' tags: - workspace security: - oauth2: [] parameters: - name: workspace_id description: The ID of the Workspace. in: path required: true schema: $ref: '#/components/schemas/ID' example: '12' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/WorkspaceResponse' example: | { "data": { "id": "1", "company_id": "140", "external_id": "2", "name": "Workspace A", "description": "Primary workspace for operations", "variables": [ { "key": "workspace1", "label": "Workspace1", "defaultValue": "", "value": null, "encrypted": true } ] } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/metadata/workspace/{workspace_id}/environment': get: operationId: getEnvironments summary: Return a list of environments for a workspace description: Return a list of environments for a workspace. tags: - environment security: - oauth2: [] parameters: - name: workspace_id description: The ID of the Workspace. in: path required: true schema: $ref: '#/components/schemas/ID' example: '12' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/EnvironmentsResponse' example: | { "data": [ { "id": "1", "name": "Staging Environment", "description": "Environment to test changes", "position": 0, "color": "#3CB702", "chains_count": 15, "variables": [ { "key": "environment", "label": "Environment", "defaultValue": "", "value": "Testing", "encrypted": true } ], "settings": { "color": "#3CB702" }, "created_at": "2018-03-14 20:10:39.520585", "updated_at": "2018-03-14 20:10:39.520585" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/metadata/workspace/{workspace_id}/environment/{environment_id}': get: operationId: getEnvironment summary: Return environment properties description: 'Return properties for an environment in a workspace with the provided IDs, or a 404 if no such workspace is found.' tags: - environment security: - oauth2: [] parameters: - name: workspace_id description: The ID of the Workspace. in: path required: true schema: $ref: '#/components/schemas/ID' example: '12' - name: environment_id description: The ID of the Environment. in: path required: true schema: $ref: '#/components/schemas/ID' example: '139' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/EnvironmentResponse' example: | { "data": { "id": "1", "name": "string", "description": "string", "position": 0, "color": "#3CB702", "chains_count": 0, "variables": [ { "key": "environment", "label": "Environment", "defaultValue": "", "value": "Testing", "encrypted": true } ], "settings": { "color": "#3CB702" }, "created_at": "2018-03-14 20:10:39.520585", "updated_at": "2018-03-14 20:10:39.520585" } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/metadata/environment/{environment_id}/chain': get: operationId: getChains summary: Return a list of chains for an environment description: Retrieves a list of chains for an environment. tags: - chain security: - oauth2: [] parameters: - name: environment_id description: The ID of the Environment. in: path required: true schema: $ref: '#/components/schemas/ID' example: '139' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainsResponse' example: | { "data": [ { "id": "1", "internal_id": 0, "name": "string", "description": "string", "created_at": "2018-03-14 20:10:39.520585", "updated_at": "2018-03-14 20:10:39.520585", "disabled": true, "concurrency_enabled": false, "runtime_inputs": [ { "vuid": "45072337-72ee-4c52-9428-0b2ae21ac73c", "data_type": "file" } ], "schedules": [ { "enabled": true, "start_at": "2019-02-08 06:25:00", "end_at": "2019-02-08 06:25:00", "properties": { "days_of_month": [ "15", "30" ], "days_of_week": [], "recurring_interval": 0, "recurring_type": "monthly", "run_at_hours": 0, "run_at_minutes": 0, "run_at_seconds": 0, "zone": "America/New_York" } } ] } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/metadata/environment/{environment_id}/chain/{chain_id}': get: operationId: getChain summary: Return chain properties description: 'Returns properties for a chain with the provided ID, or a 404 if no such chain is found.' tags: - chain security: - oauth2: [] parameters: - name: environment_id description: The ID of the Environment. in: path required: true schema: type: string example: '139' - name: chain_id description: The ID of the Chain. in: path required: true schema: type: string example: '61549' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainResponse' example: | { "data": { "id": "1", "internal_id": 0, "name": "List File Content", "description": "", "created_at": "2018-03-14 20:10:39.520585", "updated_at": "2018-03-14 20:10:39.520585", "disabled": true, "concurrency_enabled": false, "runtime_inputs": [ { "vuid": "data.chain.45072337-72ee-4c52-9428-0b2ae21ac73c", "data_type": "string" } ], "schedules": [ { "enabled": true, "start_at": "2019-02-08 06:25:00", "end_at": "2019-02-08 06:25:00", "properties": { "days_of_month": [ "15", "30" ], "days_of_week": [], "recurring_interval": 1, "recurring_type": "monthly", "run_at_hours": 10, "run_at_minutes": 1, "run_at_seconds": 0, "zone": "America/New_York" } } ] } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/metadata/environment/{environment_id}/chain/{chain_id}/command': get: operationId: getCommands summary: Return command properties description: 'Returns properties for a command with the provided ID, or a 404 if no such command is found.' tags: - chain security: - oauth2: [] parameters: - name: environment_id description: The ID of the Environment. in: path required: true schema: type: string example: '139' - name: chain_id description: The ID of the Chain. in: path required: true schema: type: string example: '2339' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CommandsResponse' example: | { "data": [ { "id": "1", "link_id": "12", "name": "Chain command", "description": "Default command for this chain" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/execute/environment/{environment_id}/chain/{chain_id}/start': post: operationId: startChain summary: Execute a chain description: 'Starts a chain run for a specific chain in an environment, specified by the Chain and Environment ID.' tags: - execution security: - oauth2: [] parameters: - name: environment_id description: The ID of the Environment. in: path required: true schema: $ref: '#/components/schemas/ID' example: '139' - name: chain_id description: The ID of the Chain. in: path required: true schema: type: string example: '34090' requestBody: description: The runtime variables that have been pre-defined for a Chain. content: application/json: schema: type: object properties: runtimeVariables: $ref: '#/components/schemas/RuntimeVariables' examples: any: summary: Runtime Variables value: runtimeVariables: variableName: variableValue required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunResponse' example: | { "data": { "id": "1", "chainId": "37010", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "success" } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '422': description: Unable to Start Chain content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/execute/environment/{environment_id}/chain/{chain_id}/history': get: operationId: chainRunHistory summary: Return run history for a chain description: Retrieves a list of run history for a chain. tags: - execution security: - oauth2: [] parameters: - name: environment_id description: The ID of the Environment. in: path required: true schema: $ref: '#/components/schemas/ID' example: '139' - name: chain_id description: The ID of the Chain. in: path required: true schema: type: string example: '54865' - name: limit description: Limit number of chainRuns returned (max 50). in: query required: false schema: $ref: '#/components/schemas/ID' example: 10 - name: cursor description: 'Cursor value returned from the API, indicating page information.' in: query required: false schema: type: string - name: start_date description: Start Date (Unix timestamp). in: query required: false schema: $ref: '#/components/schemas/ID' example: '1616143293' - name: end_date description: End Date (Unix timestamp). in: query required: false schema: $ref: '#/components/schemas/ID' example: '1616143293' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunPageResponse' example: | { "data": { "cursor": "string", "chainExecutors": [ { "id": "1", "chainId": "37", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "" } ] } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/execute/environment/{environment_id}/chain/inputs_search': get: operationId: chainInputsSearch summary: Search previous chain runs for an input value description: | Returns a list of all chain runs whose inputs match the provided search criteria. The search text is fuzzy matched; it matches any input value that contains the provided string. For example, a command that takes a File ID of "my_file_id" as an input can be searched using "my_file_id" as the search text input. The environment ID specifies which environment should be searched for chain run input parameters. The limit and cursor help determine the page size and which page to return. tags: - execution security: - oauth2: [] parameters: - name: environment_id description: The ID of the environment to search for chains run inputs. in: path required: true schema: $ref: '#/components/schemas/ID' example: '130' - name: search_text description: The fuzzy input value to search for. in: query required: true schema: type: string example: List File - name: limit description: Limit number of chainExecutors returned (Max 50). in: query required: false schema: $ref: '#/components/schemas/ID' example: 10 - name: cursor description: 'Cursor value returned from the API, indicating page information.' in: query required: false schema: type: string example: '' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunPageResponse' example: | { "data": { "cursor": "string", "chainExecutors": [ { "id": "1", "chainId": "37", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "" } ] } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '422': description: Unable to Start Chain content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/execute/chain_run/search: get: operationId: chainFilterSearch summary: Search previous chain runs description: | Returns a list of all previous chain runs that match the provided criteria. The environment IDs specify which environments should be searched for the chain run. The chain IDs specify which specific chains should be returned. The state specified returns only those chains that are in that state (e.g. "completed"). If a cursor is provided, the corresponding page will be returned. tags: - execution security: - oauth2: [] parameters: - name: environment_id description: The ID(s) of the Environments to search. in: query required: false schema: type: array items: $ref: '#/components/schemas/ID' example: - '139' - '140' - '141' explode: false style: form - name: chain_id description: The ID(s) of the Chains to return. in: query required: false schema: type: array items: $ref: '#/components/schemas/ID' example: - '574' explode: false style: form - name: start_date description: Start Date (Unix timestamp). in: query required: false schema: $ref: '#/components/schemas/ID' example: '1616143293' - name: end_date description: End Date (Unix timestamp). in: query required: false schema: $ref: '#/components/schemas/ID' example: '1616143293' - name: state description: The state of the Chain Run. in: query required: false schema: type: string enum: - running - succeeded - failed - paused - warned - completed example: completed - name: sort description: Sort direction (by date). in: query schema: type: string enum: - desc - asc example: desc - name: cursor description: 'Cursor value returned from the API, indicating page information.' in: query required: false schema: type: string example: '' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunPageResponse' example: | { "data": { "cursor": "string", "chainExecutors": [ { "id": "1", "chainId": "37", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "success" } ] } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '422': description: Unable to Start Chain content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/execute/chain_run/{chain_run_id}': get: operationId: getChainRun summary: Return chain run properties description: 'Returns properties for a chain run with the provided ID, or a 404 if no such chain run is found.' tags: - execution security: - oauth2: [] parameters: - name: chain_run_id description: The ID of the Chain Run. in: path required: true schema: $ref: '#/components/schemas/ID' example: '94532' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunResponse' example: | { "data": { "id": "1", "chainId": "37", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "success" } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/execute/chain_run/{chain_run_id}/nodes': get: operationId: getChainRunNodes summary: Return chain run properties with nodes description: 'Returns properties and nodes for a chain run with the provided ID, or a 404 if no such chain run is found.' tags: - execution security: - oauth2: [] parameters: - name: chain_run_id description: The ID of the Chain Run. in: path required: true schema: $ref: '#/components/schemas/ID' example: '54309' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunWithNodesResponse' example: | { "data": { "id": "1", "chainId": "37", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "success", "nodes": [ { "id": "1", "name": "List File Content", "nodeType": "command", "state": "sleeping", "iterable": true, "nodeId": "dcaa856a-d1cc-4eca-8d79-4773ab1b58b9", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "results": [ { "id": "1", "iteratorValue": "Account", "outputVariables": { "data": null, "path": "" }, "state": "active", "outputLogUrl": "dev.onecloud.io" } ] } ] } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/execute/chain_run/{chain_run_id}/stop': post: operationId: stopChain summary: Stop a running chain description: Stop a chain run with the specified ID. tags: - execution security: - oauth2: [] parameters: - name: chain_run_id description: The ID of the Chain Run. in: path required: true schema: $ref: '#/components/schemas/ID' example: '543459' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ChainRunResponse' example: | { "data": { "id": "1", "chainId": "37", "envId": "1154", "userId": "5", "userName": "dev23", "startAt": "2019-02-08 06:25:00", "endAt": "2019-02-12 06:25:00", "pausedAt": "2019-02-12 06:25:00", "resumedAt": "2019-02-12 06:25:00", "state": "sleeping", "launchType": "manual", "resultText": "success" } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/SingleError' '422': description: Unable to Stop Chain content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/security/login_activity: get: operationId: getLoginActivity summary: Return a list of login activity events description: Returns a list of recent login activity events. tags: - security security: - oauth2: [] parameters: - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/LoginActivityResponse' example: | { "data": [ { "id": "1", "identity": "dev@onecloud.io", "context": "sessions#create", "success": true, "failure_reason": "Invalid login credentials. Please try again.", "user_id": "1", "ip": "1.1.1.1", "city": "New York", "region": "Midwest", "country": "United States", "created_at": "2018-03-14 20:10:39.520585" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/security/authorizations_activity: get: operationId: getAuthorizationsActivity summary: Return a list of authorization activities description: Returns a list of recent authorization activity events. tags: - security security: - oauth2: [] parameters: - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ActivityResponse' example: | { "data": [ { "id": "1", "trackable_type": "UserGroupUser", "trackable_id": "1", "owner_type": "User", "owner_id": "2", "key": "user_group_user.destroy", "parameters": { "id": "1" }, "recipient_type": "UserGroup", "recipient_id": "1", "created_at": "2018-03-14 20:10:39.520585", "updated_at": "2018-03-14 20:10:39.520585" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/security/users: get: operationId: getUsers summary: Return a list of users description: Returns a list of all users in a particular company. tags: - security security: - oauth2: [] parameters: - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UsersResponse' example: | { "data": [ { "id": "1", "email": "dev@onecloud.io", "first_name": "Dev", "last_name": "Gomez", "sso_enabled": true, "last_sign_in_at": "2018-03-14 20:10:39.520585", "created_at": "2018-03-14 20:10:39.520585" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/security/users/{userId}': get: operationId: getUser summary: Return user properties description: 'Returns properties for a user with the provided ID, or a 404 if no such user is found.' tags: - security security: - oauth2: [] parameters: - name: userId description: The ID of the User. in: path required: true schema: type: string example: '1' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UserResponse' example: | { "data": { "id": "1", "email": "dev@onecloud.io", "first_name": "Dev", "last_name": "Gomez", "sso_enabled": true, "last_sign_in_at": "2018-03-14 20:10:39.520585", "created_at": "2018-03-14 20:10:39.520585" } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/security/users/{userId}/groups': get: operationId: getUserUserGroups summary: Return a list of user groups description: Returns a list of all groups that a user is a part of in a particular company. tags: - security security: - oauth2: [] parameters: - name: userId description: The ID of the User. in: path required: true schema: type: string example: '1' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UserGroupsResponse' example: | { "data": [ { "id": "1", "name": "Admins", "default": true, "created_at": "2018-03-14 20:10:39.520585" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/security/user_groups: get: operationId: getUserGroups summary: Return a list of all user groups description: Returns a list of all user groups in a company. tags: - security security: - oauth2: [] parameters: - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UserGroupsResponse' example: | { "data": [ { "id": "1", "name": "Admins", "default": true, "created_at": "2018-03-14 20:10:39.520585" } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/security/user_groups/{userGroupId}': get: operationId: getUserGroup summary: Return user group properties description: 'Return properties for a user group with the provided ID, or a 404 if no such user group is found.' tags: - security security: - oauth2: [] parameters: - name: userGroupId description: The ID of the User Group. in: path required: true schema: type: string example: '21' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UserGroupResponse' example: | { "data": { "id": "1", "name": "Admins", "default": true, "created_at": "2018-03-14 20:10:39.520585" } } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/security/user_groups/{userGroupId}/permissions': get: operationId: getUserGroupPermissions summary: Return a list of permissions for a user group description: 'Returns properties for a user group with the provided ID, or a 404 if no such user group is found.' tags: - security security: - oauth2: [] parameters: - name: userGroupId description: The ID of the User Group. in: path required: true schema: type: string example: '1' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PermissionsResponse' example: | { "data": [ { "id": "1", "object_id": "12", "object_type": "Chain", "object_name": "Regression Test", "name": "read", "user_groups": [ { "id": "1", "name": "Admins", "default": true, "created_at": "2018-03-14 20:10:39.520585" } ] } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' /v1/security/permissions: get: operationId: getPermissions summary: Return a list of all permissions for a company description: Returns a list of all permissions for a company. tags: - security security: - oauth2: [] parameters: - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PermissionsResponse' example: | { "data": [ { "id": "1", "object_id": "12", "object_type": "Chain", "object_name": "Regression Test", "name": "read", "user_groups": [ { "id": "1", "name": "Admins", "default": true, "created_at": "2018-03-14 20:10:39.520585" } ] } ] } '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/SingleError' '/v1/dataprep/mapping_groups/{mappingGroupGuid}/update_rules': post: operationId: updateRules summary: Update mapping group rules description: 'Update a mapping group ruleset, specified by the mapping group GUID.' tags: - dataprep parameters: - name: mappingGroupGuid description: The GUID of the Mapping Group. in: path required: true schema: type: string example: 4ef64a1e-55da-4071-8168-d3387d99035d requestBody: content: multipart/form-data: schema: type: object properties: mode: type: string enum: - published - draft - both nullable: false file: type: string format: binary required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/MappingRuleUploadResult' example: | { "mappingRules": [ { "id": 0, "mappingGroupGuid": "4ef64a1e-55da-4071-8168-d3387d99035d", "type": "LIKE", "source": "", "target": "", "position": 0, "conditions": { "combinator": "AND", "rules": [ { "combinator": "AND", "rules": [ { "field": "name", "operator": "NULL", "value": [ "Monthly Audit" ] } ] } ] } } ], "errors": [ { "error": "", "lineNumber": null } ] } '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/MappingRuleUploadResult' '401': description: Unauthorized content: application/json: schema: type: object '/v1/dataprep/mapping_groups/{mappingGroupGuid}/publish': post: operationId: publish summary: Publish draft version of a mapping group description: 'Publish a draft version of a mapping group, specified by the mapping group GUID.' tags: - dataprep parameters: - name: mappingGroupGuid description: The GUID of the Mapping Group. in: path required: true schema: type: string example: 4ef64a1e-55da-4071-8168-d3387d99035d responses: '200': description: OK content: application/json: schema: type: object example: | {} '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorWithoutLineNumber' '401': description: Unauthorized content: text/plain: schema: type: string security: [] x-explorer-enabled: true x-proxy-enabled: true x-samples-enabled: true x-samples-languages: - curl - node - ruby - javascript - python