Allow multifile openapi spec

This commit is contained in:
ricardo 2022-04-29 21:54:21 -04:00
parent 84e2ce53bc
commit ad9250d776
33 changed files with 681 additions and 774 deletions

View file

@ -19,7 +19,9 @@
"bin": "n8n"
},
"scripts": {
"build": "tsc && cp -r ./src/UserManagement/email/templates ./dist/src/UserManagement/email; rsync -a --include='*/' --include={'*.yml','*.css'} --exclude='*' ./src/PublicApi/ ./dist/src/PublicApi/",
"build": "tsc; npm run build:emailTemplates; npm run build:openapi",
"build:emailTemplates": "cp -r ./src/UserManagement/email/templates ./dist/src/UserManagement/email",
"build:openapi": "rsync -a --include='*/' --include={'*.yml','swaggerTheme.css'} --exclude='*' ./src/PublicApi/ ./dist/src/PublicApi/; find ./dist/src/PublicApi/ -iname 'openapi.yml' -exec swagger-cli bundle {} --type yaml --outfile {} \\;",
"dev": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon\"",
"format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/cli/**/**.ts --write",
"lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/cli",
@ -145,6 +147,7 @@
"request-promise-native": "^1.0.7",
"sqlite3": "^5.0.2",
"sse-channel": "^3.1.1",
"swagger-cli": "^4.0.4",
"swagger-ui-express": "^4.3.0",
"tslib": "1.14.1",
"typeorm": "0.2.30",

View file

@ -24,789 +24,28 @@ tags:
description: Operations about workflow
paths:
/users:
post:
x-eov-operation-id: createUsers
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Invite a user
description: Invites a user to your instance. Only available for the instance owner.
operationId: createUser
requestBody:
description: Created user object.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserInformation'
required: true
responses:
"200":
description: A User object
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
x-eov-operation-id: getUsers
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Retrieve all users
description: Retrieve all users from your instance. Only available for the instance owner.
parameters:
- name: limit
in: query
description: The maximum number of items to return.
required: false
schema:
type: number
example: 100
default: 100
- name: cursor
in: query
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
required: false
style: form
schema:
type: string
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
- name: includeRole
in: query
required: false
style: form
description: Whether to include the role information the user object.
schema:
type: boolean
example: false
default: false
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/UserDetailsResponse'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
$ref: './spec/paths/Users.yml'
/users/{identifier}:
get:
x-eov-operation-id: getUser
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Get user by ID/Email
description: Retrieve a user from your instance. Only available for the instance owner.
operationId: getUser
parameters:
- name: identifier
in: path
description: The ID or email of the user.
required: true
schema:
type: string
format: identifier
- name: includeRole
in: query
required: false
schema:
type: boolean
example: true
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/UserInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
x-eov-operation-id: deleteUser
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Delete user by ID/Email
description: Deletes a user from your instance. Only available for the instance owner.
operationId: deleteUser
parameters:
- name: identifier
in: path
description: The ID if the user to be deleted.
required: true
schema:
type: string
format: identifier
- name: transferId
in: query
description: ID of the user to transfer workflows and credentials to. Must not be equal to the to-be-deleted user.
required: false
schema:
type: string
- name: includeRole
in: query
required: false
schema:
type: boolean
example: true
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/UserInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
$ref: './spec/paths/UserById.yml'
/executions:
get:
x-eov-operation-id: getExecutions
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Retrieve all executions
description: Retrieve all executions from your instance.
parameters:
- name: status
in: query
description: Status to filter the executions by.
required: false
schema:
type: string
enum: ['error', 'running', 'success', 'waiting']
- name: workflowId
in: query
description: Workflow to filter the executions by.
required: false
schema:
type: number
example: 1000
- name: limit
in: query
description: The maximum number of items to return.
required: false
schema:
type: number
example: 100
default: 100
- name: cursor
in: query
description: Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
required: false
style: form
schema:
type: string
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionDetailsResponse'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
$ref: './spec/paths/Executions.yml'
/executions/{executionId}:
get:
x-eov-operation-id: getExecution
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Retrieve an execution
description: Retrieve an execution from you instance.
parameters:
- name: executionId
in: path
description: The ID of the execution.
required: true
schema:
type: number
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
delete:
x-eov-operation-id: deleteExecution
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Delete an execution
description: Deletes an execution from your instance.
parameters:
- name: executionId
in: path
description: The ID of the execution to be deleted.
required: true
schema:
type: number
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/ExecutionInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
$ref: './spec/paths/ExecutionById.yml'
/workflows:
post:
x-eov-operation-id: createWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Create a workflow
description: Create a workflow in your instance.
requestBody:
description: Created user object.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
required: true
responses:
"200":
description: A User object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
x-eov-operation-id: getWorkflows
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Retrieve all workflows
description: Retrieve all workflows from your instance.
parameters:
- name: active
in: query
schema:
type: boolean
example: true
- name: tags
in: query
required: false
explode: false
schema:
type: string
example: test,production
- name: limit
in: query
description: The maximum number of items to return.
required: false
schema:
type: number
example: 100
default: 100
- name: cursor
in: query
description: Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
required: false
style: form
schema:
type: string
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowDetailsResponse'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
$ref: './spec/paths/Workflows.yml'
/workflows/{workflowId}:
get:
x-eov-operation-id: getWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Retrive all workflows
description: Retrieve all workflows from your instance.
parameters:
- name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
delete:
x-eov-operation-id: deleteWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Delete a workflow
description: Deletes a workflow from your instance.
parameters:
- name: workflowId
in: path
description: The ID of the workflow to be deleted.
required: true
schema:
type: number
responses:
"200":
description: Operation successful.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
"404":
description: User not found
put:
x-eov-operation-id: updateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Update a workflow
description: Update a workflow.
parameters:
- name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number
requestBody:
description: Updated workflow object.
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
required: true
responses:
"200":
description: Workflow object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
$ref: './spec/paths/WorkflowById.yml'
/workflows/{workflowId}/activate:
post:
x-eov-operation-id: activateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Activate a workflow
description: Active a workflow.
parameters:
- name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number
responses:
"200":
description: Workflow object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
$ref: './spec/paths/WorkflowByIdActivate.yml'
/workflows/{workflowId}/desactivate:
post:
x-eov-operation-id: desactivateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Desactivate a workflow
description: Desactivate a workflow.
parameters:
- name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number
responses:
"200":
description: Workflow object
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInformation'
"401":
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
$ref: './spec/paths/WorkflowByIdDesactivate.yml'
components:
schemas:
Error:
required:
- code
- description
- message
type: object
properties:
code:
type: string
message:
type: string
description:
type: string
UserInformation:
required:
- email
type: object
properties:
id:
type: string
readOnly: true
example: 123e4567-e89b-12d3-a456-426614174000
email:
type: string
format: email
example: john.doe@company.com
firstName:
maxLength: 32
type: string
description: User's first name
readOnly: true
example: john
lastName:
maxLength: 32
type: string
description: User's last name
readOnly: true
example: Doe
isPending:
type: boolean
description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
readOnly: true
createdAt:
type: string
description: Time the user was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the user was updated.
format: date-time
readOnly: true
globalRole:
$ref: '#/components/schemas/RoleInformation'
ExecutionDetailsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ExecutionInformation'
nextCursor:
type: string
description: Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
UserDetailsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/UserInformation'
nextCursor:
type: string
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
WorkflowDetailsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkflowInformation'
nextCursor:
type: string
description: Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
ExecutionInformation:
type: object
properties:
id:
type: number
example: 1000
data:
type: string
finished:
type: boolean
example: true
mode:
type: string
enum: ['cli', 'error', 'integrated', 'internal', 'manual', 'retry', 'trigger', 'webhook']
retryOf:
type: string
nullable: true
retrySuccessId:
type: string
nullable: true
example: 2
startedAt:
type: string
format: date-time
stoppedAt:
type: string
format: date-time
workflowId:
type: string
example: 1000
waitTill:
type: string
nullable: true
format: date-time
RoleInformation:
readOnly: true
type: object
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: owner
readOnly: true
scope:
type: string
readOnly: true
example: global
createdAt:
type: string
description: Time the role was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the role was updaded.
format: date-time
readOnly: true
TagInformation:
type: object
properties:
id:
type: string
example: 12
name:
type: string
example: Production
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
NodeInformation:
type: object
properties:
name:
type: string
example: Jira
type:
type: string
example: n8n-nodes-base.Jira
typeVersion:
type: number
example: 1
position:
type: array
items:
type: number
example: [-100, 80]
parameters:
type: object
example: { additionalProperties: {} }
credentials:
type: object
example: { jiraSoftwareCloudApi: { id: "35", name: "jiraApi"} }
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
WorkflowSettingInformation:
type: object
properties:
saveExecutionProgress:
type: boolean
saveManualExecutions:
type: boolean
saveDataErrorExecution:
type: string
enum: ['all', 'none']
saveDataSuccessExecution:
type: string
enum: ['all', 'none']
executionTimeout:
type: number
example: 3600
maxLength: 3600
errorWorkflow:
type: string
example: 10
description: The ID of the workflow that contains the error trigger node.
timezone:
type: string
example: America/New_York
WorkflowInformation:
type: object
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: Workflow 1
active:
type: boolean
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
nodes:
type: array
items:
$ref: '#/components/schemas/NodeInformation'
connections:
type: object
example: { main: [{node: "Jira", type: "main", index: 0}] }
settings:
$ref: '#/components/schemas/WorkflowSettingInformation'
staticData:
type: string
nullable: true
readOnly: true
example: "{ iterationId: 2 }"
tags:
type: array
items:
$ref: '#/components/schemas/TagInformation'
readOnly: true
$ref: './spec/schemas/_index.yml'
responses:
NotFound:
description: The specified resource was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
$ref: './spec/responses/_index.yml'
parameters:
$ref: './spec/parameters/_index.yml'
securitySchemes:
ApiKeyAuth:
type: apiKey

View file

@ -0,0 +1,8 @@
name: cursor
in: query
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
required: false
style: form
schema:
type: string
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View file

@ -0,0 +1,6 @@
name: executionId
in: path
description: The ID of the execution.
required: true
schema:
type: number

View file

@ -0,0 +1,6 @@
name: includeRole
in: query
required: false
schema:
type: boolean
example: true

View file

@ -0,0 +1,8 @@
name: limit
in: query
description: The maximum number of items to return.
required: false
schema:
type: number
example: 100
default: 100

View file

@ -0,0 +1,7 @@
name: identifier
in: path
description: The ID or email of the user.
required: true
schema:
type: string
format: identifier

View file

@ -0,0 +1,6 @@
name: workflowId
in: path
description: The ID of the workflow.
required: true
schema:
type: number

View file

@ -0,0 +1,12 @@
UserIdentifier:
$ref: './UserIdentifier.yml'
Cursor:
$ref: './Cursor.yml'
includeRole:
$ref: './IncludeRole.yml'
Limit:
$ref: './Limit.yml'
ExecutionId:
$ref: './ExecutionId.yml'
WorkflowId:
$ref: './WorkflowId.yml'

View file

@ -0,0 +1,40 @@
get:
x-eov-operation-id: getExecution
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Retrieve an execution
description: Retrieve an execution from you instance.
parameters:
- $ref: '../parameters/ExecutionId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/ExecutionInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'
delete:
x-eov-operation-id: deleteExecution
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Delete an execution
description: Deletes an execution from your instance.
parameters:
- $ref: '../parameters/ExecutionId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/ExecutionInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'

View file

@ -0,0 +1,35 @@
get:
x-eov-operation-id: getExecutions
x-eov-operation-handler: v1/handlers/executions
tags:
- Execution
summary: Retrieve all executions
description: Retrieve all executions from your instance.
parameters:
- name: status
in: query
description: Status to filter the executions by.
required: false
schema:
type: string
enum: ['error', 'running', 'success', 'waiting']
- name: workflowId
in: query
description: Workflow to filter the executions by.
required: false
schema:
type: number
example: 1000
- $ref: '../parameters/Limit.yml'
- $ref: '../parameters/Cursor.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/ExecutionDetailsResponse.yml'
"401":
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'

View file

@ -0,0 +1,38 @@
get:
x-eov-operation-id: getUser
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Get user by ID/Email
description: Retrieve a user from your instance. Only available for the instance owner.
parameters:
- $ref: '../parameters/UserIdentifier.yml'
- $ref: '../parameters/IncludeRole.yml'
responses:
'200':
$ref: '../responses/UserInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
delete:
x-eov-operation-id: deleteUser
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Delete user by ID/Email
description: Deletes a user from your instance. Only available for the instance owner.
operationId: deleteUser
parameters:
- $ref: '../parameters/UserIdentifier.yml'
- $ref: '../parameters/IncludeRole.yml'
- name: transferId
in: query
description: ID of the user to transfer workflows and credentials to. Must not be equal to the to-be-deleted user.
required: false
schema:
type: string
responses:
'200':
$ref: '../responses/UserInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View file

@ -0,0 +1,48 @@
post:
x-eov-operation-id: createUsers
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Invite a user
description: Invites a user to your instance. Only available for the instance owner.
operationId: createUser
requestBody:
description: Created user object.
content:
application/json:
schema:
type: array
items:
$ref: '../schemas/UserInformation.yml'
required: true
responses:
'200':
description: A User object
content:
application/json:
schema:
type: array
items:
$ref: '../schemas/UserInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
get:
x-eov-operation-id: getUsers
x-eov-operation-handler: v1/handlers/users
tags:
- User
summary: Retrieve all users
description: Retrieve all users from your instance. Only available for the instance owner.
parameters:
- $ref: '../parameters/Limit.yml'
- $ref: '../parameters/Cursor.yml'
- $ref: '../parameters/IncludeRole.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/UserDetailsResponse.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View file

@ -0,0 +1,65 @@
get:
x-eov-operation-id: getWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Retrive all workflows
description: Retrieve all workflows from your instance.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'
delete:
x-eov-operation-id: deleteWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Delete a workflow
description: Deletes a workflow from your instance.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
'404':
$ref: '../responses/NotFound.yml'
put:
x-eov-operation-id: updateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Update a workflow
description: Update a workflow.
parameters:
- $ref: '../parameters/WorkflowId.yml'
requestBody:
description: Updated workflow object.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
required: true
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View file

@ -0,0 +1,18 @@
post:
x-eov-operation-id: activateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Activate a workflow
description: Active a workflow.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View file

@ -0,0 +1,18 @@
post:
x-eov-operation-id: desactivateWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Desactivate a workflow
description: Desactivate a workflow.
parameters:
- $ref: '../parameters/WorkflowId.yml'
responses:
'200':
description: Workflow object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View file

@ -0,0 +1,54 @@
post:
x-eov-operation-id: createWorkflow
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Create a workflow
description: Create a workflow in your instance.
requestBody:
description: Created user object.
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
required: true
responses:
'200':
description: A User object
content:
application/json:
schema:
$ref: '../schemas/WorkflowInformation.yml'
'401':
$ref: '../responses/Unauthorized.yml'
get:
x-eov-operation-id: getWorkflows
x-eov-operation-handler: v1/handlers/workflows
tags:
- Workflow
summary: Retrieve all workflows
description: Retrieve all workflows from your instance.
parameters:
- name: active
in: query
schema:
type: boolean
example: true
- name: tags
in: query
required: false
explode: false
schema:
type: string
example: test,production
- $ref: '../parameters/Limit.yml'
- $ref: '../parameters/Cursor.yml'
responses:
'200':
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/WorkflowDetailsResponse.yml'
'401':
$ref: '../responses/Unauthorized.yml'

View file

@ -0,0 +1,5 @@
description: The specified resource was not found.
content:
application/json:
schema:
$ref: '../schemas/Error.yml'

View file

@ -0,0 +1,5 @@
description: Unauthorized
content:
application/json:
schema:
$ref: '../schemas/Error.yml'

View file

@ -0,0 +1,5 @@
description: Operation successful.
content:
application/json:
schema:
$ref: '../schemas/UserInformation.yml'

View file

@ -0,0 +1,6 @@
NotFound:
$ref: './NotFound.yml'
Unauthorized:
$ref: './Unauthorized.yml'
UserInformation:
$ref: './UserInformation.yml'

View file

@ -0,0 +1,13 @@
#error.yml
required:
- code
- description
- message
type: object
properties:
code:
type: string
message:
type: string
description:
type: string

View file

@ -0,0 +1,11 @@
type: object
properties:
data:
type: array
items:
$ref: './ExecutionInformation.yml'
nextCursor:
type: string
description: Paginate through executions by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View file

@ -0,0 +1,33 @@
type: object
properties:
id:
type: number
example: 1000
data:
type: string
finished:
type: boolean
example: true
mode:
type: string
enum: ['cli', 'error', 'integrated', 'internal', 'manual', 'retry', 'trigger', 'webhook']
retryOf:
type: string
nullable: true
retrySuccessId:
type: string
nullable: true
example: 2
startedAt:
type: string
format: date-time
stoppedAt:
type: string
format: date-time
workflowId:
type: string
example: 1000
waitTill:
type: string
nullable: true
format: date-time

View file

@ -0,0 +1,30 @@
type: object
properties:
name:
type: string
example: Jira
type:
type: string
example: n8n-nodes-base.Jira
typeVersion:
type: number
example: 1
position:
type: array
items:
type: number
example: [-100, 80]
parameters:
type: object
example: { additionalProperties: {} }
credentials:
type: object
example: { jiraSoftwareCloudApi: { id: "35", name: "jiraApi"} }
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true

View file

@ -0,0 +1,25 @@
readOnly: true
type: object
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: owner
readOnly: true
scope:
type: string
readOnly: true
example: global
createdAt:
type: string
description: Time the role was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the role was updaded.
format: date-time
readOnly: true

View file

@ -0,0 +1,16 @@
type: object
properties:
id:
type: string
example: 12
name:
type: string
example: Production
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true

View file

@ -0,0 +1,11 @@
type: object
properties:
data:
type: array
items:
$ref: './UserInformation.yml'
nextCursor:
type: string
description: Paginate through users by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View file

@ -0,0 +1,40 @@
required:
- email
type: object
properties:
id:
type: string
readOnly: true
example: 123e4567-e89b-12d3-a456-426614174000
email:
type: string
format: email
example: john.doe@company.com
firstName:
maxLength: 32
type: string
description: User's first name
readOnly: true
example: john
lastName:
maxLength: 32
type: string
description: User's last name
readOnly: true
example: Doe
isPending:
type: boolean
description: Whether the user finished setting up their account in response to the invitation (true) or not (false).
readOnly: true
createdAt:
type: string
description: Time the user was created.
format: date-time
readOnly: true
updatedAt:
type: string
description: Last time the user was updated.
format: date-time
readOnly: true
globalRole:
$ref: './RoleInformation.yml'

View file

@ -0,0 +1,11 @@
type: object
properties:
data:
type: array
items:
$ref: './WorkflowInformation.yml'
nextCursor:
type: string
description: Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.
nullable: true
example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA

View file

@ -0,0 +1,39 @@
type: object
properties:
id:
type: number
readOnly: true
example: 1
name:
type: string
example: Workflow 1
active:
type: boolean
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
nodes:
type: array
items:
$ref: './NodeInformation.yml'
connections:
type: object
example: { main: [{node: "Jira", type: "main", index: 0}] }
settings:
$ref: './WorkflowSettingInformation.yml'
staticData:
type: string
nullable: true
readOnly: true
example: "{ iterationId: 2 }"
tags:
type: array
items:
$ref: './TagInformation.yml'
readOnly: true

View file

@ -0,0 +1,23 @@
type: object
properties:
saveExecutionProgress:
type: boolean
saveManualExecutions:
type: boolean
saveDataErrorExecution:
type: string
enum: ['all', 'none']
saveDataSuccessExecution:
type: string
enum: ['all', 'none']
executionTimeout:
type: number
example: 3600
maxLength: 3600
errorWorkflow:
type: string
example: 10
description: The ID of the workflow that contains the error trigger node.
timezone:
type: string
example: America/New_York

View file

@ -0,0 +1,23 @@
Error:
$ref: './Error.yml'
ExecutionInformation:
$ref: './ExecutionInformation.yml'
NodeInformation:
$ref: './NodeInformation.yml'
RoleInformation:
$ref: './RoleInformation.yml'
TagInformation:
$ref: './TagInformation.yml'
UserInformation:
$ref: './UserInformation.yml'
WorkflowInformation:
$ref: './WorkflowInformation.yml'
WorkflowSettingInformation:
$ref: './WorkflowSettingInformation.yml'
UserDetailsResponse:
$ref: './UserDetailsResponse.yml'
ExecutionDetailsResponse:
$ref: './ExecutionDetailsResponse.yml'
WorkflowDetailsResponse:
$ref: './WorkflowDetailsResponse.yml'