Forum Discussion
Struggling to create refresh plan with rest API
- 4 years ago
It's probably an issue with the json payload since the Report Portal itself uses the REST api to create schedules.
So what I would suggest is to open the browser developer tools and go to the network tab (I normally use Chrome or the new Edge for this sort of thing). Then create a schedule in the portal that is the same sort of thing that you would want to creat using the API. You should then see the relevant POST calls in the networking tab with real examples of valid json payloads.
You could then delete these example schedules and then re-execute the same requests using Postman.
It's probably an issue with the json payload since the Report Portal itself uses the REST api to create schedules.
So what I would suggest is to open the browser developer tools and go to the network tab (I normally use Chrome or the new Edge for this sort of thing). Then create a schedule in the portal that is the same sort of thing that you would want to creat using the API. You should then see the relevant POST calls in the networking tab with real examples of valid json payloads.
You could then delete these example schedules and then re-execute the same requests using Postman.
Thank you, I tried it and found that the payload differed from what I previously used.
Unfortunally I still get an 500 internal server error when posting the same payload that is used to create a schedule from the report portal with postman. Maybe something else is still wrong, I will make some more tests.