Qorus Integration Engine® Enterprise Edition 6.1.0_prod
Loading...
Searching...
No Matches
Qorus Public REST API

Qorus Public REST API Overview

The APIs documented here do not require any authentication to access.

Swagger Schema
A static version can be downloaded here: qorus-rest-api-public.yaml; a dynamic version is available from every Qorus instance without authentication at URI paths /schema/qorus-rest-api-public.yaml and /schema/qorus-rest-api-public.json (ex: if Qorus is available on https://localhost:8011, then the dynamic schema can be retrieved from https://localhost:8011/schema/qorus-rest-api-public.yaml and https://localhost:8011/schema/qorus-rest-api-public.json).

/api/public/apps

This URI path provides access to public data provider application functionality

GET /api/public/apps

Description
Returns matching DataProvider applications
Arguments
This API takes the following hash arguments:
  • search (*string): a substring or regular expression search value to look for in the application name and description fields
  • search_regex (*bool): if True then any search value will be assumed to be a regular expression instead of a substring
Return Value
This API returns a value of type *list<DataProviderAppInfo>: list of DataProvider applications

/api/public/apps/{app}

This URI path provides access to public data provider application functionality

GET /api/public/apps/{app}

Description
Returns info about the current DataProvider application
Arguments
Return Value
This API returns a DataProviderAppInfo hash with the following keys (info about the current DataProvider application):
  • name (string): the unique application name
  • display_name (string): the dispay name for the application
  • short_desc (string): the application's short description in plain text
  • desc (string): the application description with markdown formatting
  • builtin (bool): if the application is builtin to Qorus or not
  • scheme (*string): any scheme identifying a connection for the application
  • logo (string): a link to the logo data that will be served directly
  • logo_file_name (string): the file name of the logo
  • logo_mime_type (string): the mime type for logo
  • oauth2_clients (*list<OAuth2AppClientInfo>): OAuth2 client info, if any
  • connections (*list<string>): a list of existing connections with the given scheme
  • actions (*list<DataProviderActionInfo>): list of all actions on each application
  • oauth2_client (*OAuth2ClientInfo): OAuth2 client info, if any
    • oauth2_client_id (string): the OAuth2 client ID to use
    • oauth2_client_secret (string): the OAuth2 client secret to use
    • url_type (string): auto: automatically generated or required: the user must provide a URL
    • oauth2_auth_url (*string): if set, this overrides the REST connection option
    • oauth2_token_url (*string): if set, this overrides the REST connection option
    • required_options (*list<string>): a list of connection options that must be filled in by the user to create the connection

GET /api/public/apps/{app}?action=logo

Return Value
Returns the application's logo with the Content-Type as the logo's MIME type

/api/public/apps/{app}/{logo_file_name}

This URI path provides access to public data provider application functionality

GET /api/public/apps/{app}/{logo_file_name}

Return Value
Returns the application's logo with the Content-Type as the logo's MIME type

/api/public/info

This URI path implements token-based user authentication.

GET /api/public/info

Description
Since
Arguments
This API takes no arguments
Return Value
This API returns a QorusPublicInfo hash with the following keys (information about the current Qorus instance):
  • instance-key (string): Qorus instance identifier
  • omq-version (string): Qorus executable version
  • omq-build (string): Qorus executable git hash
  • qore-version (string): Qore library version
  • omq-schema (string): Qorus system schema info
  • noauth (bool): An indicator if authorization is required or not; if True then the Qorus instance has authentication disabled and does not require any authentication info to connect; all API calls run with implicit internal system privileges. If False then authentication is required and enforced for all external API calls requiring authentication
  • edition (string): Enterprise for Qorus Integration Engine(R) Enterprise Edition
  • tz_region (string): the time zone region the server is running in
  • tz_utc_offset (int): the UTC offset in seconds east of UTC; negative numbers indicate west of UTC

/api/public/login

This URI path implements token-based user authentication.

POST /api/public/login

Description
Logs a user in to Qorus; this API does not require authentication.For security reasons, this API should only be used with encrypted (HTTPS) connections.
Arguments
This API takes the following hash arguments:
  • user (string): The username to log in
  • pass (string): The user's password
Return Value
This API returns a QorusTokenInfo hash with the following key (Authentication info):
  • token (string): A valid access token to be used in the Qorus-Token header in subsequent requests
Errors
  • 400 Bad Request: invalid or missing arguments
  • 401 Unauthorized: authentication failed

/api/public/oauth2

This URI path implements token-based user authentication.

/api/public/oauth2/auth

This URI path handles requests related to OAuth2 authorization code requests

GET /api/public/oauth2/auth

Description
provides authorization codes and access tokens according to the request arguments
Arguments
This API takes the following hash arguments:
  • response_type (string): the response type, must be one of token or code
  • client_id (string): required for access tokens and authorization codes
  • redirect_uri (*string): the redirect URI
  • code (*string): required for an access token request
  • scope (*string): optional scope; OAuth2 scopes are equivalent to Qorus permissions; if empty then all scopes are assumed; if the client requests a scope / permission not allocated to the client, then an error will be returned; if scopes are provided in the call, then they must be provided as a space-separated list of scopes / permissions
  • state (*string): optional state
Return Value
This API returns a QorusOAuthTokenResponse hash with the following keys (the result of the request):
  • code (*string): required if response_type is code
  • access_token (string): the access token
  • token_type (string): the token type
  • expires_in (*int): the lifetime of the token in seconds
  • scope (*string): the scope of the response
  • state (*string): the state value from the request, if any
Errors
  • 400 Bad Request: invalid or missing arguments

/api/public/oauth2/redirect

This URI path handles redirect requests from OAuth2 authorization_code grant flows directly on the local Qorus instance

GET /api/public/oauth2/redirect

Description
Supports acquiring a token from an authorization server from an authorization code as well as updating REST connections with the token information acquired. After acquiring the token and updating the connection, the user is redirected to the final UI location.
Arguments
This API takes the following hash arguments:
  • code (string): the authorization code to use to acquire an access token
  • state (string): this is an encrypted string generated by Qorus that contains the context information that allows the original user to be authenticated and the connection to be updated
Return Value
This API returns a value of type auto: a 307 Temporary Redirect response is returned if successful using the redirect_uri value as the redirection location
Errors
  • 400 Bad Request: invalid or missing arguments
  • 401 Unauthorized: invalid authentication context in state, user has no right to modify user connections
Note
Requires one of the following permissions:

/api/public/oauth2/token

This URI path handles requests related to OAuth2 tokens

POST /api/public/oauth2/token

Description
Supports providing access token for the following OAuth2 grant types: authorization_code, password, client_credentials, refresh_token
Arguments
This API takes the following hash arguments:
  • grant_type (string): the grant type; one of: authorization_code, password, client_credentials, or refresh_token
  • redirect_uri (*string): the redirect URI
  • code (*string): required for an access token request
  • client_id (*string): required for an access token request
  • scope (*string): optional scope
  • state (*string): optional state
  • username (*string): required for an access token request
  • password (*string): required for an access token request
  • refresh_token (*string): required for a refresh token request
Return Value
This API returns a QorusOAuthTokenResponse hash with the following keys (the result of the request):
  • code (*string): required if response_type is code
  • access_token (string): the access token
  • token_type (string): the token type
  • expires_in (*int): the lifetime of the token in seconds
  • scope (*string): the scope of the response
  • state (*string): the state value from the request, if any
Errors
  • 400 Bad Request: invalid or missing arguments

/api/public/oauth2/update-connection

This URI path handles requests related to finalizing OAuth2 connections in authorization code grant flows

GET /api/public/oauth2/update-connection

Description
Supports updating connections with OAuth2 token information from authorization code grant flows from external servers as a part of the redirect action after user authorization. This call will update the user connection provided as an argument and then redirect the user to the final UI location.
Arguments
This API takes the following hash arguments:
  • access_token (string): the access token provided by the authorization server; will set the token option on the connection
  • auth_context (string): encrypted authorization information for the Qorus user executing the request
  • conn (string): the name of the user connection to update
  • redirect_uri (string): the final redirect URI to be issued after a successful operation
  • refresh_token (*string): any refresh token provided by the authorization server; will set the oauth2_refresh_token option on the connection
Return Value
This API returns a value of type auto: a 307 Temporary Redirect response is returned if successful using the redirect_uri value as the redirection location
Errors
  • 400 Bad Request: invalid or missing arguments
  • 401 Unauthorized: invalid authentication context in auth_context, no right to modify user connections
Note
Requires one of the following permissions: