API Docs

The website sailresults.net supports a public REST API. It also has JavaScript (will be soon) for embedding on other sites and for use there.

REST API

GET /api/competition/{id:int}

Gets competition with files data by id.

Responses
  • 200 - JSON object with competition data and files.
  • 404 - Not found
Remarks

You can also use shorter notation: /api/c/{id:int}


GET /api/file/{id:int}

Gets file data by id.

Responses
  • 200 - JSON array with files.
  • 404 - Not found
Remarks

You can also use shorter notation: /api/f/{id:int}

To download file use link: /f/{id:int}


POST /api/search

Gets files ordered by date and name if dates are equal using website filter. Request must be json with query { "query": "test" }.

Responses
  • 200 - JSON array with files.

Use API with script tag

To use sailresults API via embeded JavaScript:

  • Add <script src="https://sailresults.net/api.js"></script>
  • Functions will be in sailresults object.
  • See this example for more information: API Demo
  • TypeScript Declaration: https://sailresults.net/api.d.ts