MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

http://localhost:8000

Authenticating requests

Authenticate requests to this API's endpoints by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Miscellaneous

API methods for basic information

Healthcheck

Check that the service is up. If everything is okay, you'll get a 200 OK response.

Otherwise, the request will fail with a 400 error, and a response listing the failed services.

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/health_check"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost:8000/api/v1/health_check',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400, Service is unhealthy):


{
    "status": false,
    "services": {
        "database": false
    }
}
 

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "status": true,
    "services": {
        "database": true
    }
}
 

Request      

GET api/v1/health_check

Response

Response Fields

status  boolean  

The status of this API (true or false).

services  object  

Map of each downstream service and their status (true or false).

Retrieve own user

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/user"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost:8000/api/v1/user',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{
    "id": 1,
    "name": "John Doe",
    "email": "john_doe@test.com",
    "email_verified_at": "2021-07-19T16:52:07.000000Z",
    "current_team_id": null,
    "profile_photo_path": "profile-photos/tQoWDCXYOOOK15OykHUBLnyrTvB76laGnIAwtaj8.jpg",
    "created_at": "2021-07-19T16:46:51.000000Z",
    "updated_at": "2021-08-22T12:26:11.000000Z",
    "profile_photo_url": "/storage/profile-photos/tQoWDCXYOOOK15OykHUBLnyrTvB76laGnIAwtaj8.jpg"
}
 

Request      

GET api/v1/user

Categories

API methods for managing categories

Display a listing of the resource.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost:8000/api/v1/categories',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


[
    {
        "id": 1,
        "user_id": 1,
        "name": "Technology",
        "created_at": "2021-07-19T16:46:51.000000Z",
        "updated_at": "2021-08-22T12:26:11.000000Z",
        "feeds_count": 8
    },
    {
        "id": 2,
        "user_id": 1,
        "name": "Poetry",
        "created_at": "2021-07-19T16:46:51.000000Z",
        "updated_at": "2021-08-22T12:26:11.000000Z",
        "feeds_count": 3
    }
]
 

Request      

GET api/v1/categories

Store a newly created resource in storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "debitis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/api/v1/categories',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'debitis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{
    "id": 3,
    "user_id": 1,
    "name": "Blogs",
    "created_at": "2021-07-19T16:46:51.000000Z",
    "updated_at": "2021-08-22T12:26:11.000000Z",
    "feeds_count": 0
}
 

Request      

POST api/v1/categories

Body Parameters

name  string  

The name of the category.

Display the specified resource.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/categories/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost:8000/api/v1/categories/15',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{
    "id": 1,
    "user_id": 1,
    "name": "Technology",
    "created_at": "2021-07-19T16:46:51.000000Z",
    "updated_at": "2021-08-22T12:26:11.000000Z",
    "feeds_count": 8
}
 

Request      

GET api/v1/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Update the specified resource in storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/categories/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "id"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'http://localhost:8000/api/v1/categories/18',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'id',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


[{
 "id": 1,
 "user_id": 1,
 "name": "Tech & IT",
 "created_at": "2021-07-19T16:46:51.000000Z",
 "updated_at": "2021-08-23T12:26:11.000000Z",
 "feeds_count": 8
}
 

Request      

PUT api/v1/categories/{id}

PATCH api/v1/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Body Parameters

name  string  

The name of the category.

Remove the specified resource from storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/categories/6"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'http://localhost:8000/api/v1/categories/6',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{}
 

Request      

DELETE api/v1/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Feeds

API methods for managing feeds

Mark all unread feed items as read.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/feeds/mark_all_as_read"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'http://localhost:8000/api/v1/feeds/mark_all_as_read',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{}
 

Request      

PUT api/v1/feeds/mark_all_as_read

Display a listing of the resource.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/feeds"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost:8000/api/v1/feeds',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


[
    {
        "id": 1,
        "user_id": 1,
        "category_id": 1,
        "feed_url": "http://www.example.com/feed",
        "site_url": "http://www.example.com",
        "favicon_url": "http://www.example.com/favicon.ico",
        "name": "Example feed",
        "last_checked_at": "2022-01-12T21:18:15.000000Z",
        "created_at": "2021-07-19T16:46:51.000000Z",
        "updated_at": "2021-08-22T12:26:11.000000Z",
        "feed_items_count": 7,
        "category": {
            "id": 1,
            "user_id": 1,
            "name": "Example category",
            "created_at": "2021-09-23T19:11:01.000000Z",
            "updated_at": "2021-09-23T19:11:01.000000Z"
        }
    },
    {
        "id": 1,
        "user_id": 1,
        "category_id": 2,
        "feed_url": "http://www.example.com/feed",
        "site_url": "http://www.example.com",
        "favicon_url": "http://www.example.com/favicon.ico",
        "name": "Example feed",
        "last_checked_at": "2022-01-12T21:18:15.000000Z",
        "created_at": "2021-07-19T16:46:51.000000Z",
        "updated_at": "2021-08-22T12:26:11.000000Z",
        "feed_items_count": 7,
        "category": {
            "id": 1,
            "user_id": 1,
            "name": "Example category",
            "created_at": "2021-09-23T19:11:01.000000Z",
            "updated_at": "2021-09-23T19:11:01.000000Z"
        }
    }
]
 

Request      

GET api/v1/feeds

Store a newly created resource in storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/feeds"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "category_id": 12,
    "feed_url": "explicabo",
    "site_url": "et",
    "name": "pariatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost:8000/api/v1/feeds',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'category_id' => 12,
            'feed_url' => 'explicabo',
            'site_url' => 'et',
            'name' => 'pariatur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{
    "id": 1,
    "user_id": 1,
    "category_id": 1,
    "feed_url": "http://www.example.com/feed",
    "site_url": "http://www.example.com",
    "favicon_url": "http://www.example.com/favicon.ico",
    "name": "Example feed",
    "last_checked_at": "2022-01-12T21:18:15.000000Z",
    "created_at": "2021-07-19T16:46:51.000000Z",
    "updated_at": "2021-08-22T12:26:11.000000Z",
    "feed_items_count": 7,
    "category": {
        "id": 1,
        "user_id": 1,
        "name": "Example category",
        "created_at": "2021-09-23T19:11:01.000000Z",
        "updated_at": "2021-09-23T19:11:01.000000Z"
    }
}
 

Request      

POST api/v1/feeds

Body Parameters

category_id  integer  

The ID of the category.

feed_url  string  

The URL of the feed.

site_url  string  

The URL of the website.

name  string  

THe name of the feed.

Display the specified resource.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/feeds/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost:8000/api/v1/feeds/2',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{
    "id": 1,
    "user_id": 1,
    "category_id": 1,
    "feed_url": "http://www.example.com/feed",
    "site_url": "http://www.example.com",
    "favicon_url": "http://www.example.com/favicon.ico",
    "name": "Example feed",
    "last_checked_at": "2022-01-12T21:18:15.000000Z",
    "created_at": "2021-07-19T16:46:51.000000Z",
    "updated_at": "2021-08-22T12:26:11.000000Z",
    "feed_items_count": 7,
    "category": {
        "id": 1,
        "user_id": 1,
        "name": "Example category",
        "created_at": "2021-09-23T19:11:01.000000Z",
        "updated_at": "2021-09-23T19:11:01.000000Z"
    }
}
 

Request      

GET api/v1/feeds/{id}

URL Parameters

id  integer  

The ID of the feed.

Update the specified resource in storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/feeds/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "category_id": 12,
    "feed_url": "quia",
    "site_url": "ex",
    "name": "quos"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'http://localhost:8000/api/v1/feeds/3',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'category_id' => 12,
            'feed_url' => 'quia',
            'site_url' => 'ex',
            'name' => 'quos',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


[{
 "id": 1,
 "user_id": 1,
 "category_id": 1,
 "feed_url": "http://www.example.com/feed",
 "site_url": "http://www.example.com",
 "favicon_url": "http://www.example.com/favicon.ico",
 "name": "Example feed",
 "last_checked_at": "2022-01-12T21:18:15.000000Z",
 "created_at": "2021-07-19T16:46:51.000000Z",
 "updated_at": "2021-08-22T12:26:11.000000Z",
 "feed_items_count": 7,
 "category": {
  "id": 1,
  "user_id": 1,
  "name": "Example category",
  "created_at": "2021-09-23T19:11:01.000000Z",
  "updated_at": "2021-09-23T19:11:01.000000Z"
 }
}
 

Request      

PUT api/v1/feeds/{id}

PATCH api/v1/feeds/{id}

URL Parameters

id  integer  

The ID of the feed.

Body Parameters

category_id  integer  

The ID of the category.

feed_url  string  

The URL of the feed.

site_url  string  

The URL of the website.

name  string  

THe name of the feed.

Remove the specified resource from storage.

requires authentication

Example request:
const url = new URL(
    "http://localhost:8000/api/v1/feeds/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'http://localhost:8000/api/v1/feeds/18',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, success):


{}
 

Request      

DELETE api/v1/feeds/{id}

URL Parameters

id  integer  

The ID of the feed.