Propeller API

Event

addEvent

Creates a new manual event.


/api/users/{userId}/events

Usage and SDK Samples

curl -X post "https://dev.propellerhealth.com/api/api/users/{userId}/events"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EventApi;

import java.io.File;
import java.util.*;

public class EventApiExample {

    public static void main(String[] args) {
        
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        Event_2 event = ; // Event_2 | New Event
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_201 result = apiInstance.addEvent(cookie, xPhApiVersion, userId, event, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#addEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EventApi;

public class EventApiExample {

    public static void main(String[] args) {
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        Event_2 event = ; // Event_2 | New Event
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_201 result = apiInstance.addEvent(cookie, xPhApiVersion, userId, event, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#addEvent");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
Event_2 *event = ; // New Event
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

EventApi *apiInstance = [[EventApi alloc] init];

[apiInstance addEventWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    event:event
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_201 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.EventApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var event = ; // {Event_2} New Event

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addEvent(cookie, xPhApiVersion, userId, event, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addEventExample
    {
        public void main()
        {
            
            var apiInstance = new EventApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var event = new Event_2(); // Event_2 | New Event
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_201 result = apiInstance.addEvent(cookie, xPhApiVersion, userId, event, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EventApi.addEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EventApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$event = ; // Event_2 | New Event
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->addEvent($cookie, $xPhApiVersion, $userId, $event, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EventApi->addEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EventApi;

my $api_instance = WWW::SwaggerClient::EventApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $event = WWW::SwaggerClient::Object::Event_2->new(); # Event_2 | New Event
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->addEvent(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, event => $event, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EventApi->addEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.EventApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
event =  # Event_2 | New Event
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.addEvent(cookie, xPhApiVersion, userId, event, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EventApi->addEvent: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
event *

Responses

Status: 201 - Created

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

deleteEvent

Deletes an event.


/api/users/{userId}/events/{eventId}

Usage and SDK Samples

curl -X delete "https://dev.propellerhealth.com/api/api/users/{userId}/events/{eventId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EventApi;

import java.io.File;
import java.util.*;

public class EventApiExample {

    public static void main(String[] args) {
        
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String eventId = eventId_example; // String | ID of the event
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.deleteEvent(cookie, xPhApiVersion, eventId, userId, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#deleteEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EventApi;

public class EventApiExample {

    public static void main(String[] args) {
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String eventId = eventId_example; // String | ID of the event
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.deleteEvent(cookie, xPhApiVersion, eventId, userId, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#deleteEvent");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *eventId = eventId_example; // ID of the event
String *userId = userId_example; // ID of the user
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

EventApi *apiInstance = [[EventApi alloc] init];

[apiInstance deleteEventWith:cookie
    xPhApiVersion:xPhApiVersion
    eventId:eventId
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.EventApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var eventId = eventId_example; // {String} ID of the event

var userId = userId_example; // {String} ID of the user

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteEvent(cookie, xPhApiVersion, eventId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteEventExample
    {
        public void main()
        {
            
            var apiInstance = new EventApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var eventId = eventId_example;  // String | ID of the event
            var userId = userId_example;  // String | ID of the user
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.deleteEvent(cookie, xPhApiVersion, eventId, userId, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EventApi.deleteEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EventApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$eventId = eventId_example; // String | ID of the event
$userId = userId_example; // String | ID of the user
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->deleteEvent($cookie, $xPhApiVersion, $eventId, $userId, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling EventApi->deleteEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EventApi;

my $api_instance = WWW::SwaggerClient::EventApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $eventId = eventId_example; # String | ID of the event
my $userId = userId_example; # String | ID of the user
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->deleteEvent(cookie => $cookie, xPhApiVersion => $xPhApiVersion, eventId => $eventId, userId => $userId, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling EventApi->deleteEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.EventApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
eventId = eventId_example # String | ID of the event
userId = userId_example # String | ID of the user
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.deleteEvent(cookie, xPhApiVersion, eventId, userId, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling EventApi->deleteEvent: %s\n" % e)

Parameters

Path parameters
Name Description
eventId*
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

getEventById

Returns a single event by ID


/api/users/{userId}/events/{eventId}

Usage and SDK Samples

curl -X get "https://dev.propellerhealth.com/api/api/users/{userId}/events/{eventId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EventApi;

import java.io.File;
import java.util.*;

public class EventApiExample {

    public static void main(String[] args) {
        
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String eventId = eventId_example; // String | ID of the event
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200_1 result = apiInstance.getEventById(cookie, xPhApiVersion, eventId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#getEventById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EventApi;

public class EventApiExample {

    public static void main(String[] args) {
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String eventId = eventId_example; // String | ID of the event
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200_1 result = apiInstance.getEventById(cookie, xPhApiVersion, eventId, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#getEventById");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *eventId = eventId_example; // ID of the event
String *userId = userId_example; // ID of the user
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

EventApi *apiInstance = [[EventApi alloc] init];

[apiInstance getEventByIdWith:cookie
    xPhApiVersion:xPhApiVersion
    eventId:eventId
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.EventApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var eventId = eventId_example; // {String} ID of the event

var userId = userId_example; // {String} ID of the user

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEventById(cookie, xPhApiVersion, eventId, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getEventByIdExample
    {
        public void main()
        {
            
            var apiInstance = new EventApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var eventId = eventId_example;  // String | ID of the event
            var userId = userId_example;  // String | ID of the user
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.getEventById(cookie, xPhApiVersion, eventId, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EventApi.getEventById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EventApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$eventId = eventId_example; // String | ID of the event
$userId = userId_example; // String | ID of the user
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->getEventById($cookie, $xPhApiVersion, $eventId, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EventApi->getEventById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EventApi;

my $api_instance = WWW::SwaggerClient::EventApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $eventId = eventId_example; # String | ID of the event
my $userId = userId_example; # String | ID of the user
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->getEventById(cookie => $cookie, xPhApiVersion => $xPhApiVersion, eventId => $eventId, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EventApi->getEventById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.EventApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
eventId = eventId_example # String | ID of the event
userId = userId_example # String | ID of the user
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.getEventById(cookie, xPhApiVersion, eventId, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EventApi->getEventById: %s\n" % e)

Parameters

Path parameters
Name Description
eventId*
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

getEvents

Returns events for a user filtered many which ways and sorted by date descending.


/api/users/{userId}/events

Usage and SDK Samples

curl -X get "https://dev.propellerhealth.com/api/api/users/{userId}/events?addressConfirmed=&endDate=&medicationType=&medicationIds=&nightEvent=&pagingToken=&preemptive=&source=&startDate=&symptoms=&triggers="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EventApi;

import java.io.File;
import java.util.*;

public class EventApiExample {

    public static void main(String[] args) {
        
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        Boolean addressConfirmed = true; // Boolean | filter to events with or without confirmed addresses
        Date endDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 end date to filter events
        String medicationType = medicationType_example; // String | filter by the type of medication
        array[String] medicationIds = ; // array[String] | Medication IDs to filter events by
        Boolean nightEvent = true; // Boolean | filter the events based on if the event was a night event (10PM - 6AM)
        String pagingToken = pagingToken_example; // String | paging token that gets you the next or previous page of results
        Boolean preemptive = true; // Boolean | filter by preemptive state
        String source = source_example; // String | filter by the source of the event
        Date startDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 start date to filter events
        array[String] symptoms = ; // array[String] | symptoms to filter events by
        array[String] triggers = ; // array[String] | triggers to filter events by
        try {
            inline_response_200_2 result = apiInstance.getEvents(cookie, xPhApiVersion, userId, acceptLanguage, addressConfirmed, endDate, medicationType, medicationIds, nightEvent, pagingToken, preemptive, source, startDate, symptoms, triggers);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#getEvents");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EventApi;

public class EventApiExample {

    public static void main(String[] args) {
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        Boolean addressConfirmed = true; // Boolean | filter to events with or without confirmed addresses
        Date endDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 end date to filter events
        String medicationType = medicationType_example; // String | filter by the type of medication
        array[String] medicationIds = ; // array[String] | Medication IDs to filter events by
        Boolean nightEvent = true; // Boolean | filter the events based on if the event was a night event (10PM - 6AM)
        String pagingToken = pagingToken_example; // String | paging token that gets you the next or previous page of results
        Boolean preemptive = true; // Boolean | filter by preemptive state
        String source = source_example; // String | filter by the source of the event
        Date startDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 start date to filter events
        array[String] symptoms = ; // array[String] | symptoms to filter events by
        array[String] triggers = ; // array[String] | triggers to filter events by
        try {
            inline_response_200_2 result = apiInstance.getEvents(cookie, xPhApiVersion, userId, acceptLanguage, addressConfirmed, endDate, medicationType, medicationIds, nightEvent, pagingToken, preemptive, source, startDate, symptoms, triggers);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#getEvents");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)
Boolean *addressConfirmed = true; // filter to events with or without confirmed addresses (optional)
Date *endDate = 2013-10-20T19:20:30+01:00; // ISO8601 end date to filter events (optional)
String *medicationType = medicationType_example; // filter by the type of medication (optional)
array[String] *medicationIds = ; // Medication IDs to filter events by (optional) (default to [])
Boolean *nightEvent = true; // filter the events based on if the event was a night event (10PM - 6AM) (optional)
String *pagingToken = pagingToken_example; // paging token that gets you the next or previous page of results (optional)
Boolean *preemptive = true; // filter by preemptive state (optional)
String *source = source_example; // filter by the source of the event (optional)
Date *startDate = 2013-10-20T19:20:30+01:00; // ISO8601 start date to filter events (optional)
array[String] *symptoms = ; // symptoms to filter events by (optional)
array[String] *triggers = ; // triggers to filter events by (optional)

EventApi *apiInstance = [[EventApi alloc] init];

[apiInstance getEventsWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    acceptLanguage:acceptLanguage
    addressConfirmed:addressConfirmed
    endDate:endDate
    medicationType:medicationType
    medicationIds:medicationIds
    nightEvent:nightEvent
    pagingToken:pagingToken
    preemptive:preemptive
    source:source
    startDate:startDate
    symptoms:symptoms
    triggers:triggers
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.EventApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
  'addressConfirmed': true, // {Boolean} filter to events with or without confirmed addresses
  'endDate': 2013-10-20T19:20:30+01:00, // {Date} ISO8601 end date to filter events
  'medicationType': medicationType_example, // {String} filter by the type of medication
  'medicationIds': , // {array[String]} Medication IDs to filter events by
  'nightEvent': true, // {Boolean} filter the events based on if the event was a night event (10PM - 6AM)
  'pagingToken': pagingToken_example, // {String} paging token that gets you the next or previous page of results
  'preemptive': true, // {Boolean} filter by preemptive state
  'source': source_example, // {String} filter by the source of the event
  'startDate': 2013-10-20T19:20:30+01:00, // {Date} ISO8601 start date to filter events
  'symptoms': , // {array[String]} symptoms to filter events by
  'triggers':  // {array[String]} triggers to filter events by
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEvents(cookie, xPhApiVersion, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getEventsExample
    {
        public void main()
        {
            
            var apiInstance = new EventApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 
            var addressConfirmed = true;  // Boolean | filter to events with or without confirmed addresses (optional) 
            var endDate = 2013-10-20T19:20:30+01:00;  // Date | ISO8601 end date to filter events (optional) 
            var medicationType = medicationType_example;  // String | filter by the type of medication (optional) 
            var medicationIds = new array[String](); // array[String] | Medication IDs to filter events by (optional)  (default to [])
            var nightEvent = true;  // Boolean | filter the events based on if the event was a night event (10PM - 6AM) (optional) 
            var pagingToken = pagingToken_example;  // String | paging token that gets you the next or previous page of results (optional) 
            var preemptive = true;  // Boolean | filter by preemptive state (optional) 
            var source = source_example;  // String | filter by the source of the event (optional) 
            var startDate = 2013-10-20T19:20:30+01:00;  // Date | ISO8601 start date to filter events (optional) 
            var symptoms = new array[String](); // array[String] | symptoms to filter events by (optional) 
            var triggers = new array[String](); // array[String] | triggers to filter events by (optional) 

            try
            {
                inline_response_200_2 result = apiInstance.getEvents(cookie, xPhApiVersion, userId, acceptLanguage, addressConfirmed, endDate, medicationType, medicationIds, nightEvent, pagingToken, preemptive, source, startDate, symptoms, triggers);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EventApi.getEvents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EventApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
$addressConfirmed = true; // Boolean | filter to events with or without confirmed addresses
$endDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 end date to filter events
$medicationType = medicationType_example; // String | filter by the type of medication
$medicationIds = ; // array[String] | Medication IDs to filter events by
$nightEvent = true; // Boolean | filter the events based on if the event was a night event (10PM - 6AM)
$pagingToken = pagingToken_example; // String | paging token that gets you the next or previous page of results
$preemptive = true; // Boolean | filter by preemptive state
$source = source_example; // String | filter by the source of the event
$startDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 start date to filter events
$symptoms = ; // array[String] | symptoms to filter events by
$triggers = ; // array[String] | triggers to filter events by

try {
    $result = $api_instance->getEvents($cookie, $xPhApiVersion, $userId, $acceptLanguage, $addressConfirmed, $endDate, $medicationType, $medicationIds, $nightEvent, $pagingToken, $preemptive, $source, $startDate, $symptoms, $triggers);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EventApi->getEvents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EventApi;

my $api_instance = WWW::SwaggerClient::EventApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
my $addressConfirmed = true; # Boolean | filter to events with or without confirmed addresses
my $endDate = 2013-10-20T19:20:30+01:00; # Date | ISO8601 end date to filter events
my $medicationType = medicationType_example; # String | filter by the type of medication
my $medicationIds = []; # array[String] | Medication IDs to filter events by
my $nightEvent = true; # Boolean | filter the events based on if the event was a night event (10PM - 6AM)
my $pagingToken = pagingToken_example; # String | paging token that gets you the next or previous page of results
my $preemptive = true; # Boolean | filter by preemptive state
my $source = source_example; # String | filter by the source of the event
my $startDate = 2013-10-20T19:20:30+01:00; # Date | ISO8601 start date to filter events
my $symptoms = []; # array[String] | symptoms to filter events by
my $triggers = []; # array[String] | triggers to filter events by

eval { 
    my $result = $api_instance->getEvents(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, acceptLanguage => $acceptLanguage, addressConfirmed => $addressConfirmed, endDate => $endDate, medicationType => $medicationType, medicationIds => $medicationIds, nightEvent => $nightEvent, pagingToken => $pagingToken, preemptive => $preemptive, source => $source, startDate => $startDate, symptoms => $symptoms, triggers => $triggers);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EventApi->getEvents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.EventApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)
addressConfirmed = true # Boolean | filter to events with or without confirmed addresses (optional)
endDate = 2013-10-20T19:20:30+01:00 # Date | ISO8601 end date to filter events (optional)
medicationType = medicationType_example # String | filter by the type of medication (optional)
medicationIds =  # array[String] | Medication IDs to filter events by (optional) (default to [])
nightEvent = true # Boolean | filter the events based on if the event was a night event (10PM - 6AM) (optional)
pagingToken = pagingToken_example # String | paging token that gets you the next or previous page of results (optional)
preemptive = true # Boolean | filter by preemptive state (optional)
source = source_example # String | filter by the source of the event (optional)
startDate = 2013-10-20T19:20:30+01:00 # Date | ISO8601 start date to filter events (optional)
symptoms =  # array[String] | symptoms to filter events by (optional)
triggers =  # array[String] | triggers to filter events by (optional)

try: 
    api_response = api_instance.getEvents(cookie, xPhApiVersion, userId, acceptLanguage=acceptLanguage, addressConfirmed=addressConfirmed, endDate=endDate, medicationType=medicationType, medicationIds=medicationIds, nightEvent=nightEvent, pagingToken=pagingToken, preemptive=preemptive, source=source, startDate=startDate, symptoms=symptoms, triggers=triggers)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EventApi->getEvents: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Query parameters
Name Description
addressConfirmed
endDate
medicationType
medicationIds
nightEvent
pagingToken
preemptive
source
startDate
symptoms
triggers

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

updateEvent

Update event object.


/api/users/{userId}/events/{eventId}

Usage and SDK Samples

curl -X put "https://dev.propellerhealth.com/api/api/users/{userId}/events/{eventId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EventApi;

import java.io.File;
import java.util.*;

public class EventApiExample {

    public static void main(String[] args) {
        
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String eventId = eventId_example; // String | ID of the event
        String userId = userId_example; // String | ID of the user
        Event_1 event = ; // Event_1 | Updated event
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.updateEvent(cookie, xPhApiVersion, eventId, userId, event, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#updateEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EventApi;

public class EventApiExample {

    public static void main(String[] args) {
        EventApi apiInstance = new EventApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String eventId = eventId_example; // String | ID of the event
        String userId = userId_example; // String | ID of the user
        Event_1 event = ; // Event_1 | Updated event
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.updateEvent(cookie, xPhApiVersion, eventId, userId, event, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling EventApi#updateEvent");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *eventId = eventId_example; // ID of the event
String *userId = userId_example; // ID of the user
Event_1 *event = ; // Updated event
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

EventApi *apiInstance = [[EventApi alloc] init];

[apiInstance updateEventWith:cookie
    xPhApiVersion:xPhApiVersion
    eventId:eventId
    userId:userId
    event:event
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.EventApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var eventId = eventId_example; // {String} ID of the event

var userId = userId_example; // {String} ID of the user

var event = ; // {Event_1} Updated event

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateEvent(cookie, xPhApiVersion, eventId, userId, event, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateEventExample
    {
        public void main()
        {
            
            var apiInstance = new EventApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var eventId = eventId_example;  // String | ID of the event
            var userId = userId_example;  // String | ID of the user
            var event = new Event_1(); // Event_1 | Updated event
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.updateEvent(cookie, xPhApiVersion, eventId, userId, event, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EventApi.updateEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EventApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$eventId = eventId_example; // String | ID of the event
$userId = userId_example; // String | ID of the user
$event = ; // Event_1 | Updated event
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->updateEvent($cookie, $xPhApiVersion, $eventId, $userId, $event, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling EventApi->updateEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EventApi;

my $api_instance = WWW::SwaggerClient::EventApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $eventId = eventId_example; # String | ID of the event
my $userId = userId_example; # String | ID of the user
my $event = WWW::SwaggerClient::Object::Event_1->new(); # Event_1 | Updated event
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->updateEvent(cookie => $cookie, xPhApiVersion => $xPhApiVersion, eventId => $eventId, userId => $userId, event => $event, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling EventApi->updateEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.EventApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
eventId = eventId_example # String | ID of the event
userId = userId_example # String | ID of the user
event =  # Event_1 | Updated event
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.updateEvent(cookie, xPhApiVersion, eventId, userId, event, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling EventApi->updateEvent: %s\n" % e)

Parameters

Path parameters
Name Description
eventId*
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
event *

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Group

getGroupConfig

Returns a group's configuration


/api/groups/{idOrName}/config

Usage and SDK Samples

curl -X get "https://dev.propellerhealth.com/api/api/groups/{idOrName}/config"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GroupApi;

import java.io.File;
import java.util.*;

public class GroupApiExample {

    public static void main(String[] args) {
        
        GroupApi apiInstance = new GroupApi();
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String idOrName = idOrName_example; // String | ID or name of the group
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200_3 result = apiInstance.getGroupConfig(xPhApiVersion, idOrName, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupApi#getGroupConfig");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GroupApi;

public class GroupApiExample {

    public static void main(String[] args) {
        GroupApi apiInstance = new GroupApi();
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String idOrName = idOrName_example; // String | ID or name of the group
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200_3 result = apiInstance.getGroupConfig(xPhApiVersion, idOrName, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupApi#getGroupConfig");
            e.printStackTrace();
        }
    }
}
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *idOrName = idOrName_example; // ID or name of the group
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

GroupApi *apiInstance = [[GroupApi alloc] init];

[apiInstance getGroupConfigWith:xPhApiVersion
    idOrName:idOrName
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.GroupApi()

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var idOrName = idOrName_example; // {String} ID or name of the group

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getGroupConfig(xPhApiVersion, idOrName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getGroupConfigExample
    {
        public void main()
        {
            
            var apiInstance = new GroupApi();
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var idOrName = idOrName_example;  // String | ID or name of the group
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_200_3 result = apiInstance.getGroupConfig(xPhApiVersion, idOrName, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GroupApi.getGroupConfig: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GroupApi();
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$idOrName = idOrName_example; // String | ID or name of the group
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->getGroupConfig($xPhApiVersion, $idOrName, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupApi->getGroupConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GroupApi;

my $api_instance = WWW::SwaggerClient::GroupApi->new();
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $idOrName = idOrName_example; # String | ID or name of the group
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->getGroupConfig(xPhApiVersion => $xPhApiVersion, idOrName => $idOrName, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupApi->getGroupConfig: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.GroupApi()
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
idOrName = idOrName_example # String | ID or name of the group
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.getGroupConfig(xPhApiVersion, idOrName, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupApi->getGroupConfig: %s\n" % e)

Parameters

Path parameters
Name Description
idOrName*
Header parameters
Name Description
accept-language
x-ph-api-version*

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Metrics

getMetrics

Returns metrics about a user grouped into the specified time windows.


/api/users/{userId}/metrics

Usage and SDK Samples

curl -X get "https://dev.propellerhealth.com/api/api/users/{userId}/metrics?endDate=&name=&pagingToken=&period=&startDate="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MetricsApi;

import java.io.File;
import java.util.*;

public class MetricsApiExample {

    public static void main(String[] args) {
        
        MetricsApi apiInstance = new MetricsApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        array[String] name = ; // array[String] | Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        Date endDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 end date to filter metrics, defaults to now
        String pagingToken = pagingToken_example; // String | paging token that gets you the next or previous page of results
        array[String] period = ; // array[String] | size of the time windows the metrics are grouped by, or no window if set to "series"
        Date startDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 start date to filter events, defaults to 30 days ago
        try {
            inline_response_200_4 result = apiInstance.getMetrics(cookie, xPhApiVersion, userId, name, acceptLanguage, endDate, pagingToken, period, startDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MetricsApi#getMetrics");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MetricsApi;

public class MetricsApiExample {

    public static void main(String[] args) {
        MetricsApi apiInstance = new MetricsApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        array[String] name = ; // array[String] | Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        Date endDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 end date to filter metrics, defaults to now
        String pagingToken = pagingToken_example; // String | paging token that gets you the next or previous page of results
        array[String] period = ; // array[String] | size of the time windows the metrics are grouped by, or no window if set to "series"
        Date startDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 start date to filter events, defaults to 30 days ago
        try {
            inline_response_200_4 result = apiInstance.getMetrics(cookie, xPhApiVersion, userId, name, acceptLanguage, endDate, pagingToken, period, startDate);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MetricsApi#getMetrics");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
array[String] *name = ; // Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)
Date *endDate = 2013-10-20T19:20:30+01:00; // ISO8601 end date to filter metrics, defaults to now (optional)
String *pagingToken = pagingToken_example; // paging token that gets you the next or previous page of results (optional)
array[String] *period = ; // size of the time windows the metrics are grouped by, or no window if set to "series" (optional)
Date *startDate = 2013-10-20T19:20:30+01:00; // ISO8601 start date to filter events, defaults to 30 days ago (optional)

MetricsApi *apiInstance = [[MetricsApi alloc] init];

[apiInstance getMetricsWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    name:name
    acceptLanguage:acceptLanguage
    endDate:endDate
    pagingToken:pagingToken
    period:period
    startDate:startDate
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.MetricsApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var name = ; // {array[String]} Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |


var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
  'endDate': 2013-10-20T19:20:30+01:00, // {Date} ISO8601 end date to filter metrics, defaults to now
  'pagingToken': pagingToken_example, // {String} paging token that gets you the next or previous page of results
  'period': , // {array[String]} size of the time windows the metrics are grouped by, or no window if set to "series"
  'startDate': 2013-10-20T19:20:30+01:00 // {Date} ISO8601 start date to filter events, defaults to 30 days ago
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMetrics(cookie, xPhApiVersion, userId, name, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMetricsExample
    {
        public void main()
        {
            
            var apiInstance = new MetricsApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var name = new array[String](); // array[String] | Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 
            var endDate = 2013-10-20T19:20:30+01:00;  // Date | ISO8601 end date to filter metrics, defaults to now (optional) 
            var pagingToken = pagingToken_example;  // String | paging token that gets you the next or previous page of results (optional) 
            var period = new array[String](); // array[String] | size of the time windows the metrics are grouped by, or no window if set to "series" (optional) 
            var startDate = 2013-10-20T19:20:30+01:00;  // Date | ISO8601 start date to filter events, defaults to 30 days ago (optional) 

            try
            {
                inline_response_200_4 result = apiInstance.getMetrics(cookie, xPhApiVersion, userId, name, acceptLanguage, endDate, pagingToken, period, startDate);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.getMetrics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MetricsApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$name = ; // array[String] | Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
$endDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 end date to filter metrics, defaults to now
$pagingToken = pagingToken_example; // String | paging token that gets you the next or previous page of results
$period = ; // array[String] | size of the time windows the metrics are grouped by, or no window if set to "series"
$startDate = 2013-10-20T19:20:30+01:00; // Date | ISO8601 start date to filter events, defaults to 30 days ago

try {
    $result = $api_instance->getMetrics($cookie, $xPhApiVersion, $userId, $name, $acceptLanguage, $endDate, $pagingToken, $period, $startDate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MetricsApi->getMetrics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MetricsApi;

my $api_instance = WWW::SwaggerClient::MetricsApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $name = []; # array[String] | Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
my $endDate = 2013-10-20T19:20:30+01:00; # Date | ISO8601 end date to filter metrics, defaults to now
my $pagingToken = pagingToken_example; # String | paging token that gets you the next or previous page of results
my $period = []; # array[String] | size of the time windows the metrics are grouped by, or no window if set to "series"
my $startDate = 2013-10-20T19:20:30+01:00; # Date | ISO8601 start date to filter events, defaults to 30 days ago

eval { 
    my $result = $api_instance->getMetrics(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, name => $name, acceptLanguage => $acceptLanguage, endDate => $endDate, pagingToken => $pagingToken, period => $period, startDate => $startDate);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MetricsApi->getMetrics: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MetricsApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
name =  # array[String] | Name(s) of the metrics to include.
Only the following period/metricName combinations are supported. 
Other combinations will result in a `400` response.

| series   | daily                        | weekly           | monthly                          |
| -------- | ---------------------------- | ---------------- | -------------------------------- |
| actAdult | eventsControllerAdministered | adherencePercent | trendTimeOfDayMorning            |
| actChild | eventsControllerPrescribed   |                  | trendTimeOfDayAfternoon          |
|          | eventsRescue                 |                  | trendTimeOfDayEvening            |
|          | eventsRescueSensor           |                  | trendTimeOfDayNight              |
|          | eventsRescueManual           |                  | trendDayOfWeekSunday             |
|          | eventsRescueNight            |                  | trendDayOfWeekMonday             |
|          | eventsRescueNightSensor      |                  | trendDayOfWeekTuesday            |
|          | eventsRescueNightManual      |                  | trendDayOfWeekWednesday          |
|          | rescueBaseline               |                  | trendDayOfWeekThursday           |
|          |                              |                  | trendDayOfWeekFriday             |
|          |                              |                  | trendDayOfWeekSaturday           |
|          |                              |                  | trendSymptomWokenAtNight         |
|          |                              |                  | trendSymptomCough                |
|          |                              |                  | trendSymptomWheeze               |
|          |                              |                  | trendSymptomDifficultyBreathing  |
|          |                              |                  | trendSymptomShortnessOfBreath    |
|          |                              |                  | trendSymptomChestTightness       |
|          |                              |                  | trendSymptomActivityLimitations  |
|          |                              |                  | trendTriggerSmellsOrScents       |
|          |                              |                  | trendTriggerRespiratoryInfection |
|          |                              |                  | trendTriggerTobacco              |
|          |                              |                  | trendTriggerColdAir              |
|          |                              |                  | trendTriggerAnimals              |
|          |                              |                  | trendTriggerDust                 |
|          |                              |                  | trendTriggerOutdoorAllergens     |
|          |                              |                  | trendTriggerWorkplaceExposure    |
|          |                              |                  | trendTriggerAirPollution         |
|          |                              |                  | trendTriggerExercise             |
|          |                              |                  | trendTriggerUnknown              |
|          |                              |                  |                                  |

acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)
endDate = 2013-10-20T19:20:30+01:00 # Date | ISO8601 end date to filter metrics, defaults to now (optional)
pagingToken = pagingToken_example # String | paging token that gets you the next or previous page of results (optional)
period =  # array[String] | size of the time windows the metrics are grouped by, or no window if set to "series" (optional)
startDate = 2013-10-20T19:20:30+01:00 # Date | ISO8601 start date to filter events, defaults to 30 days ago (optional)

try: 
    api_response = api_instance.getMetrics(cookie, xPhApiVersion, userId, name, acceptLanguage=acceptLanguage, endDate=endDate, pagingToken=pagingToken, period=period, startDate=startDate)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MetricsApi->getMetrics: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Query parameters
Name Description
endDate
name*
pagingToken
period
startDate

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Plan

addPlanMedication

Adds a new medication to a patient's respiratory plan


/api/users/{userId}/plan/medication

Usage and SDK Samples

curl -X post "https://dev.propellerhealth.com/api/api/users/{userId}/plan/medication"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlanApi;

import java.io.File;
import java.util.*;

public class PlanApiExample {

    public static void main(String[] args) {
        
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        AddPlanMedicationRequest_1 addPlanMedicationRequest = ; // AddPlanMedicationRequest_1 | Plan Medication
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.addPlanMedication(cookie, xPhApiVersion, userId, addPlanMedicationRequest, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#addPlanMedication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlanApi;

public class PlanApiExample {

    public static void main(String[] args) {
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        AddPlanMedicationRequest_1 addPlanMedicationRequest = ; // AddPlanMedicationRequest_1 | Plan Medication
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.addPlanMedication(cookie, xPhApiVersion, userId, addPlanMedicationRequest, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#addPlanMedication");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
AddPlanMedicationRequest_1 *addPlanMedicationRequest = ; // Plan Medication
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

PlanApi *apiInstance = [[PlanApi alloc] init];

[apiInstance addPlanMedicationWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    addPlanMedicationRequest:addPlanMedicationRequest
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.PlanApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var addPlanMedicationRequest = ; // {AddPlanMedicationRequest_1} Plan Medication

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addPlanMedication(cookie, xPhApiVersion, userId, addPlanMedicationRequest, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addPlanMedicationExample
    {
        public void main()
        {
            
            var apiInstance = new PlanApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var addPlanMedicationRequest = new AddPlanMedicationRequest_1(); // AddPlanMedicationRequest_1 | Plan Medication
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.addPlanMedication(cookie, xPhApiVersion, userId, addPlanMedicationRequest, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlanApi.addPlanMedication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PlanApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$addPlanMedicationRequest = ; // AddPlanMedicationRequest_1 | Plan Medication
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->addPlanMedication($cookie, $xPhApiVersion, $userId, $addPlanMedicationRequest, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling PlanApi->addPlanMedication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlanApi;

my $api_instance = WWW::SwaggerClient::PlanApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $addPlanMedicationRequest = WWW::SwaggerClient::Object::AddPlanMedicationRequest_1->new(); # AddPlanMedicationRequest_1 | Plan Medication
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->addPlanMedication(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, addPlanMedicationRequest => $addPlanMedicationRequest, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling PlanApi->addPlanMedication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlanApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
addPlanMedicationRequest =  # AddPlanMedicationRequest_1 | Plan Medication
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.addPlanMedication(cookie, xPhApiVersion, userId, addPlanMedicationRequest, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling PlanApi->addPlanMedication: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
addPlanMedicationRequest *

Responses

Status: 201 - Created

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

addPlanSensor

Adds a new sensor to medication on a patient's respiratory plan


/api/users/{userId}/plan/medication/{medicationId}/sensor

Usage and SDK Samples

curl -X post "https://dev.propellerhealth.com/api/api/users/{userId}/plan/medication/{medicationId}/sensor"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlanApi;

import java.io.File;
import java.util.*;

public class PlanApiExample {

    public static void main(String[] args) {
        
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        AddPlanSensorRequest_1 addPlanSensorRequest = ; // AddPlanSensorRequest_1 | Plan Sensor
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.addPlanSensor(cookie, xPhApiVersion, userId, medicationId, addPlanSensorRequest, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#addPlanSensor");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlanApi;

public class PlanApiExample {

    public static void main(String[] args) {
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        AddPlanSensorRequest_1 addPlanSensorRequest = ; // AddPlanSensorRequest_1 | Plan Sensor
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.addPlanSensor(cookie, xPhApiVersion, userId, medicationId, addPlanSensorRequest, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#addPlanSensor");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
String *medicationId = medicationId_example; // ID of a medication
AddPlanSensorRequest_1 *addPlanSensorRequest = ; // Plan Sensor
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

PlanApi *apiInstance = [[PlanApi alloc] init];

[apiInstance addPlanSensorWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    medicationId:medicationId
    addPlanSensorRequest:addPlanSensorRequest
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.PlanApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var medicationId = medicationId_example; // {String} ID of a medication

var addPlanSensorRequest = ; // {AddPlanSensorRequest_1} Plan Sensor

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addPlanSensor(cookie, xPhApiVersion, userId, medicationId, addPlanSensorRequest, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addPlanSensorExample
    {
        public void main()
        {
            
            var apiInstance = new PlanApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var medicationId = medicationId_example;  // String | ID of a medication
            var addPlanSensorRequest = new AddPlanSensorRequest_1(); // AddPlanSensorRequest_1 | Plan Sensor
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.addPlanSensor(cookie, xPhApiVersion, userId, medicationId, addPlanSensorRequest, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlanApi.addPlanSensor: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PlanApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$medicationId = medicationId_example; // String | ID of a medication
$addPlanSensorRequest = ; // AddPlanSensorRequest_1 | Plan Sensor
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->addPlanSensor($cookie, $xPhApiVersion, $userId, $medicationId, $addPlanSensorRequest, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling PlanApi->addPlanSensor: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlanApi;

my $api_instance = WWW::SwaggerClient::PlanApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $medicationId = medicationId_example; # String | ID of a medication
my $addPlanSensorRequest = WWW::SwaggerClient::Object::AddPlanSensorRequest_1->new(); # AddPlanSensorRequest_1 | Plan Sensor
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->addPlanSensor(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, medicationId => $medicationId, addPlanSensorRequest => $addPlanSensorRequest, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling PlanApi->addPlanSensor: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlanApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
medicationId = medicationId_example # String | ID of a medication
addPlanSensorRequest =  # AddPlanSensorRequest_1 | Plan Sensor
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.addPlanSensor(cookie, xPhApiVersion, userId, medicationId, addPlanSensorRequest, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling PlanApi->addPlanSensor: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
medicationId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
addPlanSensorRequest *

Responses

Status: 201 - Created

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

deletePlanMedication

Deletes a medication from the patient's respiratory plan.


/api/users/{userId}/plan/medication/{medicationId}

Usage and SDK Samples

curl -X delete "https://dev.propellerhealth.com/api/api/users/{userId}/plan/medication/{medicationId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlanApi;

import java.io.File;
import java.util.*;

public class PlanApiExample {

    public static void main(String[] args) {
        
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.deletePlanMedication(cookie, xPhApiVersion, userId, medicationId, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#deletePlanMedication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlanApi;

public class PlanApiExample {

    public static void main(String[] args) {
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.deletePlanMedication(cookie, xPhApiVersion, userId, medicationId, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#deletePlanMedication");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
String *medicationId = medicationId_example; // ID of a medication
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

PlanApi *apiInstance = [[PlanApi alloc] init];

[apiInstance deletePlanMedicationWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    medicationId:medicationId
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.PlanApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var medicationId = medicationId_example; // {String} ID of a medication

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deletePlanMedication(cookie, xPhApiVersion, userId, medicationId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deletePlanMedicationExample
    {
        public void main()
        {
            
            var apiInstance = new PlanApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var medicationId = medicationId_example;  // String | ID of a medication
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.deletePlanMedication(cookie, xPhApiVersion, userId, medicationId, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlanApi.deletePlanMedication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PlanApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$medicationId = medicationId_example; // String | ID of a medication
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->deletePlanMedication($cookie, $xPhApiVersion, $userId, $medicationId, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling PlanApi->deletePlanMedication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlanApi;

my $api_instance = WWW::SwaggerClient::PlanApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $medicationId = medicationId_example; # String | ID of a medication
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->deletePlanMedication(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, medicationId => $medicationId, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling PlanApi->deletePlanMedication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlanApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
medicationId = medicationId_example # String | ID of a medication
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.deletePlanMedication(cookie, xPhApiVersion, userId, medicationId, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling PlanApi->deletePlanMedication: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
medicationId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

deletePlanSensor

Deletes a sensor from a medication on the patient's respiratory plan.


/api/users/{userId}/plan/medication/{medicationId}/sensor/{mac}

Usage and SDK Samples

curl -X delete "https://dev.propellerhealth.com/api/api/users/{userId}/plan/medication/{medicationId}/sensor/{mac}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlanApi;

import java.io.File;
import java.util.*;

public class PlanApiExample {

    public static void main(String[] args) {
        
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        String mac = mac_example; // String | sensor MAC address
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.deletePlanSensor(cookie, xPhApiVersion, userId, medicationId, mac, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#deletePlanSensor");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlanApi;

public class PlanApiExample {

    public static void main(String[] args) {
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        String mac = mac_example; // String | sensor MAC address
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.deletePlanSensor(cookie, xPhApiVersion, userId, medicationId, mac, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#deletePlanSensor");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
String *medicationId = medicationId_example; // ID of a medication
String *mac = mac_example; // sensor MAC address
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

PlanApi *apiInstance = [[PlanApi alloc] init];

[apiInstance deletePlanSensorWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    medicationId:medicationId
    mac:mac
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.PlanApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var medicationId = medicationId_example; // {String} ID of a medication

var mac = mac_example; // {String} sensor MAC address

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deletePlanSensor(cookie, xPhApiVersion, userId, medicationId, mac, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deletePlanSensorExample
    {
        public void main()
        {
            
            var apiInstance = new PlanApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var medicationId = medicationId_example;  // String | ID of a medication
            var mac = mac_example;  // String | sensor MAC address
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.deletePlanSensor(cookie, xPhApiVersion, userId, medicationId, mac, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlanApi.deletePlanSensor: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PlanApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$medicationId = medicationId_example; // String | ID of a medication
$mac = mac_example; // String | sensor MAC address
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->deletePlanSensor($cookie, $xPhApiVersion, $userId, $medicationId, $mac, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling PlanApi->deletePlanSensor: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlanApi;

my $api_instance = WWW::SwaggerClient::PlanApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $medicationId = medicationId_example; # String | ID of a medication
my $mac = mac_example; # String | sensor MAC address
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->deletePlanSensor(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, medicationId => $medicationId, mac => $mac, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling PlanApi->deletePlanSensor: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlanApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
medicationId = medicationId_example # String | ID of a medication
mac = mac_example # String | sensor MAC address
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.deletePlanSensor(cookie, xPhApiVersion, userId, medicationId, mac, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling PlanApi->deletePlanSensor: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
medicationId*
mac*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

patchPlanMedication

Updates a respiratory plan's medication


/api/users/{userId}/plan/medication/{medicationId}

Usage and SDK Samples

curl -X patch "https://dev.propellerhealth.com/api/api/users/{userId}/plan/medication/{medicationId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PlanApi;

import java.io.File;
import java.util.*;

public class PlanApiExample {

    public static void main(String[] args) {
        
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        EditPlanMedicationRequest_1 editPlanMedicationRequest = ; // EditPlanMedicationRequest_1 | Updated Medication
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.patchPlanMedication(cookie, xPhApiVersion, userId, medicationId, editPlanMedicationRequest, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#patchPlanMedication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PlanApi;

public class PlanApiExample {

    public static void main(String[] args) {
        PlanApi apiInstance = new PlanApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String medicationId = medicationId_example; // String | ID of a medication
        EditPlanMedicationRequest_1 editPlanMedicationRequest = ; // EditPlanMedicationRequest_1 | Updated Medication
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.patchPlanMedication(cookie, xPhApiVersion, userId, medicationId, editPlanMedicationRequest, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling PlanApi#patchPlanMedication");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
String *medicationId = medicationId_example; // ID of a medication
EditPlanMedicationRequest_1 *editPlanMedicationRequest = ; // Updated Medication
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

PlanApi *apiInstance = [[PlanApi alloc] init];

[apiInstance patchPlanMedicationWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    medicationId:medicationId
    editPlanMedicationRequest:editPlanMedicationRequest
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.PlanApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var medicationId = medicationId_example; // {String} ID of a medication

var editPlanMedicationRequest = ; // {EditPlanMedicationRequest_1} Updated Medication

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.patchPlanMedication(cookie, xPhApiVersion, userId, medicationId, editPlanMedicationRequest, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class patchPlanMedicationExample
    {
        public void main()
        {
            
            var apiInstance = new PlanApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var medicationId = medicationId_example;  // String | ID of a medication
            var editPlanMedicationRequest = new EditPlanMedicationRequest_1(); // EditPlanMedicationRequest_1 | Updated Medication
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.patchPlanMedication(cookie, xPhApiVersion, userId, medicationId, editPlanMedicationRequest, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlanApi.patchPlanMedication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PlanApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$medicationId = medicationId_example; // String | ID of a medication
$editPlanMedicationRequest = ; // EditPlanMedicationRequest_1 | Updated Medication
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->patchPlanMedication($cookie, $xPhApiVersion, $userId, $medicationId, $editPlanMedicationRequest, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling PlanApi->patchPlanMedication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PlanApi;

my $api_instance = WWW::SwaggerClient::PlanApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $medicationId = medicationId_example; # String | ID of a medication
my $editPlanMedicationRequest = WWW::SwaggerClient::Object::EditPlanMedicationRequest_1->new(); # EditPlanMedicationRequest_1 | Updated Medication
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->patchPlanMedication(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, medicationId => $medicationId, editPlanMedicationRequest => $editPlanMedicationRequest, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling PlanApi->patchPlanMedication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PlanApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
medicationId = medicationId_example # String | ID of a medication
editPlanMedicationRequest =  # EditPlanMedicationRequest_1 | Updated Medication
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.patchPlanMedication(cookie, xPhApiVersion, userId, medicationId, editPlanMedicationRequest, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling PlanApi->patchPlanMedication: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
medicationId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
editPlanMedicationRequest *

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

User

createUser

Create a new patient or caregiver user account


/api/users

Usage and SDK Samples

curl -X post "https://dev.propellerhealth.com/api/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        Credentials_1 credentials = ; // Credentials_1 | User credentials
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.createUser(xPhApiVersion, credentials, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#createUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        Credentials_1 credentials = ; // Credentials_1 | User credentials
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.createUser(xPhApiVersion, credentials, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#createUser");
            e.printStackTrace();
        }
    }
}
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
Credentials_1 *credentials = ; // User credentials
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance createUserWith:xPhApiVersion
    credentials:credentials
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var credentials = ; // {Credentials_1} User credentials

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createUser(xPhApiVersion, credentials, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUserExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var credentials = new Credentials_1(); // Credentials_1 | User credentials
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_200 result = apiInstance.createUser(xPhApiVersion, credentials, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.createUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$credentials = ; // Credentials_1 | User credentials
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->createUser($xPhApiVersion, $credentials, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->createUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $credentials = WWW::SwaggerClient::Object::Credentials_1->new(); # Credentials_1 | User credentials
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->createUser(xPhApiVersion => $xPhApiVersion, credentials => $credentials, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->createUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
credentials =  # Credentials_1 | User credentials
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.createUser(xPhApiVersion, credentials, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->createUser: %s\n" % e)

Parameters

Header parameters
Name Description
accept-language
x-ph-api-version*
Body parameters
Name Description
credentials *

Responses

Status: 201 - Created

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

getUser

Returns details for the authenticated user


/api/users/me

Usage and SDK Samples

curl -X get "https://dev.propellerhealth.com/api/api/users/me"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.getUser(cookie, xPhApiVersion, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.getUser(cookie, xPhApiVersion, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUser");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance getUserWith:cookie
    xPhApiVersion:xPhApiVersion
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUser(cookie, xPhApiVersion, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_200 result = apiInstance.getUser(cookie, xPhApiVersion, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->getUser($cookie, $xPhApiVersion, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->getUser(cookie => $cookie, xPhApiVersion => $xPhApiVersion, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->getUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.getUser(cookie, xPhApiVersion, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->getUser: %s\n" % e)

Parameters

Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

getUserById

Returns details for an individual user


/api/users/{userId}

Usage and SDK Samples

curl -X get "https://dev.propellerhealth.com/api/api/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.getUserById(cookie, xPhApiVersion, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUserById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.getUserById(cookie, xPhApiVersion, userId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUserById");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance getUserByIdWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserById(cookie, xPhApiVersion, userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserByIdExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_200 result = apiInstance.getUserById(cookie, xPhApiVersion, userId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.getUserById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->getUserById($cookie, $xPhApiVersion, $userId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->getUserById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->getUserById(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->getUserById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.getUserById(cookie, xPhApiVersion, userId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->getUserById: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

patchUserById

Updates a user


/api/users/{userId}

Usage and SDK Samples

curl -X patch "https://dev.propellerhealth.com/api/api/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        User_2 user = ; // User_2 | Updated user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.patchUserById(cookie, xPhApiVersion, userId, user, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#patchUserById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        User_2 user = ; // User_2 | Updated user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.patchUserById(cookie, xPhApiVersion, userId, user, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#patchUserById");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
User_2 *user = ; // Updated user
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance patchUserByIdWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    user:user
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var user = ; // {User_2} Updated user

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.patchUserById(cookie, xPhApiVersion, userId, user, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class patchUserByIdExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var user = new User_2(); // User_2 | Updated user
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.patchUserById(cookie, xPhApiVersion, userId, user, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.patchUserById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$user = ; // User_2 | Updated user
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->patchUserById($cookie, $xPhApiVersion, $userId, $user, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->patchUserById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $user = WWW::SwaggerClient::Object::User_2->new(); # User_2 | Updated user
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->patchUserById(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, user => $user, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling UserApi->patchUserById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
user =  # User_2 | Updated user
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.patchUserById(cookie, xPhApiVersion, userId, user, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling UserApi->patchUserById: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
user *

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

putUserById

Updates a user


/api/users/{userId}

Usage and SDK Samples

curl -X put "https://dev.propellerhealth.com/api/api/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        User_1 user = ; // User_1 | Updated user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.putUserById(cookie, xPhApiVersion, userId, user, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#putUserById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String userId = userId_example; // String | ID of the user
        User_1 user = ; // User_1 | Updated user
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            apiInstance.putUserById(cookie, xPhApiVersion, userId, user, acceptLanguage);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#putUserById");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *userId = userId_example; // ID of the user
User_1 *user = ; // Updated user
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance putUserByIdWith:cookie
    xPhApiVersion:xPhApiVersion
    userId:userId
    user:user
    acceptLanguage:acceptLanguage
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var userId = userId_example; // {String} ID of the user

var user = ; // {User_1} Updated user

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.putUserById(cookie, xPhApiVersion, userId, user, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putUserByIdExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var userId = userId_example;  // String | ID of the user
            var user = new User_1(); // User_1 | Updated user
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                apiInstance.putUserById(cookie, xPhApiVersion, userId, user, acceptLanguage);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.putUserById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$userId = userId_example; // String | ID of the user
$user = ; // User_1 | Updated user
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $api_instance->putUserById($cookie, $xPhApiVersion, $userId, $user, $acceptLanguage);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->putUserById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $userId = userId_example; # String | ID of the user
my $user = WWW::SwaggerClient::Object::User_1->new(); # User_1 | Updated user
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    $api_instance->putUserById(cookie => $cookie, xPhApiVersion => $xPhApiVersion, userId => $userId, user => $user, acceptLanguage => $acceptLanguage);
};
if ($@) {
    warn "Exception when calling UserApi->putUserById: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
userId = userId_example # String | ID of the user
user =  # User_1 | Updated user
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_instance.putUserById(cookie, xPhApiVersion, userId, user, acceptLanguage=acceptLanguage)
except ApiException as e:
    print("Exception when calling UserApi->putUserById: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Body parameters
Name Description
user *

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

signIn

Signs in a user and returns the signed in user object as the response


/api/users/signIn

Usage and SDK Samples

curl -X post "https://dev.propellerhealth.com/api/api/users/signIn"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        Credentials credentials = ; // Credentials | User credentials
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.signIn(xPhApiVersion, credentials, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#signIn");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        Credentials credentials = ; // Credentials | User credentials
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        try {
            inline_response_200 result = apiInstance.signIn(xPhApiVersion, credentials, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#signIn");
            e.printStackTrace();
        }
    }
}
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
Credentials *credentials = ; // User credentials
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance signInWith:xPhApiVersion
    credentials:credentials
    acceptLanguage:acceptLanguage
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var credentials = ; // {Credentials} User credentials

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.signIn(xPhApiVersion, credentials, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class signInExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var credentials = new Credentials(); // Credentials | User credentials
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 

            try
            {
                inline_response_200 result = apiInstance.signIn(xPhApiVersion, credentials, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.signIn: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$credentials = ; // Credentials | User credentials
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

try {
    $result = $api_instance->signIn($xPhApiVersion, $credentials, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->signIn: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $credentials = WWW::SwaggerClient::Object::Credentials->new(); # Credentials | User credentials
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call

eval { 
    my $result = $api_instance->signIn(xPhApiVersion => $xPhApiVersion, credentials => $credentials, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->signIn: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
credentials =  # Credentials | User credentials
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)

try: 
    api_response = api_instance.signIn(xPhApiVersion, credentials, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->signIn: %s\n" % e)

Parameters

Header parameters
Name Description
accept-language
x-ph-api-version*
Body parameters
Name Description
credentials *

Responses

Status: 200 - Success

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

signOut

Signs out a user and optionally can delete mobile tokens


/api/users/signOut

Usage and SDK Samples

curl -X post "https://dev.propellerhealth.com/api/api/users/signOut?deviceToken="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        String deviceToken = deviceToken_example; // String | Device Token
        try {
            apiInstance.signOut(cookie, xPhApiVersion, acceptLanguage, deviceToken);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#signOut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
        String xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
        String acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
        String deviceToken = deviceToken_example; // String | Device Token
        try {
            apiInstance.signOut(cookie, xPhApiVersion, acceptLanguage, deviceToken);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#signOut");
            e.printStackTrace();
        }
    }
}
String *cookie = cookie_example; // connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
String *xPhApiVersion = xPhApiVersion_example; // Propeller Health API version 3.14.0
String *acceptLanguage = acceptLanguage_example; // RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)
String *deviceToken = deviceToken_example; // Device Token (optional)

UserApi *apiInstance = [[UserApi alloc] init];

[apiInstance signOutWith:cookie
    xPhApiVersion:xPhApiVersion
    acceptLanguage:acceptLanguage
    deviceToken:deviceToken
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PropellerApi = require('propeller_api');

var api = new PropellerApi.UserApi()

var cookie = cookie_example; // {String} connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in

var xPhApiVersion = xPhApiVersion_example; // {String} Propeller Health API version 3.14.0

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
  'deviceToken': deviceToken_example // {String} Device Token
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.signOut(cookie, xPhApiVersion, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class signOutExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var cookie = cookie_example;  // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
            var xPhApiVersion = xPhApiVersion_example;  // String | Propeller Health API version 3.14.0
            var acceptLanguage = acceptLanguage_example;  // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional) 
            var deviceToken = deviceToken_example;  // String | Device Token (optional) 

            try
            {
                apiInstance.signOut(cookie, xPhApiVersion, acceptLanguage, deviceToken);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.signOut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UserApi();
$cookie = cookie_example; // String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
$xPhApiVersion = xPhApiVersion_example; // String | Propeller Health API version 3.14.0
$acceptLanguage = acceptLanguage_example; // String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
$deviceToken = deviceToken_example; // String | Device Token

try {
    $api_instance->signOut($cookie, $xPhApiVersion, $acceptLanguage, $deviceToken);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->signOut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserApi;

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $cookie = cookie_example; # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
my $xPhApiVersion = xPhApiVersion_example; # String | Propeller Health API version 3.14.0
my $acceptLanguage = acceptLanguage_example; # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call
my $deviceToken = deviceToken_example; # String | Device Token

eval { 
    $api_instance->signOut(cookie => $cookie, xPhApiVersion => $xPhApiVersion, acceptLanguage => $acceptLanguage, deviceToken => $deviceToken);
};
if ($@) {
    warn "Exception when calling UserApi->signOut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UserApi()
cookie = cookie_example # String | connect.sid - user's session id obtained from POST /api/users or POST /api/sign-in
xPhApiVersion = xPhApiVersion_example # String | Propeller Health API version 3.14.0
acceptLanguage = acceptLanguage_example # String | RFC BCP 47 code for overriding the user's profile language and region used by the API for this call (optional)
deviceToken = deviceToken_example # String | Device Token (optional)

try: 
    api_instance.signOut(cookie, xPhApiVersion, acceptLanguage=acceptLanguage, deviceToken=deviceToken)
except ApiException as e:
    print("Exception when calling UserApi->signOut: %s\n" % e)

Parameters

Header parameters
Name Description
cookie*
accept-language
x-ph-api-version*
Query parameters
Name Description
deviceToken

Responses

Status: 204 - No Content

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 400 - Bad Request

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 401 - Unauthorized

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 403 - Forbidden

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Status: 500 - Internal Server Error

Name Type Format Description
content-language String HTTP response header that indicates the RFC BCP 47 code used in processing the response
x-ph-api-request-id String Unique ID for this Propeller Health API request

Generated 2017-06-02T17:11:40.324Z