Page tree
Skip to end of metadata
Go to start of metadata

API : Account Resources

GET /rest/users/:username

Description

Retrieves the account information of the authenticated user.

URI Parameters
  • username < string >: The user account's username.
Parameters

None

Return Format
  • status < integer >: The status that indicates success or failure
    • value = 0: Failure state. This displays message.
    • value = 1: Success state. This displays content.

  • message < string >: Error message when status is unsuccessful.

  • content < JSON >: The user account information.

    • allusage < double > : The total usage of all Application Keys

    • created < string > : The created account datetime stamp in (ISO format).

    • email < string > : The user account email.

    • lastlogin < string > : The user account last login datetime stamp in (ISO format).

    • role < string > : The user account type.
      • value = "free": This user account is a trial account.

    • status < string > : The status that indicates if user account is verified or not.
      • value = "verified": This indicates that user is verified.

    • type < string > : The user account's payment type.
      • value = "invoice": The payment is made by invoice.

    • update < string >: The user account last updated datetime stamp in (ISO format).

    • username < string >: The user account username.
Example GET Request Body

No example parameters to show.

POST /rest/users/

Description

Creates a new user account.

Parameters
  • username < string >: The username.

  • email < string >: The email.

  • password < string >: The password.
Return Format
  • status < integer >: The status that indicates success or failure
    • value = 0: Failure state. This displays message.
    • value = 1: Success state. This displays content.

  • message < string >: Error message when status is unsuccessful.

  • content < JSON >: The user account information.

    • allusage < double > : The total usage of all Application Keys

    • created < string > : The created account datetime stamp in (ISO format).

    • email < string > : The user account email.

    • lastlogin < string > : The user account last login datetime stamp in (ISO format).

    • role < string > : The user account type.
      • value = "free": This user account is a trial account.

    • status < string > : The status that indicates if user account is verified or not.
      • value = "verified": This indicates that user is verified.

    • type < string > : The user account's payment type.
      • value = "invoice": The payment is made by invoice.

    • update < string >: The user account last updated datetime stamp in (ISO format).

    • username < string >: The user account username.
Example POST Request Body

For Content-Type: application/json example, here's the values passed:

{
  "username": "username",
  "email": "email@user.com",
  "password": "xxxxxx" }

For Content-Type: application/x-www-form-urlencoded; charset=UTF-8 example, here's the values passed:

?&username=username&email=email@user.com&password=xxxxxx

PUT /rest/users/:username

Description

Updates the account information of the authenticated user.

Parameters
  • username < string >: The username.

  • email < string >: The email.
Return Format
  • status < integer >: The status that indicates success or failure
    • value = 0: Failure state. This displays message.
    • value = 1: Success state. This displays content.

  • message < string >: Error message when status is unsuccessful.

  • content < JSON >: The user account information.

    • allusage < double > : The total usage of all Application Keys

    • created < string > : The created account datetime stamp in (ISO format).

    • email < string > : The user account email.

    • lastlogin < string > : The user account last login datetime stamp in (ISO format).

    • role < string > : The user account type.
      • value = "free": This user account is a trial account.

    • status < string > : The status that indicates if user account is verified or not.
      • value = "verified": This indicates that user is verified.

    • type < string > : The user account's payment type.
      • value = "invoice": The payment is made by invoice.

    • update < string >: The user account last updated datetime stamp in (ISO format).

    • username < string >: The user account username.
Example PUT Request Body

For Content-Type: application/json example, here's the values passed:

{
  "username": "username",
  "email": "newemail@user.com" }

For Content-Type: application/x-www-form-urlencoded; charset=UTF-8 example, here's the values passed:

?&username=username&email=newemail@user.com
  • No labels