Last date modified: 2025-Apr-29
Interface: RelativityHttpClient
ConvenienceApi.RelativityHttpClient
Description
Allows developers to send requests to internal Relativity APIs or external non-Relativity APIs
Properties
- delete
- get
- getCancellationToken
- keplerCallLRP
- keplerDelete
- keplerGet
- keplerPatch
- keplerPost
- keplerPut
- makeRelativityBaseRequestOptions
- makeRelativityRelativeUrl
- makeRelativityRestBaseRequestOptions
- makeRelativityRestRelativeUrl
- patch
- post
- put
Properties
delete
- delete: (
input:string|Request,requestOptions:RequestInit) =>Promise<Response>
Type declaration
- (
input,requestOptions):Promise<Response>
Parameters
| Name | Type | Description |
|---|---|---|
input
|
string | Request |
The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource. |
requestOptions
|
RequestInit
|
- |
Returns
Promise<Response>
A Promise for the Response from the fetch request
Description
Calls fetch with request method set to DELETE
See
get
- get: (
input:string|Request,requestOptions?:RequestInit) =>Promise<Response>
Type declaration
- (
input,requestOptions?):Promise<Response>
Parameters
| Name | Type | Description |
|---|---|---|
input
|
string | Request |
The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource. |
requestOptions?
|
RequestInit
|
- |
Returns
Promise<Response>
A Promise for the Response from the fetch request
Description
Calls fetch as a GET request
See
getCancellationToken
- getCancellationToken: () =>
CancellationToken
Type declaration
- ():
CancellationToken
Returns
CancellationToken
instance of keplerjs.CancellationToken
Description
get a new instance of a keplerjs.CancellationToken. For use when calling the keplerCallLRP function.
See
keplerCallLRP
- keplerCallLRP: <T>(
hub:string,operation:string,payload:any,progressCallback:any,cancellationToken:any,requestOptions?:AxiosRequestConfig<any>,httpMethod?:string,signalRHub?:string,metricKey?:string,waitForPageLoad?:boolean) =>Promise<void|T>
Type declaration
- <
T>(hub,operation,payload,progressCallback,cancellationToken,requestOptions?,httpMethod?,signalRHub?,metricKey?,waitForPageLoad?):Promise<void|T>
Type parameters
| Name |
|---|
T
|
Parameters
| Name | Type | Description |
|---|---|---|
hub
|
string
|
Url for the Kepler service |
operation
|
string
|
Name of the method on the Kepler service to call |
payload
|
any
|
Yhe body of the request |
progressCallback
|
any
|
Function called when the long running operation posts a status update. It's called with an object with the type of the IProgress parameter defined in the Kepler endpoint |
cancellationToken
|
any
|
Instance of keplerjs.CancellationToken - returned from the getCancellationToken() function - to cancel the long running operation |
requestOptions?
|
AxiosRequestConfig<any> |
Object with request options to keplerjs |
httpMethod?
|
string
|
HTTP method for the call. Defaults to "POST", if omitted |
signalRHub?
|
string
|
The path to the SignalR hub to use (for progress and cancel). If not specified, the default Object Manager hub is used |
metricKey?
|
string
|
The key to identify the api call in metrics |
waitForPageLoad?
|
boolean
|
Specifies whether SignalR should wait for the page to load before starting the connection |
Returns
Promise<void | T>
Promise resolves to the result of the long running operation
Description
Call to a kepler service to perform a long running operation
See
keplerDelete
- keplerDelete: <T>(
url:string,metricKey?:string) =>Promise<void|T>
Type declaration
- <
T>(url,metricKey?):Promise<void|T>
Type parameters
| Name |
|---|
T
|
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
URL to request |
metricKey?
|
string
|
The key to identify the api call in metrics |
Returns
Promise<void | T>
On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body
Description
Invoke a DELETE request to a kepler service. The request cannot be cancelled and does not report progress
keplerGet
- keplerGet: <T>(
url:string,requestOptions?:AxiosRequestConfig<any>,metricKey?:string) =>Promise<void|T>
Type declaration
- <
T>(url,requestOptions?,metricKey?):Promise<void|T>
Type parameters
| Name |
|---|
T
|
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
URL to request |
requestOptions?
|
AxiosRequestConfig<any> |
Object with request options to keplerjs |
metricKey?
|
string
|
The key to identify the api call in metrics |
Returns
Promise<void | T>
On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body.
Description
Invoke a GET request to a kepler service
See
keplerPatch
- keplerPatch: <T>(
url:string,payload:any,requestOptions?:AxiosRequestConfig<any>,metricKey?:string) =>Promise<void|T>
Type declaration
- <
T>(url,payload,requestOptions?,metricKey?):Promise<void|T>
Type parameters
| Name |
|---|
T
|
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
URL to request |
payload
|
any
|
JSON serializable object to send in the request body |
requestOptions?
|
AxiosRequestConfig<any> |
Object with request options to keplerjs |
metricKey?
|
string
|
The key to identify the api call in metrics |
Returns
Promise<void | T>
On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body
Description
Invoke a PATCH request to a kepler service
See
keplerPost
- keplerPost: <T>(
url:string,payload:any,requestOptions?:AxiosRequestConfig<any>,metricKey?:string) =>Promise<void|T>
Type declaration
- <
T>(url,payload,requestOptions?,metricKey?):Promise<void|T>
Type parameters
| Name |
|---|
T
|
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
URL to request |
payload
|
any
|
JSON serializable object to send in the request body |
requestOptions?
|
AxiosRequestConfig<any> |
Object with request options to keplerjs |
metricKey?
|
string
|
The key to identify the api call in metrics |
Returns
Promise<void | T>
On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body.
Description
Invoke a POST request to a kepler service
See
keplerPut
- keplerPut: <T>(
url:string,payload:any,metricKey?:string) =>Promise<void|T>
Type declaration
- <
T>(url,payload,metricKey?):Promise<void|T>
Type parameters
| Name |
|---|
T
|
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
URL to request. |
payload
|
any
|
JSON serializable object to send in the request body. |
metricKey?
|
string
|
The key to identify the api call in metrics |
Returns
Promise<void | T>
On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body.
Description
Invoke a PUT request to a kepler service.
makeRelativityBaseRequestOptions
- makeRelativityBaseRequestOptions: (
extendWith?:RequestInit) =>RequestInit
Type declaration
- (
extendWith?):RequestInit
Parameters
| Name | Type |
|---|---|
extendWith?
|
RequestInit
|
Returns
RequestInit
Returns a base request options object for use in calls against services on Relativity
Description
Generates a base requestOptions object for use in calls against services on Relativity
makeRelativityRelativeUrl
- makeRelativityRelativeUrl: (
url:string) =>string
Type declaration
- (
url):string
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
url string, relative to Relativity's base url |
Returns
string
a Relativity service Url
Description
Prefixes the given url with Relativity's base url
makeRelativityRestBaseRequestOptions
- makeRelativityRestBaseRequestOptions: (
extendWith?:RequestInit) =>RequestInit
Type declaration
- (
extendWith?):RequestInit
Parameters
| Name | Type |
|---|---|
extendWith?
|
RequestInit
|
Returns
RequestInit
Returns a base request options object for use in calls against Relativity.Rest services
Description
Generates a base requestOptions object for use in calls against Relativity.Rest services
makeRelativityRestRelativeUrl
- makeRelativityRestRelativeUrl: (
url:string) =>string
Type declaration
- (
url):string
Parameters
| Name | Type | Description |
|---|---|---|
url
|
string
|
Url string, relative to Relativity.Rest's base url |
Returns
string
A Relativity.Rest service Url
Description
Prefixes the given url with Relativity.Rest's base url
patch
- patch: (
input:string|Request,payload?:any,requestOptions?:RequestInit) =>Promise<Response>
Type declaration
- (
input,payload?,requestOptions?):Promise<Response>
Parameters
| Name | Type | Description |
|---|---|---|
input
|
string | Request |
The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource. |
payload?
|
any
|
- |
requestOptions?
|
RequestInit
|
- |
Returns
Promise<Response>
A Promise for the Response from the fetch request
Description
Calls fetch with request method set to PATCH
See
post
- post: (
input:string|Request,payload?:any,requestOptions?:RequestInit) =>Promise<Response>
Type declaration
- (
input,payload?,requestOptions?):Promise<Response>
Parameters
| Name | Type | Description |
|---|---|---|
input
|
string | Request |
The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource. |
payload?
|
any
|
- |
requestOptions?
|
RequestInit
|
- |
Returns
Promise<Response>
A Promise for the response from the fetch request
Description
Calls fetch with request method set to POST
See
put
- put: (
input:string|Request,payload?:any,requestOptions?:RequestInit) =>Promise<Response>
Type declaration
- (
input,payload?,requestOptions?):Promise<Response>
Parameters
| Name | Type | Description |
|---|---|---|
input
|
string | Request |
The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource. |
payload?
|
any
|
- |
requestOptions?
|
RequestInit
|
- |
Returns
Promise<Response>
A Promise for the Response from the fetch request
Description
Calls fetch with request method set to PUT
See
On this page