Skip to content

Latest commit

 

History

History
696 lines (542 loc) · 30.1 KB

File metadata and controls

696 lines (542 loc) · 30.1 KB

Hyperscience Connector Reference

The Anypoint Connector for Hyperscience (Hyperscience Connector) provides connectivity to the Hyperscience API, enabling you to interface with Hyperscience to Create (using a JSON payload), List, and Retrieve submissions.

Configuration


Parameters

Name Type Description Default Value Required

Name

String

Unique identifier for this configuration. Connectors reference the configuration by this name.

x

Connection

Names of Connection Types for this configuration.

x

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

60

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default): Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS: Connector always streams the request content.

  • NEVER: Connector does not stream the request content.

AUTO

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

OAuth2.0 Connection Provider

Uses OAuth2.0 with the client-credentials grant type to authenticate.

Name Type Description Default Value Required

Name

String

ID used to reference this configuration.

x

Base Uri

String

URI of your Hyperscience instance.

x

Client Id

String

OAuth Client ID

x

Client Secret

String

OAuth Client Secret

x

Token Uri

String

URL of the service provider’s access-token endpoint.

x

Scope

String

OAuth scopes to request during the OAuth dance (comma separated).

Proxy Configuration

One of:

Configures a proxy for outbound connections.

TLS Configuration

TLS

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

Default Headers

Array of Default Header.

Default Query Parameters

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

Indicates whether to use persistent connections:

  • true: Mule uses persistent connections.

  • false: Mule closes the connection after the first request completes.

true

Max Connections

Number

Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput.

-1

Connection Idle Timeout

Number

When Use Persistent Connections is set to true, specifies how long a connection can remain idle before Mule closes it.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Stream Response

Boolean

If set to true, Mule streams received responses.

false

Response Buffer Size

Number

Size of the buffer that stores the HTTP response, in bytes.

-1

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Token Authentication Connection Provider

Uses a token to authenticate the connection.

Name Type Description Default Value Required

Name

String

ID used to reference this configuration.

x

Base Uri

String

URI of your Hyperscience instance.

Authorization

String

API token.

x

Proxy Configuration

One of:

Configures a proxy for outbound connections.

TLS Configuration

TLS

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

Default Headers

Array of Default Header.

Default Query Parameters

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

Indicates whether to use persistent connections:

  • true: Mule uses persistent connections.

  • false: Mule closes the connection after the first request completes.

true

Max Connections

Number

Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput.

-1

Connection Idle Timeout

Number

When Use Persistent Connections is set to true, specifies how long a connection can remain idle before Mule closes it.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Stream Response

Boolean

If set to true, Mule streams received responses.

false

Response Buffer Size

Number

Size of the buffer that stores the HTTP response, in bytes.

-1

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Custom Authentication Connection Provider

Uses a custom internal authentication mechanism to connect.

This internal mechanism is the default authentication method for SaaS instances.

In order to properly authenticate using this method, follow these steps:

  1. In the application, create an API account at Users > API Accounts.

  2. Copy the client ID and account password. You will not be able to access the account password after account creation.

  3. Enter your client ID in the Client ID field.

  4. Enter your account password in the Client Secret field.

  5. In the Auth Server field, enter the domain of the authentication server for your instance (e.g., login.hyperscience.net).

  6. In the Domain field, enter the domain of the instance where the Hyperscience application is hosted (e.g., example.hyperscience.net).

For more information, see API Access for SaaS Instances.

Name Type Description Default Value Required

Name

String

ID used to reference this configuration.

x

Client ID

String

Client ID.

x

Client Secret

String

Client Secret.

x

Auth server

String

Authentication server domain.

x

Domain

String

Domain of the Hyperscience instance.

x

Default Headers

Array of Default Header.

Default Query Parameters

Connection Timeout

Number

How long the connector waits before timing out when establishing a connection to the remote service.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Use Persistent Connections

Boolean

Indicates whether to use persistent connections:

  • true: Mule uses persistent connections.

  • false: Mule closes the connection after the first request completes.

true

Max Connections

Number

Maximum number of connections to open to the backend. HTTP requests are sent in parallel over multiple connections. Setting this value too high can impact latency and consume additional resources without increasing throughput.

-1

Connection Idle Timeout

Number

When persistent connections are enabled, how long a connection can remain idle before Mule closes it.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

Stream Response

Boolean

If this value is true, Mule streams received responses.

false

Response Buffer Size

Number

Size of the buffer that stores the HTTP response, in bytes.

-1

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

Submission Create JSON

<hyperscience:submissions-create-json>

Creates a submission using a JSON payload. This operation makes an HTTP POST request to the api/v5/submissions endpoint.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Body

Object

Content to use.

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Custom Query Parameters

Object

Custom query parameters to include in the request. The query parameters specified here are merged with the default query parameters that are specified in the configuration.

Custom Headers

Object

Custom headers to include in the request. The custom headers specified here are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default): Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS: Connector always streams the request content.

  • NEVER: Connector does not stream the request content.

Target Variable

String

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

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Object

For Configurations

Throws

  • HYPERSCIENCE:BAD_REQUEST

  • HYPERSCIENCE:CLIENT_ERROR

  • HYPERSCIENCE:CONNECTIVITY

  • HYPERSCIENCE:INTERNAL_SERVER_ERROR

  • HYPERSCIENCE:NOT_FOUND

  • HYPERSCIENCE:SERVER_ERROR

  • HYPERSCIENCE:UNAUTHORIZED

  • HYPERSCIENCE:UNSUPPORTED_MEDIA_TYPE

Submission Retrieve

<hyperscience:submissions-retrieve>

Retrieves a submission using the Submission id. This operation makes an HTTP GET request to the api/v5/submissions/{id} endpoint.

Parameters

Name Type Description Default Value Required

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

id

String

Submission id.

x

flat

Boolean

Optional parameter that prevents returning the documents, document_folders, unassigned_pages, and rejected_documents arrays of the Submission object. Defaults to true unless specifically set to false.

False

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Custom Query Parameters

Object

Custom query parameters to include in the request. The query parameters specified here are merged with the default query parameters that are specified in the configuration.

Custom Headers

Object

Custom headers to include in the request. The custom headers specified here are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default): Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS: Connector always streams the request content.

  • NEVER: Connector does not stream the request content.

Target Variable

String

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

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Object

For Configurations

Throws

  • HYPERSCIENCE:CLIENT_ERROR

  • HYPERSCIENCE:CONNECTIVITY

  • HYPERSCIENCE:INTERNAL_SERVER_ERROR

  • HYPERSCIENCE:NOT_FOUND

  • HYPERSCIENCE:SERVER_ERROR

  • HYPERSCIENCE:UNAUTHORIZED

  • HYPERSCIENCE:UNSUPPORTED_MEDIA_TYPE

Submissions List

<hyperscience:submissions-list>

Retrieves submissions. This operation makes an HTTP GET request to the api/v5/submissions endpoint.

Parameters

Name Type Description Default Value Required

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Complete time gte

DateTime

Filter for Submissions that were ingested into the application on or after a specific date and time (“greater than or equal to” operator).

Complete time lt

DateTime

Filter for Submissions that were ingested into the application before a specific date and time (“less than” operator).

exception

string

Filters for Submissions that have a specific exception. See Exceptions for a list of possible values.

Goal time gte

DateTime

Filter for Submissions that were created with the goal-time parameter whose value is the same or greater than a specific date and time (“greater than or equal to” operator).

Goal time lt

DateTime

Filter for Submissions that were created with the goal-time parameter whose value is before a specific date and time (“less than” operator).

halted

Boolean

Filters for Submissions that are in a halted state.

id

Submission Id

Filters for Submissions based on their `id`s

layout

String

Filters for Submissions whose Documents are matched to a certain layout

layout tag

String

Filters for Submissions containing Documents that matched to a layout with the specified layout tag.

limit

Number

Number of results to return per page.

60

offset

Number

The initial index from which to return the results.

Start time gte

DateTime

Filter for Submissions that were ingested into the application on or after a specific date and time (“greater than or equal to” operator).

Start time lt

DateTime

Filter for Submissions that were ingested into the application before a specific date and time (“less than” operator).

state

String

Filters for Submissions that are in a specific state. See Substates for a list of possible values.

substate

String

Filters for Submissions that are in a specific substate. See Substates for a list of possible values.

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Custom Query Parameters

Object

