StatX API Test Drive

Welcome to the StatX API Test Drive. You can perform a live interaction in this browser with the StatX API Server. We recommended you play with the API in this Test Drive before you implement the API in your software.

You will send requests to the API Server with your own StatX account credentials. You will need the StatX app already installed on your phone (search StatX on Apple App Store or Google Play Store) and your phone available with you.

How to use:
  • For each of the API calls, click on the yellow "Model Schema" box in the Parameters Section to copy and paste the JSON template for the request body. Modify the parameters as needed and click "Try it out!" to send the request to the server. Some of the parameters like groupID or statID will have to be copied and pasted from previous responses from the server. Observe the curl parameters to see the payload send to the server. This payload is what you will construct in your own code. Observe the Response Body for server response or any error messages.
  • Execute the "/auth/login" endpoint with your phone number and a suitable descriptive name for clientName. This will deliver a notification to your phone. Go to your StatX app, Settings (in iOS this is a tab, in Android it is in the overflow menu item in the main StatX), tap on Additional Authorizations. Tap Get Code to obtain the verification code.
  • Execute the "/auth/verifyCode" endpoint using this verification code as a parameter. The server will return the API key and authentication token.
  • Copy and paste the API Key and Auth Token in the respective input boxes at the top of this screen. This will set the header with the key and token for all subsequent invocations of the other API endpoints. These headers are not stored, however, we recommend to close your browser window when you are done with the Test Drive. You can also Revoke the authorization to this Test Drive on your phone.
  • Try out the other API endpoints. Start with fetching the groups in your account, then the stats in a particular group.
  • To update a stat, you will need to provide appropriately formatted payload as described in the Formal Documentation. Templates for different stats are not automatically provided in this UI. You can use any stat response from the server to construct the JSON for your update payload.