APIClient Bean
Properties Methods Events Configuration Settings Errors
The APIClient component provides an easy way to make requests and listen for responses to and from any RESTful API.
Syntax
InAPI.Apiclient
Remarks
The API Integrator contains a single bean, APIClient. This is a generic bean that provides a developer with all the tools they need to integrate with a RESTful API. Using this in conjunction with /n software's Code Generation Service allows a developer to quickly and easily generate an SDK for any API.
The APIClient bean has the ability to make HTTP and HTTPS requests. It will also listen for any responses. It can generate and parse through both XML and JSON. Parameters can be built and sent as part of the URL, a form, a query, or any other typically used mechanism for a RESTful API.
Property List
The following is the full list of the properties of the bean with short descriptions. Click on the links for further details.
Accept | A list of acceptable MIME types for the request. |
AuthScheme | The authentication scheme to use when server authorization is required. |
AWS4AccessKey | The Access Key for an Amazon Web Services account. |
AWS4SecretKey | The Secret Key for an Amazon Web Services account. |
Connected | Shows whether the component is connected. |
ContentType | Content type for posts and puts. |
FileVars | File variables for the current request. |
Firewall | A set of properties related to firewall access. |
FormVars | Form variables for the current request. |
Headers | Collection of response headers returned after the last request. |
HTTPMethod | The HTTP method used for the request. |
Idle | The current status of the component. |
JChildren | Collection of child elements of the currently selected JSON element. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
OAuthAuthorizationScope | The scope request or response parameter used during OAuth authorization. |
OAuthCacheFile | The location on disk used to store OAuth settings and cache OAuth tokens. |
OAuthClientId | The OAuth Client Id assigned to the registered application. |
OAuthClientSecret | The OAuth Client Secret assigned to the registered application. |
OAuthGrantType | The OAuth grant type used to acquire an OAuth access token. |
OAuthServerAuthURL | The URL of the OAuth authorization server. |
OAuthServerTokenURL | The URL used to obtain the OAuth access token. |
ParsedHeaders | Collection of headers returned from the last request. |
Password | A password if authentication is to be used. |
PostData | The data to post with the URL if the POST method is used. |
Proxy | A set of properties related to proxy access. |
QueryParameters | The query parameters to be appended to the URL. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
StatusCode | The HTTP status code returned in the last response. |
StatusDescription | The HTTP status description returned in the last response. |
Timeout | A timeout for the component. |
TransferredData | The contents of the last response from the server. |
URL | The URL to use to make the request. |
URLParameters | The URL parameters to substitute into the URL. |
URLPath | The path for the URL. |
URLPort | The port for the URL. |
URLScheme | The scheme for the URL. |
URLServer | The server for the URL. |
User | A user name if authentication is to be used. |
XChildren | Collection of child elements of the currently selected XML element. |
XElement | The name of the currently selected XML/JSON element. |
XPath | Selects a specific element in the loaded XML/JSON content. |
XSubTree | A snapshot of the currently selected XML/JSON element. |
XText | The text of the currently selected XML/JSON element. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
addFileVar | Adds a file variable and the corresponding file name. |
addFormVar | Adds a form variable and the corresponding value. |
addHeader | Adds an HTTP header to the request. |
addQueryParam | Adds a query parameter to the query string. |
addURLParam | Adds a URL parameter to be substituted into a URL. |
config | Sets or retrieves a configuration setting . |
endArray | Writes the closing bracket of a JSON array. |
endElement | Writes the closing tag of an open XML element. |
endObject | Writes the closing brace of a JSON object. |
flush | Flushes the XML/JSON content that has been written so far. |
getHeader | Returns the value of a header. |
interrupt | Interrupt the current method. |
parse | Parses XML/JSON content and loads it into the component. |
putAttr | Writes an XML attribute. |
putElement | Writes a simple XML element with a value. |
putName | Writes the name of a property. |
putProperty | Write a property and value. |
putRaw | Writes a raw XML fragment. |
putString | Writes text inside an XML element. |
putValue | Writes a value of a property. |
reset | Resets the component to its default state. |
sendRequest | Sends the request to the server. |
setDownloadStream | Sets the stream to which the downloaded data from the server will be written. |
setUploadStream | Sets the stream to be uploaded to the server. |
startArray | Writes the opening bracket of a JSON array. |
startElement | Writes the opening tag of an XML element. |
startObject | Writes the opening brace of a JSON object. |
util | Reserved for future use. |
Event List
The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.
AfterOAuth | Fires after an OAuth authentication attempt has finished. |
BeforeOAuth | Fires before an OAuth authentication attempt begins. |
Connected | Fired immediately after a connection completes (or fails). |
ConnectionStatus | Fired to indicate changes in connection state. |
Disconnected | Fired when a connection is closed. |
EndTransfer | Fired when a document finishes transferring. |
Error | Information about errors during data delivery. |
Header | Fired every time a header line comes in. |
Log | Fires once for each log message. |
OAuthLaunchBrowser | Fires before launching a browser with the OAuth authorization URL. |
Redirect | Fired when a redirection is received from the server. |
SetCookie | Fired for every cookie set by the server. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
StartTransfer | Fired when a document starts transferring (after the headers). |
Status | Fired when the HTTP status line is received from the server. |
Transfer | Fired while a document transfers (delivers document). |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
OAuthToken | Gets an OAuth authorization token. |
OAuthAuthorizationTokenType | The type of access token returned. |
OAuthAuthorizationURL | Specifies the URL used for authorization. |
OAuthBrowserResponseTimeout | Specifies the amount of time to wait for a response from the browser. |
OAuthFormVarCount | Specifies the number of additional form variables to include in the request. |
OAuthFormVarName[i] | Specifies the form variable name at the specified index. |
OAuthFormVarValue[i] | Specifies the form variable value at the specified index. |
OAuthOffice365ServiceAPIVersion | The API version of the Office 365 service being discovered. |
OAuthOffice365ServiceCapability | The API capability of the Office 365 service being discovered. |
OAuthOffice365ServiceEndpoint | The Office 365 endpoint for the service that matches the criteria specified. |
OAuthReUseWebServer | Determines if the same server instance is used between requests. |
OAuthTokenInfoFieldCount | The number of fields in the tokeninfo service response. |
OAuthTokenInfoFieldName[i] | The name of the tokeninfo service response field. |
OAuthTokenInfoFieldValue[i] | The value of the tokeninfo service response field. |
OAuthTokenInfoURL | The URL of the tokeninfo service. |
OAuthValidateToken | Validates the specified access token with a tokeninfo service. |
OAuthWebServerFailedResponse | The custom response that will be displayed to the user if authentication failed. |
OAuthWebServerHost | The hostname used by the embedded web server displayed in the ReturnURL. |
OAuthWebServerPort | The port on which the embedded web server listens. |
OAuthWebServerResponse | The custom response that will be displayed to the user. |
OAuthWebServerUseSSL | Whether the web server requires SSL connections. |
OAuthWebServerSSLCertStoreType | The type of certificate store. |
OAuthWebServerSSLCertStore | The name of the certificate store for the client certificate. |
OAuthWebServerSSLCertStorePassword | The certificate password. |
OAuthWebServerSSLCertSubject | The certificate subject. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowHTTPFallback | Whether HTTP/2 connections are permitted to fallback to HTTP/1.1. |
AllowNTLMFallback | Whether to allow fallback from Negotiate to NTLM when authenticating. |
Append | Whether to append data to LocalFile. |
Authorization | The Authorization string to be sent to the server. |
BytesTransferred | Contains the number of bytes transferred in the response data. |
EncodeURL | If set to true the URL will be encoded by the component. |
FollowRedirects | Determines what happens when the server issues a redirect. |
GetOn302Redirect | If set to true the component will perform a GET on the new location. |
HTTPVersion | The version of HTTP used by the component. |
HTTP2HeadersWithoutIndexing | HTTP2 headers that should not update the dynamic header table with incremental indexing. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KeepAlive | Determines whether the HTTP connection is closed after completion of the request. |
LogLevel | The level of detail that is logged. |
MaxHeaders | Instructs component to save the amount of headers specified that are returned by the server after a Header event has been fired. |
MaxHTTPCookies | Instructs component to save the amount of cookies specified that are returned by the server when a SetCookie event is fired. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
NegotiatedHTTPVersion | The negotiated HTTP version. |
OtherHeaders | Other headers as determined by the user (optional). |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
TransferredData | The contents of the last response from the server. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the component. |
TransferredHeaders | The full set of headers as received from the server. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
UsePlatformHTTPClient | Whether or not to use the platform HTTP client. |
UserAgent | Information about the user agent (browser). |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
TcpNoDelay | Whether or not to delay when sending packets. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLContextProtocol | The protocol used when getting an SSLContext instance. |
SSLTrustManagerFactoryAlgorithm | The algorithm to be used to create a TrustManager through TrustManagerFactory. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
UseDaemonThreads | Whether threads created by the component are daemon threads. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |