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

Profiles

Profiles end points

Profiles are elements of user accounts. A single user account may maintain a number of profiles to help segment different types of users.

Sample code

const apiClient = client();
const response = await apiClient.http.profiles.retrieve('your-profile-id');
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 ProfileRetrieve200Response */
console.log(body.Name);

Methods

create

create(data)

Creates a user profile under a main user account. User profiles may be used to segment different accounts for measurements.

Endpoint Action ID = 400

Parameters

NameType
dataProfileCreateRequest

Returns

Promise<ErrorResponse | ProfileCreate200Response>


list

list(data)

Lists specific profiles managed under the current user account.

Endpoint Action ID = 402

Parameters

NameType
dataProfileListRequest

Returns

Promise<ErrorResponse | ProfileList200Response>


listByUser

listByUser(userId, data)

Lists specific profiles managed under a single user account specified by the ID in the request parameters.

Endpoint Action ID = 403

Parameters

NameType
userIdstring
dataProfileListByUserRequest

Returns

Promise<ErrorResponse | ProfileListByUser200Response>


remove

remove(profileId)

Removes the user profile entirely. It also deletes any related meta fields associated with the profile.

Endpoint Action ID = 404

Parameters

NameType
profileIdstring

Returns

Promise<ErrorResponse | ProfileRemove200Response>


retrieve

retrieve(profileId)

Retrieves a single user Profile specified by ID.

Endpoint Action ID = 401

Parameters

NameType
profileIdstring

Returns

Promise<ErrorResponse | ProfileRetrieve200Response>


update

update(profileId, data)

Updates a specific user profile. To update status the valid options are: ACTIVE and INACTIVE.

Endpoint Action ID = 405

Parameters

NameType
profileIdstring
dataProfileUpdateRequest

Returns

Promise<ErrorResponse | ProfileUpdate200Response>