zoukankan      html  css  js  c++  java
  • 测试 jupyter notebook rest api

    创建目录
    Method:POST
    URL:http://localhost:8888/api/contents
    Body/raw: {"type":"directory"}
    Response:
    {
    "created": "2017-09-29T02:27:48.277551Z",
    "type": "directory",
    "name": "Untitled Folder 2",
    "mimetype": null,
    "content": null,
    "path": "Untitled Folder 2",
    "last_modified": "2017-09-29T02:27:48.277551Z",
    "format": null,
    "writable": true
    }

    重命名目录
    目录的名字可以用特殊字符,比如 【】
    Method:PATCH
    URL:http://localhost:8888/api/contents/Untitled Folder 2
    Body/raw: {"path": "my_folder"}
    Response:
    {
    "created": "2017-09-29T02:32:58.825560Z",
    "type": "directory",
    "name": "my_folder",
    "mimetype": null,
    "content": null,
    "path": "my_folder",
    "last_modified": "2017-09-29T02:32:13.525558Z",
    "format": null,
    "writable": true
    }

    删除目录
    删除之前,目录不能有文件
    Method:DELETE
    URL:http://localhost:8888/api/contents/my_folder
    Response:204 No Content

    创建notebook
    Method:POST
    URL:http://localhost:8888/api/contents
    Body/raw: {"type":"notebook"}
    Response:
    {
    "created": "2017-09-29T02:29:44.445554Z",
    "type": "notebook",
    "name": "Untitled12.ipynb",
    "mimetype": null,
    "content": null,
    "path": "Untitled12.ipynb",
    "last_modified": "2017-09-29T02:29:44.445554Z",
    "format": null,
    "writable": true
    }

    重命名notebook
    Untitled12.ipynb需存在,11111.ipynb是新文件名
    Method:PATCH
    URL:http://localhost:8888/api/contents/Untitled12.ipynb
    Body/raw: {"path": "11111.ipynb"}
    Response:
    {
    "created": "2017-09-29T02:18:02.593534Z",
    "type": "notebook",
    "name": "11111.ipynb",
    "mimetype": null,
    "content": null,
    "path": "11111.ipynb",
    "last_modified": "2017-09-29T01:37:07.721463Z",
    "format": null,
    "writable": true
    }

    删除notebook
    Method:DELETE
    URL:http://localhost:8888/api/contents/11111.ipynb
    Response:204 No Content

  • 相关阅读:
    Oracle 添加主键和索引
    Oracle中查询主键、外键、sequence、表基本信息等
    Spring工作原理
    Ehcache 缓存使用
    socket编程-java
    oracle触发器详解
    单例模式的几种写法
    [LeetCode] 412. Fizz Buzz 嘶嘶嗡嗡
    LeetCode Top Interview Questions
    [LeetCode] 131. Palindrome Partitioning 回文分割
  • 原文地址:https://www.cnblogs.com/machong/p/7611562.html
Copyright © 2011-2022 走看看