status.get
Checks that the Velo API is reachable and the client's credentials are valid. The request is sent immediately.
Imports
import { Velo } from 'velo-sdk';Examples
import { Velo } from 'velo-sdk';
const velo = new Velo({ apiKey: process.env.VELO_API_KEY! });
const status = await velo.status.get();
if (status === 'ok') {
console.log('Connected to the Velo API');
}Definition
function get(options?: HttpRequestOptions): Promise<StatusResponse>;Parameters
options
- Type:
HttpRequestOptions - Optional
Per-request timeout, retry, and abort-signal options.
Return Type
- Type:
Promise<StatusResponse>
Returns the string literal "ok" when the API is reachable and the credentials are valid.
Errors
Rejects with the corresponding request error for an unsuccessful HTTP response or a VeloError for an unexpected response body.