Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filecoin-station/voyager-api
🪐 Voyager API
https://github.com/filecoin-station/voyager-api
Last synced: 16 days ago
JSON representation
🪐 Voyager API
- Host: GitHub
- URL: https://github.com/filecoin-station/voyager-api
- Owner: filecoin-station
- License: other
- Created: 2024-03-05T12:59:11.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T07:33:12.000Z (10 months ago)
- Last Synced: 2024-04-12T15:07:10.396Z (10 months ago)
- Language: JavaScript
- Size: 1.71 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# voyager-api
[Voyager](https://github.com/filecoin-station/voyager) API[![CI](https://github.com/filecoin-station/voyager-api/actions/workflows/ci.yml/badge.svg)](https://github.com/filecoin-station/voyager-api/actions/workflows/ci.yml)
## Routes
### `POST /retrievals`
Start a new retrieval.
Body:
```typescript
{
zinniaVersion: String
}Response:
```typescript
{
id: String,
cid: String
}
```### `PATCH /retrievals/:id`
Parameters:
- `id`: Request ID (from `POST /retrievals`)Body:
```typescript
{
participantAddress: String,
carTooLarge: Boolean,
statusCode: Number,
endAt: String // ISO 8601
}
```Dates should be formatted as [ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format)
strings.Response:
```
OK
```## Development
### Database
Set up [PostgreSQL](https://www.postgresql.org/) with default settings:
- Port: 5432
- User: _your system user name_
- Password: _blank_
- Database: _your system user name_Alternatively, set the environment variable `$DATABASE_URL` with `postgres://${USER}:${PASS}@${HOST}:${POST}/${DATABASE}`.
The Postgres user and database need to already exist, and the user
needs full management permissions for the database.You can also the following command to set up the PostgreSQL server via Docker:
```bash
docker run -d --name voyager-db \
-e POSTGRES_HOST_AUTH_METHOD=trust \
-e POSTGRES_USER=$USER \
-e POSTGRES_DB=$USER \
-p 5432:5432 \
postgres
```### `voyager-api`
Start the API service:
```bash
npm start
```Run tests and linters:
```bash
npm test
```## Deployment
Pushes to `main` will be deployed automatically.
Perform manual devops using [Fly.io](https://fly.io):
```bash
$ fly deploy
```