Skip to main content

This documentation is for an older version of this product. See the latest version of this content.Opens in a new tab

HS.BulkFHIR.Fetch.Util.RestClient

class HS.BulkFHIR.Fetch.Util.RestClient extends HS.FHIRServer.RestClient.HTTP

Property Inventory

Method Inventory

Parameters

parameter TokenRetryLimit = 2;
Maximum number of retries for obtaining an OAuth token during $export when obtain fails.

Properties

property BaseURL as %String [ Calculated ];
Property methods: BaseURLDisplayToLogical(), BaseURLIsValid(), BaseURLLogicalToDisplay(), BaseURLLogicalToOdbc(), BaseURLNormalize()

Methods

method BaseURLGet() as %String
classmethod EnsureFetchToken(pOAuthClientName As %String, ByRef pTokenSessionId As %String, pFetchTokenInfo As %DynamicObject, pGrantType As %String, pEndpointURL As %String, pHTTPCredentialsConfig As %String) as %Status
@API
Use an IRIS OAuth API call to verify that a token exists and is active for the specified OAuth client name and SessionId. If not found or not active, then obtain a new token.

@Input pOAuthClientName OAuth client name.
@Input pTokenSessionId OAuth token 'SessionId" value to use for storing and retrieving an access token. This is not the same item as the BFC sessionId.
@Input pFetchTokenInfo %DynamicObject of information about the access token on the request to the BFC.
@Input pGrantType OAuth token grant type to use when requesting the token.
@Input pEndpointURL Resource server endpoint URL to use in the aud claim.
@Input pHTTPCredentialsConfig Interoperability credentials config ID to use for password grant.
method ExecuteRequest(pPath As %String) as HS.FHIRServer.API.Data.RestClient.Response
@API
Sends an HTTP GET request to the endpoint configured for this REST client.
@Input path path to send an HTTP request to, eg. "Patient" or "metadata"
classmethod GetClientId(pClientName) as %String
Return the OAuth client id for a given OAuth client name.
classmethod GetNewFetchTokenSessionId() as %String
@API
Return a new unique SessionId to use for OAuth token request, retrieve and revoke.
classmethod GetScopesForToken(pFetchTokenInfo As %DynamicObject) as %String
Derive the OAuth scopes string to use for the access token for resource server interactions. The return value is a space-delimited string of scopes.
classmethod GetTokenForFetch(pOAuthClientName As %String, pTokenSessionId As %String, pFetchTokenInfo As %DynamicObject, pGrantType As %String, pEndpointURL As %String, pHTTPCredentialsConfig As %String)
@API
Obtain an access token for interactions with the resource server. If successful, the token is stored in a structure from which it can be retrieved, given the OAuth client name and a session id.

@Input pOAuthClientName OAuth client name.
@Input pTokenSessionId OAuth token 'SessionId" value to use for storing and retrieving an access token. This is not the same item as the BFC sessionId.
@Input pFetchTokenInfo %DynamicObject of information about the access token on the request to the BFC.
@Input pGrantType OAuth token grant type to use when requesting the token.
@Input pEndpointURL Resource server endpoint URL to use in the aud claim.
@Input pHTTPCredentialsConfig Interoperability credentials config ID to use for password grant.
method Revoke()
Revoke an access token that might be in use by this RestClient instance.
Input:
@Input pOAuthClientName OAuth client name.
@Input pTokenSessionId OAuth token 'SessionId" value to use for revoking the access token. This is not the same item as the BFC sessionId.
classmethod RevokeAccessToken(pOAuthClientName As %String, pTokenSessionId As %String)
classmethod getInstance(pServiceEntryName As %String, pMaxRequestsPerSecond As %Integer, pTokenObj As HS.BulkFHIR.Fetch.Util.AccessToken = "", pSessionId As %String = "", ByRef pHeaders) as HS.BulkFHIR.Fetch.Util.RestClient
@API
Returns a configured instance of this class, which can be used as a rest client for fetching content out of the configured FHIR endpoint.
@Input pServiceEntryName Entry in the Service Registry that points to a FHIR endpoint
@Input pMaxRequestsPerSecond Imposes rate limiting on requests using this client object
@Input pTokenObj Object that holds information about the new token to request.
@Input pSessionId BFC sessionId.
@Input pHeaders Custom HTTP headers to add to requests.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab