click below
click below
Normal Size Small Size show me how
Rest API
| Question | Answer |
|---|---|
| CRUD Operations/ HTTP Methods | - Get: gets data and responds the data as json - Post: creates data in database - Put: updates data in database - Delete: deletes data from database |
| status codes | 200- OK 201 - Created 204 - No Content 400 - Bad request 401- Unauthorized 403 - Forbidden 404- Not Found |
| BaseURl and Endpoint | -baseurl: main address for api - endpoint: specific point of access within api |
| difference between PUT and PATCH | - put updates the entire item - patch partially updates an item |
| difference between POST and PUT | post creates and put updates it |
| POSTMAN collections | organize group and reuse api requests within platform |
| different data types of payload | JSON and XML |
| headers | - Authorization: Token - Accept: application/json - Content type: application/json |
| Serialization and Deserialization | - Serialization POJO to JSON - Deserialization JSON to POJO |
| difference between Authentication and Authorization | - Authentication stating that you are who you are - Authorization asking if you have access to certain resource |
| JWT | JSON Web Token (header,payload, signature) |
| different types of endpoint parameters | - path parameter/ department/78 - query parameter/ departments?limit=5&order=desc |
| example of test scenario | POST/users returns 201 created with the new user data - GET /users/{id} returns 200 OK with the correct user data). |
| difference between 401 and 403 status code | 401 unauthorzed and 403 Forbidden |