Skip to content

Latest commit

 

History

History
248 lines (172 loc) · 4.37 KB

custom-fields.md

File metadata and controls

248 lines (172 loc) · 4.37 KB

Custom Fields

7 operation(s). Part of the API index.

Call these as client.<service>.<method>({ ... }). <service> is the client field for this group — the README lists the field name for every service. These pages group operations the way the OpenAPI specification tags them, which is not always one field per page.


createCustomField

POST /v2/manage/custom-fields

Create custom field

Creates a new Custom Field for the Tenant.

Example

async function callCreateCustomField(client: LoginRadius) {
  const raasCustomFieldModel = {  }; //Required

  try {
    const res = await client.<service>.createCustomField({ raasCustomFieldModel });
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Request body

RaasCustomFieldModel as application/json.

Returns

RaasCustomField


deleteCustomField

DELETE /v2/manage/custom-fields/{cfname}

Delete custom field

Deletes a Custom Field by name for the Tenant.

Example

async function callDeleteCustomField(client: LoginRadius) {
  const cfname: string = '<cfname>'; //Required

  try {
    const res = await client.<service>.deleteCustomField({ cfname });
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Parameters

Name In Type Required Description
cfname path string yes Custom Fields Name

Returns

DeleteResponse


getActiveCustomFields

GET /v2/manage/custom-fields/active

List active custom fields

Retrieves all custom fields currently active in the registration form for the Tenant.

Example

async function callGetActiveCustomFields(client: LoginRadius) {
  try {
    const res = await client.<service>.getActiveCustomFields();
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Returns

object


getAllCustomFields

GET /v2/manage/custom-fields

List custom fields

Retrieves all Custom Fields created for the Tenant.

Example

async function callGetAllCustomFields(client: LoginRadius) {
  try {
    const res = await client.<service>.getAllCustomFields();
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Returns

object


getCustomFieldLimit

GET /v2/manage/custom-fields/limit

Retrieve custom field limit

Retrieves the Custom Field Limit configured for the Tenant.

Example

async function callGetCustomFieldLimit(client: LoginRadius) {
  try {
    const res = await client.<service>.getCustomFieldLimit();
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Returns

CustomFieldLimitResponse


listCustomFields

GET /v2/manage/custom-fields/list

List custom fields

Retrieves all custom fields for the Tenant, returned as an array of strings.

Example

async function callListCustomFields(client: LoginRadius) {
  try {
    const res = await client.<service>.listCustomFields();
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Returns

object


setCustomField

PUT /v2/manage/custom-fields

Set custom field

Updates or sets a Custom Field instance in RAAS to be displayed on forms for the Tenant.

Example

async function callSetCustomField(client: LoginRadius) {
  const object = {  }; //Required

  try {
    const res = await client.<service>.setCustomField({ object });
    console.log(res.data);
  } catch (err) {
    if (err instanceof LoginRadiusError) {
      console.error(err.description);
    } else {
      throw err;
    }
  }
}

Request body

object as application/json.

Returns

object