RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

ApiAccountController

Controller Class for API Accounts

Constructor

new ApiAccountController()

Source

Methods

static

create(createData) → {Promise.<ApiAccountModel>}

Create a API Account [POST /api-accounts]

Parameters

  • createData ApiAccountController.CreateData

    The API Account Create Data

Returns

  • Promise.<ApiAccountModel>

Source

static

getAll(queryParametersopt) → {Promise.<Array.<ApiAccountModel>>}

List all API Accounts [GET /api-accounts]

Parameters

  • queryParameters ApiAccountController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<ApiAccountModel>>

Source

static

getOne(id) → {Promise.<ApiAccountModel>}

Retrieve a API Account [GET /api-accounts/{id}]

Parameters

  • id string

    The API Account ID

Returns

  • Promise.<ApiAccountModel>

Source

static

getPolicies(id) → {Promise.<{policies: Array.<string>}>}

Retrieve the Policies Assigned to an API Account [GET /api-accounts/{id}/policies]

Parameters

  • id string

    The API Account ID

Returns

  • Promise.<{policies: Array.<string>}>

Source

static

getSecret(id) → {Promise.<string>}

Retrieve the Secret of an API Account [GET /api-accounts/{id}/secret]

Parameters

  • id string

    The API Account ID

Returns

  • Promise.<string>

Source

static

setPolicies(id, policies) → {Promise.<boolean>}

Set the Policies Assigned to an API Account [POST /api-accounts/{id}/policies]

Parameters

  • id string

    The API Account ID

  • policies Array.<string>

    An Array of Account Policy IDs

Returns

  • Promise.<boolean>

Source

static

update(id, updateData) → {Promise.<ApiAccountModel>}

Update a API Account [PATCH /api-accounts/{id}]

Parameters

  • id string

    The API Account ID

  • updateData ApiAccountController.UpdateData

    The API Account Update Data

Returns

  • Promise.<ApiAccountModel>

Source

static

updateCurrent(updateData) → {Promise.<ApiAccountModel>}

Update the Current API Account [PATCH /api-account]

Parameters

  • updateData ApiAccountController.UpdateData

    The API Account Update Data

Returns

  • Promise.<ApiAccountModel>

Source

Type Definitions

CreateData

The Create Data for a API Account

Type

  • Object

Properties

  • name string

    The API Account Name

  • companyId string

    The Company this API Account belongs to

  • policies Array.<string> <optional>

    The Policies that apply to this API Account

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • name string <optional>

    The API Account Name

  • companyId string <optional>

    The Company this API Account belongs to

Source