Skip to content

Back end Account API

Theodor Moroianu edited this page Jun 3, 2021 · 9 revisions

Introduction

This page presents the API presented by the backend for the account settings.

Update Account Information

  • Permissions required: Signed in
  • Address: /api/Account/Edit
  • Request JSON:
    {
        "FirstName": "New first name, doesn't exist if first name is not changed",
        "LastName": "New last name, doesn't exist if last name is not changed",

        "Username": "username of the user",        

        "VisibleEmail": "true if user's email is public (not yet implemented)",
        "VisibleEmail": true,
    }
  • Response JSON:
    {
        "error_message": "Reason why the action failed. Doesn't exist if successful",
        "status": "'ok' if successful, 'fail' if not",
    }

Retrieve Account Information

  • Permissions required: Signed in
  • Address: /api/Account/Details
  • Request JSON:
    {
        
    }
  • Response JSON:
    {
        "error_message": "Reason why the action failed. Doesn't exist if successful",
        "status": "'ok' if successful, 'fail' if not",

        "FirstName": "New first name, doesn't exist if first name is not changed",
        "LastName": "New last name, doesn't exist if last name is not changed",
        "Email": "email of the user",
        "DateJoined": "date the user joined",
        "UserID": "id of the user",

        "VisibleEmail": "true if user's email is public",
        "VisibleEmail": true,

        "Username": "Username of the user",
    }

Delete Account

  • Permissions required: Signed in
  • Address: /api/Account/Delete
  • Request JSON:
    {
        
    }
  • Response JSON:
    {
        "error_message": "Reason why the action failed. Doesn't exist if successful",
        "status": "'ok' if successful, 'fail' if not",
    }

Clone this wiki locally