API/Postman Flashcards
Challenges for rest API testing
- api documentation
- access to db
- authorization overhead
What’s the difference between put and post methods
Post - creates a new record in the database
Put - changes records information in the database
Different method/requests types in rest API
- post
- put
- patch
- delete
- head
- options
- get
What’s the difference between put and patch
Put - method of modifying recourses that updates the entire recourse/record
Patch - method of modifying recourses that updates partial data without modifying the entire data.
What’s the difference between rest API and GrqphQL
The core difference between GraphQL and Rest API is that graphQL is a specification, a query language, while REST is an architectural concept for network-based software
Status/response codes
1- hold on Request initiated by the browser is continuing
2 - here you go - success codes
3** - go away, unauthorized - redirection response
4** - you fd up - client errors
5** - I fd up(server)- server error codes
API abbreviation
Application programming interface
REST abbreviation
Representational state transfer
GraphQl abbreviation
Graph Query Language
Importance of API testing
- detect bugs earlier
- It is critical for integration testing since API is used to communicate between different software systems
- Time saving
- cost efficient
Why postman
- you can write tests
- manipulate data
- test API and graphQL
- you can write commands
- robust community and support
Most common status codes
200 - Success/ok
301 - Permanent redirect(page moved to a new URL)
302 - temporary redirect
304 - not modified for caching purposes
400 - bad request
401 - unauthorized error
403 - forbidden
404 - not found
500 - internal server error
501 - not implemented
What is Basic Auth in Postman
It’s the basic authentication provided for HTTP user agents like browser to enter username and password
what is binary form in Post method
Post binary form designed to send information in the forma that is impossible to enter manually, like large csv files
what is the difference between authentication and authorization
- Authorization is a way of allowing or permitting someone, authentication is proving that something is genuine.
- Authentication comes first
- Authorization is open with permission, for authentication requires you to have a password.