2022.3.8 • Published 2 years ago

lamp-core v2022.3.8

Weekly downloads
29
License
BSD-3-Clause
Repository
github
Last release
2 years ago

JavaScript & TypeScript API client for the LAMP Platform

Overview

This API client is used to connect to the LAMP Platform from the JavaScript and TypeScript programming languages. Visit our documentation for more information about the LAMP Platform.

Installation

Prerequisites

Install the package directly from the GitHub repository.

npm i lamp-core

Configuration

Ensure your serverAddress is set correctly. If using the default server, it will be api.lamp.digital. Keep your accessKey (sometimes an email address) and secretKey (sometimes a password) private and do not share them with others.

import LAMP from 'lamp-core'
await LAMP.connect({ serverAddress: '...', accessKey: '...', secretKey: '...' })

API Endpoints

All URIs are relative to the serverAddress (by default, api.lamp.digital) with the https:// protocol.

ClassMethodHTTP requestDescription
LAMP.APIqueryPOST /Query the LAMP Database.
LAMP.APIschemaGET /View the API schema document.
LAMP.ActivityallGET /activityGet the set of all activities.
LAMP.ActivityallByParticipantGET /participant/{participant_id}/activityGet all activities for a participant.
LAMP.ActivityallByResearcherGET /researcher/{researcher_id}/activityGet all activities for a researcher.
LAMP.ActivityallByStudyGET /study/{study_id}/activityGet all activities in a study.
LAMP.ActivitycreatePOST /study/{study_id}/activityCreate a new Activity under the given Study.
LAMP.ActivitydeleteDELETE /activity/{activity_id}Delete an Activity.
LAMP.ActivityupdatePUT /activity/{activity_id}Update an Activity's settings.
LAMP.ActivityviewGET /activity/{activity_id}Get a single activity, by identifier.
LAMP.ActivityEventallByParticipantGET /participant/{participant_id}/activity_eventGet all activity events for a participant.
LAMP.ActivityEventallByResearcherGET /researcher/{researcher_id}/activity_eventGet all activity events for a researcher by participant.
LAMP.ActivityEventallByStudyGET /study/{study_id}/activity_eventGet all activity events for a study by participant.
LAMP.ActivityEventcreatePOST /participant/{participant_id}/activity_eventCreate a new ActivityEvent for the given Participant.
LAMP.ActivityEventdeleteDELETE /participant/{participant_id}/activity_eventDelete a ActivityEvent.
LAMP.ActivitySpecallGET /activity_specGet all ActivitySpecs registered.
LAMP.ActivitySpeccreatePOST /activity_specCreate a new ActivitySpec.
LAMP.ActivitySpecdeleteDELETE /activity_spec/{activity_spec_name}Delete an ActivitySpec.
LAMP.ActivitySpecupdatePUT /activity_spec/{activity_spec_name}Update an ActivitySpec.
LAMP.ActivitySpecviewGET /activity_spec/{activity_spec_name}View an ActivitySpec.
LAMP.CredentialcreatePOST /type/{type_id}/credential
LAMP.CredentialdeleteDELETE /type/{type_id}/credential/{access_key}
LAMP.CredentiallistGET /type/{type_id}/credential
LAMP.CredentialupdatePUT /type/{type_id}/credential/{access_key}
LAMP.ParticipantallGET /participantGet the set of all participants.
LAMP.ParticipantallByResearcherGET /researcher/{researcher_id}/participantGet the set of all participants under a single researcher.
LAMP.ParticipantallByStudyGET /study/{study_id}/participantGet the set of all participants in a single study.
LAMP.ParticipantcreatePOST /study/{study_id}/participantCreate a new Participant for the given Study.
LAMP.ParticipantdeleteDELETE /participant/{participant_id}Delete a participant AND all owned data or event streams.
LAMP.ParticipantupdatePUT /participant/{participant_id}Update a Participant's settings.
LAMP.ParticipantviewGET /participant/{participant_id}Get a single participant, by identifier.
LAMP.ResearcherallGET /researcherGet the set of all researchers.
LAMP.ResearchercreatePOST /researcherCreate a new Researcher.
LAMP.ResearcherdeleteDELETE /researcher/{researcher_id}Delete a researcher.
LAMP.ResearcherupdatePUT /researcher/{researcher_id}Update a Researcher's settings.
LAMP.ResearcherviewGET /researcher/{researcher_id}Get a single researcher, by identifier.
LAMP.SensorallGET /sensorGet the set of all sensors.
LAMP.SensorallByParticipantGET /participant/{participant_id}/sensorGet all sensors for a participant.
LAMP.SensorallByResearcherGET /researcher/{researcher_id}/sensorGet all sensors for a researcher.
LAMP.SensorallByStudyGET /study/{study_id}/sensorView all sensors in a study.
LAMP.SensorcreatePOST /study/{study_id}/sensorCreate a new Sensor under the given Study.
LAMP.SensordeleteDELETE /sensor/{sensor_id}Delete a Sensor.
LAMP.SensorupdatePUT /sensor/{sensor_id}Update an Sensor's settings.
LAMP.SensorviewGET /sensor/{sensor_id}Get a single sensor, by identifier.
LAMP.SensorEventallByParticipantGET /participant/{participant_id}/sensor_eventGet all sensor events for a participant.
LAMP.SensorEventallByResearcherGET /researcher/{researcher_id}/sensor_eventGet all sensor events for a researcher by participant.
LAMP.SensorEventallByStudyGET /study/{study_id}/sensor_eventGet all sensor events for a study by participant.
LAMP.SensorEventcreatePOST /participant/{participant_id}/sensor_eventCreate a new SensorEvent for the given Participant.
LAMP.SensorEventdeleteDELETE /participant/{participant_id}/sensor_eventDelete a sensor event.
LAMP.SensorSpecallGET /sensor_specGet all SensorSpecs registered.
LAMP.SensorSpeccreatePOST /sensor_specCreate a new SensorSpec.
LAMP.SensorSpecdeleteDELETE /sensor_spec/{sensor_spec_name}Delete an SensorSpec.
LAMP.SensorSpecupdatePUT /sensor_spec/{sensor_spec_name}Update an SensorSpec.
LAMP.SensorSpecviewGET /sensor_spec/{sensor_spec_name}Get a SensorSpec.
LAMP.StudyallGET /studyGet the set of all studies.
LAMP.StudyallByResearcherGET /researcher/{researcher_id}/studyGet the set of studies for a single researcher.
LAMP.StudycreatePOST /researcher/{researcher_id}/studyCreate a new Study for the given Researcher.
LAMP.StudydeleteDELETE /study/{study_id}Delete a study.
LAMP.StudyupdatePUT /study/{study_id}Update the study.
LAMP.StudyviewGET /study/{study_id}Get a single study, by identifier.
LAMP.TypegetAttachmentGET /type/{type_id}/attachment/{attachment_key}
LAMP.TypegetDynamicAttachmentGET /type/{type_id}/attachment/dynamic/{attachment_key}
LAMP.TypelistAttachmentsGET /type/{type_id}/attachment
LAMP.TypeparentGET /type/{type_id}/parentFind the owner(s) of the resource.
LAMP.TypesetAttachmentPUT /type/{type_id}/attachment/{attachment_key}/{target}
LAMP.TypesetDynamicAttachmentPUT /type/{type_id}/attachment/dynamic/{attachment_key}/{target}

Documentation for Models

2022.3.8

2 years ago

2022.1.21

2 years ago

2021.11.15

2 years ago

2021.9.21

3 years ago

2021.7.27

3 years ago

2021.4.20

3 years ago

2021.1.13

3 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago