email-assistant/indexer
2018-02-06 10:59:34 -08:00
..
indexer Fix token db path 2018-02-06 10:59:19 -08:00
.dockerignore Update dockerignore for tokendb 2018-02-06 10:59:34 -08:00
.gitignore Add initial indexer apis 2018-02-03 00:06:55 -08:00
docker-compose.yml Fix token db path 2018-02-06 10:59:19 -08:00
Dockerfile Update indexer to write sqlite db to persisted volume 2018-02-05 17:56:55 -08:00
Readme.md Add indexer readme 2018-02-03 00:34:14 -08:00
requirements-dev.txt Add initial indexer apis 2018-02-03 00:06:55 -08:00
requirements.txt Pin versions in indexer 2018-02-05 12:44:27 -08:00

Indexer

Simple service to act as data layer for Email Assitant

Healthcheck

Path: / Returns: OK

Tokens

Path: /token

POST

Accepts JSON representation of a EmailToken

Accepts:

Field Type Example
"subject" String "Your shipping info"
"token" String "123456"
"type" String "SHIPPING"
"metadata" Object (optional) {"carrier": "UPS"}
"disabled" Boolean (optional) false

Returns:

Field Type Example
"success" Boolean true
"token" Token Object {"id": 1, ... }

GET

Path: /token Returns all Token Objects

Parameters:

Parameter Description Example
"filter_type" String token type to filter by SHIPPING

Returns:

Field Type Example
"tokens" List of Token Objects [{"id": 1, ... }, ...]

Path: /token/<int:token_id> Returns Token Object with that ID