You are here:

Home

/

Documentation

/

Introduction

API reference

The JournalOS API is organized around REST. Our API has predictable resource-oriented URLs.

You can not use the JournalOS API in test mode. This means all requests will be processed towards your production account. Please be cautious.

The JournalOS API doesn’t support bulk updates. You can work on only one object per request.

Base URL

Code
https://j.codingcat12.net/api

Test the API yourself

If you want to test the API yourself, we provide two convenient tools for you to use: Bruno .

The documentation is included in the GitHub repository, under the docs folder.

Why these tools? Because they're fresh, new, free and open source under the MIT license, and I really like their ethos.

Conventions of the API

There is no strict standard for JSON payloads, but we do try to follow the JSON:API specification , which defines a structured format for responses.

Pagination

All endpoints that return a collection of resources support pagination.

The default value for per_page is 10. This can not be changed at the moment.

All responses will include links to navigate to the next and previous pages.

GET Example of pagination
{
"meta": {
"current_page": 1 ,
"from": 1 ,
"last_page": 1 ,
"links": [
{
"url": null ,
"label": "« Previous" ,
"page": null ,
"active": false
},
{
"url": "https://j.codingcat12.net/api/settings/logs?page=1" ,
"label": "1" ,
"page": 1 ,
"active": true
},
{
"url": null ,
"label": "Next »" ,
"page": null ,
"active": false
]
},
"path": "https://j.codingcat12.net/api/settings/logs" ,
"per_page": 10 ,
"to": 1 ,
"total": 1
}
}

Health

This endpoint checks the health of the application and returns a simple "ok" message. It lets you know if the application is running and if the database is connected.

URL parameters

This endpoint does not have any parameters.

Query parameters

This endpoint does not have any parameters.

Response attributes

message string

The message of the response.

status integer

The status code of the response.

GET /api/health
{
"message": "ok" ,
"status": 200 ,
}