Parameters
Profile
Competition
Event
License
User
Entrystandard
Entrystandardentry
Eventtypeperiod
Eventtype
Manager
Participant
Period
Phaseattendance
Phasepresetphase
Phasepreset
Phaseresult
Phase
Style
Team
Adjustmentrule
Adjustmentrulerule
Club
Discipline
Models
Powered by Stoplight

Basic usage of the LEVERADE API

Introduction

Our API adheres to the JSON API standard, so its documentation can always be read to know about how our API sends and receives data.

This is basically a REST API, this means that we offer CRUD operations for manipulating information through our API. These operations are:

  • Create
  • Read
  • Update
  • Delete

All endpoints can be grouped in one of these operations. Next, we are going to explain how the requests to each one of these operations can be made to our LEVERADE API.

Types of request

All endpoints can be of five types. 2 types (index and show) are types of read operations, and the other 3 fit exactly the rest of CRUD operations (create, update and delete).

A summary of how those requests can be done is shown below.

Index

Returns a list of resources of a certain type (depends on the endpoint).

Request

The format is usually this: /resource

It must be an HTTP GET with an empty body.

Response

If everything went ok, you will be answered with an HTTP 200 OK and a JSON response.

Example
  • /managers
  • /licenses

Show

Returns a single resource of a certain type (depends on the endpoint).

Request

The format is usually this: /endpoint/{id}

Where {id} is the the numeric id you want to get returned.

It must be an HTTP GET with an empty body.

Response

If everything went ok, you will be answered with an HTTP 200 OK and a JSON response.

Store

It lets you create a single resource of a certain type.

Request

The format is usually this /endpoint

It must be an HTTP POST where the body is a json containing the resource you want to create.

Please refer to the JSON API documentation for more information.

Response

If everything went ok, you will be answered with an HTTP 200 OK and a JSON response, containing the resource it was created.

Update

It lets you update information about an already existing resource.

Request

The format is usually this: endpoint/{id}

Where {id} is the numeric id you want to be edited.

It must be an HTTP PATCH where the body is the json representing the resource you want to edit.

Information about how this JSON is structured can be read here

Response

If everything went ok, you will be answered with an HTTP 200 OK and a JSON response, containing the edited resource with its new changes.

Delete

It lets you delete a resource. Please note this operation cannot be undone.

Request

The format is usually this /endpoint/{id}

Where {id} is the numeric id of the resource you want to delete.

It must be an HTTP DELETE with an empty body.

As always, you can check the analogous JSON API documentation for more information about this topic.

Response

If everything went ok, you will be answered with a HTTP 204 No Content. This means the resource was successfully deleted.