Custom query parameters to include in the request. The query parameters specified here are merged with the default query parameters that are specified in the configuration.

Custom Headers

Object

Custom headers to include in the request. The custom headers specified here are merged with the default headers that are specified in the configuration.

Response Timeout

Number

How long Mule waits for a response to complete before the request times out.

Response Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

Streaming Type

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

How the connector streams request content to the remote service:

  • AUTO (default): Connector automatically uses the best streaming strategy based on the request content.

  • ALWAYS: Connector always streams the request content.

  • NEVER: Connector does not stream the request content.

Target Variable

String

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

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Object

For Configurations

Throws

  • HYPERSCIENCE:CLIENT_ERROR

  • HYPERSCIENCE:CONNECTIVITY

  • HYPERSCIENCE:INTERNAL_SERVER_ERROR

  • HYPERSCIENCE:SERVER_ERROR

  • HYPERSCIENCE:UNAUTHORIZED

  • HYPERSCIENCE:UNSUPPORTED_MEDIA_TYPE

Unauthorize

<hyperscience:unauthorize>

Deletes all the access-token information of a given resource-owner ID. After this deletion, it is impossible to execute any operation for the resource owner without completing the authorization dance again.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Resource Owner Id

String

ID of the resource owner for whom to invalidate access.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Types

Default Header

Headers automatically added to every outbound request.

Field Type Description Default Value Required

Key

String

Key for this type.

x

Value

String

Value for this type.

x

Default Query Param

Query parameters automatically added to every outbound request.

Field Type Description Default Value Required

Key

String

Key for this type.

x

Value

String

Value for this type.

x

Proxy

Configures a proxy for outbound connections.

Field Type Description Default Value Required

Host

String

Hostname or IP address of the proxy server.

x

Port

Number

Port of the proxy server.

x

Username

String

Username to authenticate against the proxy server.

Password

String

Password to authenticate against the proxy server.

Non Proxy Hosts

String

Comma-separated list of hosts that the proxy must not be used against.

TLS

Configures TLS to provide secure communications for the Mule app.

Field Type Description Default Value Required

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.

Key Store

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

Field Type Description Default Value Required

Path

String

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

Type

String

Type of keystore.

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.

Non-Repeatable Stream

Disables the repeatable stream functionality and uses non-repeatable streams, resulting in lower performance overhead, memory use, and cost.

Trust Store

Configures the truststore for TLS.

Field Type Description Default Value Required

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 truststore.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

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

Reconnect

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

Field Type Description Default Value Required

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.

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in MILLISECONDS.

Blocking

Boolean

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

Reconnection

Configures a reconnection strategy for an operation.

Field Type Description Default Value Required

Fails Deployment

Boolean

What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:

  • true: Allow the deployment to fail.

  • false: Ignore the results of the connectivity test.

Reconnection Strategy

Reconnection strategy to use.

Expiration Policy

Configures an expiration policy strategy.

Field Type Description Default Value Required

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.

Repeatable File Store Stream

Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.

Field Type Description Default Value Required

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to reduce the number of times Mule needs to write the buffer on disk. Doing so increases performance, but it also requires additional memory, which limits the number of concurrent requests your application can process.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

Repeatable In-Memory Stream

Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX buffer size. Always run performance tests to find the optimal buffer size for your specific use case.

Field Type Description Default Value Required

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the size of the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value.

Buffer Size Increment

Number

Amount by which the buffer size expands if its initial size is smaller than the size of the data stream. Setting a value of 0 or lower prevents the buffer from expanding.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 indicates that there is no maximum size limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields.

Non-Repeatable Stream

Disables the repeatable stream functionality and uses non-repeatable streams, reducing performance overhead, memory usage, and cost.

CRL File

Specifies the location of the Certification Revocation List (CRL) file.

Field Type Description Default Value Required

Path

String

Path to the CRL file.

Custom OCSP Responder

Configures a custom Online Certificate Status Protocol (OCSP) responder for certification-revocation checks.

Field Type Description Default Value Required

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.

Standard Revocation Check

Configures standard revocation checks for TLS certificates.

Field Type Description Default Value Required

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 was not specified in the Prefer Crls field (i.e., 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 cannot be reached or is busy:

  • true: Avoid verification failure.

  • false: Allow the verification to fail.