First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Explaining and Creating API Specifications with Anypoint Platform
In a contract-first (design-first) approach, what is the role of the API specification?
- It stores the compiled Mule application artifact for deployment.
- It records the agreed interface between API consumers and the provider. Correct answer.
- It defines the internal Java class hierarchy of the implementation.
- It holds runtime logs produced while the API processes requests.
Explanation
A specification is the machine-readable contract describing resources, methods, parameters, and payloads. Both consumers and the implementation team build against it, so changes are negotiated in the contract rather than in code.
Question 2Explaining and Creating API Specifications with Anypoint Platform
Which file extension identifies a RAML 1.0 API specification?
- sample.rml
- sample.raml Correct answer.
- sample.yaml
- sample.ramx
Explanation
RAML documents are stored with the .raml extension even though their content is YAML-based. Tooling relies on the extension to recognise the file as a RAML definition rather than a generic YAML file.
Question 3Explaining and Creating API Specifications with Anypoint Platform
Which Anypoint Platform component provides a browser-based editor for designing RAML and OpenAPI specifications?
- API Manager
- Design Center Correct answer.
- Access Management
- Runtime Manager
Explanation
Design Center hosts the API Designer, where specs are authored, validated, mocked, and published to Exchange. API Manager governs instances of deployed APIs rather than authoring contracts.
Question 4Explaining and Creating API Specifications with Anypoint Platform
RAML specifications are written using which data serialization syntax?
- INI
- CSV
- YAML Correct answer.
- XML
Explanation
RAML is a YAML-based modelling language, so indentation and key/value structure follow YAML rules. This makes the contract human-readable while remaining machine-parsable.
Question 5Explaining and Creating API Specifications with Anypoint Platform
After an API specification is published to Anypoint Exchange, what can other teams do with it?
- Discover, reuse, and reference it as a dependency in their projects. Correct answer.
- Convert it automatically into a database schema for storage.
- Compile it into a Java archive using the Maven plugin.
- Deploy it directly to CloudHub as a running application.
Explanation
Exchange is the catalogue where assets are published, versioned, and consumed by others. A published spec becomes discoverable and can be imported as a dependency into Mule projects or other fragments.
Question 6Explaining and Creating API Specifications with Anypoint Platform
Which root-level RAML property declares the base URL of the API?
- title
- version
- baseUri Correct answer.
- mediaType
Explanation
The baseUri property holds the full base URL, commonly including a version segment, to which resource paths are appended. The version property only holds the version label used in documentation and Exchange.
Question 7Explaining and Creating API Specifications with Anypoint Platform
In RAML, how is a URI parameter declared inside a resource path?
- with square brackets, e.g. /users/[userId]
- with a dollar prefix, e.g. /users/$userId
- with curly braces, e.g. /users/{userId} Correct answer.
- with angle brackets, e.g. /users/<userId>
Explanation
RAML follows the URI template convention in which variable path segments appear inside curly braces. The matching entry under the resource's uriParameters node describes the type and constraints of that variable.
Question 8Explaining and Creating API Specifications with Anypoint Platform
In RAML, which element of a method documents the HTTP status codes it can return?
- headers
- body
- queryParameters
- responses Correct answer.
Explanation
The responses node maps each status code, such as 200 or 404, to its description, headers, and payload definitions. Those documented responses are also what the mocking service uses to answer calls.
Question 9Explaining and Creating API Specifications with Anypoint Platform
An API specification documents example payloads for each response. What does the Anypoint mocking service do with them?
- It deploys a container running the Mule application flows.
- It generates Java connector code for the implementation.
- It validates the RAML syntax before the spec is published.
- It returns documented example responses without a backend. Correct answer.
Explanation
The mocking service is generated directly from the specification and replies with the examples declared in the contract. This lets consumers start integration work before any real implementation exists.
Question 10Explaining and Creating API Specifications with Anypoint Platform
Which RAML construct groups method-level properties, such as headers or query parameters, so they can be shared by several methods?
- a data type
- a library
- a trait Correct answer.
- a resource type
Explanation
Traits are declared under the root traits node and applied to a method with the is keyword. They are the mechanism for reusing cross-cutting method concerns such as pagination or correlation headers.
Question 11Explaining and Creating API Specifications with Anypoint Platform
Which RAML feature lets a designer define a reusable pattern of methods and responses that several resources can inherit?
- an annotation type
- a trait
- a security scheme
- a resource type Correct answer.
Explanation
A resource type is declared at the root and applied to a resource with the type keyword, bringing along its methods and responses. Optional methods can be marked with a question mark so each applying resource decides whether to implement them.
Question 12Explaining and Creating API Specifications with Anypoint Platform
A large RAML specification keeps the JSON schema for a request body in a separate file. Which RAML construct references that file?
- !reference
- $ref
- !import
- !include Correct answer.
Explanation
RAML uses the !include tag to pull external files, such as schemas, examples, or fragments, into the document at parse time. This keeps a single contract modular without duplicating content.
Question 13Explaining and Creating API Specifications with Anypoint Platform
Which root-level RAML property sets the default content type used for request and response bodies across the API?
- mediaType Correct answer.
- defaultMedia
- produces
- contentType
Explanation
The mediaType property at the document root declares the default MIME type, such as application/json, that applies wherever a body does not state its own type. Individual bodies can still override it.
Question 14Explaining and Creating API Specifications with Anypoint Platform
In an OpenAPI 3.0 document, where should a schema be placed so several operations can reuse it by $ref?
- In the tags list of each operation
- In the info object under a schemas key
- In components, under the schemas section Correct answer.
- In the servers array as a schema entry
Explanation
OpenAPI 3.0 collects reusable objects under the root components section, with schemas as one of its subsections. Other locations then point to them with a $ref such as #/components/schemas/Order.
Question 15Explaining and Creating API Specifications with Anypoint Platform
Which OpenAPI Specification versions can be authored in Anypoint Platform's Design Center?
- 2.0 and 3.0 Correct answer.
- 3.1 only
- 2.0 only
- 1.0 and 2.0
Explanation
Design Center supports RAML as well as OpenAPI 2.0 and OpenAPI 3.0 projects. OpenAPI 3.1 is a later revision that is not among the supported authoring options in this platform.
Question 16Explaining and Creating API Specifications with Anypoint Platform
A GET operation must accept an optional status filter that is not part of the resource path. How is it declared in the specification?
- As a required request header declared in the method's headers node
- As a URI parameter placed in curly braces in the resource path
- As a property inside the schema of the response body
- As an optional query parameter in the queryParameters node Correct answer.
Explanation
Filters that are appended to the URL after a question mark are declared as query parameters on the method, with required set to false when they are optional. URI parameters, by contrast, are segments of the path itself.
Question 17Explaining and Creating API Specifications with Anypoint Platform
Which root-level RAML section defines the security schemes that methods can require?
- securitySchemes Correct answer.
- protocols
- securedBy
- traits
Explanation
The securitySchemes section declares each mechanism, such as OAuth 2.0 or Basic Authentication, together with its settings. Methods then reference those declarations by name through the securedBy property.
Question 18Explaining and Creating API Specifications with Anypoint Platform
What does the API Console in Anypoint Exchange provide for a published API specification?
- Interactive, human-readable documentation generated from the spec Correct answer.
- A test suite that executes the deployed Mule flows
- A billing dashboard for API consumption
- A Docker image of the API ready for deployment
Explanation
The API Console renders the contract as browsable documentation, including resources, parameters, and examples. Consumers can also try requests against the mocking service from that same interface.
Question 19Explaining and Creating API Specifications with Anypoint Platform
A team must publish an updated API specification in Exchange without breaking consumers still using the current one. What should they do?
- Delete the asset and publish it again under a new name
- Copy the RAML into a Mule application project instead
- Publish the new specification as a new version of the asset Correct answer.
- Overwrite the existing asset with the same version number
Explanation
Exchange assets are versioned, so publishing a new version preserves the old one for existing consumers. Overwriting in place would silently change what dependent projects resolve.
Question 20Explaining and Creating API Specifications with Anypoint Platform
In RAML 1.0, how is a reusable object type with named, typed properties declared?
- With a trait that lists the property headers
- With a type declaration under the types section Correct answer.
- With the properties keyword inside a resource
- Only with an external JSON schema file
Explanation
RAML 1.0 introduces the types section at the root, where data types are defined with properties, types, and facets. Bodies and parameters then reference the declared type by name.
Question 21Explaining and Creating API Specifications with Anypoint Platform
A specification declares baseUri https://api.example.com/v1 and a developer enables the mocking service. Which statement is accurate?
- The declared baseUri is rewritten and saved in the contract.
- The mock needs a deployed Mule application in order to respond.
- The mock exposes its own URL that returns the example responses. Correct answer.
- Requests to https://api.example.com/v1 are proxied to the mock.
Explanation
Enabling the mocking service generates a separate mock base URL derived from the platform, which answers calls using the documented examples. The baseUri written in the contract stays as authored.
Question 22Explaining and Creating API Specifications with Anypoint Platform
A team wants to attach custom metadata, such as an internal owner name, to resources so that tooling can read it. Which RAML feature is intended for this?
- A library included with !include
- An annotation type declared under annotationTypes Correct answer.
- A trait applied with the is keyword
- A resource type with an extra method
Explanation
RAML 1.0 annotation types define custom metadata keys and their allowed values, and the annotations are then applied in parentheses on any node. This keeps extra information inside the contract without breaking the specification.
Question 23Explaining and Creating API Specifications with Anypoint Platform
In Design Center, which project type should be created to author a new REST API contract from scratch?
- A fragment project
- An API specification project Correct answer.
- A flow designer project
- A Mule application project
Explanation
An API specification project is used to design RAML or OpenAPI contracts, validate them, and publish them to Exchange. Application and fragment projects serve implementation and reuse purposes rather than contract authoring.
Question 24Explaining and Creating API Specifications with Anypoint Platform
What distinguishes a RAML library from an API fragment in Anypoint Platform?
- A library must be published to Exchange, while a fragment stays local.
- A fragment can only hold data types, while a library holds any content.
- A library is included from a file; a fragment is an Exchange dependency. Correct answer.
- A library is written in OAS, while a fragment is written in RAML.
Explanation
A RAML library is an external file pulled into a contract at design time with !include. An API fragment is a separate Design Center asset published to Exchange and consumed as a dependency by other specification projects.
Question 25Explaining and Creating API Specifications with Anypoint Platform
A RAML specification is imported from Exchange into an Anypoint Studio project that uses APIkit. What does APIkit produce?
- A database schema derived from the spec's data types
- A set of unit tests that call the mocking service
- A router whose flows map to the spec's resources and methods Correct answer.
- A CloudHub deployment configuration for each resource
Explanation
APIkit reads the contract and scaffolds a router plus generated flows, one for each resource and method combination. Incoming requests are then validated and dispatched to the matching flow.
Question 26Explaining and Creating API Specifications with Anypoint Platform
Which root-level RAML 1.0 property supplies the human-readable name of the API?
- mediaType
- version
- title Correct answer.
- baseUri
Explanation
The title property is a required root-level string that names the API for humans and appears in generated documentation. The version property identifies the API release, while baseUri and mediaType configure addressing and payload defaults.
Question 27Explaining and Creating API Specifications with Anypoint Platform
Which root-level RAML 1.0 section holds long-form prose documentation, such as usage notes, that is not tied to a single resource?
- traits and methods
- documentation Correct answer.
- description attached to a resource
- types and schemas
Explanation
The documentation section is an array of entries, each with a title and content, intended for narrative API documentation. The description property documents a specific node, while types and traits define reusable data and method behavior.
Question 28Explaining and Creating API Specifications with Anypoint Platform
In an OpenAPI 3.0 document, which object is required and carries the API title and version?
- paths
- components
- servers
- info Correct answer.
Explanation
The info object is mandatory and contains title and version, along with optional fields such as description. The paths object is also required but holds operations rather than API metadata.
Question 29Explaining and Creating API Specifications with Anypoint Platform
After an API specification is created in Design Center, which Anypoint Platform component makes the contract available for other teams to discover and consume?
- Runtime Manager
- Exchange Correct answer.
- Anypoint Studio
- API Manager
Explanation
Publishing a Design Center project creates an API asset in Exchange, where other teams can discover it and open the API Console. API Manager applies policies to deployed APIs, and Runtime Manager operates Mule runtimes.
Question 30Explaining and Creating API Specifications with Anypoint Platform
Which RAML 1.0 root-level property imports a RAML library so its traits, types, and resource types can be referenced?
- !include
- uses Correct answer.
- imports
- modules
Explanation
The uses property maps a namespace prefix to a library file, and library members are then referenced through that prefix. The !include directive splices a file's content directly into the current document instead of creating a namespace.
Question 31Explaining and Creating API Specifications with Anypoint Platform
A method must require OAuth 2.0 while the rest of the API remains public. Which RAML property is placed on that method to enforce the requirement?
- protocols
- authorization
- securitySchemes
- securedBy Correct answer.
Explanation
securedBy on a method applies one or more security schemes to that operation and overrides any root-level securedBy. The schemes themselves are declared once under securitySchemes.
Question 32Explaining and Creating API Specifications with Anypoint Platform
Which RAML 1.0 property restricts an API to HTTPS only?
- baseUri
- mediaType default
- protocols Correct answer.
- version
Explanation
The protocols property accepts an array such as [ HTTPS ] and limits the transports the API supports. The baseUri supplies the address but does not by itself restrict the allowed protocols.
Question 33Explaining and Creating API Specifications with Anypoint Platform
A RAML baseUri contains the template variable {region}. Which root-level property describes that variable?
- variables at the root level
- parameters for operations
- baseUriParameters Correct answer.
- uriParameters for resource paths
Explanation
baseUriParameters declares the parameters used in the baseUri template, including type, enum, and description. uriParameters is used for variables in resource paths, not for the base URI.
Question 34Explaining and Creating API Specifications with Anypoint Platform
In OpenAPI 3.0, which top-level array lists the base URLs where the API is available?
- host
- servers Correct answer.
- paths
- basePath
Explanation
The servers array contains objects with a url field and optional variables, replacing the Swagger 2.0 host and basePath fields. The paths object describes operations rather than server addresses.
Question 35Explaining and Creating API Specifications with Anypoint Platform
In OpenAPI 3.0, which operation-level object describes the payload a client sends to the API?
- security requirements
- responses
- requestBody Correct answer.
- parameters
Explanation
requestBody holds the content map, media types, schema, and required flag for the request payload. In Swagger 2.0 this was represented with body parameters instead.
Question 36Explaining and Creating API Specifications with Anypoint Platform
Which RAML 1.0 type property holds multiple named examples for a data type?
- example
- default value
- samples
- examples Correct answer.
Explanation
The examples property is a map of named example entries, each with a value and optional displayName or description. The singular example property supplies one unnamed sample, and default supplies a fallback value.
Question 37Explaining and Creating API Specifications with Anypoint Platform
A method must accept both JSON and XML request bodies. How is this represented in RAML 1.0?
- A union type that combines the JSON and XML payload definitions.
- A query parameter that lets the client select the media type at runtime.
- Separate application/json and application/xml keys under body. Correct answer.
- A single body key whose media type is set to application/*.
Explanation
A RAML body node is a map keyed by media type, so each supported media type gets its own key and schema. A wildcard media type is not used to declare two concrete representations.
Question 38Explaining and Creating API Specifications with Anypoint Platform
A trait declares a parameter named statusCode and uses it inside its responses section. How does a method apply that trait with the value 404?
- traitName: { statusCode: 404 } applied at the method level
- traits: { statusCode: 404 } inside the method definition
- is: [ traitName: { statusCode: 404 } ] Correct answer.
- uses: [ traitName: { statusCode: 404 } ] with the parameter inline
Explanation
A parameterized trait is applied through the is property, with a map of parameter values following the trait name. The uses property is for libraries, not for applying traits.
Question 39Explaining and Creating API Specifications with Anypoint Platform
A resource applies a resourceType that defines a get method with a 200 response. The resource itself declares a get method with a 201 response. Which response appears in the resulting specification?
- The specification is invalid because the method is duplicated.
- Only the 201 response declared on the resource. Correct answer.
- Only the 200 response from the resource type.
- Both 200 and 201 responses are merged into the get method.
Explanation
When a resource defines a method that a resourceType also defines, the resource's own method takes precedence and the resourceType method is not merged into it. Methods are inherited only when the resource does not declare them.
Question 40Explaining and Creating API Specifications with Anypoint Platform
In OpenAPI 3.0, a schema object contains a $ref alongside a description sibling. What is the result?
- The description overrides the referenced schema's existing description.
- The $ref is resolved and the sibling description is ignored. Correct answer.
- The document is invalid because a $ref cannot have sibling properties.
- The description is merged into the referenced schema.
Explanation
In OpenAPI 3.0, a $ref replaces the containing object, and sibling properties next to $ref are ignored. OpenAPI 3.1 later allows summary and description siblings, but 3.0 does not.
Question 41Deploying and Managing API Implementations
A Mule application contains an API Autodiscovery element in its main flow. What does this element associate the running application with?
- A dedicated load balancer, so traffic is spread across all workers
- An API instance in API Manager, so its policies are enforced Correct answer.
- A published Exchange asset, so consumers can download the RAML
- A connected app in Access Management, so the app can request tokens
Explanation
API Autodiscovery links a deployed implementation to an API instance that exists in API Manager in the same environment. Once the link is established, the API gateway applies the policies and governance configured for that API instance. Autodiscovery does not publish documentation, create load balancers, or grant OAuth credentials.
Question 42Deploying and Managing API Implementations
Which Anypoint Platform tool is used to start, stop, scale, and inspect the logs of an application deployed to CloudHub?
- API Designer
- Anypoint Exchange
- Runtime Manager Correct answer.
- Access Management
Explanation
Runtime Manager is the control plane for deployed applications: it handles deployments, worker or replica counts, application properties, logs, and alerts. API Designer is for authoring specifications, Exchange is a repository of assets, and Access Management handles users and permissions.
Question 43Deploying and Managing API Implementations
In API Manager, at which levels can a policy be applied to an API instance?
- At the API level for all resources, or narrowed to specific resources and methods Correct answer.
- Only at the organization level, so it covers every API at once
- Only at the environment level, so it covers every deployment there
- Only at the method level for REST APIs and at the queue level for messaging APIs
Explanation
A policy can be applied to the whole API, which affects every resource, or it can be scoped to individual resources and methods so that different operations are governed differently. Organization-wide and environment-wide application is not how API Manager policy scoping works.
Question 44Deploying and Managing API Implementations
A Rate Limiting policy rejects a request because the client exceeded its allowed quota. Which HTTP status code does the API gateway return?
- 503
- 401
- 400
- 429 Correct answer.
Explanation
When a rate limit is exceeded the gateway responds with HTTP 429, which signals that the caller has sent too many requests in the current window. A 400 indicates a malformed request, 401 indicates failed authentication, and 503 indicates an unavailable service.
Question 45Deploying and Managing API Implementations
The Client ID Enforcement policy is applied to an API instance. What must a consuming application have before the gateway accepts its requests?
- A contract with the API and the credentials issued for it Correct answer.
- An active VPN tunnel into the CloudHub virtual private cloud
- A platform user account with the API Consumer role assigned
- A local copy of the RAML downloaded from Anypoint Exchange
Explanation
Client ID Enforcement validates the client credentials presented on each request against an application that has a contract for the API in API Manager. Without a registered contract there are no valid credentials, so the gateway rejects the traffic. Roles, documentation copies, and network tunnels do not substitute for a contract.
Question 46Deploying and Managing API Implementations
Which prefix marks a property value as encrypted when the Secure Properties module is used in a Mule configuration file?
- vault::
- secure:: Correct answer.
- encrypted::
- cipher::
Explanation
Values written as secure::<encrypted value> are decrypted at runtime by the Secure Properties module using the configured encryption key. The other prefixes are not recognized by the module and would be treated as literal text.
Question 47Deploying and Managing API Implementations
An organization uses the Design, Sandbox, and Production environments. Where does the API instance that governs a production implementation live?
- In the Design environment, from which it is promoted automatically
- In Exchange, once for the whole organization
- In Runtime Manager, on the application's settings page
- In API Manager for the Production environment Correct answer.
Explanation
Each environment has its own API Manager instance with its own set of API instances and identifiers. An implementation deployed to Production is governed by the API instance registered in the Production environment, which is why the API ID used at deployment must match that environment.
Question 48Deploying and Managing API Implementations
An application runs on CloudHub 1.0 with two workers. Which change increases the number of separate Mule runtime instances processing requests?
- Increasing the worker size
- Enabling persistent queues
- Attaching a dedicated load balancer
- Increasing the number of workers Correct answer.
Explanation
Worker count determines how many runtime instances run the application, while worker size determines the CPU and memory of each instance. Persistent queues affect message durability and a load balancer affects ingress, not instance count.
Question 49Deploying and Managing API Implementations
How does the Throttling policy differ from the Rate Limiting policy?
- Throttling delays excess requests across the window, while rate limiting rejects them Correct answer.
- Throttling rejects excess requests with HTTP 429, while rate limiting queues them
- Throttling always applies across all clients, while rate limiting is per client application
- Throttling only works at the operation level, while rate limiting only at the API level
Explanation
Rate limiting accepts traffic up to a fixed count per window and returns an error for anything beyond it. Throttling instead smooths the flow by holding back excess requests so that the average rate stays within the limit, avoiding immediate rejections.
Question 50Deploying and Managing API Implementations
An API instance uses SLA-based rate limiting. What determines the limit that is applied to a particular consuming application?
- The length of the client secret issued to the application
- The priority setting chosen on the API instance
- The number of workers the implementation is deployed with
- The SLA tier of the contract the application holds with the API Correct answer.
Explanation
With SLA-based rate limiting, each tier defined on the API carries its own limits, and a client application receives the limits of the tier attached to its contract. Requests from applications with no contract, or from a tier with no capacity, are handled according to the policy defaults.