Public API Documentation

This API works for now, but it is going to be deprecated soon, see this post for more information.
The new API Documentation can be found HERE.

The REST API used on this website is very simple. It can be found on GitHub if you would like to see its source code HERE.

The API is also able to walk you through the available options on its own, given you have a JSON parser installed in your browser. You will have to do your own research for your given browser, but for Firefox I prefer “JSONovich.”

The base URL can be found at: https://uoltt.org/sapi/

Constants
  • success – Boolean
    • Dependent on whether an error was encountered
Conditionals
  • error – Array
    • The content of this field is dependent on each and every extension or “method” of the API. It will usually give helpful information about as to what error was encountered and what to do about it
API Root

Path: https://uoltt.org/sapi/

sc_user

Path: https://uoltt.org/sapi/sc_user/

This is the controller that manages Star Citizen User Stuffs.

list_users

Path: https://uoltt.org/sapi/sc_user/list_users/

This method will list all users in the database if no search term is used. If a search term is given, it will only return results which mach the given search query.

Input:

  • Method: GET/POST
  • Accepted Arguments
    • text_search – string – optional
    • order – string – optional
      • ASC
      • DESC
    • sort – string – optional
      • id
      • sc1
      • sc2
      • forum
      • rank
      • shipname

Structure:

  • Array
    • Constant(s) (see above)
    • Users – Array
      • Array
        • ID – Integer
        • SC Name – String
        • LTT Name – String
        • Rank – String
      • Array
        • ID – Integer
        • SC Name – String
        • LTT Name – String
        • Rank – String
user_ships

Path: https://uoltt.org/sapi/sc_user/user_ships/

This method will list the ships belonging to a current user. The search function built-in will return the ships in possession by the first, and ONLY the first, member of the search result. For this reason, it might be a better idea to use the users ID rather than random search queries.

Input:

  • Method: GET/POST
  • Accepted Arguments
    • user – String/Integer – Required

Structure:

  • Array
    • Constant(s) (see above)
    • user  – Interger
    • ships – Array
      • String
      • String
ruc_save

Path: https://uoltt.org/sapi/ruc_save/
NOTE: This URL is subject to change if more people than just Rucdoc use it.

This controller is used for remote user manipulation. It is incomplete.
Even though the API says there is multiple methods, the only finished method is the “add” controller.

add

Path: https://uoltt.org/sapi/ruc_save/
NOTE: This URL will not return content, instead it will “bounce” you to Rucdocs landing page on the Insane Maths Department website. If enough demand for user interaction arises, I will change this.

Input:

  • Method: GET/POST
  • Accepted Arguments
    • forum – String – Required
    • member – String – Required
    • rank – String – Required
    • role – String – Required
    • sc1 – String – Required
    • sc2 – String – Required
    • lastUID – Interger – Required
      • This variable is for the MOST RECENT user in the database.
        For example, if the new user being added is ID 999, you
        would submit 998 as the lastUID.

There is no output.

 

One thought on “Public API Documentation”

Leave a Reply

Your email address will not be published. Required fields are marked *