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

  • 相关阅读:
    OpenERP实施记录(12):付款处理
    OpenERP实施记录(10):采购补货
    OpenERP实施记录(9):销售一批电脑
    从一个action地址获取信息
    在线杀毒 (最大文件大小64MB)
    WIN7启动WIFI
    Lazy Load, 延迟加载图片的 jQuery 插件【备忘】
    Android 汉字转拼音之JNI篇
    Android Studio 解决方法No JVM installation found. Please install a 64-bit JDK.
    Unity3D移植到自己的Android程序
  • 原文地址:https://www.cnblogs.com/machong/p/7611562.html
Copyright © 2011-2022 走看看