Closed Amrosx closed 3 years ago
Hi @Amrosx.
Sorry for the confusion! The angle brackets (<
and >
) are not meant to be used literally in the request described in the API docs. Rather, they should indicate something that can optionally be included. That is, if the documentation says:
{ "a": "b",
< "c": "d" >
}
then, you could write, for example, {"a": "b"}
or {"a": "b", "c": "d"}
. Either way, you still have to provide valid JSON syntax, which has requirements like double quotes around strings and commas between name-value pairs.
Also, when you see something like Document_Prefix
, that means you should provide the actual prefix, and where you see Boolean
, you would write true
or false
.
Finally, we're currently working on a major new release as well as shining new light on our documentation. We'll be sure to keep questions like yours in mind while we're developing.
Hope that helps!
Hi @spl thanks for replying. I tried to use it as JSON then I got autherzation error and I am not using any password for admin/foo what is the permission? and if possible could you write me a correct syntax api request example (creating user or db) because all my tries failed unfortunatly.
POST https://localhost:6363/api/db/admin/foo
{ "prefixes" : { "doc" : "<terminusdb:///data/>" ,
"scm" : "<terminusdb:///schema#>" } ,
"label" : "A Label",
"comment" : "A Comment",
"public" : true ,
"schema" : false
}
response
{
"action": "system:create_database",
"api:message": "Access to doc:admin_organization is not authorised with action system:create_database and auth doc:anonymous",
"api:status": "api:forbidden",
"auth": "doc:anonymous",
"scope": "doc:admin_organization"
}
thanks for me this issue has been solved I was missing the basic auth username : admin password : root
Acutally in documentation there are missing a clear step by step for biginers and some terms are confusing like what is Organization, Agent, authentication ...
@Amrosx I'm glad you figured out your issue. And I agree, there are some issues with the docs. We're working on it!
I am running terminusdb-bootstrap docker image and calling api using postman
POST https://localhost:6363/api/db/<organization>/<dbid>
BodyI got this error what does it mean and how can I solve it