{"id":19308534,"url":"https://github.com/dcronqvist/restberry-api","last_synced_at":"2026-05-16T08:09:52.212Z","repository":{"id":40956051,"uuid":"240977040","full_name":"dcronqvist/restberry-api","owner":"dcronqvist","description":"☁ REST API that is hosted on my Raspberry Pi","archived":false,"fork":false,"pushed_at":"2023-02-16T02:49:33.000Z","size":155,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T03:17:22.421Z","etag":null,"topics":["raspberry-pi","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcronqvist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-16T22:35:46.000Z","updated_at":"2022-05-30T22:31:07.000Z","dependencies_parsed_at":"2025-01-06T01:26:35.031Z","dependency_job_id":"599e65e0-1c3a-43c0-8e5e-29ac1d4ac151","html_url":"https://github.com/dcronqvist/restberry-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dcronqvist/restberry-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcronqvist%2Frestberry-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcronqvist%2Frestberry-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcronqvist%2Frestberry-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcronqvist%2Frestberry-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcronqvist","download_url":"https://codeload.github.com/dcronqvist/restberry-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcronqvist%2Frestberry-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275303838,"owners_count":25441156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["raspberry-pi","rest-api"],"created_at":"2024-11-10T00:15:18.171Z","updated_at":"2025-09-15T18:35:55.113Z","avatar_url":"https://github.com/dcronqvist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# restberry-api\n\n![Uptime Robot ratio (7 days)](https://img.shields.io/uptimerobot/ratio/7/m788440920-edcdd5975b38ec31da628d55) ![Website](https://img.shields.io/website?down_message=down\u0026label=status\u0026up_message=up\u0026url=https%3A%2F%2Fapi.dcronqvist.se) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/dcronqvist/restberry-api/Run%20Pytest?label=tests) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/dcronqvist/restberry-api/CI%20to%20Docker%20Hub?label=build%20%26%20docker%20hub%20push) ![Docker Pulls](https://img.shields.io/docker/pulls/dcronqvist/restberry-api) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/dcronqvist/restberry-api/latest)\n\nA REST API that used to be hosted on my Raspberry Pi 4, hence the name. Is now hosted as a docker container on another server. \n\nCheck it out here: [https://api.dcronqvist.se](https://api.dcronqvist.se)\n\n## Table of contents\n\n- [Authentication](#authentication)\n- [Available privileges](#available-privileges)\n- [List of endpoints](#list-of-endpoints)\n    - [Authorization](#authorization)\n        - [/v1/auth/login](#authorization)\n    - [Economy](#economy)\n        - [/v1/economy/periods/months](#economy)\n        - [/v1/economy/periods/months/current](#economy)\n        - [/v1/economy/periods/years](#economy)\n        - [/v1/economy/periods/years/current](#economy)\n        - [/v1/economy/accounts](#economy)\n        - [/v1/economy/transactions](#economy)\n        - [/v1/economy/transactions/id](#economy)\n    - [PiHole](#pihole)\n        - [/v1/pihole/status](#pihole)\n    - [AI](#ai)\n        - [/v1/ai/accountant](#ai)\n\n## Authentication\n\nTo authenticate against the API, you must have a valid login (username \u0026 password), which you POST to [https://api.dcronqvist.se/v1/auth/login](https://api.dcronqvist.se/v1/). Once authorized, you'll be given a token which will be valid for the following 60 minutes, after that you must acquire a new token to remain authorized. \n\nThe acquired token must be supplied in the `Authorization` header for all subsequent API requests. The only endpoint which does not require the `Authorization` header is of course the `/v1/auth/login` endpoint, as that wouldn't make much sense.\n\n## Available privileges\n\nThere is a multitude of RESTful endpoints, which all require certain ***privileges***.\n\nPrivilege | Description\n------------ | -------------\neconomy | Base privilege for most endpoints regarding economy\naccounts | Additional economy privilege for accessing accounts\ntransactions | Additional economy privilege for accessing transactions\nperiods | Additional economy privilege for accessing economic periods\npihole | Privilege that gives access to status information from dani's pihole\n\n## List of endpoints\n\nHere is a list of endpoints which you can request, however, to have some more insight to what they expect (regarding query parameters or payloads), or more detailed information in general, please head to [https://api.dcronqvist.se](https://api.dcronqvist.se) and go to the relevant version to see the official documentation.\n\n### Authorization\nAll endpoints related to authentication in the API.\n\nURL | HTTP Method | Privileges | Returns/Performs\n--- | ----------- | ---------- | ---------------\n/v1/auth/login | POST | None | A token which is valid for 60 minutes\n\n### Economy\n\nAll endpoints related to dani's personal finance, all of  **the following endpoints require the privilege `economy`** in addition to their specific privilege.\n\nURL | HTTP Method | Privileges | Returns/Performs\n--- | ----------- | ---------- | ---------------\n/v1/economy/periods/months | GET | `periods` | Returns the specified month(s)'s economic period\n/v1/economy/periods/months/current | GET | `periods` | Returns the current month's economic period\n/v1/economy/periods/years | GET | `periods` | Returns the specified year's economic period\n/v1/economy/periods/years/current | GET | `periods` | Returns the current year's economic period\n/v1/economy/accounts | GET | `accounts` | Returns all or the specified account(s)'s information\n/v1/economy/accounts | POST | `accounts` | Creates a new economy account\n/v1/economy/transactions | GET | `transactions` | Returns all or the specified transaction(s)'s information\n/v1/economy/transactions | POST | `transactions` | Creates a new transaction\n/v1/economy/transactions/id | GET | `transactions` | Returns the specified transaction\n\n### PiHole\n\nAll endpoints related to dani's PiHole, all the following endpoints require the privilege `pihole`.\n\nURL | HTTP Method | Returns/Performs\n--- | ----------- | ---------------\n/v1/pihole/status | GET | Returns PiHole statistics\n\n### AI\n\nAll endpoints related to dani's different AI models.\n\nURL | HTTP Method | Privileges | Returns/Performs\n--- | ----------- | ---------- | ---------------\n/v1/ai/accountant | GET | `economy, transactions, accounts` | Predicts which accounts the specified transaction might go FROM and TO.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcronqvist%2Frestberry-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcronqvist%2Frestberry-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcronqvist%2Frestberry-api/lists"}