Thẻ ghi nhớ: Mulesoft Developer 1 | Quizlet

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/113

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

114 Terms

1
New cards

What is the data format that SOAP webservices associate with?

XML

2
New cards

What principle is true about RESTful APIs?

RESTful APIs do not store client state information in the server

3
New cards

What is a valid characteristics of SOAP API?

SOAP APIs can communicate using SMTP

4
New cards

Which two options are valid parts of a HTTP Request?

HHTP Method, Resource

5
New cards

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

6
New cards

According to HTTP 1.1 specification, which HTTP method should a REST API specify to update a field in a resource instance?

PATCH

7
New cards

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

8
New cards

From what phase of the API lifecycle should you start incorporating consumer feedback?

Design

9
New cards

Fill in the blank. RAML APIs can be published to the new Anypoint Exchange from

Design Center

10
New cards

What are the phases of the API Definition portion of the SDLC of a modern API in the correct order?

Design, Simulate, Feedback, Validate

11
New cards

What is the output of the API Definition part of the SDLC of a modern API?

Specification

12
New cards

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

13
New cards

Which component in an HTTP Request is used to identify a resource?

URI

14
New cards

Which two are valid fragment identifiers in RAML 1.0?

AnnotationTypeDeclaration, Extension

15
New cards

What node needs to be added into the RAML definition to specify the service endpoint of an API?

baseUri:

16
New cards

Which is true about the RAML mediaType of the resource method request and response bodies?

The mediaType can be overwritten at the method level.

17
New cards

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

18
New cards

What should the first line of a RAMP API definition contain?

A comment containing the RAML version

19
New cards

What node is used to specify the the locations where annotations can be applied in a RAML API specification?

allowedTargets

20
New cards

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

21
New cards

What HTTP status code does the HTTP specification indicate should be returned when a new resource is created?

201

22
New cards

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

23
New cards

Which HTTP header is used to specify the client software that is sending the request?

User-Agent

24
New cards

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

25
New cards

In a RAML 1.0 file, how do you specify the maximum and minimum allowed values for an integer data type?

With a facet

26
New cards

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

27
New cards

In an array datatype, what is the facet used to indicate the type of all the array elements?

items:

28
New cards

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

29
New cards

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

30
New cards

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

31
New cards

When you add a documentation node in a RAMP API specification, is it displayed in the

API console

32
New cards

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

33
New cards

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');

34
New cards

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();

35
New cards

What language is used to create API notebooks?

JavaScript

36
New cards

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.

37
New cards

#%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>>

38
New cards

What is the immediate RAML node that traits associate with?

methods

39
New cards

What is the immediate RAML node that resourceTypes associate with?

resources

40
New cards

What is the correct RAML syntax for linking a library fragment into the main RAML API definition?

uses:
library_name: libraries/Lib1.raml

41
New cards

Which two RAML mechanisms help modularize the API specification?

Overlays, Libraries

42
New cards

What root level node must an overlay file contain?

extends

43
New cards

Which two are valid uses of an overlay?

Internationalization, Connecting to testing frameworks

44
New cards

What is the correct way to secure the /customers resource GET method with two security schemes - customToken and OAuth2?

/customers:
get:
securedBy:
- customToken
- OAuth2

45
New cards

What node describes security related request and response components when defining security schemas in RAML 1.0?

describedBy

46
New cards

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

47
New cards

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

48
New cards

What Mulesoft API-led connectivity layer is intended to expose part of a backend database without business logic?

System

49
New cards

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.

50
New cards

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

51
New cards

What is a core characteristic of the Modern API?

API is designed first using an API specification for rapid feedback

52
New cards

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

53
New cards

What HTTP method in a RESTful web service is typically used to completely replace an existing resource?

PUT

54
New cards

What is the main purpose of Flow Designer in Design Center?

To design and develop fully functional Mule applications in a hosted development environment

55
New cards

Where does a deployed Flow Designer application run in Anypoint Platform?

CloudHub worker

56
New cards

What MuleSoft product enables publishing, sharing, and searching of APIs?

Anypoint Exchange

57
New cards

What asset can NOT be created using Design Center?

API Portals

58
New cards

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

59
New cards

An API has been created in Design Center. What is the next step to make the API discoverable?

Publish the API to Anypoint Exchange

60
New cards

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

61
New cards

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

62
New cards

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

63
New cards

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"

64
New cards

What is the purpose of the api:router element in APIkit?

Validates requests against RAMP API specifications and routes them to API implementations

65
New cards

What is the minimum required configuration in a flow for a Mule application to compile?

An event processor

66
New cards

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

67
New cards

What is NOT part of a Mule 4 event?

inboundProperties

68
New cards

How does APIkit determine the number of flows to generate from a RAML specification?

Creates a separate flow for each HTTP method

69
New cards

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

70
New cards

How many Mule applications can run on a CloudHub worker?

At most one

71
New cards

What does an API proxy application NOT do?

Determine which response Mule event is allowed to pass through to the API backend service

72
New cards

What does the Mule runtime use to enforce policies and limit access to APIs?

The Mule runtime's embedded API Gateway

73
New cards

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

74
New cards

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)

75
New cards

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]

76
New cards

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]

77
New cards

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']

78
New cards

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]

79
New cards

What is NOT part of a Mule 4 event?

outboundProperties

80
New cards

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.

81
New cards

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

82
New cards

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.

83
New cards

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

84
New cards

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}

85
New cards

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

86
New cards

In what files does the Mule project keep track of all of its dependencies?

pom.xml

87
New cards

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

88
New cards

What file type is required to configure a Web Service Consumer to consumer a SOAP web service?

WSDL

89
New cards

How are query parameters dynamically passed to an outbound REST using an HTTP Request operation?

As query parameters in the HTTP Request operation

90
New cards

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

91
New cards

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.

92
New cards

What is the process to create a connector using REST Connect?

Design the API in Design Center and publish the API to Exchange

93
New cards

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

94
New cards

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

95
New cards

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

96
New cards

What module and operation will throw an error if a Mule event's payload is not a number?

Validation module's ls number operation

97
New cards

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

98
New cards

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

99
New cards

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

100
New cards

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