Services/Sync/Server/Archived/0.3/API/Admin
Contents
Weave 0.3 Admin API
Release Date: TBD
API Specification
The Admin API may be used to create users, update passwords, and delete users. It is a post API, and the path is a single-endpoint, so it takes no path arguments.
Responses will be returned in JSON format.
API Parameters
Parameter | Description |
function | [check|create|update|delete] |
user | The username to be operated on. |
pass | Required if creating a user or changing the password |
secret | The secret, if one has been required by WEAVE_USER_ADMIN_SECRET |
Check
Checks for the existence of a user. Returns 1 if the user exists, 0 otherwise.
Create
Creates a user. Requires a username and a password. Will not attempt to create a user that already exists. Returns success if the user is created, an error otherwise.
Update
Updates the password for the given user. Returns success if the user is created, an error otherwise.
Delete
Deletes the user. Returns success if the user is created, an error otherwise.
Response Codes
200 OK -- Returned on a successful request.
400 Bad Request -- Will be returned if there was an error in the client's request, such as a non-POST URL, a nonexistent function, or a missing secret.
404 Not Found -- Returned if the user does not exist and was expected to.
503 Service Unavailable -- An internal error (storage failure). Please try back again later.