1/113
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the data format that SOAP webservices associate with?
XML
What principle is true about RESTful APIs?
RESTful APIs do not store client state information in the server
What is a valid characteristics of SOAP API?
SOAP APIs can communicate using SMTP
Which two options are valid parts of a HTTP Request?
HHTP Method, Resource
Your are designing an order status check application that has customers, customer_id, and orders identified as resources. What resource-method pair is typically used to retrieve all orders for a specific customer_id?
/customers/{customer_id}/orders, GET
According to HTTP 1.1 specification, which HTTP method should a REST API specify to update a field in a resource instance?
PATCH
The Runtime Manager API uses the recommended best practices for assigning HTTP methods to a REST API following HTTP 1.1 specification. What method is used to deploy to a new application to a server?
POST
From what phase of the API lifecycle should you start incorporating consumer feedback?
Design
Fill in the blank. RAML APIs can be published to the new Anypoint Exchange from
Design Center
What are the phases of the API Definition portion of the SDLC of a modern API in the correct order?
Design, Simulate, Feedback, Validate
What is the output of the API Definition part of the SDLC of a modern API?
Specification
Which three are true about RAML fragments?
Can be added as dependencies by discovery from Anypoint Exchange, Begins with a line containing a RAML fragment identifier, Can exist as a standalone project in Design Center
Which component in an HTTP Request is used to identify a resource?
URI
Which two are valid fragment identifiers in RAML 1.0?
AnnotationTypeDeclaration, Extension
What node needs to be added into the RAML definition to specify the service endpoint of an API?
baseUri:
Which is true about the RAML mediaType of the resource method request and response bodies?
The mediaType can be overwritten at the method level.
Snippet A:
/customers/{customer_id}/orders:
get:
responses:
200:
body:
Snippet B:
/customers:
/{customer_id}:
get:
responses:
200:
body:
/orders:
get:
responses:
200:
body:
Snippet A and B behave the same way when a client accesses the /orders endpoint
What should the first line of a RAMP API definition contain?
A comment containing the RAML version
What node is used to specify the the locations where annotations can be applied in a RAML API specification?
allowedTargets
What HTTP status code does the HTTP specification indicate should be returned when an unsupported value is sent in the Accept header of an HTTP request?
406
What HTTP status code does the HTTP specification indicate should be returned when a new resource is created?
201
While using a POST method to create a new entity, which HTTP header is sent in the response to specify the URI of the newly created entity?
Location
Which HTTP header is used to specify the client software that is sending the request?
User-Agent
What is the correct way to specify queryParameters for a resource in RAML 1.0?
/customers:
get:
queryParameters:
pageLimit:
type: number
minimum: 1
maximum: 10
In a RAML 1.0 file, how do you specify the maximum and minimum allowed values for an integer data type?
With a facet
What is the right way of defining a Customer datatype with a customerType discriminator of string type?
types:
Customer:
type: object
discriminator: customerType
properties:
customerType: string
/customers:
get:
responses:
200:
body:
application/json:
type: Customer
In an array datatype, what is the facet used to indicate the type of all the array elements?
items:
What is the correct way to define a customer object that contains a tagColor property that is an enumeration type and accepts the values White, Blue, Yellow, and Red?
types:
Customer:
type: object
properties:
tagColor:
type:
enum:
- White
- Blue
- Yellow
- Red
Which two ways specify a property in a custom object datatype is optional?
By setting a required facet for the property name to false, By adding a "?" to the property name
What is the correct way to define the Customer datatype to serialize it into the XML format?
<Customer displayName="ABC">
<Accounts>
<Account accountName="Savings">
<accountNumber>....</accountNumber>
</Account>
</Accounts>
</Customer>
#%RAML 1.0
title: ACME Customers API
types:
Customer:
properties:
displayName:
type: string
xml:
attribute: true
Accounts:
type: Account[]
xml:
wrapped: true
Account:
properties:
accountNamer:
type: string
xml:
attribute: true
accountNumber: string
When you add a documentation node in a RAMP API specification, is it displayed in the
API console
A POST request is made by a web client like Postman to an API with the mocking service enabled. In this scenario, which three responses are possible?
An exmaple response specified in the RAML file, A response from a live service, An error response
While creating an API notebook, what is the syntax of the first function call to generate a client to make calls to the API?
API.createClient('name-of-API-client', 'http://apiLocation.raml');
What is a valid API Notebook function call to access the /{customer_id} nested resource that accepts a URI parameter?
#% RAML 1.0
title: ACME Customers API
version: v1
/customers:
get:
post:
/{customer_id}:
get:
responses:
200:
body:
type: Customer
example:
value:
customerID: a1234d
name: Abcd
client.customers.customer_id("a1234d").get();
What language is used to create API notebooks?
JavaScript
Which two correctly characterize API Notebooks?
API Notebooks can be created insider API Portals or as a gist by retrieving the API from a Github account, The share icon in an API Notebook helps embeded the NOtebook in a website or share the URL of the API Notebook.
#%RAML 1.0
title: ACME Customers API
types:
Customer:
type: object
properties:
name: string
resourceTypes:
collection:
get:
reponses:
200:
body:
application/json:
type: _________
/customers:
type: collection
<<resourcePathName | !singularize | !uppercamelcase>>
What is the immediate RAML node that traits associate with?
methods
What is the immediate RAML node that resourceTypes associate with?
resources
What is the correct RAML syntax for linking a library fragment into the main RAML API definition?
uses:
library_name: libraries/Lib1.raml
Which two RAML mechanisms help modularize the API specification?
Overlays, Libraries
What root level node must an overlay file contain?
extends
Which two are valid uses of an overlay?
Internationalization, Connecting to testing frameworks
What is the correct way to secure the /customers resource GET method with two security schemes - customToken and OAuth2?
/customers:
get:
securedBy:
- customToken
- OAuth2
What node describes security related request and response components when defining security schemas in RAML 1.0?
describedBy
Which three describe the purpose of hypermedia?
Link information from one location to another, Move away from traditional linear responses, Help client applications navigate between useful content about the data returned from an API
Which three are acceptable ways of versioning APIs?
Add version number to the request URL, Add version number in the Accept header, Add version number in a custom request header
What Mulesoft API-led connectivity layer is intended to expose part of a backend database without business logic?
System
What statement is part of MuleSoft's description of an application network?
Create reusable APIs and assets designed to be consumed by other business units.
According to MuleSoft, what is the Center for Enablement's role in the new IT operating model?
Creates and manages discoverable assets to be consumed by line of business developers
What is a core characteristic of the Modern API?
API is designed first using an API specification for rapid feedback
What is the most idiomatic (used for its intended purpose) URL and method to retrieve articles about "einstein" in XML format?
ENDPOINT:
https://www.searchworld.org/s/api.php
QUERY PARAMETERS:
action - Action type - required
options: compare, delete, save, search
query - Search string - required
profile - search profile to use
options: strict, normal, classic
format - the format of the output
options: xml, xmlfm, json, jsonfm
namespace - Namespaces to search
options: 1,2,3,4
HEADERS:
AUTH - Authentication token - required
Method: GET
Request URL: https://www.searchworld.org/s/api.php?action=search&query=einstein&format=xml
Header name: AUTH
Header value: SK33D
What HTTP method in a RESTful web service is typically used to completely replace an existing resource?
PUT
What is the main purpose of Flow Designer in Design Center?
To design and develop fully functional Mule applications in a hosted development environment
Where does a deployed Flow Designer application run in Anypoint Platform?
CloudHub worker
What MuleSoft product enables publishing, sharing, and searching of APIs?
Anypoint Exchange
What asset can NOT be created using Design Center?
API Portals
A web client submits a GET request to a Mule 4 application to the endpoint /customers?id=48493. Where is the id stored in the Mule event by the HTTP Listener?
Attributes
An API has been created in Design Center. What is the next step to make the API discoverable?
Publish the API to Anypoint Exchange
What is the correct URL to submit a GET request to /patients?
#%RAML 1.0
title: ACME Medical API
baseUri: http://dev.acme.com/api
/patients:
get:
queryParameters:
year:
type: integer
example: 2017
http://dev.acme.com/api/patients?year=2016
A RAML example fragment named BankAccountsExample.raml is placed in the examples folder in an API specification project. What is the correct syntax to reference the fragment?
examples: !include examples/BankAccountsExample.raml
There is an error in the flight_id resource's GET method. What needs to be done to fix the problem?
#%RAML 1.0
version: v1
title: American Flights API
/flights:
get:
/{flight_id}:
get:
indent the get method under the {flight_id} resource
This RAML specification includes an XML example that matches the Records data type defined in another RAML file name recordsDataType.raml.
Using the Records type, how can this XML example be represented in RAML?
#%RAML 1.0
title: Records API
/records:
get:
responses:
200:
body:
application/xml:
example: |
<music>
<collection>Deep Collection</collection>
<artists>
<artist1>Deep Purple</artist1>
<artist2>Rainbow</artist2>
</artists>
</music>
#%RAML 1.0
title: Records API
types:
Records: !include recordsDataType.raml
/records:
get:
responses:
200:
body:
application/xml:
type: Records
example:
music:
collection: "Deep Collection"
artisits:
artist1: "Deep Purple"
artist2: "Rainbow"
What is the purpose of the api:router element in APIkit?
Validates requests against RAMP API specifications and routes them to API implementations
What is the minimum required configuration in a flow for a Mule application to compile?
An event processor
A database connector is configured to select rows from a MySQL database. What is the format of the array of results returned from the database query?
Java
What is NOT part of a Mule 4 event?
inboundProperties
How does APIkit determine the number of flows to generate from a RAML specification?
Creates a separate flow for each HTTP method
What is the purpose of API autodiscovery?
Allows a deployed Mule application to connect with API Manager to download policies and act as its own API proxy
How many Mule applications can run on a CloudHub worker?
At most one
What does an API proxy application NOT do?
Determine which response Mule event is allowed to pass through to the API backend service
What does the Mule runtime use to enforce policies and limit access to APIs?
The Mule runtime's embedded API Gateway
API Manager has been configured to enforce an SLA policy and the RAML spec has been updated with the required client_id and client_secret header requirements.
The new RAML spec has been published to Anypoint Exchange.
What is the next step to gain access to the API?
Request access to the API in Anypoint Exchange
What happens to the attributes of a Mule event in a flow after an outbound HTTP Request is made?
Attributes are replaced with new attributes from the HTTP Request response (which might be null)
A Set Variable component saves the current payload to a variable with the name images. What is the DataWeave expression to access the images variable?
#[vars.images]
A web service implements an API to handle request to http://acme.com/customers/{state}. A web client makes a request to this API implementation at http://acme.com/customers/CA. What is the correct DataWeave expression to retrieve the value CA?
#[attributes.uriParams.state]
A flow contains an HTTP Listener as the event source. What is the DataWeave expression to log the Content-Type header using a Logger component?
#["Content-Type: " ++ attributes.headers.'content-type']
What is the correct DataWeave expression for accessing the city Cleveland from the JSON payload?
[
{
"OrderId": 592,
"shipping": "international",
"city": "Tokyo",
"account": 4829284911,
"price": 24.99
},
{
"orderId": 972,
"shipping": "domestic",
"city": "Cleveland",
"account": 829118144,
"price": 49.99
},
{
"orderId": 396,
"shipping": "international",
"city": "Berlin",
"account": 114800833,
"price": 24.99
}
]
#[payload[1].city]
What is NOT part of a Mule 4 event?
outboundProperties
A Mule application has two flows named parentFlow and childFlow. The childFlow beings with an HTTP Listener. A variable is defined in parentFlow, then an HTTP Request is made to childFlow's HTTP Listener with some headers set. What is the scope of the variable and attributes in the parent Flow after childFlow returns a response?
The variable is accessible. All the attributes passed to childFlow are removed or replaced.
A Mule application has a flow named parentFlow. The parentFlow contains an HTTP Request operation at the end of the flow. The parentFlow also contains a Set Variable operation right before the HTTP Request operation. What is the scope of the variable to the server receiving the HTTP Request from parentFlow?
The variable is NOT accessible in the server
A Mule application has two flows named parentFlow and childFlow. A variable is defined in parentFlow. What is the scope of the variable when the parentFlow calls childFlow using a Flow Reference?
The variable is accessible in childFlow, can be changed, and changes are seen back in the parentFlow.
In the deployable archive's /classes folder, there are two properties files named dev.properties and prod.properties deploy to CloudHub through Runtime Manager with the following error message.
What could be causing this error?
java.io.FileNotFoundException: class path resource [${env}.properties] cannot be opened because it does not exist
The env property is NOT set in the Runtime Manager in the Mule application's Properties tab
What reserved property can be defined and used in a Mule application to allow an HTTPS Listener to be accessed by external web clients after the Mule application is deployed to CloudHub?
${https.port}
Why must a Mule application's deployable archive package all its dependencies in order to be deployed to CloudHub?
CloudHub workers CANNOT download ALL possible project dependencies a project may contain
In what files does the Mule project keep track of all of its dependencies?
pom.xml
What can ONLY be done with VM connectors, and NOT with Flow References, in a single Mule application?
Allow a flow to pass events to another flow asynchronously
What file type is required to configure a Web Service Consumer to consumer a SOAP web service?
WSDL
How are query parameters dynamically passed to an outbound REST using an HTTP Request operation?
As query parameters in the HTTP Request operation
The flow calls a SOAP endpoint using the Consume operation of the Web Service Consumer. The SOAP service has a required input parameter.
What event processor can be used to build the SOAP envelope with the required argument to pass the SOAP service?
Transform Message
An HTTP Request operation returns a JSON array of objects. In the Transform Message component, what is the process to convert the array of objects to an array of custom Java Account objects?
Add the Account object metadata to the output and use the drag-and-drop feature to transform the incoming JSON data.
What is the process to create a connector using REST Connect?
Design the API in Design Center and publish the API to Exchange
How are multiple conditions used in a Choice router to route events?
To find the FIRST true condition, then distribute the event to the ONE matched route
A Scatter-Gather processes three separate HTTP requests. Each request returns a Mule event with a JSON payload. What is the final output of the Scatter-Gather?
An Object containing all three Mule event Objects
An event contains a payload that is an Array of Objects. How is the event routed in a Scatter-Gather?
The ENTIRE event is sent to each route and processed in PARALLEL
What module and operation will throw an error if a Mule event's payload is not a number?
Validation module's ls number operation
What happens to this flow when the Validation module's ls not null operation throws an error?
<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config">
<http:listener-connection host="0.0.0.0" port="8081"/>
</http:listener-config>
<flow name="main">
<http:listener doc:name="HTTP: GET /test" config-ref="HTTP_Listener_config" path="/test"/>
<set-payload value="#[null]" />
<validation:is-not-null doc:name="payload" value="#[payload]" message="The payload is null!"/>
</flow>
The flow stops processing its Mule event and returns an error message to the HTTP Listener operation
The main flow has an On Error Continue scope. In the Configuration global element, default error handler is set to global ErrorHandler.
A web client makes an HTTP GET request to the flow's HTTP Listener. The Is number validator then throws an error with message "Validate - Payload is an Integer"
What response message is returned to the web client?
<configuration doc:name="Configuration" defaultErrorHadnler-ref="globalErrorHandler" />
<error-handler name="globalErrorHandler">
<on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue">
<set-payload value="Global Error Handler" doc:name="Global Error Hanlder" />
</on-error-continue>
</error-handler>
<http:listener-config name="HTTO_Listener_config" doc:name="HTTP Listener config" >
<http:listener-connection host="0.0.0.0" port="8081" />
</http:listener-config>
<flow name="main">
<http:listener doc:name="HTTP: GET /" config-ref="HTTP_Listener_config" path="/">
<set-payload value='Success - Begin main flow' doc:name='"Success - Begin main flow" /'>
<validation:is-number numberType="INETER"
doc:name="payload" value='#[payload]'
message="Validate - Payload is an Integer"/>
<set-payload value="Success - End main flow" doc:name='"Success - End main flow"'>
<error-handler >
<on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue">
<set-payload value="Error - main flow" doc:name='"Error - main flow"'>
</on-error-continue>
</error-handler>
</flow>
Error - main flow
The main flow has an On Error Propagate scope. In the Configuration global element, default error handler is set to globalErrorHandler.
A web client makes an HTTP GET request to the flow's HTTP Listener. The ls number validation then throws an error with message "Validate - Payload is an Integer".
What response message is returned to the web client?
<configuration doc:name="Configuration" defaultErrorHadnler-ref="globalErrorHandler" />
<error-handler name="globalErrorHandler">
<on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue">
<set-payload value="Global Error Handler" doc:name="Global Error Hanlder" />
</on-error-continue>
</error-handler>
<http:listener-config name="HTTO_Listener_config" doc:name="HTTP Listener config" >
<http:listener-connection host="0.0.0.0" port="8081" />
</http:listener-config>
<flow name="main">
<http:listener doc:name="HTTP: GET /" config-ref="HTTP_Listener_config" path="/">
<set-payload value='Success - Begin main flow' doc:name='"Success - Begin main flow" /'>
<validation:is-number numberType="INETER"
doc:name="payload" value='#[payload]'
message="Validate - Payload is an Integer"/>
<set-payload value="Success - End main flow" doc:name='"Success - End main flow"'>
<error-handler >
<on-error-continue enableNotifications="true" logException="true" doc:name="On Error Propagate">
<set-payload value="Error - main flow" doc:name='"Error - main flow"'>
</on-error-continue>
</error-handler>
</flow>
Validate - Payload is an Integer
The private flow has an Error Propagate scope. In the Configuration global element, default error handler is set to globalErrorHandler.
A web client makes an HTTP GET request to the flow's HTTP Listener. The ls number validator in the private flow then throws an error with message "Validate - Payload is an Integer".
What response message is returned to the web client?
<configuration doc:name="Configuration" defaultErrorHadnler-ref="globalErrorHandler" />
<error-handler name="globalErrorHandler">
<on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue">
<set-payload value="Global Error Handler" doc:name="Global Error Hanlder" />
</on-error-continue>
</error-handler>
<http:listener-config name="HTTO_Listener_config" doc:name="HTTP Listener config" >
<http:listener-connection host="0.0.0.0" port="8081" />
</http:listener-config>
<flow name="main">
<http:listener doc:name="HTTP: GET /" config-ref="HTTP_Listener_config" path="/">
<set-payload value='Success - Begin main flow' doc:name='"Success - Begin main flow" /'>
<validation:is-number numberType="INETER"
doc:name="payload" value='#[payload]'
message="Validate - Payload is an Integer"/>
<set-payload value="Success - End main flow" doc:name='"Success - End main flow"'>
<error-handler>
<on-error-propagate enableNotifications="true" logException="true" doc:name="On Error Propagate">
</on-error->
</error-handler>
</flow>
<error-handler name="globalErrorHandler">
<on-error-continue enableNotifications="true" logException="true" doc:name="On Error Contonue">
<set-payload value="globalErrorHandler" doc:name='"globalErrorHandler"'>
</on-error-continue>
</error-handler>
globalErrorHandler