Skip to content

REST API to make divelogs in ATMOS Platform to public

License

Notifications You must be signed in to change notification settings

umatare5/logbook-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d76b0c9 · Feb 9, 2024

History

13 Commits
Feb 9, 2024
Jan 22, 2022
Jan 22, 2022
Jan 22, 2022
Jan 28, 2022
Jan 22, 2022
Apr 30, 2022
Jan 22, 2022
Jan 26, 2022
Jan 22, 2022
Jan 22, 2022
Jan 22, 2022
Jan 26, 2022
Jan 22, 2022
Jan 22, 2022
Jan 22, 2022
Jan 26, 2022
Jan 22, 2022
Apr 30, 2022
Apr 30, 2022
Jan 28, 2022
Jan 26, 2022

Repository files navigation

logbook-api

logbook-api is a REST API to make divelogs in ATMOS Platform to public.

Syntax

$ logbook
NAME:
   logbook - Serve your dive-logs

USAGE:
   logbook COMMAND [options...]

VERSION:
   0.1.0

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --web.listen-address value, -L value   Set IP address (default: "0.0.0.0")
   --web.listen-port value, -P value      Set port number (default: 8080)
   --web.debug, -D                        Set debug mode (default: false)
   --config.atmos.server value, -s value  Set FQDN for ATMOS Platform (default: "http://localhost:8080/") [$LOGBOOK_ATMOS_API]
   --config.atmos.token value, -t value   Set access-tokens to access to ATMOS Platform [$LOGBOOK_ATMOS_TOKEN]
   --help, -h                             show help (default: false)
   --version, -v                          print the version (default: false)
  • ✓ Supported variables

    Following variables are supported.

    Environment Variable Description
    LOGBOOK_ATMOS_API FQDN for ATMOS Platform.
    LOGBOOK_ATMOS_TOKEN Access-token to use ATMOS Platform API.

Install

You can download the binary archive on releases page.

After unarchived, start logbook-api easily with the following command.

./logbook

Endpoints

Admin API

Method Path Parameters Description
GET /api/admin/health - Get status of this API

Divelog API

Method Path Parameters Description
GET /api/v1/divelogs limit=number,
cursor=string
Get dive-logs
GET /api/v1/divelog/{divelogId} divelogId=String Get detail of a dive-log

Release

When push new tag, following Github Actions will works;

  • deploy.yml

    • Build new image and push to GCR. After that, the image will be deployed to Cloud Run.
  • release.yml

    • Release new command to Github Releases.