This repository contains a small REST API, written in Spring Boot. The resources are related to David Allens Getting Things Done time management method.
curl -v -d 'username=john@doe.com&password=d03' \
http://localhost:8080/public/users/register
The outcome is an authentication token.
Alternatively, store the token in an environment variable:
TOKEN=$(curl -d 'username=john@doe.com&password=d03' http://localhost:8080/public/users/register)
curl -v -d 'username=john@doe.com&password=d03' \
http://localhost:8080/public/users/login
The outcome again is an authentication token.
Alternatively, store the token in an environment variable:
TOKEN=$(curl -d 'username=john@doe.com&password=d03' http://localhost:8080/public/users/login)
Pre-conditions
- the authentication token is stored in an environment variable
TOKEN
curl -v -H "Authorization: Bearer $TOKEN" \
http://localhost:8080/users/me
Pre-conditions
- the authentication token is stored in an environment variable
TOKEN
curl -v -H "Authorization: Bearer $TOKEN" \
http://localhost:8080/contexts
curl -v -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{ \"name\": \"Example\" }" \
http://localhost:8080/contexts
Pre-conditions
- the authentication token is stored in an environment variable
TOKEN
curl -v -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{ \"text\": \"Example\", \"context_id\": \"{context-id}\" }" \
http://localhost:8080/tasks/
curl -v -H "Authorization: Bearer $TOKEN" \
http://localhost:8080/contexts/{context-id}/tasks