Constructor
new DirectAPIRequest(limits)
Creates an instance with which any number of API requests can be made.
Parameters:
| Name | Type | Description |
|---|---|---|
limits |
object | Default values for |
- Source:
Methods
(async) fetch(options, onDoneopt) → {EventEmitter|Promise}
Required properties in the RequestOptions object (unless an alias is used - see below):
url: URL relative to thebaseURL. Ex.:'/api/v2/entities'.baseURL: URL of the Dynatrace tenant. Ex.:'https://abc12345.live.dynatrace.com'.
For convenience aliases have been provided for the following request methods:
get(url, options[, onDone])delete(url, options[, onDone])post(url, data, options[, onDone])put(url, data, options[, onDone])
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
options |
RequestOptions | The request options, Axios-style. |
|
onDone |
RequestCallback |
<optional> |
Callback that handles the result (alternative to using a Promise). |
- Source:
Returns:
If onDone is provided, this method returns an EventEmitter.
Else, this method returns a Promise.
- Type
- EventEmitter | Promise