Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernel API /api/filetree/getIDsByHPath #9654

Closed
jabobian opened this issue Nov 14, 2023 · 1 comment
Closed

Add kernel API /api/filetree/getIDsByHPath #9654

jabobian opened this issue Nov 14, 2023 · 1 comment
Assignees
Milestone

Comments

@jabobian
Copy link

jabobian commented Nov 14, 2023

Allow more paremeters for /api/filetree/createDocWithMd

In what scenarios do you need this feature?

I used to use /api/filetree/createDocWithMd to append markdown to a doc with specified human readable path, e.g. Notes/YYYY/MM/DD
But after some version, the API will not append the existing doc, but create a new doc with same name. As is said in the API document: If you use the same path to call this interface repeatedly, the existing document will not be overwritten.

So I want an API to get the id of a human readable path. I know I can use SQL to get it, but the code is bulky, can you afford one more API to "Get ID based on human readable path and the notebook id", and one can specify to get the first ID or all the IDs.

Describe the optimal solution

Can you afford one more API to "Get ID based on human readable path and the notebook id", and one can specify to get the first ID or all the IDs.

Describe the candidate solution

No response

Other information

No response

@88250 88250 self-assigned this Nov 15, 2023
@88250 88250 changed the title Allow more paremeters for /api/filetree/createDocWithMd Add kernel API /api/filetree/getIDsByHPath Nov 15, 2023
@88250
Copy link
Member

88250 commented Nov 15, 2023

Hello, thanks for your proposal, we will add the following kernel API in the next release:

  • /api/filetree/getIDsByHPath

  • Parameters

    {
      "path": "/foo/bar",
      "notebook": "20210808180117-czj9bvb"
    }
    • path: Human-readable path
    • notebook: Notebook ID
  • Return value

    {
      "code": 0,
      "msg": "",
      "data": [
          "20200813004931-q4cu8na"
      ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants