MuleSoft MCD-Level-1 MuleSoft Certified Developer - Level 1 (Mule 4) Exam Practice Test

Page: 1 / 14
Total 235 questions
Question 1

Refer to the exhibit. APIkit is used to generate flow components for the RAML specification.

How many apikit:router XML elements are generated to handle requests to every endpoint defined in the RAML specification?



Answer : D


Question 2

Refer to the exhibits The Mule application does NOT define any global error handlers.

A web client sends a POST request to the Multi application with this input payload The File Write operation throws a FILECONNECTIVITY error

What response message is returned to the web client?



Answer : A


Question 3

What DataWeave expression transforms the array a to the XML output?



Answer : A

For such questions always look for Syntax:

I call it 'Wrap the Map'

trains:

{(

When mapping array elements (JSON or JAVA) to XML, wrap the map operations in {(..)}

-{ } are defining the object

-( ) are transforming each element in the array as a key/value pair


Question 4

What is the correct Syntax to add a customer ID as a URI parameter in the HTTP listener's path attribute?



Answer : C

URL parameters are always accessed using { } like => {customerID}


Question 5

An API instance of type API endpoint with API proxy is created in API manager using an API specification from Anypoint Exchange. The API instance is also configured with an API proxy that is deployed and running in CloudHub.

An SLA- based policy is enabled in API manager for this API instance.

Where can an external API consumer obtain a valid client ID and client secret to successfully send requests to the API proxy?



Answer : A

* When a client application is registered in Anypoint Platform, a pair of credentials consisting of a client ID and client secret is generated.

* When the client application requests access to an API, a contract is created between the application and that API.

* An API that is protected with a Client ID Enforcement policy is accessible only to applications that have an approved contract.

---------------------------------------------------------------------------------------------------------------------------------------------

Correct Answer: In the organization's public API portal in Anypoint Exchange, from


Question 6

A shopping API contains a method to look up store details by department.

To get the information for a particular store, web clients will submit requests with a query parameter named department and uri parameter named storeId

What is valid RAML snippet that supports requests from a web client to get a data for a specific storeId and department name?



Answer : D

Lets revise few concepts RAML which can help us to find the answer of this question.

URI Parameters

Lets have a look at below example.

/foos:

/{id}:

/name/{name}:

Here, the braces { } around property names define URI parameters. They represent placeholders in each URI and do not reference root-level RAML file properties as we saw above in thebaseUrideclaration. The added lines represent the resources/foos/{id}and/foos/name/{name}.

Query Parameters

Now we'll define a way to query thefooscollection using query parameters. Note that query parameters are defined using the same syntax that we used above for data types:

/foos:

get:

description: List all Foos matching query criteria, if provided;

otherwise list all Foos

queryParameters:

name?: string

ownerName?: string

Based on the above information , below is the only option which definesstoreidas uri parameter anddepartmentas query parameter.

/{storeId}:

get:

queryParameter:

department:


Question 7

Refer to the exhibit.

How should be the where clause written for the configured input parameters in such a way that it achieves below SQL query?



Answer : C

Correct syntax to use where clause isWHERE city = :city AND state = :state

This question validates knowledge on using dynamic queries in DBselect operation.

Configure Dynamic Queries in the Select Operation

When you need to parameterize not only theWHEREclause but also parts of the query itself (for example, queries that compare tables that depend on a condition, or complex queries for which the project table columns need to vary), you can configure dynamic queries.

In the following example, you configure a dynamic query by using a full expression with a string in which the table depends on a variable$(vars.table). Although some of the query text is dynamic ('SELECT * FROM $(vars.table)), theWHEREclause still defines theWHEREcondition using input parameters: in this case,WHERE name = :name.

In your Studio flow, select theSelectoperation.

In the operation configuration screen, set theSQL Query Textfield toSELECT * FROM $(vars.table) WHERE name = :name.

Set theInput Parametersfield to{'name' : payload}.

The following screenshot shows the configuration in Studio:

Figure 3. Dynamic query configuration

In the XML editor, the<db:sql>configuration looks like this:

<set-variable variableName='table' value='PLANET'/>

<db:select config-ref='dbConfig'>

<db:sql>#['SELECT * FROM $(vars.table) WHERE name = :name']</db:sql>

<db:input-parameters>

#[{'name' : payload}]

</db:input-parameters>

</db:select>

You can apply input parameters only to parameters in aWHEREclause. To modify any other part of the query, use the DataWeave interpolation operator.

Mule Ref Doc:Query a Database Examples - Mule 4 | MuleSoft Documentation


Page:    1 / 14   
Total 235 questions