Quickstart¶
A simple docker-compose-quickstart.yml
file is available to get the APIs
up and running in minutes. This file has some convenience settings to get
started quickly and these should never be used for anything besides testing:
A default secret is set in the
SECRET_KEY
environment variable.A predefined database and database account is used.
API authorizations are disabled.
With the above remarks in mind, let’s go:
Objecttypes API¶
Create a project folder:
$ mkdir objecttypes-api $ cd objecttypes-api
Download the
docker-compose
file:$ wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
PS> wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
Start the Docker containers:
$ docker-compose -f docker-compose-qs.yml up -d
Import a demo set of objecttypes:
$ docker-compose exec web src/manage.py loaddata demodata
Create a superuser
$ docker-compose exec web src/manage.py createsuperuser
Objects API¶
Create a project folder:
$ mkdir objects-api $ cd objects-api
Download the
docker-compose
file:$ wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
PS> wget https://raw.githubusercontent.com/maykinmedia/objects-api/master/docker-compose-quickstart.yml -O docker-compose-qs.yml
Start the Docker containers:
$ docker-compose -f docker-compose-qs.yml up -d
Import a demo set of objects (linking to the demo objecttypes):
$ docker-compose exec web src/manage.py loaddata demodata
Create a superuser
$ docker-compose exec web src/manage.py createsuperuser
Retrieve an object via the Objects API in your webbrowser:
http://localhost:8000/api/v1/objects/
After you have the Objects API and the Objecttypes API running you can configure Authentication, Authorization and use the API’s.