|
| 1 | +openapi: 3.0.0 |
| 2 | +info: |
| 3 | + title: services API |
| 4 | + version: 0.1.0 |
| 5 | + description: 'Access to interactive and computational services' |
| 6 | +servers: |
| 7 | + - description: API server |
| 8 | + url: '/v0' |
| 9 | +paths: |
| 10 | + /services: |
| 11 | + get: |
| 12 | + description: Lists available services in catalog |
| 13 | + operationId: services_get |
| 14 | + parameters: |
| 15 | + - $ref: './openapi-services.yaml#/components/parameters/ServiceType' |
| 16 | + responses: |
| 17 | + "200": |
| 18 | + description: Returns list of services in catalog |
| 19 | + content: |
| 20 | + application/json: |
| 21 | + schema: |
| 22 | + $ref: '../../shared/schemas/services.yaml#/components/schemas/ServicesEnveloped' |
| 23 | + "401": |
| 24 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 25 | + |
| 26 | + default: |
| 27 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 28 | + |
| 29 | + /running_interactive_services: |
| 30 | + post: |
| 31 | + description: Starts an interactive service in the oSparc platform and returns its entrypoint |
| 32 | + operationId: running_interactive_services_post |
| 33 | + parameters: |
| 34 | + - $ref: './openapi-services.yaml#/components/parameters/ProjectIdQuery' |
| 35 | + - $ref: './openapi-services.yaml#/components/parameters/ServiceKey' |
| 36 | + - $ref: './openapi-services.yaml#/components/parameters/ServiceVersion' |
| 37 | + - $ref: './openapi-services.yaml#/components/parameters/AssignmentUuid' |
| 38 | + responses: |
| 39 | + "201": |
| 40 | + description: Succesfully created the service in the oSparc platform. Returns the location where the service runs. |
| 41 | + content: |
| 42 | + application/json: |
| 43 | + schema: |
| 44 | + $ref: '../../shared/schemas/running_service.yaml#/components/schemas/RunningServiceEnveloped' |
| 45 | + "400": |
| 46 | + description: Malformed function call, missing field |
| 47 | + content: |
| 48 | + application/json: |
| 49 | + schema: |
| 50 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 51 | + "401": |
| 52 | + description: Unauthorized access |
| 53 | + content: |
| 54 | + application/json: |
| 55 | + schema: |
| 56 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 57 | + "404": |
| 58 | + description: Service not found |
| 59 | + content: |
| 60 | + application/json: |
| 61 | + schema: |
| 62 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 63 | + "409": |
| 64 | + description: A service with the same uuid already exists |
| 65 | + content: |
| 66 | + application/json: |
| 67 | + schema: |
| 68 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 69 | + default: |
| 70 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 71 | + delete: |
| 72 | + description: Stops and removes all user interactive services from the platform |
| 73 | + operationId: running_interactive_services_delete_all |
| 74 | + responses: |
| 75 | + "204": |
| 76 | + description: Succesfully stopped and removed the service from the oSparc platform |
| 77 | + content: |
| 78 | + application/json: |
| 79 | + schema: |
| 80 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 81 | + default: |
| 82 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 83 | + |
| 84 | + /running_interactive_services/{service_uuid}: |
| 85 | + get: |
| 86 | + description: Succesfully returns if a service with the defined uuid is up and running |
| 87 | + operationId: running_interactive_services_get |
| 88 | + parameters: |
| 89 | + - $ref: './openapi-services.yaml#/components/parameters/ServiceUuid' |
| 90 | + responses: |
| 91 | + "204": |
| 92 | + description: OK service exists and runs |
| 93 | + content: |
| 94 | + application/json: |
| 95 | + schema: |
| 96 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 97 | + "400": |
| 98 | + description: Malformed function call, missing field |
| 99 | + content: |
| 100 | + application/json: |
| 101 | + schema: |
| 102 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 103 | + "404": |
| 104 | + description: Service not found |
| 105 | + content: |
| 106 | + application/json: |
| 107 | + schema: |
| 108 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 109 | + default: |
| 110 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 111 | + |
| 112 | + delete: |
| 113 | + description: Stops and removes an interactive service from the oSparc platform |
| 114 | + operationId: running_interactive_services_delete |
| 115 | + parameters: |
| 116 | + - $ref: './openapi-services.yaml#/components/parameters/ServiceUuid' |
| 117 | + responses: |
| 118 | + "204": |
| 119 | + description: Succesfully stopped and removed the service from the oSparc platform |
| 120 | + content: |
| 121 | + application/json: |
| 122 | + schema: |
| 123 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 124 | + "400": |
| 125 | + description: Malformed function call, missing field |
| 126 | + content: |
| 127 | + application/json: |
| 128 | + schema: |
| 129 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 130 | + "404": |
| 131 | + description: Service not found |
| 132 | + content: |
| 133 | + application/json: |
| 134 | + schema: |
| 135 | + $ref: '../../shared/schemas/error.yaml#/components/schemas/ErrorEnveloped' |
| 136 | + default: |
| 137 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 138 | + |
| 139 | + |
| 140 | + /computation/pipeline/{project_id}: |
| 141 | + put: |
| 142 | + description: "Update a pipeline using workbench section from given project" |
| 143 | + operationId: update_pipeline |
| 144 | + parameters: |
| 145 | + - $ref: './openapi-services.yaml#/components/parameters/ProjectId' |
| 146 | + responses: |
| 147 | + "204": |
| 148 | + description: Succesfully updated the pipeline |
| 149 | + default: |
| 150 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 151 | + |
| 152 | + /computation/pipeline/{project_id}/start: |
| 153 | + post: |
| 154 | + description: Starts a pipeline of a given project |
| 155 | + operationId: start_pipeline |
| 156 | + parameters: |
| 157 | + - $ref: './openapi-services.yaml#/components/parameters/ProjectId' |
| 158 | + responses: |
| 159 | + "200": |
| 160 | + description: Succesffully started the pipeline |
| 161 | + content: |
| 162 | + application/json: |
| 163 | + schema: |
| 164 | + $ref: './components/schemas/pipeline.yaml#/components/schemas/PipelineCreatedEnveloped' |
| 165 | + default: |
| 166 | + $ref: './openapi.yaml#/components/responses/DefaultErrorResponse' |
| 167 | + |
| 168 | + # PROJECT SERVICES ----------------------------------------------------------------- |
| 169 | +components: |
| 170 | + parameters: |
| 171 | + ProjectId: |
| 172 | + in: path |
| 173 | + name: project_id |
| 174 | + required: true |
| 175 | + description: the uuid of the project |
| 176 | + schema: |
| 177 | + type: string |
| 178 | + # format: uuid |
| 179 | + example: 123e4567-e89b-12d3-a456-426655440000 |
| 180 | + |
| 181 | + ProjectIdQuery: |
| 182 | + in: query |
| 183 | + name: project_id |
| 184 | + required: true |
| 185 | + description: the uuid of the project |
| 186 | + schema: |
| 187 | + type: string |
| 188 | + # format: uuid |
| 189 | + example: 123e4567-e89b-12d3-a456-426655440000 |
| 190 | + |
| 191 | + AssignmentUuid: |
| 192 | + in: query |
| 193 | + name: service_uuid |
| 194 | + description: The uuid to assign the service with |
| 195 | + required: true |
| 196 | + schema: |
| 197 | + type: string |
| 198 | + # format: uuid |
| 199 | + example: 123e4567-e89b-12d3-a456-426655440000 |
| 200 | + |
| 201 | + ServiceKey: |
| 202 | + in: query |
| 203 | + name: service_key |
| 204 | + description: The key (url) of the service |
| 205 | + required: true |
| 206 | + schema: |
| 207 | + type: string |
| 208 | + # format: url |
| 209 | + example: simcore/services/dynamic/3d-viewer |
| 210 | + |
| 211 | + ServiceType: |
| 212 | + in: query |
| 213 | + name: service_type |
| 214 | + description: | |
| 215 | + The service type: |
| 216 | + * computational - a computational service |
| 217 | + * interactive - an interactive service |
| 218 | + required: false |
| 219 | + schema: |
| 220 | + type: string |
| 221 | + enum: |
| 222 | + - computational |
| 223 | + - interactive |
| 224 | + example: computational |
| 225 | + |
| 226 | + ServiceUuid: |
| 227 | + in: path |
| 228 | + name: service_uuid |
| 229 | + description: The uuid of the service |
| 230 | + required: true |
| 231 | + schema: |
| 232 | + type: string |
| 233 | + # format: uuid |
| 234 | + example: 123e4567-e89b-12d3-a456-426655440000 |
| 235 | + |
| 236 | + ServiceVersion: |
| 237 | + in: query |
| 238 | + name: service_tag |
| 239 | + description: The tag/version of the service |
| 240 | + required: false |
| 241 | + schema: |
| 242 | + type: string |
| 243 | + example: "1.4" |
0 commit comments