Exercise API

Creating a new exercise

Creates a new exercise requires an admin user to be logged in

Parameters

Name Description
name Exercise name
user_id Admin User id

Request

Headers

Content-Type: application/json
Host: example.org

Route

POST /v1/exercises

cURL

curl "http://extracker-api.herokuapp.com/v1/exercises" -d '' -X POST \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json; charset=utf-8

Status

422

Body

Request

Headers

Content-Type: application/json
Host: example.org

Route

POST /v1/exercises

Body

cURL

curl "http://extracker-api.herokuapp.com/v1/exercises" -d '{"name":"Squats","user_id":"1"}' -X POST \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json; charset=utf-8

Status

201

Body