Rest Endpoints

Login Service

Request Type: Post

Endpoint: https://api.dectechsports.com/authentication/login/

Description: This service provides the login mechanism for the application. A username and password is provided in the body. The service then returns a user token if valid credentials are provided.

_images/login_service.png

Authentication Service

Request Type: Get

Endpoint: https://api.dectechsports.com:/authentication/user/

Description: The service provides an alternative method of authenticating a user by a previously given user token. A token is provided in the header of the request. If the token is valid, the full user details will be returned otherwise a invalid token response will be given.

_images/authentication_service.png

List Player Reports Service

Request Type: Get

Endpoint: https://api.dectechsports.com/user-reports

Description: This service lets you get a list all the reports associated with a user. For the service to work, all you need to do is provide the user token in the header of the request. If the token is valid, the a list of reports the user has permission for is returned. Just the main information is provided in the reports.

_images/report_service.png

Read Player Report Service

Request Type: Get

Endpoint: https://api.dectechsports.com/user-reports/<reportId>

Description: This service returns a full report based. For the service to work, all you need to do is provide the user token in the header of the request and also the reportId as a query param. If the token is valid and the user has permission to read the report, a fully serialised report will be returned.

_images/full_report_service.png

Create Report Service

Request Type: Post

Endpoint: https://api.dectechsports.com/create-report

Description: This service initiates the process to create a player report. Just pass the goal_scope, percentile_scope and the list of comparison_player ids in the body of post request. It then returns the amount of credits remaining (if that user does not have unlimited credits.

_images/create_report_service.png

Search Player Service

Request Type: Post

Endpoint: https://api.dectechsports.com/players

Description: This service allows a user to search for players by name, age, weight, role, style, performance and likeliness of injury.

_images/search_params.png

Example Requests: Any of the following examples can be combined. You must also include the authentication token in the header of the request. The response back is a list of players with all the data associated with them from the fast player look up table. This service uses pages with a max of 1000 players on each one. The count and the next page url is given in the response.

_images/search_requests.png _images/search_response.png

Note - Additional Rest API endpoints exist for the Team Portal. The full list of end points can be found in fb_api/urls.py