@nuralogix.ai/dfx-api-client / HTTP / Studies
Studies
Studies end points
Studies are organized segments of analyses that guide the measurement process. Studies consist of Types, Templates and Assets. A study type is a general, high-level grouping for studies. A template is a pre-built study standard created and made available by the Nuralogix team. Templates are version controlled and named for use with a study.
Sample code
const apiClient = client();
const response = await apiClient.http.studies.retrieve('your-study-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 StudyRetrieve200Response */
console.log(body.Name);
Methods
create
▸ create(data
)
Creates a new study within an organization. Studies must be based on a specific StudyTemplateID. Passing in config will override values available in the StudyType definition template.
Endpoint Action ID = 80x
Parameters
Name | Type |
---|---|
data | StudyCreateRequest |
Returns
Promise
<ErrorResponse
| StudyCreate200Response
>
deleteStudyMeasurement
▸ deleteStudyMeasurement(studyId
)
Only DFX_ORG_ADMIN has permission to delete all measuremenet of specific study for its own organization.
Endpoint Action ID = 811
Parameters
Name | Type |
---|---|
studyId | string |
Returns
Promise
<ErrorResponse
| StudyDeleteMeasurements200Response
>
list
▸ list(statusId
)
Lists all the studies created in an organization.
Endpoint Action ID = 805
Parameters
Name | Type |
---|---|
statusId | null | string |
Returns
Promise
<ErrorResponse
| StudyList200Response
>
remove
▸ remove(studyId
)
Deletes a study. However, if there are any measurements taken under that Study already, it cannot be deleted.
Endpoint Action ID = 808
Parameters
Name | Type |
---|---|
studyId | string |
Returns
Promise
<ErrorResponse
| StudyDelete200Response
>
retrieve
▸ retrieve(studyId
)
Retrieves a study record with it's definitions and values. It also displays the amount of measurements captured in it to date.
Endpoint Action ID = 804
Parameters
Name | Type |
---|---|
studyId | string |
Returns
Promise
<ErrorResponse
| StudyRetrieve200Response
>
retrieveSdkConfigData
▸ retrieveSdkConfigData(data
)
Retrieves a study's binary config data that has to be used to initialize the DFX SDK Factory object. Get the SDKID parameter by calling GetSDKId on the DFX SDK Factory object. A response of 304 means that existing file in hand is up to date.
Endpoint Action ID = 806
Parameters
Name | Type |
---|---|
data | StudyRetrieveSdkConfigDataRequest |
Returns
Promise
<ErrorResponse
| StudySdkConfigData200Response
>
templates
▸ templates(data
)
Retrieves a list of study templates that exist in a particular organization.
Endpoint Action ID = 801
Parameters
Name | Type |
---|---|
data | StudyTemplateRequest |
Returns
Promise
<ErrorResponse
| StudyTemplates200Response
>
types
▸ types(statusId
)
Retrieves a list of studies that act as templates or base types. Types can be filtered by the Status querystring value. This is useful for looking up all studies and current.
Endpoint Action ID = 800
Parameters
Name | Type |
---|---|
statusId | null | string |
Returns
Promise
<ErrorResponse
| StudyTypes200Response
>
update
▸ update(studyId
, data
)
Updates a particular study record with new information. Organizations can set the status of a particular study as well to record their general activity and visibility. Study templates cannot be revised after a study is created.
Endpoint Action ID = 807
Parameters
Name | Type |
---|---|
studyId | string |
data | StudyUpdateRequest |
Returns
Promise
<ErrorResponse
| StudyUpdate200Response
>