Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You manage a containerized REST API deployed on Cloud Run that uses Cloud Endpoints with an OpenAPI specification. Clients currently consume version 1.2 through the /v1 base path.
You need to introduce breaking changes by renaming a response property and changing a parameter's data type while meeting these requirements:
Which versioning and deployment strategy should you implement?
/v1, distinguish version 2.0 requests using a custom HTTP header in the Cloud Run application, and immediately deprecate and disable the 1.2 response format upon deployment.Header-based versioning keeps a single URI path (such as /v1) and relies on custom HTTP request headers (for example, X-API-Version) to instruct the backend application which schema or behavior to return. Combining this with immediate removal of 1.2 functionality forces all callers onto the new contract at deployment time.
/v1 and /v2). Using overlapping paths in a single OpenAPI specification prevents ESP from tagging requests with distinct major versions.v1 and v2 traffic metrics.1.2 format immediately defeats the purpose of systematic deprecation. Properly deprecated endpoints remain supported and functional while clients migrate, rather than being deleted immediately.You were using a custom application-layer router or API gateway policy specifically configured for header-based dispatch, and all clients had already migrated before shutting down the legacy version.
info.version set to 2.0 and basePath set to /v2 while retaining the 1.2 file at /v1. Deploy both OpenAPI files together to a single Cloud Run backend, monitor version metrics in Endpoints, and remove the v1 configuration once legacy traffic stops.Concurrent major URI versioning combines semantic versioning (major.minor) with distinct URI base paths (/v1, /v2) to isolate breaking API changes from existing consumers. In Cloud Endpoints with the Extensible Service Proxy (ESP), multiple OpenAPI configuration files representing different major versions can be deployed simultaneously into the same Google Cloud project and routed to a single backend service on Cloud Run.
1.2 OpenAPI specification active on /v1 while introducing 2.0 on /v2 allows existing clients to continue operating uninterrupted until they are ready to upgrade./v1. Once /v1 traffic drops to zero, you can redeploy only the v2 OpenAPI configuration and safely remove the legacy code./v1 and /v2 handlers inside one Cloud Run service eliminates duplicate infrastructure and reduces operational cost.basePath values enable clean path-based dispatch in ESP without configuration conflicts./v2 on their own schedule rather than facing forced cutovers.For breaking changes—such as renaming response fields or altering parameter data types—incrementing the major version on a separate URI path while sharing one Cloud Run backend balances stability, cost control, and lifecycle governance.
info.version from 1.2 to 1.3 while keeping basePath set to /v1. Deploy the updated configuration and replace the Cloud Run endpoint logic so all clients receive the updated schema.Minor version incrementing (1.2 to 1.3) under semantic versioning indicates additive, backward-compatible updates—such as introducing a new endpoint method or adding an optional parameter—while retaining the existing /v1 base path. Cloud Endpoints runs only one minor version of a given major API at a time, replacing the active 1.x definition upon redeployment.
/v1 immediately breaks any partner integration expecting the 1.2 contract.1.2 and 1.3 cannot run side by side.1.3 replaces 1.2 traffic handling immediately rather than routing selectively.You were introducing non-breaking, additive changes—such as adding a new optional response field or a brand-new path—where existing client code continues to work without modification.
2.0 with its own OpenAPI specification using basePath /v1. Instruct partners to switch to the new project hostname when ready to upgrade.Separating deployments across distinct Google Cloud projects and separate Cloud Run services creates completely isolated environments with independent quotas, IAM boundaries, hostnames, and service configurations. This isolation model is standard for separating staging and production environments so that testing errors or quota exhaustion in staging cannot disrupt live production traffic.
basePath as /v1 on a different hostname undermines clear URI semantic versioning, forcing clients to manage multiple service URLs instead of clean /v1 and /v2 paths.You needed to isolate a staging environment from a production environment to test pre-release API updates safely without sharing Google Cloud project quotas.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated