api.yaml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975
  1. swagger: "2.0"
  2. info:
  3. title: Jupyter Server API
  4. description: Server API
  5. version: "5"
  6. contact:
  7. name: Jupyter Project
  8. url: https://jupyter.org
  9. # will be prefixed to all paths
  10. basePath: /
  11. produces:
  12. - application/json
  13. consumes:
  14. - application/json
  15. parameters:
  16. kernel:
  17. name: kernel_id
  18. required: true
  19. in: path
  20. description: kernel uuid
  21. type: string
  22. format: uuid
  23. session:
  24. name: session
  25. required: true
  26. in: path
  27. description: session uuid
  28. type: string
  29. format: uuid
  30. path:
  31. name: path
  32. required: true
  33. in: path
  34. description: file path
  35. type: string
  36. permissions:
  37. name: permissions
  38. type: string
  39. required: false
  40. in: query
  41. description: |
  42. JSON-serialized dictionary of `{"resource": ["action",]}`
  43. (dict of lists of strings) to check.
  44. The same dictionary structure will be returned,
  45. containing only the actions for which the user is authorized.
  46. checkpoint_id:
  47. name: checkpoint_id
  48. required: true
  49. in: path
  50. description: Checkpoint id for a file
  51. type: string
  52. section_name:
  53. name: section_name
  54. required: true
  55. in: path
  56. description: Name of config section
  57. type: string
  58. terminal_id:
  59. name: terminal_id
  60. required: true
  61. in: path
  62. description: ID of terminal session
  63. type: string
  64. paths:
  65. /api/:
  66. get:
  67. summary: Get the Jupyter Server version
  68. description: |
  69. This endpoint returns only the Jupyter Server version.
  70. It does not require any authentication.
  71. responses:
  72. 200:
  73. description: Jupyter Server version information
  74. schema:
  75. type: object
  76. properties:
  77. version:
  78. type: string
  79. description: The Jupyter Server version number as a string.
  80. /api/contents/{path}:
  81. parameters:
  82. - $ref: "#/parameters/path"
  83. get:
  84. summary: Get contents of file or directory
  85. description: "A client can optionally specify a type and/or format argument via URL parameter. When given, the Contents service shall return a model in the requested type and/or format. If the request cannot be satisfied, e.g. type=text is requested, but the file is binary, then the request shall fail with 400 and have a JSON response containing a 'reason' field, with the value 'bad format' or 'bad type', depending on what was requested."
  86. tags:
  87. - contents
  88. parameters:
  89. - name: type
  90. in: query
  91. description: File type ('file', 'directory')
  92. type: string
  93. enum:
  94. - file
  95. - directory
  96. - name: format
  97. in: query
  98. description: "How file content should be returned ('text', 'base64')"
  99. type: string
  100. enum:
  101. - text
  102. - base64
  103. - name: content
  104. in: query
  105. description: "Return content (0 for no content, 1 for return content)"
  106. type: integer
  107. - name: hash
  108. in: query
  109. description: "May return hash hexdigest string of content and the hash algorithm (0 for no hash - default, 1 for return hash). It may be ignored by the content manager."
  110. type: integer
  111. responses:
  112. 404:
  113. description: No item found
  114. 400:
  115. description: Bad request
  116. schema:
  117. type: object
  118. properties:
  119. error:
  120. type: string
  121. description: Error condition
  122. reason:
  123. type: string
  124. description: Explanation of error reason
  125. 200:
  126. description: Contents of file or directory
  127. headers:
  128. Last-Modified:
  129. description: Last modified date for file
  130. type: string
  131. format: dateTime
  132. schema:
  133. $ref: "#/definitions/Contents"
  134. 500:
  135. description: Model key error
  136. post:
  137. summary: Create a new file in the specified path
  138. description: "A POST to /api/contents/path creates a New untitled, empty file or directory. A POST to /api/contents/path with body {'copy_from': '/path/to/OtherNotebook.ipynb'} creates a new copy of OtherNotebook in path."
  139. tags:
  140. - contents
  141. parameters:
  142. - name: model
  143. in: body
  144. description: Path of file to copy
  145. schema:
  146. type: object
  147. properties:
  148. copy_from:
  149. type: string
  150. ext:
  151. type: string
  152. type:
  153. type: string
  154. responses:
  155. 201:
  156. description: File created
  157. headers:
  158. Location:
  159. description: URL for the new file
  160. type: string
  161. format: url
  162. schema:
  163. $ref: "#/definitions/Contents"
  164. 404:
  165. description: No item found
  166. 400:
  167. description: Bad request
  168. schema:
  169. type: object
  170. properties:
  171. error:
  172. type: string
  173. description: Error condition
  174. reason:
  175. type: string
  176. description: Explanation of error reason
  177. patch:
  178. summary: Rename a file or directory without re-uploading content
  179. tags:
  180. - contents
  181. parameters:
  182. - name: path
  183. in: body
  184. required: true
  185. description: New path for file or directory.
  186. schema:
  187. type: object
  188. properties:
  189. path:
  190. type: string
  191. format: path
  192. description: New path for file or directory
  193. responses:
  194. 200:
  195. description: Path updated
  196. headers:
  197. Location:
  198. description: Updated URL for the file or directory
  199. type: string
  200. format: url
  201. schema:
  202. $ref: "#/definitions/Contents"
  203. 400:
  204. description: No data provided
  205. schema:
  206. type: object
  207. properties:
  208. error:
  209. type: string
  210. description: Error condition
  211. reason:
  212. type: string
  213. description: Explanation of error reason
  214. put:
  215. summary: Save or upload file.
  216. description: "Saves the file in the location specified by name and path. PUT is very similar to POST, but the requester specifies the name, whereas with POST, the server picks the name."
  217. tags:
  218. - contents
  219. parameters:
  220. - name: model
  221. in: body
  222. description: New path for file or directory
  223. schema:
  224. type: object
  225. properties:
  226. name:
  227. type: string
  228. description: The new filename if changed
  229. path:
  230. type: string
  231. description: New path for file or directory
  232. type:
  233. type: string
  234. description: Path dtype ('notebook', 'file', 'directory')
  235. format:
  236. type: string
  237. description: File format ('json', 'text', 'base64')
  238. content:
  239. type: string
  240. description: The actual body of the document excluding directory type
  241. responses:
  242. 200:
  243. description: File saved
  244. headers:
  245. Location:
  246. description: Updated URL for the file or directory
  247. type: string
  248. format: url
  249. schema:
  250. $ref: "#/definitions/Contents"
  251. 201:
  252. description: Path created
  253. headers:
  254. Location:
  255. description: URL for the file or directory
  256. type: string
  257. format: url
  258. schema:
  259. $ref: "#/definitions/Contents"
  260. 400:
  261. description: No data provided
  262. schema:
  263. type: object
  264. properties:
  265. error:
  266. type: string
  267. description: Error condition
  268. reason:
  269. type: string
  270. description: Explanation of error reason
  271. delete:
  272. summary: Delete a file in the given path
  273. tags:
  274. - contents
  275. responses:
  276. 204:
  277. description: File deleted
  278. headers:
  279. Location:
  280. description: URL for the removed file
  281. type: string
  282. format: url
  283. /api/contents/{path}/checkpoints:
  284. parameters:
  285. - $ref: "#/parameters/path"
  286. get:
  287. summary: Get a list of checkpoints for a file
  288. description: List checkpoints for a given file. There will typically be zero or one results.
  289. tags:
  290. - contents
  291. responses:
  292. 404:
  293. description: No item found
  294. 400:
  295. description: Bad request
  296. schema:
  297. type: object
  298. properties:
  299. error:
  300. type: string
  301. description: Error condition
  302. reason:
  303. type: string
  304. description: Explanation of error reason
  305. 200:
  306. description: List of checkpoints for a file
  307. schema:
  308. type: array
  309. items:
  310. $ref: "#/definitions/Checkpoints"
  311. 500:
  312. description: Model key error
  313. post:
  314. summary: Create a new checkpoint for a file
  315. description: "Create a new checkpoint with the current state of a file. With the default FileContentsManager, only one checkpoint is supported, so creating new checkpoints clobbers existing ones."
  316. tags:
  317. - contents
  318. responses:
  319. 201:
  320. description: Checkpoint created
  321. headers:
  322. Location:
  323. description: URL for the checkpoint
  324. type: string
  325. format: url
  326. schema:
  327. $ref: "#/definitions/Checkpoints"
  328. 404:
  329. description: No item found
  330. 400:
  331. description: Bad request
  332. schema:
  333. type: object
  334. properties:
  335. error:
  336. type: string
  337. description: Error condition
  338. reason:
  339. type: string
  340. description: Explanation of error reason
  341. /api/contents/{path}/checkpoints/{checkpoint_id}:
  342. post:
  343. summary: Restore a file to a particular checkpointed state
  344. parameters:
  345. - $ref: "#/parameters/path"
  346. - $ref: "#/parameters/checkpoint_id"
  347. tags:
  348. - contents
  349. responses:
  350. 204:
  351. description: Checkpoint restored
  352. 400:
  353. description: Bad request
  354. schema:
  355. type: object
  356. properties:
  357. error:
  358. type: string
  359. description: Error condition
  360. reason:
  361. type: string
  362. description: Explanation of error reason
  363. delete:
  364. summary: Delete a checkpoint
  365. parameters:
  366. - $ref: "#/parameters/path"
  367. - $ref: "#/parameters/checkpoint_id"
  368. tags:
  369. - contents
  370. responses:
  371. 204:
  372. description: Checkpoint deleted
  373. /api/sessions/{session}:
  374. parameters:
  375. - $ref: "#/parameters/session"
  376. get:
  377. summary: Get session
  378. tags:
  379. - sessions
  380. responses:
  381. 200:
  382. description: Session
  383. schema:
  384. $ref: "#/definitions/Session"
  385. patch:
  386. summary: "This can be used to rename the session."
  387. tags:
  388. - sessions
  389. parameters:
  390. - name: model
  391. in: body
  392. required: true
  393. schema:
  394. $ref: "#/definitions/Session"
  395. responses:
  396. 200:
  397. description: Session
  398. schema:
  399. $ref: "#/definitions/Session"
  400. 400:
  401. description: No data provided
  402. delete:
  403. summary: Delete a session
  404. tags:
  405. - sessions
  406. responses:
  407. 204:
  408. description: Session (and kernel) were deleted
  409. 410:
  410. description: "Kernel was deleted before the session, and the session was *not* deleted (TODO - check to make sure session wasn't deleted)"
  411. /api/sessions:
  412. get:
  413. summary: List available sessions
  414. tags:
  415. - sessions
  416. responses:
  417. 200:
  418. description: List of current sessions
  419. schema:
  420. type: array
  421. items:
  422. $ref: "#/definitions/Session"
  423. post:
  424. summary: "Create a new session, or return an existing session if a session of the same name already exists"
  425. tags:
  426. - sessions
  427. parameters:
  428. - name: session
  429. in: body
  430. schema:
  431. $ref: "#/definitions/Session"
  432. responses:
  433. 201:
  434. description: Session created or returned
  435. schema:
  436. $ref: "#/definitions/Session"
  437. headers:
  438. Location:
  439. description: URL for session commands
  440. type: string
  441. format: url
  442. 501:
  443. description: Session not available
  444. schema:
  445. type: object
  446. description: error message
  447. properties:
  448. message:
  449. type: string
  450. short_message:
  451. type: string
  452. /api/kernels:
  453. get:
  454. summary: List the JSON data for all kernels that are currently running
  455. tags:
  456. - kernels
  457. responses:
  458. 200:
  459. description: List of currently-running kernel uuids
  460. schema:
  461. type: array
  462. items:
  463. $ref: "#/definitions/Kernel"
  464. post:
  465. summary: Start a kernel and return the uuid
  466. tags:
  467. - kernels
  468. parameters:
  469. - name: options
  470. in: body
  471. schema:
  472. type: object
  473. required:
  474. - name
  475. properties:
  476. name:
  477. type: string
  478. description: Kernel spec name (defaults to default kernel spec for server)
  479. path:
  480. type: string
  481. description: API path from root to the cwd of the kernel
  482. responses:
  483. 201:
  484. description: Kernel started
  485. schema:
  486. $ref: "#/definitions/Kernel"
  487. headers:
  488. Location:
  489. description: Model for started kernel
  490. type: string
  491. format: url
  492. /api/kernels/{kernel_id}:
  493. parameters:
  494. - $ref: "#/parameters/kernel"
  495. get:
  496. summary: Get kernel information
  497. tags:
  498. - kernels
  499. responses:
  500. 200:
  501. description: Kernel information
  502. schema:
  503. $ref: "#/definitions/Kernel"
  504. delete:
  505. summary: Kill a kernel and delete the kernel id
  506. tags:
  507. - kernels
  508. responses:
  509. 204:
  510. description: Kernel deleted
  511. /api/kernels/{kernel_id}/interrupt:
  512. parameters:
  513. - $ref: "#/parameters/kernel"
  514. post:
  515. summary: Interrupt a kernel
  516. tags:
  517. - kernels
  518. responses:
  519. 204:
  520. description: Kernel interrupted
  521. /api/kernels/{kernel_id}/restart:
  522. parameters:
  523. - $ref: "#/parameters/kernel"
  524. post:
  525. summary: Restart a kernel
  526. tags:
  527. - kernels
  528. responses:
  529. 200:
  530. description: Kernel restarted
  531. headers:
  532. Location:
  533. description: URL for kernel commands
  534. type: string
  535. format: url
  536. schema:
  537. $ref: "#/definitions/Kernel"
  538. /api/kernelspecs:
  539. get:
  540. summary: Get kernel specs
  541. tags:
  542. - kernelspecs
  543. responses:
  544. 200:
  545. description: Kernel specs
  546. schema:
  547. type: object
  548. properties:
  549. default:
  550. type: string
  551. description: Default kernel name
  552. kernelspecs:
  553. type: object
  554. additionalProperties:
  555. $ref: "#/definitions/KernelSpec"
  556. /api/config/{section_name}:
  557. get:
  558. summary: Get a configuration section by name
  559. parameters:
  560. - $ref: "#/parameters/section_name"
  561. tags:
  562. - config
  563. responses:
  564. 200:
  565. description: Configuration object
  566. schema:
  567. type: object
  568. patch:
  569. summary: Update a configuration section by name
  570. tags:
  571. - config
  572. parameters:
  573. - $ref: "#/parameters/section_name"
  574. - name: configuration
  575. in: body
  576. schema:
  577. type: object
  578. responses:
  579. 200:
  580. description: Configuration object
  581. schema:
  582. type: object
  583. /api/terminals:
  584. get:
  585. summary: Get available terminals
  586. tags:
  587. - terminals
  588. responses:
  589. 200:
  590. description: A list of all available terminal ids.
  591. schema:
  592. type: array
  593. items:
  594. $ref: "#/definitions/Terminal"
  595. 403:
  596. description: Forbidden to access
  597. 404:
  598. description: Not found
  599. post:
  600. summary: Create a new terminal
  601. tags:
  602. - terminals
  603. responses:
  604. 200:
  605. description: Successfully created a new terminal
  606. schema:
  607. $ref: "#/definitions/Terminal"
  608. 403:
  609. description: Forbidden to access
  610. 404:
  611. description: Not found
  612. /api/terminals/{terminal_id}:
  613. get:
  614. summary: Get a terminal session corresponding to an id.
  615. tags:
  616. - terminals
  617. parameters:
  618. - $ref: "#/parameters/terminal_id"
  619. responses:
  620. 200:
  621. description: Terminal session with given id
  622. schema:
  623. $ref: "#/definitions/Terminal"
  624. 403:
  625. description: Forbidden to access
  626. 404:
  627. description: Not found
  628. delete:
  629. summary: Delete a terminal session corresponding to an id.
  630. tags:
  631. - terminals
  632. parameters:
  633. - $ref: "#/parameters/terminal_id"
  634. responses:
  635. 204:
  636. description: Successfully deleted terminal session
  637. 403:
  638. description: Forbidden to access
  639. 404:
  640. description: Not found
  641. /api/me:
  642. get:
  643. summary: |
  644. Get the identity of the currently authenticated user.
  645. If present, a `permissions` argument may be specified
  646. to check what actions the user currently is authorized to take.
  647. tags:
  648. - identity
  649. parameters:
  650. - $ref: "#/parameters/permissions"
  651. responses:
  652. 200:
  653. description: The user's identity and permissions
  654. schema:
  655. type: object
  656. properties:
  657. identity:
  658. $ref: "#/definitions/Identity"
  659. permissions:
  660. $ref: "#/definitions/Permissions"
  661. example:
  662. identity:
  663. username: minrk
  664. name: Min Ragan-Kelley
  665. display_name: Min RK
  666. initials: MRK
  667. avatar_url: null
  668. color: null
  669. permissions:
  670. contents:
  671. - read
  672. - write
  673. kernels:
  674. - read
  675. - write
  676. - execute
  677. /api/status:
  678. get:
  679. summary: Get the current status/activity of the server.
  680. tags:
  681. - status
  682. responses:
  683. 200:
  684. description: The current status of the server
  685. schema:
  686. $ref: "#/definitions/APIStatus"
  687. /api/spec.yaml:
  688. get:
  689. summary: Get the current spec for the notebook server's APIs.
  690. tags:
  691. - api-spec
  692. produces:
  693. - text/x-yaml
  694. responses:
  695. 200:
  696. description: The current spec for the notebook server's APIs.
  697. schema:
  698. type: file
  699. definitions:
  700. APIStatus:
  701. description: |
  702. Notebook server API status.
  703. Added in notebook 5.0.
  704. properties:
  705. started:
  706. type: string
  707. description: |
  708. ISO8601 timestamp indicating when the notebook server started.
  709. last_activity:
  710. type: string
  711. description: |
  712. ISO8601 timestamp indicating the last activity on the server,
  713. either on the REST API or kernel activity.
  714. connections:
  715. type: number
  716. description: |
  717. The total number of currently open connections to kernels.
  718. kernels:
  719. type: number
  720. description: |
  721. The total number of running kernels.
  722. Identity:
  723. description: The identity of the currently authenticated user
  724. properties:
  725. username:
  726. type: string
  727. description: |
  728. Unique string identifying the user
  729. name:
  730. type: string
  731. description: |
  732. For-humans name of the user.
  733. May be the same as `username` in systems where
  734. only usernames are available.
  735. display_name:
  736. type: string
  737. description: |
  738. Alternate rendering of name for display.
  739. Often the same as `name`.
  740. initials:
  741. type: string
  742. description: |
  743. Short string of initials.
  744. Initials should not be derived automatically due to localization issues.
  745. May be `null` if unavailable.
  746. avatar_url:
  747. type: string
  748. description: |
  749. URL of an avatar to be used for the user.
  750. May be `null` if unavailable.
  751. color:
  752. type: string
  753. description: |
  754. A CSS color string to use as a preferred color,
  755. such as for collaboration cursors.
  756. May be `null` if unavailable.
  757. Permissions:
  758. type: object
  759. description: |
  760. A dict of the form: `{"resource": ["action",]}`
  761. containing only the AUTHORIZED subset of resource+actions
  762. from the permissions specified in the request.
  763. If no permission checks were made in the request,
  764. this will be empty.
  765. additionalProperties:
  766. type: array
  767. items:
  768. type: string
  769. KernelSpec:
  770. description: Kernel spec (contents of kernel.json)
  771. properties:
  772. name:
  773. type: string
  774. description: Unique name for kernel
  775. KernelSpecFile:
  776. $ref: "#/definitions/KernelSpecFile"
  777. resources:
  778. type: object
  779. properties:
  780. kernel.js:
  781. type: string
  782. format: filename
  783. description: path for kernel.js file
  784. kernel.css:
  785. type: string
  786. format: filename
  787. description: path for kernel.css file
  788. logo-*:
  789. type: string
  790. format: filename
  791. description: path for logo file. Logo filenames are of the form `logo-widthxheight`
  792. KernelSpecFile:
  793. description: Kernel spec json file
  794. required:
  795. - argv
  796. - display_name
  797. - language
  798. properties:
  799. language:
  800. type: string
  801. description: The programming language which this kernel runs. This will be stored in notebook metadata.
  802. argv:
  803. type: array
  804. description: "A list of command line arguments used to start the kernel. The text `{connection_file}` in any argument will be replaced with the path to the connection file."
  805. items:
  806. type: string
  807. display_name:
  808. type: string
  809. description: "The kernel's name as it should be displayed in the UI. Unlike the kernel name used in the API, this can contain arbitrary unicode characters."
  810. codemirror_mode:
  811. type: string
  812. description: Codemirror mode. Can be a string *or* an valid Codemirror mode object. This defaults to the string from the `language` property.
  813. env:
  814. type: object
  815. description: A dictionary of environment variables to set for the kernel. These will be added to the current environment variables.
  816. additionalProperties:
  817. type: string
  818. help_links:
  819. type: array
  820. description: Help items to be displayed in the help menu in the notebook UI.
  821. items:
  822. type: object
  823. required:
  824. - text
  825. - url
  826. properties:
  827. text:
  828. type: string
  829. description: menu item link text
  830. url:
  831. type: string
  832. format: URL
  833. description: menu item link url
  834. Kernel:
  835. description: Kernel information
  836. required:
  837. - id
  838. - name
  839. properties:
  840. id:
  841. type: string
  842. format: uuid
  843. description: uuid of kernel
  844. name:
  845. type: string
  846. description: kernel spec name
  847. last_activity:
  848. type: string
  849. description: |
  850. ISO 8601 timestamp for the last-seen activity on this kernel.
  851. Use this in combination with execution_state == 'idle' to identify
  852. which kernels have been idle since a given time.
  853. Timestamps will be UTC, indicated 'Z' suffix.
  854. Added in notebook server 5.0.
  855. connections:
  856. type: number
  857. description: |
  858. The number of active connections to this kernel.
  859. execution_state:
  860. type: string
  861. description: |
  862. Current execution state of the kernel (typically 'idle' or 'busy', but may be other values, such as 'starting').
  863. Added in notebook server 5.0.
  864. Session:
  865. description: A session
  866. type: object
  867. properties:
  868. id:
  869. type: string
  870. format: uuid
  871. path:
  872. type: string
  873. description: path to the session
  874. name:
  875. type: string
  876. description: name of the session
  877. type:
  878. type: string
  879. description: session type
  880. kernel:
  881. $ref: "#/definitions/Kernel"
  882. Contents:
  883. description: "A contents object. The content and format keys may be null if content is not contained. The hash maybe null if hash is not required. If type is 'file', then the mimetype will be null."
  884. type: object
  885. required:
  886. - type
  887. - name
  888. - path
  889. - writable
  890. - created
  891. - last_modified
  892. - mimetype
  893. - format
  894. - content
  895. properties:
  896. name:
  897. type: string
  898. description: "Name of file or directory, equivalent to the last part of the path"
  899. path:
  900. type: string
  901. description: Full path for file or directory
  902. type:
  903. type: string
  904. description: Type of content
  905. enum:
  906. - directory
  907. - file
  908. - notebook
  909. writable:
  910. type: boolean
  911. description: indicates whether the requester has permission to edit the file
  912. created:
  913. type: string
  914. description: Creation timestamp
  915. format: dateTime
  916. last_modified:
  917. type: string
  918. description: Last modified timestamp
  919. format: dateTime
  920. size:
  921. type: integer
  922. description: "The size of the file or notebook in bytes. If no size is provided, defaults to null."
  923. mimetype:
  924. type: string
  925. description: "The mimetype of a file. If content is not null, and type is 'file', this will contain the mimetype of the file, otherwise this will be null."
  926. content:
  927. type: string
  928. description: "The content, if requested (otherwise null). Will be an array if type is 'directory'"
  929. format:
  930. type: string
  931. description: Format of content (one of null, 'text', 'base64', 'json')
  932. hash:
  933. type: string
  934. description: "[optional] The hexdigest hash string of content, if requested (otherwise null). It cannot be null if hash_algorithm is defined."
  935. hash_algorithm:
  936. type: string
  937. description: "[optional] The algorithm used to produce the hash, if requested (otherwise null). It cannot be null if hash is defined."
  938. Checkpoints:
  939. description: A checkpoint object.
  940. type: object
  941. required:
  942. - id
  943. - last_modified
  944. properties:
  945. id:
  946. type: string
  947. description: Unique id for the checkpoint.
  948. last_modified:
  949. type: string
  950. description: Last modified timestamp
  951. format: dateTime
  952. Terminal:
  953. description: A Terminal object
  954. type: object
  955. required:
  956. - name
  957. properties:
  958. name:
  959. type: string
  960. description: name of terminal
  961. last_activity:
  962. type: string
  963. description: |
  964. ISO 8601 timestamp for the last-seen activity on this terminal. Use
  965. this to identify which terminals have been inactive since a given time.
  966. Timestamps will be UTC, indicated 'Z' suffix.