WorksheetsRestfulAPI
Total questions: 21
Worksheet time: 11mins
Which of the following best defines a Web Service?
A database system
A system that allows applications to communicate over a network
A programming language
A type of server
Which format is MOST commonly used in REST APIs today?
XML
JSON
YAML
CSV
Which HTTP method is idempotent?
POST
GET
PATCH
None of the above
Which status code means “Resource Not Found”?
200
201
404
500
Which of the following is NOT a REST principle?
Stateless communication
Client-Server architecture
Cacheable responses
Requires SOAP protocol
In Django, which file is used for defining database models?
Which HTTP header specifies the data format being sent to the server?
a) Authorization
b) Accept
c) Content-Type
d) Cache-Control
Which HTTP status code indicates success when a new resource is created?
200
201
202
204
Which authentication method uses Base64 encoding of username and password?
API Key
Basic Auth
Bearer Token
OAuth 2.0
In REST, what does the 201 status code represent?
OK
Created
No Content
Forbidden
In REST, which HTTP method is used to update an existing resource completely?
POST
PUT
PATCH
DELETE
Which HTTP method is generally used to delete a resource?
GET
DELETE
POST
PUT
Which of the following is an example of a RESTful URL design?
/getUser?id=101
/api/users/101
/fetch/user/101
/users.php?id=101
In Django, which command is used to start a new project?
django-admin startapp
django-admin runserver
django-admin startproject
django-admin migrate
Which HTTP status code indicates a server error?
200
404
500
401
Which of the following is NOT an HTTP method?
GET
POST
UPDATE
DELETE
Which status code means “Unauthorized”
200
401
403
500
In Django, which file is used for project-wide configurations like DB, security, middleware?
In Django, which file handles the request/response logic
Which is the correct command to run a Django development server?
