In API management, how does an API Gateway optimize API traffic between services and external clients?

  • Caching frequently requested responses
  • Ignoring client-side optimizations
  • Increasing API response time
  • Introducing additional latency
An API Gateway optimizes API traffic by caching frequently requested responses, reducing the need to make repeated calls to backend services.

What distinguishes symmetric encryption from asymmetric encryption?

  • Different keys for encryption and decryption
  • Only used for secure web communication
  • Same key for both encryption and decryption
  • Uses a key pair for encryption
Symmetric encryption uses the same key for both encryption and decryption, while asymmetric encryption uses different keys for these operations.

A comprehensive error handling strategy in web services should include _______ to track and analyze errors over time.

  • Authentication
  • Caching
  • Load Balancing
  • Logging and Monitoring
A comprehensive error handling strategy in web services includes logging and monitoring to track and analyze errors over time.

In REST, what is the significance of resource URIs?

  • Determining the server location
  • Identifying and accessing resources
  • Providing authentication information
  • Specifying the message format
Resource URIs in REST play a crucial role in identifying and accessing resources on the server. They form the basis for RESTful interactions.

When integrating with enterprise-level legacy systems, _______ might offer better support compared to _______ due to its standardized protocol.

  • GraphQL
  • REST
  • SOAP
  • XML-RPC
When integrating with enterprise-level legacy systems, SOAP might offer better support compared to REST due to its standardized protocol. SOAP (Simple Object Access Protocol) provides a strict set of rules for communication, making it a suitable choice for environments that require high security and reliability.

When unit testing a web service, what is the importance of mocking external dependencies?

  • To increase the complexity of tests
  • To introduce real-world dependencies
  • To isolate the code under test and ensure tests are focused
  • To slow down the testing process
Mocking external dependencies is crucial to isolate the code under test, allowing focused testing without relying on real-world external factors.

In the context of web services, why is it crucial to handle errors gracefully?

  • Enhances performance
  • Improves user experience
  • Introduces security vulnerabilities
  • Reduces code complexity
Handling errors gracefully in web services is crucial as it improves the user experience by providing meaningful error messages, making the system more user-friendly.

How does SOAP ensure security in its message transmission?

  • Encryption and digital signatures
  • IP address filtering
  • Obfuscation of message content
  • Token-based authentication
SOAP ensures security through techniques like encryption and digital signatures, providing confidentiality and integrity during message transmission.

To enhance the discoverability of a RESTful service, _______ can be used to describe the API.

  • GraphQL
  • JSON-RPC
  • OpenAPI Specification
  • XML Schema
To enhance the discoverability of a RESTful service, the OpenAPI Specification can be used. It provides a standard way to describe and document RESTful APIs, making them more accessible and easily understandable for developers.

A company needs to implement a secure API with mobile client support. Which authentication method is preferable?

  • API Key Authentication
  • Basic Authentication
  • HMAC Authentication
  • OAuth 2.0
OAuth 2.0 is a preferred authentication method for securing APIs, especially when mobile client support is required. It provides a token-based approach for secure access.