User Manual



Introduction

All routes in our API can be accessed from our root: http://atostimemachine.westus.cloudapp.azure.com/api/ and the details pertaining is route are listed below.

Authentication

Authentication allows you to generate a token so that you can access the other functionalities the API has to offer. In order to authenticate your credentials you can make a post request to /authenticate

    
        Curl -d  http://atostimemachine.westus.cloudapp.azure.com/api/authenticate
    

Where the payload is constructed of the following fields put into JSON:

Name Description
Id This is your normal staff id that you log into your ATOS account with.
Password This is the password which your supervisor assigned alongside your staff id when they made your account.

The response message from this will be constructed of the following:

Name Description
Success This a boolean field which details wherever the post request was successful.
Token (Optional) This is a string which contains the encoded id you authenticated with, and whether or not your credentials provide you with an admin status (this is only returned if the success is true).
Admin (Optional) This a boolean field which indicated whether or not your credentials provide you with an admin status.

Getting a list of staff under a supervisor

In order to get a list of staff members with their accompanying details you can make a get request to /staff

    
        Curl http://atostimemachine.westus.cloudapp.azure.com/api/staff/:token
    

Where the request parameters are as follows:

Name Description
Token This is the token field which is returned by the authentication route.

The response message from this will be constructed of the following:

Name Description
Results This an array containing all of the results relevant to the get request.

Getting the profile of a user

In order to get the current details attached to the credentials that have been passed through authentication you can get make a get request to /profile

    
        Curl http://atostimemachine.westus.cloudapp.azure.com/api/profile/:token
    

Where the request parameters are as follows:

Name Description
Token This is the token field which is returned by the authentication route.

The response message from this will be constructed of the following:

Name Description
Results This an array containing all of the results relevant to the get request.

Getting a list of overtime requests that need reviewing

In order to get the list of overtime requests that users you have added, have submitted that require your approval you can make a get request to /review

    
        Curl http://atostimemachine.westus.cloudapp.azure.com/api/review/:token
    

Where the request parameters are as follows:

Name Description
Token This is the token field which is returned by the authentication route.

The response message from this will be constructed of the following:

Name Description
Results This an array containing all of the results relevant to the get request.

Getting a list of overtime requests that need confirmation

In order to get a list of overtime requests that your supervisor has approved but still requires you to confirm the actual details of the overtime work you can make a get request to /present

    
        Curl http://atostimemachine.westus.cloudapp.azure.com/api/present/:token
    

Where the request parameters are as follows:

Name Description
Token This is the token field which is returned by the authentication route.

The response message from this will be constructed of the following:

Name Description
Results This an array containing all of the results relevant to the get request.

Getting a list of processed overtime requests

In order to get a list of your overtime requests that have fully processed you can make a get request to /past

    
        Curl http://atostimemachine.westus.cloudapp.azure.com/api/past/:token
    

Where the request parameters are as follows:

Name Description
Token This is the token field which is returned by the authentication route.

The response message from this will be constructed of the following:

Name Description
Results This an array containing all of the results relevant to the get request.

Get a list of WBS codes for a particular user

In order to get the list of WBS codes that you have added you can make a get request to /code

    
        Curl http://atostimemachine.westus.cloudapp.azure.com/api/code/:token
    

Where the request parameters are as follows:

Name Description
Token This is the token field which is returned by the authentication route.

The response message from this will be constructed of the following:

Name Description
Results This an array containing all of the results relevant to the get request.

Adding a new WBS code for a user

In order to add a new WBS code to be used in submitting an overtime request you can make a post request to /code

    
        Curl -d  http://atostimemachine.westus.cloudapp.azure.com/api/code
    

Where the payload is constructed of the following fields put into JSON:

Name Description
Token This is the token field which is returned by the authentication route.
Code This is an array containing all of the results relevant to the get request.

The response message from this will be constructed of the following:

Name Description
Success This a boolean field which details wherever the post request was successful.