Home > Mobile >  REST API - retrieve body parameters for post call
REST API - retrieve body parameters for post call

Time:06-08

This is rather a generic question for (any) REST API: I am having a REST api that is being used to update some cloud tool. The provided API documentation is rather poor and I was wondering the following: If I know a certain POST url, is there a way to retrieve the full potential body of the POST call by making use of for example POSTMAN? If this is the case, how should my request look like to retrieve the body parameters?

So in short, if I am aware of an URL that creates a resource, eg:

https://cloud.app.com/api/vx/accounts/account_id/projects/project_id/resource/

am I able to retrieve something like:

{
    "id": int,
    "account_id": int,
    "project_id": int,
    "resource_name": str,
    "resource_type": str,
    "state": null,
    "threads": optional[int] #default= 4,
  
}

So that I am fully aware of all potential parameters before creating the body of the POST request

CodePudding user response:

No way. You need documentation or access to view the code to know full potential body. If there is some entity that can be changed by POST, you can try to get the data of this entity through a GET and check keys in the response. But not the fact that these parameters can be changed by POST or that its full list of keys.

  • Related