elyra.yaml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. #
  2. # Copyright 2018-2022 Elyra Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. openapi: 3.0.1
  17. info:
  18. title: Elyra API
  19. description: The API for the Elyra extensions.
  20. contact:
  21. name: Elyra
  22. url: https://github.com/elyra-ai/elyra
  23. version: "1"
  24. paths:
  25. /elyra/elyra.yaml:
  26. get:
  27. tags:
  28. - api
  29. summary: Get API information (yaml).
  30. responses:
  31. 200:
  32. description: Returns a swagger specification in yaml.
  33. content:
  34. text/x-yaml:
  35. schema:
  36. type: string
  37. 500:
  38. description: Unexpected error.
  39. /elyra/schemaspace:
  40. get:
  41. tags:
  42. - schemaspace
  43. summary: Get current schemaspace names.
  44. responses:
  45. 200:
  46. description: Returns the list of current schemaspace names.
  47. content:
  48. application/json:
  49. schema:
  50. type: object
  51. properties:
  52. schemaspaces:
  53. items: {
  54. type: string
  55. }
  56. description: The list of current schemaspace names.
  57. 500:
  58. description: Unexpected error.
  59. /elyra/schemaspace/{schemaspace_name_or_id}:
  60. get:
  61. tags:
  62. - schemaspace
  63. summary: Get properties for a given schemaspace.
  64. parameters:
  65. - name: schemaspace_name_or_id
  66. in: path
  67. description: The name or id of the schemaspace.
  68. required: true
  69. schema:
  70. type: string
  71. responses:
  72. 200:
  73. description: Returns the single-valued properties of the current schemaspace.
  74. content:
  75. application/json:
  76. schema:
  77. type: object
  78. allOf:
  79. - $ref: '#/components/schemas/SchemaspaceResource'
  80. 404:
  81. description: Schemaspace not found.
  82. content: {}
  83. 500:
  84. description: Unexpected error.
  85. /elyra/schema/{schemaspace_name_or_id}:
  86. get:
  87. tags:
  88. - schema
  89. summary: Get schemas for a given schemaspace
  90. parameters:
  91. - name: schemaspace_name_or_id
  92. in: path
  93. description: The name or id of the schemaspace
  94. required: true
  95. schema:
  96. type: string
  97. responses:
  98. 200:
  99. description: Returns the schema instances for a given schemaspace name or id.
  100. content:
  101. application/json:
  102. schema:
  103. type: object
  104. properties:
  105. schemaspace:
  106. type: array
  107. description: The schema instances within the schemaspace.
  108. items:
  109. $ref: '#/components/schemas/SchemaResource'
  110. 404:
  111. description: Schemaspace not found.
  112. content: {}
  113. 500:
  114. description: Unexpected error.
  115. /elyra/schema/{schemaspace_name_or_id}/{resource}:
  116. get:
  117. tags:
  118. - schema
  119. summary: Get a given schema instance from a given schemaspace name or id.
  120. parameters:
  121. - name: schemaspace_name_or_id
  122. in: path
  123. description: The name or id of the schemaspace.
  124. required: true
  125. schema:
  126. type: string
  127. - name: resource
  128. in: path
  129. description: The name of the resource in a given schemaspace.
  130. required: true
  131. schema:
  132. type: string
  133. responses:
  134. 200:
  135. description: The named schema instance within the schemaspace.
  136. content:
  137. application/json:
  138. schema:
  139. $ref: '#/components/schemas/SchemaResource'
  140. 404:
  141. description: Schemaspace/Resource not found.
  142. content: {}
  143. 500:
  144. description: Unexpected error.
  145. /elyra/metadata/{schemaspace_name_or_id}:
  146. get:
  147. tags:
  148. - metadata
  149. summary: Get metadata for a given schemaspace name or id.
  150. parameters:
  151. - name: schemaspace_name_or_id
  152. in: path
  153. description: The name or id of the schemaspace.
  154. required: true
  155. schema:
  156. type: string
  157. responses:
  158. 200:
  159. description: The metadata instances within the schemaspace.
  160. content:
  161. application/json:
  162. schema:
  163. type: object
  164. properties:
  165. schemaspace:
  166. type: array
  167. description: The name of the schemaspace.
  168. items:
  169. $ref: '#/components/schemas/MetadataResource'
  170. 400:
  171. description: An error (validation, syntax) occurred relative to the instance data.
  172. 404:
  173. description: Schemaspace not found.
  174. content: {}
  175. 500:
  176. description: Unexpected error.
  177. post:
  178. tags:
  179. - metadata
  180. summary: Create a metadata instance in a given schemaspace.
  181. parameters:
  182. - name: schemaspace_name_or_id
  183. in: path
  184. description: The name or id of the schemaspace.
  185. required: true
  186. schema:
  187. type: string
  188. requestBody:
  189. required: true
  190. content:
  191. application/json:
  192. schema:
  193. $ref: '#/components/schemas/MetadataResourceBody'
  194. responses:
  195. 201:
  196. description: The newly-created metadata instance.
  197. content:
  198. application/json:
  199. schema:
  200. $ref: '#/components/schemas/MetadataResource'
  201. headers:
  202. Location:
  203. description: Resource endpoint
  204. schema:
  205. type: string
  206. format: url
  207. 400:
  208. description: An error (validation, syntax) occurred relative to the instance data.
  209. 404:
  210. description: Schemaspace not found.
  211. 409:
  212. description: Resource already exists.
  213. 500:
  214. description: Unexpected error.
  215. /elyra/metadata/{schemaspace_name_or_id}/{resource}:
  216. get:
  217. tags:
  218. - metadata
  219. summary: Get a given metadata instance from a given schemaspace name or id.
  220. parameters:
  221. - name: schemaspace_name_or_id
  222. in: path
  223. description: The name or id of the schemaspace.
  224. required: true
  225. schema:
  226. type: string
  227. - name: resource
  228. in: path
  229. description: The name of the resource in a given schemaspace.
  230. required: true
  231. schema:
  232. type: string
  233. responses:
  234. 200:
  235. description: The named metadata instance within the schemaspace.
  236. content:
  237. application/json:
  238. schema:
  239. $ref: '#/components/schemas/MetadataResource'
  240. 400:
  241. description: An error (validation, syntax) occurred relative to the instance data.
  242. 404:
  243. description: Schemaspace/Resource not found.
  244. content: {}
  245. 500:
  246. description: Unexpected error.
  247. put:
  248. tags:
  249. - metadata
  250. summary: Update a given metadata resource within a given schemaspace.
  251. parameters:
  252. - name: schemaspace_name_or_id
  253. in: path
  254. description: The name or id of the schemaspace.
  255. required: true
  256. schema:
  257. type: string
  258. - name: resource
  259. in: path
  260. description: The name of the resource in a given schemaspace.
  261. required: true
  262. schema:
  263. type: string
  264. requestBody:
  265. required: true
  266. content:
  267. application/json:
  268. schema:
  269. $ref: '#/components/schemas/MetadataResourceBody'
  270. responses:
  271. 200:
  272. description: The updated metadata instance.
  273. content:
  274. application/json:
  275. schema:
  276. $ref: '#/components/schemas/MetadataResource'
  277. 400:
  278. description: An error (validation, syntax, not supported) occurred relative to the instance data.
  279. 404:
  280. description: The resource to update was not found.
  281. 500:
  282. description: Unexpected error.
  283. delete:
  284. tags:
  285. - metadata
  286. summary: Delete a given metadata resource from a given schemaspace.
  287. parameters:
  288. - name: schemaspace_name_or_id
  289. in: path
  290. description: The name or id of the schemaspace.
  291. required: true
  292. schema:
  293. type: string
  294. - name: resource
  295. in: path
  296. description: The name of the resource in a given schemaspace.
  297. required: true
  298. schema:
  299. type: string
  300. responses:
  301. 204:
  302. description: The resource was successfully deleted.
  303. 400:
  304. description: An error (validation, syntax) occurred relative to the instance data.
  305. 403:
  306. description: Deletion of the resource is not permitted.
  307. 404:
  308. description: The resource was not found.
  309. 500:
  310. description: Unexpected error.
  311. /elyra/pipeline/components/cache:
  312. put:
  313. tags:
  314. - component
  315. summary: Initiates a refresh of the entire component cache.
  316. requestBody:
  317. required: true
  318. content:
  319. application/json:
  320. schema:
  321. $ref: '#/components/schemas/ComponentCacheResource'
  322. responses:
  323. 204:
  324. description: The refresh request was initiated successfully.
  325. 400:
  326. description: Invalid request, malformed body.
  327. 409:
  328. description: Cache refresh is in progress - try request later.
  329. /elyra/pipeline/components/cache/{catalog}:
  330. parameters:
  331. - name: catalog
  332. in: path
  333. description: The name of the component catalog to refresh
  334. required: true
  335. schema:
  336. type: string
  337. put:
  338. tags:
  339. - component
  340. summary: Initiates a refresh of the given component catalog.
  341. requestBody:
  342. required: true
  343. content:
  344. application/json:
  345. schema:
  346. $ref: '#/components/schemas/ComponentCacheResource'
  347. responses:
  348. 204:
  349. description: The refresh request was initiated successfully.
  350. 400:
  351. description: Invalid request, malformed body.
  352. 404:
  353. description: Catalog not found.
  354. /elyra/pipeline/components/{processor}:
  355. parameters:
  356. - name: processor
  357. in: path
  358. description: The name of the runtime processor. Will match the runtime schema name (e.g., "kfp", "airflow", etc.).
  359. required: true
  360. schema:
  361. type: string
  362. get:
  363. tags:
  364. - pipeline
  365. - component
  366. summary: Fetch all components associated with the given runtime processor.
  367. responses:
  368. 200:
  369. description: The components relative to the given runtime processor for use in the Elyra front-end.
  370. content:
  371. application/json:
  372. schema:
  373. type: object
  374. 400:
  375. description: Invalid runtime processor.
  376. /elyra/pipeline/components/{processor}/{component_id}/properties:
  377. parameters:
  378. - name: processor
  379. in: path
  380. description: The name of the runtime processor. Will match the runtime schema name (e.g., "kfp", "airflow", etc.).
  381. required: true
  382. schema:
  383. type: string
  384. - name: component_id
  385. in: path
  386. description: The component identifier - composed of the catalog connector schema name, ":", and the component's hash.
  387. required: true
  388. schema:
  389. type: string
  390. get:
  391. tags:
  392. - pipeline
  393. - component
  394. summary: Fetch a component's properties for use in the Elyra front-end
  395. responses:
  396. 200:
  397. description: JSON containing the component definition.
  398. content:
  399. application/json:
  400. schema:
  401. type: object
  402. 400:
  403. description: Invalid runtime processor or component ID.
  404. /elyra/pipeline/{processor}/properties:
  405. parameters:
  406. - name: processor
  407. in: path
  408. description: The name of the runtime processor. Will match the RuntimeType string form (e.g., "KUBEFLOW_PIPELINES", "AIRFLOW", etc.).
  409. required: true
  410. schema:
  411. type: string
  412. get:
  413. tags:
  414. - pipeline
  415. summary: Fetch a pipeline's properties for use in the Elyra front-end
  416. responses:
  417. 200:
  418. description: JSON containing the pipeline properties definition.
  419. content:
  420. application/json:
  421. schema:
  422. type: object
  423. 400:
  424. description: Invalid runtime processor.
  425. /elyra/pipeline/export:
  426. post:
  427. tags:
  428. - pipeline
  429. summary: Export a pipeline.
  430. requestBody:
  431. required: true
  432. content:
  433. application/json:
  434. schema:
  435. $ref: '#/components/schemas/PipelineExportBodyPost'
  436. responses:
  437. 201:
  438. description: The pipeline export response.
  439. headers:
  440. Location:
  441. description: The resource endpoint.
  442. schema:
  443. type: string
  444. format: url
  445. content:
  446. application/json:
  447. schema:
  448. type: object
  449. properties:
  450. export_path:
  451. type: string
  452. description: The pipeline export path.
  453. /elyra/pipeline/runtimes/types:
  454. get:
  455. tags:
  456. - pipeline
  457. summary: Get the set of static resources associated with currently configured runtime types
  458. responses:
  459. 200:
  460. description: The resources associated with the currently configured runtime types
  461. content:
  462. application/json:
  463. schema:
  464. type: object
  465. properties:
  466. runtime_types:
  467. type: array
  468. description: The list of resources associated with each configured runtime type.
  469. items:
  470. $ref: '#/components/schemas/RuntimeTypeResources'
  471. /elyra/pipeline/schedule:
  472. post:
  473. tags:
  474. - pipeline
  475. summary: Execute pipelines as batch jobs.
  476. requestBody:
  477. required: true
  478. content:
  479. application/json:
  480. schema:
  481. $ref: '#/components/schemas/PipelineResource'
  482. responses:
  483. 200:
  484. description: The pipeline processor response.
  485. content:
  486. application/json:
  487. schema:
  488. $ref: '#/components/schemas/PipelineScheduleResponse'
  489. /elyra/pipeline/validate:
  490. post:
  491. tags:
  492. - pipeline
  493. summary: Validate a pipeline.
  494. requestBody:
  495. required: true
  496. content:
  497. application/json:
  498. schema:
  499. $ref: '#/components/schemas/PipelineResource'
  500. responses:
  501. 200:
  502. description: The pipeline validation response.
  503. content:
  504. application/json:
  505. schema:
  506. $ref: '#/components/schemas/PipelineValidationResponse'
  507. /elyra/contents/properties/{filepath}:
  508. get:
  509. tags:
  510. - contents
  511. summary: Get a dictionary of properties for a file.
  512. parameters:
  513. - name: filepath
  514. in: path
  515. description: The path to the file to be parsed, relative to the JupyterLab server root directory.
  516. required: true
  517. schema:
  518. type: string
  519. responses:
  520. 200:
  521. description: The dictionary of properties found while parsing the file.
  522. content:
  523. application/json:
  524. schema:
  525. type: object
  526. description: A dictionary of properties.
  527. allOf:
  528. - $ref: '#/components/schemas/ContentsPropertiesResource'
  529. 400:
  530. description: File is a directory.
  531. 404:
  532. description: File not found.
  533. components:
  534. schemas:
  535. MetadataResourceBody:
  536. description: The set of properties comprising the request body for POST and PUT requests.
  537. required:
  538. - display_name
  539. - schema_name
  540. - metadata
  541. type: object
  542. properties:
  543. name:
  544. type: string
  545. description: The canonical name of the resource. Will be derived from display_name if not provided on POST.
  546. display_name:
  547. type: string
  548. description: The display name of the resource.
  549. schema_name:
  550. type: string
  551. description: The schema name used to validate the resource.
  552. metadata:
  553. type: object
  554. properties: {}
  555. description: A free-form dictionary consisting of additional information
  556. about the resource.
  557. MetadataResource:
  558. description: The set of properties comprising a metadata resource entity.
  559. required:
  560. - name
  561. - display_name
  562. - schema_name
  563. - metadata
  564. type: object
  565. properties:
  566. name:
  567. type: string
  568. description: The canonical name of the metadata resource.
  569. display_name:
  570. type: string
  571. description: The display name of the metadata resource.
  572. schema_name:
  573. type: string
  574. description: The schema name used to validate the metadata resource.
  575. metadata:
  576. type: object
  577. properties: {}
  578. description: A free-form dictionary consisting of additional information
  579. about the resource.
  580. SchemaResource:
  581. description: The set of properties comprising a schema resource entity.
  582. required:
  583. - name
  584. - schemaspace
  585. type: object
  586. properties:
  587. schemaspace:
  588. type: string
  589. description: The schemaspace name or id of the schema resource.
  590. name:
  591. type: string
  592. description: The canonical name of the schema resource.
  593. title:
  594. type: string
  595. description: The title of the schema resource.
  596. properties:
  597. type: object
  598. properties: {}
  599. description: A free-form dictionary consisting of additional information
  600. about the resource.
  601. SchemaspaceResource:
  602. description: The set of properties comprising a schemaspace resource entity.
  603. required:
  604. - name
  605. - id
  606. - display_name
  607. - description
  608. type: object
  609. properties:
  610. name:
  611. type: string
  612. description: The canonical name of the schemaspace resource.
  613. id:
  614. type: string
  615. description: The id of the schemaspace resource.
  616. display_name:
  617. type: string
  618. description: The display name of the schemaspace resource.
  619. description:
  620. type: string
  621. description: The description of the schemaspace resource.
  622. PipelineResource:
  623. description: The set of properties comprising a pipeline resource entity.
  624. required:
  625. - primary_pipeline
  626. - pipelines
  627. type: object
  628. properties:
  629. primary_pipeline:
  630. type: string
  631. description: The primary pipeline id.
  632. pipelines:
  633. type: array
  634. description: A set of pipeline definitions.
  635. items:
  636. type: object
  637. properties:
  638. id:
  639. type: string
  640. description: The unique identifier of the pipeline.
  641. name:
  642. type: string
  643. description: The name of the pipeline.
  644. nodes:
  645. type: array
  646. description: The set of nodes in the pipeline.
  647. items:
  648. type: object
  649. properties: {}
  650. description: The node configuration.
  651. runtime:
  652. type: string
  653. description: The runtime type for the pipeline.
  654. runtime-config:
  655. type: object
  656. properties: {}
  657. description: The runtime configuration that should be used to submit the pipeline.
  658. PipelineScheduleResponse:
  659. description: The set of properties comprising a pipeline processor response entity.
  660. required:
  661. - run_url
  662. - object_storage_url
  663. - object_storage_path
  664. type: object
  665. properties:
  666. run_url:
  667. type: string
  668. description: The runtime URL to access the pipeline experiment.
  669. object_storage_url:
  670. type: string
  671. description: The object storage URL to access the pipeline outputs
  672. and processed notebooks.
  673. object_storage_path:
  674. type: string
  675. description: The object storage working directory path where the pipeline outputs
  676. and processed notebooks are located.
  677. PipelineExportBodyPost:
  678. description: The set of properties comprising the request body for POST request.
  679. required:
  680. - pipeline
  681. - export_format
  682. - export_path
  683. - overwrite
  684. type: object
  685. properties:
  686. pipeline:
  687. $ref: '#/components/schemas/PipelineResource'
  688. export_format:
  689. type: string
  690. description: The pipeline export format.
  691. export_path:
  692. type: string
  693. description: The pipeline export path.
  694. overwrite:
  695. type: boolean
  696. description: Determines if the existing export should be overwritten.
  697. PipelineValidationResponse:
  698. description: The set of properties comprising a pipeline validation response entity.
  699. required:
  700. - title
  701. - description
  702. - issues
  703. type: object
  704. properties:
  705. title:
  706. type: string
  707. description: The title relative to the validation response.
  708. description:
  709. type: string
  710. description: The description relative to the validation response.
  711. issues:
  712. type: array
  713. description: The issues encountered during validation. This will be empty if no issues were encountered.
  714. items:
  715. type: object
  716. properties:
  717. severity:
  718. type: integer
  719. enum: [1, 2, 3, 4]
  720. description: The numeric value representing the severity of the issue - Error (1), Warning (2), Information (3), Hint (4)
  721. source:
  722. type: string
  723. description: The highlevel source of the validation issue.
  724. type:
  725. type: string
  726. description: Indicator of the category of the issue (e.g., "invalidNodeProperty", "invalidRuntime", etc.).
  727. message:
  728. type: string
  729. description: The message corresponding to the validation issue.
  730. data:
  731. type: object
  732. description: JSON consisting of information pertaining to where the issue occurred.
  733. RuntimeTypeResources:
  734. description: The set of properties comprising a runtime type resource entity.
  735. required:
  736. - id
  737. - display_name
  738. - icon
  739. - export_file_types
  740. type: object
  741. properties:
  742. id:
  743. type: string
  744. description: The id of the runtime type resource.
  745. display_name:
  746. type: string
  747. description: The display name of the runtime type resource.
  748. icon:
  749. type: string
  750. description: The location (endpoint) in which the runtime type icon can be found.
  751. export_file_types:
  752. type: array
  753. description: The set of export file types this runtime type supports.
  754. items:
  755. type: object
  756. properties:
  757. id:
  758. type: string
  759. description: The supported file suffix
  760. display_name:
  761. type: string
  762. description: The label corresponding to the export file type
  763. ContentsPropertiesResource:
  764. description: The set of resources comprising the request body.
  765. required:
  766. - env_vars
  767. - inputs
  768. - outputs
  769. type: object
  770. properties:
  771. env_vars:
  772. type: object
  773. description: A dictionary with a key for each environment variable name found and a value corresponding to the variable value or null.
  774. additionalProperties:
  775. type: string
  776. inputs:
  777. type: array
  778. description: A list of input file names.
  779. items:
  780. type: string
  781. outputs:
  782. type: array
  783. description: A list of output file names.
  784. items:
  785. type: string
  786. ComponentCacheResource:
  787. description: The request body for refreshing the component cache.
  788. required:
  789. - action
  790. type: object
  791. properties:
  792. action:
  793. type: string
  794. description: The action to carry out on the cache. Only 'refresh' is supported.
  795. enum:
  796. - refresh