Logo

Docs

Authentication

Password, token and API key login

Every /rest call authenticates with query or form parameters. All three styles work for every user.

StyleParametersDescription
Passwordu, pPlain, or hex encoded with an enc: prefix (p=enc:70617373)
Tokenu, t, st is md5(password + s) as hex, s is a random salt
API keyapiKeyA key starting with jz_
GET /rest/ping?f=json&u=admin&p=change-me
GET /rest/ping?f=json&apiKey=jz_...

Token login

juuz needs the password to check a token. A user must log in once with p before t and s work, otherwise the call fails with error 41. Most clients do this on their own.

API keys

API keys let apps authenticate without a password. They are stored as a SHA-256 hash, so a key is shown only once, when it is created. Create and manage keys on the keys page of the web UI or with these calls:

EndpointParametersDescription
juuzCreateApiKeyname (label), username (admin only)Returns {"juuzApiKey": {id, name, username, key}}
juuzGetApiKeysusername (admin only)Returns {"juuzApiKeys": {"apiKey": [{id, name, created}]}}
juuzDeleteApiKeyid, username (admin only)Deletes a key

username lets an admin manage the keys of another user.

Errors

CodeMessageWhen
10required parameter is missing: pNo p, t and s or apiKey was sent
40wrong username or passwordUnknown user, wrong password or wrong token
41log in once with a password so token authentication can be enabledToken login before a password login
43multiple conflicting authentication mechanisms providedapiKey sent together with u, p, t or s
44invalid api keyThe key does not exist or was deleted
50for example user is not authorized to uploadThe user lacks the role for this call

On this page