apollo_algorithm_endpoints
v0.8.1
Published
A_combined_endpoint_featuringAlgorithm_Personalization_Endpoint_personalize_Retrieve_personalized_parameters_for_edge_inference_models_Cloud_Inference_Executor_execute_Queue_cloud_inference_of_user_data_User_Algorithm_Data_Histories_history_Retrieve_histo
Downloads
2
Readme
apollo_algorithm_endpoints
ApolloAlgorithmEndpoints - JavaScript client for apollo_algorithm_endpoints A combined endpoint featuring: Algorithm Personalization Endpoint _/personalize: Retrieve personalized parameters for edge-inference models. Cloud Inference Executor _/execute: Queue cloud inference of user data. User Algorithm Data Histories _/history: Retrieve historic inference data for a user and algorithm. Edge Inference Result Storage _/save: Save the results from an edge inference consistent with cloud inference. Algorithm Versioning _/versions: Retrieve the latest version info for models. Application State _/app: Retrieve information about internal application state. This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.8.1
- Package version: 0.8.1
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install apollo_algorithm_endpoints --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your apollo_algorithm_endpoints from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('apollo_algorithm_endpoints')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var ApolloAlgorithmEndpoints = require('apollo_algorithm_endpoints');
var defaultClient = ApolloAlgorithmEndpoints.ApiClient.instance;
// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-HAPPY-MP-SUB'] = "Token"
var api = new ApolloAlgorithmEndpoints.ActivityApi()
var payload = new ApolloAlgorithmEndpoints.Activityv0Inputs(); // {Activityv0Inputs}
var opts = {
'xFields': "xFields_example" // {String} An optional fields mask
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.executePostActivityV0(payload, opts, callback);
Documentation for API Endpoints
All URIs are relative to https://api.happy.dev/apollo/v1
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- ApolloAlgorithmEndpoints.ActivityApi | executePostActivityV0 | POST /execute/activity/v0 | Trigger cloud-based inference for the v0 ACTIVITY model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.ActivityApi | historyPostActivityV0 | POST /history/activity/v0 | Retrieve historical inference results for the v0 ACTIVITY model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.ActivityApi | savePostActivityV0 | POST /save/activity/v0 | Stores inference results for the v0 ACTIVITY model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.ActivityApi | versionsPostActivityLatest | POST /versions/activity/latest | Get the latest version information for the ACTIVITY model ApolloAlgorithmEndpoints.CstressApi | executePostCstressV0 | POST /execute/cstress/v0 | Trigger cloud-based inference for the v0 CSTRESS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressApi | historyPostCstressV0 | POST /history/cstress/v0 | Retrieve historical inference results for the v0 CSTRESS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressApi | historyPostCstressV2 | POST /history/cstress/v2 | Retrieve historical inference results for the v2 CSTRESS model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.CstressApi | historyPostCstressV3 | POST /history/cstress/v3 | Retrieve historical inference results for the v3 CSTRESS model at specific versions '3.X.Y' ApolloAlgorithmEndpoints.CstressApi | personalizePostCstressV0p0 | POST /personalize/cstress/v0p0 | Retrieve personalized algorithm parameters for the v0 CSTRESS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressApi | personalizePostCstressV2p2 | POST /personalize/cstress/v2p2 | Retrieve personalized algorithm parameters for the v2 CSTRESS model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.CstressApi | personalizePostCstressV3p3 | POST /personalize/cstress/v3p3 | Retrieve personalized algorithm parameters for the v3 CSTRESS model at specific versions '3.X.Y' ApolloAlgorithmEndpoints.CstressApi | savePostCstressV0 | POST /save/cstress/v0 | Stores inference results for the v0 CSTRESS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressApi | savePostCstressV2 | POST /save/cstress/v2 | Stores inference results for the v2 CSTRESS model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.CstressApi | savePostCstressV3 | POST /save/cstress/v3 | Stores inference results for the v3 CSTRESS model at specific versions '3.X.Y' ApolloAlgorithmEndpoints.CstressApi | versionsPostCstressLatest | POST /versions/cstress/latest | Get the latest version information for the CSTRESS model ApolloAlgorithmEndpoints.CstressprsApi | executePostCstressprsV0 | POST /execute/cstressprs/v0 | Trigger cloud-based inference for the v0 CSTRESS_PRS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | executePostCstressprsV2 | POST /execute/cstressprs/v2 | Trigger cloud-based inference for the v2 CSTRESS_PRS model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | executePostCstressprsV3 | POST /execute/cstressprs/v3 | Trigger cloud-based inference for the v3 CSTRESS_PRS model at specific versions '3.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | historyPostCstressprsV0 | POST /history/cstressprs/v0 | Retrieve historical inference results for the v0 CSTRESS_PRS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | historyPostCstressprsV2 | POST /history/cstressprs/v2 | Retrieve historical inference results for the v2 CSTRESS_PRS model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | historyPostCstressprsV3 | POST /history/cstressprs/v3 | Retrieve historical inference results for the v3 CSTRESS_PRS model at specific versions '3.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | savePostCstressprsV0 | POST /save/cstressprs/v0 | Stores inference results for the v0 CSTRESS_PRS model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | savePostCstressprsV2 | POST /save/cstressprs/v2 | Stores inference results for the v2 CSTRESS_PRS model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | savePostCstressprsV3 | POST /save/cstressprs/v3 | Stores inference results for the v3 CSTRESS_PRS model at specific versions '3.X.Y' ApolloAlgorithmEndpoints.CstressprsApi | versionsPostCstressprsLatest | POST /versions/cstressprs/latest | Get the latest version information for the CSTRSS_PRS model ApolloAlgorithmEndpoints.HrApi | executePostHrV0 | POST /execute/hr/v0 | Trigger cloud-based inference for the v0 HR model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.HrApi | versionsPostHrLatest | POST /versions/hr/latest | Get the latest version information for the HR model ApolloAlgorithmEndpoints.OnoffApi | personalizePostOnoffV1p1 | POST /personalize/onoff/v1p1 | Retrieve personalized algorithm parameters for the v1 ON_OFF model at specific versions '1.X.Y' ApolloAlgorithmEndpoints.OnoffApi | versionsPostOnoffLatest | POST /versions/onoff/latest | Get the latest version information for the ON_OFF model ApolloAlgorithmEndpoints.OnoffprsApi | executePostOnoffprsV1 | POST /execute/onoffprs/v1 | Trigger cloud-based inference for the v1 ON_OFF_PRS model at specific versions '1.X.Y' ApolloAlgorithmEndpoints.OnoffprsApi | savePostOnoffprsV1 | POST /save/onoffprs/v1 | Stores inference results for the v1 ON_OFF_PRS model at specific versions '1.X.Y' ApolloAlgorithmEndpoints.OnoffprsApi | versionsPostOnoffprsLatest | POST /versions/onoffprs/latest | Get the latest version information for the ON_OFF_PRS model ApolloAlgorithmEndpoints.ProbesApi | probesHealthzGet | GET /probes/healthz | ApolloAlgorithmEndpoints.ProbesApi | probesReadinessGet | GET /probes/readiness | ApolloAlgorithmEndpoints.SleepApi | executePostSleepV0 | POST /execute/sleep/v0 | Trigger cloud-based inference for the v0 SLEEP model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.SleepApi | executePostSleepV2 | POST /execute/sleep/v2 | Trigger cloud-based inference for the v2 SLEEP model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.SleepApi | historyPostSleepV0 | POST /history/sleep/v0 | Retrieve historical inference results for the v0 SLEEP model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.SleepApi | historyPostSleepV2 | POST /history/sleep/v2 | Retrieve historical inference results for the v2 SLEEP model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.SleepApi | personalizePostSleepV2p1 | POST /personalize/sleep/v2p1 | Retrieve personalized algorithm parameters for the v2 SLEEP model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.SleepApi | savePostSleepV0 | POST /save/sleep/v0 | Stores inference results for the v0 SLEEP model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.SleepApi | savePostSleepV2 | POST /save/sleep/v2 | Stores inference results for the v2 SLEEP model at specific versions '2.X.Y' ApolloAlgorithmEndpoints.SleepApi | versionsPostSleepLatest | POST /versions/sleep/latest | Get the latest version information for the SLEEP model ApolloAlgorithmEndpoints.SleepprsApi | historyPostSleepprsV1 | POST /history/sleepprs/v1 | Retrieve historical inference results for the v1 SLEEP_PRS model at specific versions '1.X.Y' ApolloAlgorithmEndpoints.SleepprsApi | savePostSleepprsV1 | POST /save/sleepprs/v1 | Stores inference results for the v1 SLEEP_PRS model at specific versions '1.X.Y' ApolloAlgorithmEndpoints.SleepprsApi | versionsPostSleepprsLatest | POST /versions/sleepprs/latest | Get the latest version information for the SLEEP_PRS model ApolloAlgorithmEndpoints.StresscapacityApi | executePostStresscapacityV0 | POST /execute/stresscapacity/v0 | Trigger cloud-based inference for the v0 STRESS_CAPACITY model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.StresscapacityApi | historyPostStresscapacityV0 | POST /history/stresscapacity/v0 | Retrieve historical inference results for the v0 STRESS_CAPACITY model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.StresscapacityApi | savePostStresscapacityV0 | POST /save/stresscapacity/v0 | Stores inference results for the v0 STRESS_CAPACITY model at specific versions '0.X.Y' ApolloAlgorithmEndpoints.StresscapacityApi | versionsPostStresscapacityLatest | POST /versions/stresscapacity/latest | Get the latest version information for the STRESS_CAPACITY model
Documentation for Models
- ApolloAlgorithmEndpoints.Activityv0History
- ApolloAlgorithmEndpoints.Activityv0Inputs
- ApolloAlgorithmEndpoints.Activityv0Query
- ApolloAlgorithmEndpoints.Activityv0Results
- ApolloAlgorithmEndpoints.ApolloGetModelVersionResult
- ApolloAlgorithmEndpoints.ApolloSaveInferenceResult
- ApolloAlgorithmEndpoints.ApolloTriggerInferenceResult
- ApolloAlgorithmEndpoints.CstressPrsv0History
- ApolloAlgorithmEndpoints.CstressPrsv0Inputs
- ApolloAlgorithmEndpoints.CstressPrsv0Query
- ApolloAlgorithmEndpoints.CstressPrsv0Results
- ApolloAlgorithmEndpoints.CstressPrsv2History
- ApolloAlgorithmEndpoints.CstressPrsv2Inputs
- ApolloAlgorithmEndpoints.CstressPrsv2Query
- ApolloAlgorithmEndpoints.CstressPrsv2Results
- ApolloAlgorithmEndpoints.CstressPrsv3History
- ApolloAlgorithmEndpoints.CstressPrsv3Inputs
- ApolloAlgorithmEndpoints.CstressPrsv3Query
- ApolloAlgorithmEndpoints.CstressPrsv3Results
- ApolloAlgorithmEndpoints.Cstressv0History
- ApolloAlgorithmEndpoints.Cstressv0Inputs
- ApolloAlgorithmEndpoints.Cstressv0PersonalizationResult
- ApolloAlgorithmEndpoints.Cstressv0Query
- ApolloAlgorithmEndpoints.Cstressv0Results
- ApolloAlgorithmEndpoints.Cstressv2History
- ApolloAlgorithmEndpoints.Cstressv2Inputs
- ApolloAlgorithmEndpoints.Cstressv2PersonalizationResult
- ApolloAlgorithmEndpoints.Cstressv2Query
- ApolloAlgorithmEndpoints.Cstressv2Results
- ApolloAlgorithmEndpoints.Cstressv3History
- ApolloAlgorithmEndpoints.Cstressv3PersonalizationResult
- ApolloAlgorithmEndpoints.Cstressv3Query
- ApolloAlgorithmEndpoints.Cstressv3Results
- ApolloAlgorithmEndpoints.Error
- ApolloAlgorithmEndpoints.GeneralInputs
- ApolloAlgorithmEndpoints.GeneralInputsAppVersion
- ApolloAlgorithmEndpoints.GeneralInputsExtended
- ApolloAlgorithmEndpoints.Hrv0Inputs
- ApolloAlgorithmEndpoints.ModelVersionEndpoints
- ApolloAlgorithmEndpoints.OnOffPrsv1Inputs
- ApolloAlgorithmEndpoints.OnOffPrsv1Results
- ApolloAlgorithmEndpoints.OnOffv1PersonalizationResult
- ApolloAlgorithmEndpoints.SleepPrsv1History
- ApolloAlgorithmEndpoints.SleepPrsv1Query
- ApolloAlgorithmEndpoints.SleepPrsv1Results
- ApolloAlgorithmEndpoints.Sleepv0History
- ApolloAlgorithmEndpoints.Sleepv0Inputs
- ApolloAlgorithmEndpoints.Sleepv0Query
- ApolloAlgorithmEndpoints.Sleepv0Results
- ApolloAlgorithmEndpoints.Sleepv2History
- ApolloAlgorithmEndpoints.Sleepv2Inputs
- ApolloAlgorithmEndpoints.Sleepv2PersonalizationResult
- ApolloAlgorithmEndpoints.Sleepv2Query
- ApolloAlgorithmEndpoints.Sleepv2Results
- ApolloAlgorithmEndpoints.StressCapacityv0History
- ApolloAlgorithmEndpoints.StressCapacityv0Inputs
- ApolloAlgorithmEndpoints.StressCapacityv0Query
- ApolloAlgorithmEndpoints.StressCapacityv0Results
Documentation for Authorization
APIKeyHeader
- Type: API key
- API key parameter name: X-HAPPY-MP-SUB
- Location: HTTP header