Martyn Inglis
f88f86a924
Endpoint to allow SES updates to occur
...
- update notification with delivery state
2016-03-10 17:29:17 +00:00
Martyn Inglis
1f22f2b7cc
Updates to fire text integration:
...
- client updated to raise errors with fire text error codes/messages
New endpoint
- /notifications/sms/firetext
For delivery notifications to be sent to.
2016-03-10 15:40:41 +00:00
Martyn Inglis
61a0cf32c8
Ensure clients have rate limit enforced
...
- rate limiting is a hard number per day
- not limited in terms of rate of request
- limit is a single number held against the service
- every notification counts against the limit, regardless of type
- return a 429 if limit exceeded.
2016-03-09 11:06:37 +00:00
Martyn Inglis
e07d16e8c6
Fixed up dates so that we respect mills
2016-03-08 17:45:37 +00:00
Martyn Inglis
67c4bd2263
Build rest endpoint to read service stats
...
- get stats by service id
- returns a list of stats objects
Not paginated - have 1 row per day.
2016-03-08 16:34:03 +00:00
Martyn Inglis
5a2cf1baca
Appeased pep8
2016-03-03 15:38:22 +00:00
Martyn Inglis
24a9487a20
Updated status page
...
- include travis build number
- renamed properties
- ELB version
- moved code all into health check
- changed health check to be on same URL for admin and api
2016-03-03 15:18:12 +00:00
Adam Shimali
3b66745677
[WIP] Start of api for accepting invite.
2016-03-01 14:13:38 +00:00
Nicholas Staples
16e1ecb134
Working permissions and all tests passing.
...
Remove print statements.
Fix for review comments.
2016-02-26 15:00:29 +00:00
Martyn Inglis
a3a9d673a6
Merge branch 'master' into celery-jobs
2016-02-25 12:06:53 +00:00
Martyn Inglis
b3884e2d6c
Move job processing into celery
...
- brings boto S3 into new AWS folder
- CSV processing utils method
Rejigs the jobs rest endpoint - removes some now unused endpoints,
Calls to the task with the job, job processing in task, delegating SMS calls to the sms task
2016-02-24 17:12:30 +00:00
Adam Shimali
e6fe10cbdc
[WIP] added endpoint and dao to create invites for users.
...
Droped token as later code to send email invite can generate
timebased url to send to user. That can then be checked
against configurable time threshold for expiry. Therefore
no need to store a token.
2016-02-24 14:18:56 +00:00
Martyn Inglis
b01782bbe6
Send Email via the API
...
- uses the new subject/email from fields present on the templates / service tables
- brings the send email api call into line with the sms one.
- same fields (to/template_id)
- same rules regarding restricted services
- wired in as a task into celery
Requires
- new celery queue
- new env property (NOTIFY_EMAIL_DOMAIN)
2016-02-22 17:17:29 +00:00
Martyn Inglis
9bb95a53ec
Updates to template endpoints:
...
- moved into templates rest class
- updated dao
- removed delete methods
- constraint on subject line
2016-02-22 12:55:18 +00:00
Rebecca Law
9073814d9f
I have an issue with the test, not sure why?
2016-02-17 17:48:23 +00:00
Martyn Inglis
226459132a
Basic (Very basic) implementation of the fire text API.
...
[https://www.firetext.co.uk/docs#sendingsms ](https://www.firetext.co.uk/docs#sendingsms )
Not to be merged. This API has a limit on it at the moment that will need to be removed before it is used in anger.
2016-02-17 12:57:51 +00:00
Martyn Inglis
73d0e67e68
Removed alpha api client
2016-02-17 09:22:06 +00:00
Martyn Inglis
cb265896a7
Merge branch 'master' into move-sms-notifications-into-celery
...
Conflicts:
app/__init__.py
tests/conftest.py
2016-02-17 09:14:37 +00:00
Rebecca Law
08ba5de61b
Update config
...
Source the configuration from an environment file, this way it is similar to how the aws environment works
2016-02-16 16:01:50 +00:00
Martyn Inglis
18d63e241b
Extracted serialiser for encryption into a flask module
...
- allows mocking easier
- shared across methods
- not built everytime
2016-02-16 15:28:30 +00:00
Martyn Inglis
e42da7dd54
Fixing up tests to validate the call to the celery tasks.
...
- mocker used to test call or otherwise of the task
- no new tests just a spring clean
2016-02-16 14:06:56 +00:00
Martyn Inglis
655beddba6
Fixed up the get_notitication endpoint
...
- returns a notification
2016-02-16 11:22:44 +00:00
Martyn Inglis
223cb8c2dd
Made SMS messages go through celery
...
- twilio client pulled in from delivery app
- made method to perform task
2016-02-15 16:01:14 +00:00
Martyn Inglis
fcc1585fdf
Merge branch 'master' into celery-spike
...
Conflicts:
app/__init__.py
app/notifications/rest.py
config.py
wsgi.py
2016-02-12 09:36:49 +00:00
Nicholas Staples
1b25a3c762
Removed alpha client imports.
2016-02-09 16:13:48 +00:00
Martyn Inglis
fb41acdac9
Celery tests
2016-02-09 13:31:45 +00:00
Nicholas Staples
cd5a91d4c8
version file has been updated to include a travis commit and time of build.
2016-02-01 11:37:22 +00:00
Nicholas Staples
99b849171f
Status page updated with api version and db version.
2016-01-29 12:51:33 +00:00
Adam Shimali
c15fdbe197
Fixed formatting
2016-01-20 15:51:13 +00:00
Nicholas Staples
92697d2671
Addedcors response.
2016-01-20 15:28:39 +00:00
Adam Shimali
f18071084e
Merge pull request #18 from alphagov/proxy-to-alpha
...
Proxy to alpha
2016-01-19 16:02:42 +00:00
Martyn Inglis
fa30782d70
Removed Status endpoints from requiring Auth tokens
...
- auth tests now use service endpoints
- one test commented out and needs reworked
2016-01-19 15:32:33 +00:00
Martyn Inglis
742a567036
Added AWS files to
...
- upgrade database
- use credstash for secret overrides
2016-01-19 14:50:42 +00:00
Martyn Inglis
d275ba83a2
Added endpoints for the proxy to notifications.
...
- this uses alpha API for delivery
- no DB model included as just proving
- all notifications for same service at the moment (!)
2016-01-19 11:23:09 +00:00
Adam Shimali
f4a0a9b8d9
Fix for job urls that should have been within context of a service.
...
The service id path parameter is captured in the url prefix for the
job blueprint.
2016-01-18 09:57:04 +00:00
Rebecca Law
5f59b631e1
Added the before_request so that all calls must have a valid token.
...
Next is to get all the rest tests to pass again.
2016-01-15 17:01:26 +00:00
Adam Shimali
834801d19b
Added endpoints for creating job, and getting job/jobs.
2016-01-15 15:48:05 +00:00
Rebecca Law
010408d98a
Remove the view packages
2016-01-14 16:13:27 +00:00
Rebecca Law
34693d70af
Removed the main package.
2016-01-14 14:28:23 +00:00
Nicholas Staples
dad0fff4ba
Template rest api skeleton added.
2016-01-13 11:04:13 +00:00
Nicholas Staples
49e98c21e7
Service and User API added, working with tests. Still need to polish the edges and add more tests.
2016-01-11 15:07:13 +00:00
Nicholas Staples
0bc4d02713
Work in progress, skeleton of the api created and testing started. Need to fix authentication tests.
2016-01-08 17:51:46 +00:00
Nicholas Staples
5bcc615825
Added dao, test framework and tests for dao.
2016-01-08 12:18:12 +00:00
Nicholas Staples
a327702ad0
Initial code added for models and services not functional yet. Bootstrap and migrations added for db.
2016-01-07 17:50:55 +00:00
Martyn Inglis
1c926a1b34
Added logging from notifications-utils.
2016-01-07 13:28:56 +00:00
Martyn Inglis
3f5e7ae0bd
Added healthcheck page
...
- used in ELB healthchecks
2015-12-15 17:14:13 +00:00
Martyn Inglis
dbf70ec1eb
First pass at implementing API authentication using new JWT tokens
...
- NOTE - this does not manage secrets. There is only one URL and there is no functionality implemented
- prior to rolling out we need to store secrets properly
Uses the JWT libraries in [https://github.com/alphagov/notifications-python-client ](https://github.com/alphagov/notifications-python-client )
- Tokens are checked on every request and will be rejected if token is invalid as per the rules in the python clients.
2015-12-15 10:47:20 +00:00
Martyn Inglis
e25ca0e434
Basic commit to add get pages showing
...
- bootstrap script
- run script
- couple of views
- basic config
2015-12-10 10:56:59 +00:00
Rebecca Law
3d59c72e17
Initial version of the notify-notifications-api
2015-11-18 17:02:25 +00:00