@nuralogix.ai/dfx-api-client / HTTP / General

General

General end points

Sample code

const apiClient = client();
const response = await apiClient.http.general.status();
const { status, body } = response;
if (status !== '200') {
    /**
     * TypeScript knows that once we are inside this block, the only response
     * shape that matches a non "200" response is the ErrorResponse
    */
    throw body;
}
/** Otherwise the shape of the response is GeneralStatus200Response */
console.log(body.Version);

Methods

listAcceptedMimeTypes

▸ listAcceptedMimeTypes()

Returns a list of system-wide accepted Mime types and their IDs.

Endpoint Action ID = 101

Returns

Promise<ErrorResponse | GeneralListAcceptedMIMETypes200Response>


listAvailableStatuses

▸ listAvailableStatuses()

Retrieves a list of available status codes that can be used throughout the application to update the StatusID field of various resources.

Endpoint Action ID = 104

Returns

Promise<ErrorResponse | GeneralListAvailableStatuses200Response>


listAvailableUserRoles

▸ listAvailableUserRoles()

Retrieves a list of available User Roles.

Endpoint Action ID = 102

Returns

Promise<ErrorResponse | GeneralListAvailableRoles200Response>


regions

▸ regions()

Return the list of regions available for clusters.

Endpoint Action ID = 108

Returns

Promise<ErrorResponse | GeneralRegions200Response>


status

▸ status()

An endpoint that propagates the current API health status and other information. This can be used during an apps initial boot process to determine the accessibility of the API and propagate a general status message to users.

Endpoint Action ID = 100

Returns

Promise<ErrorResponse | GeneralServerStatus200Response>


verifyToken

▸ verifyToken()

Checks validity of your Token and returns its encoded info.

Endpoint Action ID = 107

Returns

Promise<ErrorResponse | GeneralVerifyToken200Response>