How do Web APIs facilitate communication between different software applications?

  • By allowing applications to share data and functionality through standardized protocols
  • By defining the physical appearance of an application through CSS styles
  • By enabling applications to directly execute code from other applications
  • By providing a visual interface for end-users to interact with applications
Web APIs facilitate communication by allowing different software applications to share data and functionality through standardized protocols. This enables applications to interact and exchange information, making them more versatile and interconnected.

Which common vulnerability involves unauthorized commands being sent to a database via an API?

  • Cross-Site Request Forgery (CSRF)
  • Cross-Site Scripting (XSS)
  • Man-in-the-Middle (MitM) Attack
  • SQL Injection
SQL Injection is a common vulnerability involving unauthorized commands being sent to a database via an API. Attackers can manipulate input data to execute malicious SQL queries, potentially gaining unauthorized access to the database and compromising the security of the API.

How can rate limiting be used in conjunction with API keys?

  • To boost API response times
  • To eliminate the need for authentication
  • To prevent API keys from expiring
  • To restrict the number of API requests from a single user
Rate limiting in conjunction with API keys is used to restrict the number of API requests that a single user or application can make within a specified time frame. This helps control excessive usage, protect against abuse, and ensure fair and efficient use of API resources.

RESTful APIs are considered ________ because they do not maintain any information about previous requests.

  • Secured
  • Stateful
  • Stateless
  • Streamlined
RESTful APIs are considered Stateless because they do not maintain any information about previous requests. This architectural style allows each request from a client to be independent, enhancing scalability and performance.

Web APIs play a crucial role in _____ development by allowing different software components to interact and share data.

  • Backend
  • Cloud
  • Frontend
  • Mobile
Web APIs play a crucial role in "backend" development by allowing different software components to interact and share data. They enable the server-side logic of applications to communicate with databases, external services, and other software components.

A SOAP API uses ________ to format the messages that are sent between the client and server.

  • CSS (Cascading Style Sheets)
  • HTML (Hypertext Markup Language)
  • JSON (JavaScript Object Notation)
  • XML (eXtensible Markup Language)
A SOAP API uses XML (eXtensible Markup Language) to format the messages that are sent between the client and server. XML provides a structured way to define and exchange data between applications in a standardized format.

How does GraphQL handle real-time data and subscriptions?

  • By periodically polling the server for updates
  • By sending email notifications to clients
  • By using RESTful APIs
  • By using WebSockets to establish persistent connections
GraphQL handles real-time data and subscriptions by using WebSockets to establish persistent connections. This allows the server to push updates to clients as soon as new data is available, enabling real-time interaction without the need for frequent polling, which is both inefficient and less responsive in comparison.

In GraphQL, _____ allows clients to receive real-time updates when data they are interested in changes.

  • GraphQL Query
  • RESTful API
  • SOAP
  • Subscriptions
In GraphQL, Subscriptions allow clients to receive real-time updates when data they are interested in changes. Subscriptions enable a publish-subscribe model, enhancing the real-time capabilities of GraphQL.

Why is it important to perform load testing on an API?

  • To ensure the API can handle expected traffic loads
  • To evaluate the API's functionality and features
  • To identify security vulnerabilities
  • To improve API documentation
Load testing is essential for APIs to ensure they can handle expected traffic loads without performance degradation. It helps identify bottlenecks, scalability issues, and performance limitations, ensuring that the API can deliver a seamless experience to users under varying loads.

OpenID Connect is built on top of _____ and is used for user authentication.

  • HTTPS
  • JSON
  • OAuth
  • XML
OpenID Connect is built on top of OAuth and is used for user authentication. OAuth is a widely-used authorization protocol that allows third-party applications to access a user's resources without exposing their credentials. OpenID Connect extends OAuth to provide user authentication and allows applications to verify the identity of end-users.