# mulesoft OpenWeatherMap Connector - Full Documentation --- product: OpenWeatherMap Connector version: 1.0 is-latest-version: true --- # OpenWeatherMap Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for OpenWeatherMap (OpenWeatherMap Connector) enables Mule applications to access the OpenWeatherMap API. For information about compatibility and fixed issues, refer to the OpenWeatherMap Connector Release Notes. ## Before You Begin To use this connector, you must be familiar with: - The OpenWeatherMap Connector’s API - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Code Builder or Anypoint Studio Before creating an app, you must have: - Credentials to access the OpenWeatherMap target resource - Anypoint Platform - The latest versions of Anypoint Code Builder or Anypoint Studio ## Next Step After you complete the prerequisites, you’re ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) or [Anypoint Code Builder](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [OpenWeatherMap Connector Reference](https://docs.mulesoft.com/openweathermap-connector/latest/openweathermap-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: OpenWeatherMap Connector version: 1.0 is-latest-version: true --- # OpenWeatherMap Connector 1.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configurations --- ### Config Default configuration. #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Name

String

ID used to reference this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

#### Connection Types ##### API Key ###### Parameters
NameTypeDescriptionDefault ValueRequired

apiKey

String

API key used to authenticate requests to the OpenWeatherMap API.

x

baseUri

String

Base URI for the OpenWeatherMap API endpoint.

x

TLS Configuration

Configures TLS. If using the HTTPS protocol, you must configure TLS.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

## Supported Operations - [Get Current Weather](#GetCurrentWeather) - [Get Timestamp Data](#GetTimestampData) - [Get Weather Overview](#GetWeatherOverview) ## Operations ## Get Current Weather `` Get Current Weather. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

lat

Number

Latitude coordinate of the location.

x

lon

Number

Longitude coordinate of the location.

x

units

Enumeration, one of:

  • standard

  • metric

  • imperial

Temperature units for the response.

lang

String

Language code for the response text.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

### Output

Type

Any

Attributes Type

Any

### For Configurations - [Config](#Config) ### Throws - OPENWEATHERMAP:BAD\_REQUEST - OPENWEATHERMAP:CLIENT\_ERROR - OPENWEATHERMAP:CONNECTIVITY - OPENWEATHERMAP:FORBIDDEN - OPENWEATHERMAP:NOT\_FOUND - OPENWEATHERMAP:SECURITY - OPENWEATHERMAP:SERVER\_ERROR - OPENWEATHERMAP:TIMEOUT - OPENWEATHERMAP:TOO\_MANY\_REQUESTS - OPENWEATHERMAP:UNAUTHORIZED ## Get Timestamp Data `` Get Timestamp Data. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

lat

Number

Latitude coordinate of the location.

x

lon

Number

Longitude coordinate of the location.

x

Unix Timestamp

Number

Timestamp (Unix time, UTC time zone). Data is available from January 1st, 1979 till 4 days ahead.

x

units

Enumeration, one of:

  • standard

  • metric

  • imperial

Temperature units for the response.

lang

String

Language code for the response text.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

### Output

Type

Any

Attributes Type

Any

### For Configurations - [Config](#Config) ### Throws - OPENWEATHERMAP:BAD\_REQUEST - OPENWEATHERMAP:CLIENT\_ERROR - OPENWEATHERMAP:CONNECTIVITY - OPENWEATHERMAP:FORBIDDEN - OPENWEATHERMAP:NOT\_FOUND - OPENWEATHERMAP:SECURITY - OPENWEATHERMAP:SERVER\_ERROR - OPENWEATHERMAP:TIMEOUT - OPENWEATHERMAP:TOO\_MANY\_REQUESTS - OPENWEATHERMAP:UNAUTHORIZED ## Get Weather Overview `` Get Weather Overview. ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

lat

Number

Latitude coordinate of the location.

x

lon

Number

Longitude coordinate of the location.

x

units

Enumeration, one of:

  • standard

  • metric

  • imperial

Temperature units for the response.

lang

String

Language code for the response text.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

### Output

Type

Any

Attributes Type

Any

### For Configurations - [Config](#Config) ### Throws - OPENWEATHERMAP:BAD\_REQUEST - OPENWEATHERMAP:CLIENT\_ERROR - OPENWEATHERMAP:CONNECTIVITY - OPENWEATHERMAP:FORBIDDEN - OPENWEATHERMAP:NOT\_FOUND - OPENWEATHERMAP:SECURITY - OPENWEATHERMAP:SERVER\_ERROR - OPENWEATHERMAP:TIMEOUT - OPENWEATHERMAP:TOO\_MANY\_REQUESTS - OPENWEATHERMAP:UNAUTHORIZED ## Types ### TLS Configures TLS to provide secure communications for the Mule app.
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures a revocation checking mechanism.

### Truststore Configures the truststore for TLS.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of store.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

### Keystore Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of store.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

### Standard Revocation Check Configures standard revocation checks for TLS certificates.
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

Verify only the last element in the certificate chain.

  • false

Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

Check the Certification Revocation List (CRL) for certificate validity.

  • false

Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

Avoid verification failure.

  • false

Allow the verification to fail.

### Custom OCSP Responder Configures a custom OCSP responder for certification revocation checks.
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

### CRL File Specifies the location of the certification revocation list (CRL) file.
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Count

Number

How many reconnection attempts the Mule app can make.

### Reconnect Forever Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

### Expiration Policy Configures an expiration policy strategy.
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

### Error Mapping
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Error source type to map.

Target

String

Target error type to map to.

x