ToTheZeroth News

API Documentation

"Users" collection

URI supplied by the ttzn:users link in the entry point resource

The "users" collection models the set of user accounts, although they are not actually embedded in its representations. It is available for POST however, and it also has some state properties that are useful when posting new users or informing the user about payment options.

Note on POST: When posting a user account, the client is never told whether there was an e-mail address conflict. If the e-mail address was already registered, the API will interpret the call as a request for password change (and this is the only way to request such a change without being authenticated). In either case, a confirmation message will be sent to the e-mail address.

The resource is represented by an application/hal+json [draft] object with the following structure.

State properties
Property Type Mode Description
algorithm String Read-only The algorithm to use when creating an HA1 hash, as specified in the HTTP Digest Authentication specification [RFC2617]
currency String Read-only ISO currency code for the accepted currency
paymentPlan Array of {
    
"level": integer,
    
"amount": integer,
    
"subscriptionLimit":
    
integer
}
Read-only Information about the available payment options (all subscriptions are for one year)
realm String Read-only The realm to use when creating an HA1 hash, as specified in the HTTP Digest Authentication specification [RFC2617]
Resource links
Relation Description
curies A URI template [RFC6570] for expanding rel names with the ttzn prefix into the actual documentation URIs
self The URI of the "users" collection
ttzn:me The URI of the authenticated user
Note: This points to the user that is authenticated when the target resource is accessed