|
3673 | 3673 | ], |
3674 | 3674 | "type": "object" |
3675 | 3675 | }, |
| 3676 | + "WorkflowSlugConflictResponse": { |
| 3677 | + "properties": { |
| 3678 | + "code": { |
| 3679 | + "enum": [ |
| 3680 | + "DUPLICATE_SLUG" |
| 3681 | + ], |
| 3682 | + "type": "string" |
| 3683 | + }, |
| 3684 | + "details": { |
| 3685 | + "properties": { |
| 3686 | + "existingWorkflowId": { |
| 3687 | + "description": "UUID of the workflow that already uses this slug, if known.", |
| 3688 | + "type": "string" |
| 3689 | + }, |
| 3690 | + "slug": { |
| 3691 | + "description": "The slug that collided.", |
| 3692 | + "type": "string" |
| 3693 | + } |
| 3694 | + }, |
| 3695 | + "required": [ |
| 3696 | + "slug" |
| 3697 | + ], |
| 3698 | + "type": "object" |
| 3699 | + }, |
| 3700 | + "message": { |
| 3701 | + "type": "string" |
| 3702 | + } |
| 3703 | + }, |
| 3704 | + "required": [ |
| 3705 | + "message", |
| 3706 | + "code", |
| 3707 | + "details" |
| 3708 | + ], |
| 3709 | + "type": "object" |
| 3710 | + }, |
3676 | 3711 | "WorkflowStringInput": { |
3677 | 3712 | "properties": { |
3678 | 3713 | "default": { |
|
9854 | 9889 | } |
9855 | 9890 | }, |
9856 | 9891 | "description": "Invalid request" |
| 9892 | + }, |
| 9893 | + "409": { |
| 9894 | + "content": { |
| 9895 | + "application/json": { |
| 9896 | + "schema": { |
| 9897 | + "$ref": "#/components/schemas/WorkflowSlugConflictResponse" |
| 9898 | + } |
| 9899 | + } |
| 9900 | + }, |
| 9901 | + "description": "Workflow slug already exists in this workspace" |
9857 | 9902 | } |
9858 | 9903 | }, |
9859 | 9904 | "summary": "Create a workflow", |
|
9862 | 9907 | ] |
9863 | 9908 | } |
9864 | 9909 | }, |
| 9910 | + "/v1/workspaces/{workspaceId}/workflows/slug/{slug}": { |
| 9911 | + "get": { |
| 9912 | + "description": "Gets a workflow by its slug within the workspace.", |
| 9913 | + "operationId": "getWorkflowBySlug", |
| 9914 | + "parameters": [ |
| 9915 | + { |
| 9916 | + "description": "ID of the workspace", |
| 9917 | + "in": "path", |
| 9918 | + "name": "workspaceId", |
| 9919 | + "required": true, |
| 9920 | + "schema": { |
| 9921 | + "type": "string" |
| 9922 | + } |
| 9923 | + }, |
| 9924 | + { |
| 9925 | + "description": "Slug of the workflow", |
| 9926 | + "in": "path", |
| 9927 | + "name": "slug", |
| 9928 | + "required": true, |
| 9929 | + "schema": { |
| 9930 | + "type": "string" |
| 9931 | + } |
| 9932 | + } |
| 9933 | + ], |
| 9934 | + "responses": { |
| 9935 | + "200": { |
| 9936 | + "content": { |
| 9937 | + "application/json": { |
| 9938 | + "schema": { |
| 9939 | + "$ref": "#/components/schemas/Workflow" |
| 9940 | + } |
| 9941 | + } |
| 9942 | + }, |
| 9943 | + "description": "OK response" |
| 9944 | + }, |
| 9945 | + "400": { |
| 9946 | + "content": { |
| 9947 | + "application/json": { |
| 9948 | + "schema": { |
| 9949 | + "$ref": "#/components/schemas/ErrorResponse" |
| 9950 | + } |
| 9951 | + } |
| 9952 | + }, |
| 9953 | + "description": "Invalid request" |
| 9954 | + }, |
| 9955 | + "404": { |
| 9956 | + "content": { |
| 9957 | + "application/json": { |
| 9958 | + "schema": { |
| 9959 | + "$ref": "#/components/schemas/ErrorResponse" |
| 9960 | + } |
| 9961 | + } |
| 9962 | + }, |
| 9963 | + "description": "Resource not found" |
| 9964 | + } |
| 9965 | + }, |
| 9966 | + "summary": "Get a workflow by slug", |
| 9967 | + "tags": [ |
| 9968 | + "Workflows" |
| 9969 | + ] |
| 9970 | + } |
| 9971 | + }, |
| 9972 | + "/v1/workspaces/{workspaceId}/workflows/slug/{slug}/runs": { |
| 9973 | + "post": { |
| 9974 | + "description": "Creates a new run for a workflow identified by slug.", |
| 9975 | + "operationId": "createWorkflowRunBySlug", |
| 9976 | + "parameters": [ |
| 9977 | + { |
| 9978 | + "description": "ID of the workspace", |
| 9979 | + "in": "path", |
| 9980 | + "name": "workspaceId", |
| 9981 | + "required": true, |
| 9982 | + "schema": { |
| 9983 | + "type": "string" |
| 9984 | + } |
| 9985 | + }, |
| 9986 | + { |
| 9987 | + "description": "Slug of the workflow", |
| 9988 | + "in": "path", |
| 9989 | + "name": "slug", |
| 9990 | + "required": true, |
| 9991 | + "schema": { |
| 9992 | + "type": "string" |
| 9993 | + } |
| 9994 | + } |
| 9995 | + ], |
| 9996 | + "requestBody": { |
| 9997 | + "content": { |
| 9998 | + "application/json": { |
| 9999 | + "schema": { |
| 10000 | + "properties": { |
| 10001 | + "inputs": { |
| 10002 | + "additionalProperties": true, |
| 10003 | + "description": "Input values for the workflow run.", |
| 10004 | + "type": "object" |
| 10005 | + } |
| 10006 | + }, |
| 10007 | + "required": [ |
| 10008 | + "inputs" |
| 10009 | + ], |
| 10010 | + "type": "object" |
| 10011 | + } |
| 10012 | + } |
| 10013 | + }, |
| 10014 | + "required": true |
| 10015 | + }, |
| 10016 | + "responses": { |
| 10017 | + "201": { |
| 10018 | + "content": { |
| 10019 | + "application/json": { |
| 10020 | + "schema": { |
| 10021 | + "$ref": "#/components/schemas/WorkflowRun" |
| 10022 | + } |
| 10023 | + } |
| 10024 | + }, |
| 10025 | + "description": "Resource created successfully" |
| 10026 | + }, |
| 10027 | + "400": { |
| 10028 | + "content": { |
| 10029 | + "application/json": { |
| 10030 | + "schema": { |
| 10031 | + "$ref": "#/components/schemas/ErrorResponse" |
| 10032 | + } |
| 10033 | + } |
| 10034 | + }, |
| 10035 | + "description": "Invalid request" |
| 10036 | + }, |
| 10037 | + "404": { |
| 10038 | + "content": { |
| 10039 | + "application/json": { |
| 10040 | + "schema": { |
| 10041 | + "$ref": "#/components/schemas/ErrorResponse" |
| 10042 | + } |
| 10043 | + } |
| 10044 | + }, |
| 10045 | + "description": "Resource not found" |
| 10046 | + } |
| 10047 | + }, |
| 10048 | + "summary": "Create a workflow run by slug", |
| 10049 | + "tags": [ |
| 10050 | + "Workflows" |
| 10051 | + ] |
| 10052 | + } |
| 10053 | + }, |
9865 | 10054 | "/v1/workspaces/{workspaceId}/workflows/{workflowId}": { |
9866 | 10055 | "delete": { |
9867 | 10056 | "description": "Deletes a workflow.", |
|
10046 | 10235 | } |
10047 | 10236 | }, |
10048 | 10237 | "description": "Resource not found" |
| 10238 | + }, |
| 10239 | + "409": { |
| 10240 | + "content": { |
| 10241 | + "application/json": { |
| 10242 | + "schema": { |
| 10243 | + "$ref": "#/components/schemas/WorkflowSlugConflictResponse" |
| 10244 | + } |
| 10245 | + } |
| 10246 | + }, |
| 10247 | + "description": "Workflow slug already exists in this workspace" |
10049 | 10248 | } |
10050 | 10249 | }, |
10051 | 10250 | "summary": "Update a workflow", |
|
0 commit comments