In order to create an activity we must first add boats, which also require certificates.
This document will provide a tutorial of how to create a training activity from scratch.
We must first get an admin token.
The admin credentials are "administrator" and "administrator".
The input is just the json of those two elements and the response is a token that we can use to create a boat and the certificate.
Here is where we will be placing the admin token.
After that we can use admin endpoints.
We will call the add certificate endpoint from the admin controller.
We will get a response that also includes the id of our certificate.
We can use this id for our next step
We will call the add boat endpoint including our certificate id. We opted for two types of roles in our boat: Coach and Cox but we could also add more if we would like.
We now have the id of our boat.
Before registering the new user we will log out of the admin account by going to the same authorize button and clicking log out.
Now that we have logged out we can register a new user.
We have created a new account and gotten a new token. We will place the token where we did previously.
We need to include our boat in the boats list and select a date that is in the future.
We received a response model of our newly created activity. We can see that it managed to find our boat as it filled in the rest of the details for us automatically.