Get and Post json data on generic api endpoint

57 views
Skip to first unread message

1rn18cs094_sanskriti

unread,
Jun 25, 2021, 6:18:19 AM6/25/21
to Django REST framework
I have a json data and I want to post it on some api endpoint (like :localhost/workflow) 
and want to get that data back on get call (get localhost/workflow or get localhost/workflow/<id>) .I have more than 1 json data and want to attach id to it.
How should I go about it
Data I have attached as an attachment.
aws.json

Nikeet NA

unread,
Jun 25, 2021, 7:48:17 AM6/25/21
to Django REST framework
You need to create models according to your json data , write and api end point which accepts this data , and loads it in  data base. You can use retrieve  api mixin and create api mixin , for this, override the def create method to work with your data.
Reply all
Reply to author
Forward
0 new messages