API Questions and Answers
API Questions and Answers
27. What are diff ways to pass the data/ scripting languages?
JSON:
{
"name": "Suraj ",
"email": "[email protected]",
"gender": "Male",
"status": "Active"
}
b) XML:
<name>suraj</name>
<email>[email protected]</email>
c) String
d) Text
e) Html
f) Javascript
Etc.
c. Oauth1
Oauth1 required below things:
Consumer Key
Consumer Secret
Access Token
Secret Token
Above info will get from developers.
e. Oauth2
Oauth2 required below things:
Client Id
Client Secret
Grant type
Above info will get from developers.
f. Bearer Token
g. NoAuth
etc.
34. what are different environment variable in Postman?
Global variable
Collection variables
Environmental variables
Local variables
b. Collection Variables
-Collection variables are available throughout the requests in a collection and are
independent of environments, so do not change based on the selected environment.
- Collection variables are suitable if you are only using a single environment, for
example for auth / URL details.
Snippet: pm.collectionVariables.set("variable_key", "variable_value");
c. Environment variables
- Environment variables allow you to tailor your processing to different environments,
for example local development vs testing or production. Only one environment can be
active at a time
-Snippet: pm.environment.set("variable_key", "variable_value");
d. Local Variables
- Local variables are temporary, and only accessible in your request scripts. Local
variable values are scoped to a single request or collection run, and are no longer
available when the run is complete
Snippet: pm.variables.get("variable_key");
What is WSDL file
WSDL basically an XML document contains all the details about web service and all api
request