Measurement API

Creating a new user measurement

Registers a new measurement from the login user

Parameters

Name Description
description Measurement description
amount Amount of exercise done by the user
user_id Login User
exercise_id Exercise done by the user

Request

Headers

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

Route

POST /v1/users/1/measurements

cURL

curl "http://extracker-api.herokuapp.com/v1/users/1/measurements" -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/users/1/measurements

Body

cURL

curl "http://extracker-api.herokuapp.com/v1/users/1/measurements" -d '{"description":"Repetitions","amount":"12","exercise_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