REST API - Example URL and JSON combinations.. #1232
nodecentral
started this conversation in
Show and tell
Replies: 1 comment
-
No reverse engineering needed, you can use swagger to browse and hit the various endpoints - https://wger.de/api/v2/schema/ui#/weightentry/weightentry_create |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
While I’m very new to Wger, and to be honest I’m not entirely sure I’ve got my docker instance setup/configured correctly, I’ve been trying to learn how the REST API works..
First off you need to have active access codes/tokens to make a submission, and how to get those is shown in the published content - > https://wger.de/en/software/api.
What’s not shown (at least not clearly) is how you submit (POST) information to your Wger instance…
To get the ball rolling, he’s how to log your weight..
URL - http://IP:PORT/api/v2/weightentry/
JSON - {"date":"2023-01-20","weight":"70"}
Curl example..
I’ll add more when I’ve worked some of the others out… :-)
If anyone reading this has working examples, please share them below..
Beta Was this translation helpful? Give feedback.
All reactions