NEW
Font size
S
M
L
XL
WorksheetsAPI Integration
Total questions: 40
Worksheet time: 13mins
Name
Class
Date
1.
What does API stand for?
a)
Application Programming Interface
b)
Applied Programming Instruction
c)
Automated Processing Integration
d)
Advanced Programming Interaction
2.
Which statement best describes API integration?
a)
It allows multiple software systems to communicate and share data.
b)
It compiles source code into machine language.
c)
It connects two hardware devices.
d)
It creates backup copies of data.
3.
The primary function of an API is to:
a)
Control database storage
b)
Provide a set of rules for software communication
c)
Format web pages
d)
Manage network protocols
4.
An API endpoint refers to:
a)
The database where data is stored
b)
The URL where an API receives requests
c)
The port number of the web server
d)
The encryption key
5.
Which of the following HTTP methods retrieves data?
a)
POST
b)
GET
c)
PUT
d)
DELETE
6.
What is the main use of the POST method?
a)
Retrieve data
b)
Delete data
c)
Create new data
d)
Update data partially
7.
Which format is most commonly used in API communication today?
a)
CSV
b)
JSON
c)
PDF
d)
HTML
8.
What does REST stand for?
a)
Representational State Transfer
b)
Reliable System Transfer
c)
Remote Service Transaction
d)
Resource Exchange System Type
9.
Which HTTP status code indicates “OK” or success?
a)
404
b)
500
c)
200
d)
401
10.
A 401 status code means:
a)
Unauthorized access
b)
Resource not found
c)
Bad request
d)
Server timeout
11.
In REST, resources are identified using:
a)
IP addresses
b)
URLs
c)
Session tokens
d)
Tables
12.
Which method deletes a resource?
a)
REMOVE
b)
DELETE
c)
ERASE
d)
POST
13.
What does PUT do in REST API?
a)
Adds new data
b)
Updates an entire resource
c)
Updates only part of the resource
d)
Deletes data
14.
What does PATCH do?
a)
Deletes data
b)
Partially updates data
c)
Replaces all records
d)
Changes API version
15.
Which tool is most commonly used to test APIs manually?
a)
Visual Studio Code
b)
Postman
c)
Adobe XD
d)
Node.js
16.
In RESTful APIs, what does a “resource” refer to?
a)
A database query
b)
A specific data object accessible via a URL
c)
A software developer
d)
A JSON format
17.
Which method should be idempotent (gives same result every time)?
a)
POST
b)
GET
c)
PUT
d)
PATCH
18.
Which of the following is a valid REST endpoint?
a)
/getuser?id=1
b)
/api/v1/users/1
c)
users.get/1
d)
data!user
19.
What does the term “stateless” mean in REST architecture?
a)
Each request is independent and contains all necessary information.
b)
The server remembers the client state.
c)
The API stores session data.
d)
Requests depend on cookies.
20.
Which HTTP header carries authentication credentials?
a)
Content-Type
b)
Accept
c)
Authorization
d)
Cache-Control
21.
What is the purpose of an API key?
a)
Speed up requests
b)
Authenticate and identify the API user
c)
Store passwords
d)
Display data
22.
What does CORS mean?
a)
Cross-Origin Resource Sharing
b)
Client-Origin Routing Service
c)
Common Object Response System
d)
Cloud-Origin Resource Setup
23.
What is the main risk if CORS is not configured properly?
a)
Application will run faster
b)
Unauthorized domains may access data
c)
Server will crash
d)
JSON won’t parse
24.
A Bearer token is used for:
a)
File encryption
b)
User authentication in API requests
c)
JSON formatting
d)
Data compression
25.
Which protocol does REST commonly use for communication?
a)
FTP
b)
HTTP/HTTPS
c)
SMTP
d)
SSH
26.
What is rate limiting in an API?
a)
Limiting the number of database connections
b)
Restricting the number of API calls per time frame
c)
Reducing data size
d)
Controlling file upload limits
27.
What is the purpose of API documentation?
a)
To make the interface secure
b)
To explain how to use the API
c)
To speed up the API
d)
To encrypt requests
28.
What is OAuth used for?
a)
Data validation
b)
Authorization framework for secure access
c)
File compression
d)
Rate limiting
29.
Which of the following helps prevent unauthorized API access?
a)
Caching
b)
Authentication
c)
Pagination
d)
Logging
30.
What does HTTPS provide that HTTP does not?
a)
Faster connection
b)
Data encryption and security
c)
Plain text communication
d)
Offline access
31.
Which JavaScript method is used to send API requests?
a)
fetch()
b)
connect()
c)
getAPI()
d)
requestAPI()
32.
In React, which hook is typically used for fetching API data?
a)
useData
b)
useEffect
c)
useHook
d)
useSync
33.
Which Node.js framework is commonly used to build APIs?
a)
React.js
b)
Express.js
c)
Next.js
d)
Vue.js
34.
In Express, the function app.get('/users', ... ) handles:
a)
API response
b)
GET request to '/users'
c)
DELETE request
d)
Authentication
35.
Which of the following is a free API for testing and practice?
a)
JSONPlaceholder
b)
Oracle Cloud API
c)
Microsoft Azure
d)
MongoDB Atlas
36.
What is a base URL in an API?
a)
The hostname and root path for all endpoints
b)
The directory of JavaScript files
c)
The database address
d)
The port number
37.
Which of the following describes “API response”?
a)
The data returned by the server after processing a request
b)
The client’s authentication process
c)
The request header
d)
The backend database
38.
Which type of API is publicly accessible to all developers?
a)
Internal API
b)
Partner API
c)
Open API (Public API)
d)
Composite API
39.
What is one advantage of API integration?
a)
Increases redundancy
b)
Reduces system interoperability
c)
Allows automation and real-time data sharing
d)
Limits scalability
40.
When integrating APIs in a web app, the most important first step is to:
a)
Design the frontend
b)
Obtain the API key and understand documentation
c)
Host the backend
d)
Create dummy data
Reset
