Gustav
05/07/2021, 9:59 AMuser
05/07/2021, 10:04 AMinbox and then tindy things up when back in vscode.user
05/07/2021, 10:05 AMuser
05/07/2021, 10:06 AMfudo
05/07/2021, 10:08 AMuser
05/07/2021, 10:10 AMtests vault in my workspace, but I'd like to generate the notes automatically... I'm a coder so I can come up with something, but wondering the Dendron developers have some standard way to do this.fudo
05/07/2021, 10:22 AMuser
05/07/2021, 10:36 AMuser
05/07/2021, 10:42 AMDevelopment note in the wiki, which already answered most of my questions 🙂kevins8
05/07/2021, 3:42 PMGustav
05/07/2021, 4:01 PMDarrenBrierton
05/07/2021, 4:02 PMkevins8
05/07/2021, 4:17 PMGustav
05/07/2021, 5:29 PMuser
05/07/2021, 9:30 PMapi-server by cloning from github and launching the api-server on a terminal using yarn start:integ , but so far using the API has been mostly unsuccessful. I know it runs because it responds to, e.g. http://localhost:3005/api/note/info , but I could not yet figure out how to get some meaningful data from my workspace. For instance http://localhost:3005/api/note/query?qs=journal results in my REST client hanging indefinitely and an error in the terminal's console with the following message:
UnhandledPromiseRejectionWarning: Error: STORE is empty
Other than that, this is indeed interesting, as if I get to understand how to use the API to populate my test vault, I feel like I'll have achieved a big step forward in my little project.
Also, I noticed a (mostly) empty nextjs project in the monorepo. Is it your intention to use the API with it?user
05/07/2021, 9:38 PMCannot GET / on localhost:8080, what's wrong with my setup?kevins8
05/08/2021, 12:31 AMkevins8
05/08/2021, 12:31 AMkevins8
05/08/2021, 12:39 AMAPI_SERVER="localhost:3005"
WORKSPACE=""
curl --location --request GET "$WORKSPACE_URL/api/workspace/initialize" \
--header 'Content-Type: application/json' \
--data-raw '{
"uri": "$WORKSPACE"
}'user
05/08/2021, 7:59 AM$WORSPACE_URL here? API_SERVER does not seem to be used. And $WORKSPACE is the empty string in your example. Is it intentional or should it contain something? If yes, what? I tried http://localhost:3005/api/workspace/initialize with a json payload resembling what you give in the example with a few variations, without success. I'm always getting:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/workspace/initialize</pre>
</body>
</html>hikchoi
05/08/2021, 8:20 AM$WORKSPACE_URL is actually $API_SERVER and $WORKSPACE should be the full path to where you want the workspace to be initialized.hikchoi
05/08/2021, 8:20 AMhikchoi
05/08/2021, 8:20 AMkevins8
05/08/2021, 4:17 PMcurl --location --request POST 'http://localhost:3005/api/workspace/initialize' \
--header 'Content-Type: application/json' \
--data-raw '{
"uri": "/Users/kevinlin/Dendron",
"config": {
"vaults": ["/Users/kevinlin/Dendron/vault"]
}
}'user
05/08/2021, 8:39 PMtests vault under config/vaults . What is strange is that the notes query endpoint still returns docs from my normal ("vault") vault...rhaynes
05/08/2021, 9:27 PMkevins8
05/08/2021, 10:01 PMkevins8
05/08/2021, 10:02 PMdendron.ymluser
05/08/2021, 10:03 PMtests and vault Even though I specified tests only under the config key for the initialize call, I still get documents from the vault vault. I hope that's clearer.kevins8
05/08/2021, 10:16 PMdendron.yml from the wsRoot. the api is still in a state of iteration which is why it isn't formally documented yet 😅