canmove, Confirmed users
1,173
edits
(→PUT) |
No edit summary |
||
| Line 13: | Line 13: | ||
The Weave User API has a set of [https://wiki.mozilla.org/Labs/Weave/0.3/ResponseCodes Weave Response Codes] to cover errors in the request or on the server side. The format of a successful response is defined in the appropriate request method section. | The Weave User API has a set of [https://wiki.mozilla.org/Labs/Weave/0.3/ResponseCodes Weave Response Codes] to cover errors in the request or on the server side. The format of a successful response is defined in the appropriate request method section. | ||
The URL for User requests is structured as follows: | |||
https://<server name>/<api pathname>/<version>/<username>/<further instruction> | |||
For the central weave server API, the servername is "auth.services.mozilla.com", the pathname is "user", and the version is "1" | |||
== GET == | == GET == | ||
'''https://''server''/ | '''https://''server''/''pathname''/''version''/''username''/ ''' | ||
Returns 1 if the username is in use, 0 if it is available. | Returns 1 if the username is in use, 0 if it is available. | ||
'''https://''server''/ | '''https://''server''/''pathname''/''version''/''username''/node/weave ''' | ||
Returns the Weave Node that the client is located on. Weave-specific calls should be directed to that node. | Returns the Weave Node that the client is located on. Weave-specific calls should be directed to that node. | ||
== PUT == | == PUT == | ||
'''https://''server''/''pathname''/''version''/''username''/ ''' | |||
'''https://''server''/ | |||
Requests that an account be created for ''username''. | Requests that an account be created for ''username''. | ||
| Line 59: | Line 63: | ||
== POST == | == POST == | ||
'''https://''server''/ | '''https://''server''/''pathname''/''version''/''username''/email ''' | ||
''NOTE:'' Requires basic authentication with the username and password associated with the account. The auth username must match the username in the path. | ''NOTE:'' Requires basic authentication with the username and password associated with the account. The auth username must match the username in the path. | ||
| Line 67: | Line 71: | ||
The server will return the new email address on success, or an error message if some portion of the process fails. | The server will return the new email address on success, or an error message if some portion of the process fails. | ||
'''https://''server''/''pathname''/''version''/''username''/password ''' | |||
'''https://''server''/ | |||
''NOTE:'' Requires basic authentication with the username and (current) password associated with the account. The auth username must match the username in the path. | ''NOTE:'' Requires basic authentication with the username and (current) password associated with the account. The auth username must match the username in the path. | ||
| Line 78: | Line 81: | ||
== DELETE == | == DELETE == | ||
'''https://''server''/ | '''https://''server''/''pathname''/''version''/''username''/ ''' | ||
''NOTE:'' Requires simple authentication with the username and password associated with the account. The auth username must match the username in the path. | ''NOTE:'' Requires simple authentication with the username and password associated with the account. The auth username must match the username in the path. | ||