Lite Results API

API change history

Retrieve the VitaCurvesLITE curves mapping results for a given exercise.

Get Lite Mappings

Get Lite Mappings

Try it

Request

Request URL

Request parameters

  • string
  • (optional)
    integer

    Format - int32.

Request headers

  • string
  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Responses

200 OK

Success

Representations

{
  "correlationId": "Correlation ID",
  "members": [
    {
      "memberId": "010013R",
      "firstLifeCode": "CV16v1_1214_MPAalgBpb1",
      "secondLifeCode": "CV16v1_1214_FWAalgBpb1"
    },
    {
      "memberId": "010066R",
      "firstLifeCode": "CV16v1_1214_FPAalgFpb1",
      "secondLifeCode": "CV16v1_1214_MWAalgEpb2"
    }
  ],
  "vitaCurves": {
    "vitaCode": "VitaCode",
    "mortalityRate": [
      {
        "age": 16,
        "mortalityRate": 0.391729
      },
      {
        "age": 17,
        "mortalityRate": 0.373511
      },
      {
        "age": 18,
        "mortalityRate": 0.546976
      },
      {
        "age": 19,
        "mortalityRate": 0.66004
      },
      {
        "age": 20,
        "mortalityRate": 0.001067
      },
      {
        "age": 21,
        "mortalityRate": 0.18246
      },
      {
        "age": 22,
        "mortalityRate": 0.894309
      },
      {
        "age": 23,
        "mortalityRate": 0.175966
      },
      {
        "age": 24,
        "mortalityRate": 0.637551
      },
      {
        "age": 25,
        "mortalityRate": 0.753051
      },
      {
        "age": 26,
        "mortalityRate": 0.626219
      },
      {
        "age": 27,
        "mortalityRate": 0.724893
      },
      {
        "age": 28,
        "mortalityRate": 0.349487
      },
      {
        "age": 29,
        "mortalityRate": 0.47053
      },
      {
        "age": 30,
        "mortalityRate": 0.145132
      },
      {
        "age": 31,
        "mortalityRate": 0.916525
      },
      {
        "age": 32,
        "mortalityRate": 0.703478
      },
      {
        "age": 33,
        "mortalityRate": 0.591327
      },
      {
        "age": 34,
        "mortalityRate": 0.426475
      },
      {
        "age": 35,
        "mortalityRate": 0.424953
      },
      {
        "age": 36,
        "mortalityRate": 0.811545
      },
      {
        "age": 37,
        "mortalityRate": 0.199572
      },
      {
        "age": 38,
        "mortalityRate": 0.567209
      },
      {
        "age": 39,
        "mortalityRate": 0.477695
      },
      {
        "age": 40,
        "mortalityRate": 0.066826
      },
      {
        "age": 41,
        "mortalityRate": 0.255107
      },
      {
        "age": 42,
        "mortalityRate": 0.482511
      },
      {
        "age": 43,
        "mortalityRate": 0.192556
      },
      {
        "age": 44,
        "mortalityRate": 0.175274
      },
      {
        "age": 45,
        "mortalityRate": 0.547032
      },
      {
        "age": 46,
        "mortalityRate": 0.981842
      },
      {
        "age": 47,
        "mortalityRate": 0.910038
      },
      {
        "age": 48,
        "mortalityRate": 0.696443
      },
      {
        "age": 49,
        "mortalityRate": 0.108886
      },
      {
        "age": 50,
        "mortalityRate": 0.752611
      },
      {
        "age": 51,
        "mortalityRate": 0.527761
      },
      {
        "age": 52,
        "mortalityRate": 0.248605
      },
      {
        "age": 53,
        "mortalityRate": 0.508443
      },
      {
        "age": 54,
        "mortalityRate": 0.863515
      },
      {
        "age": 55,
        "mortalityRate": 0.49437
      },
      {
        "age": 56,
        "mortalityRate": 0.20814
      },
      {
        "age": 57,
        "mortalityRate": 0.144745
      },
      {
        "age": 58,
        "mortalityRate": 0.365744
      },
      {
        "age": 59,
        "mortalityRate": 0.341343
      },
      {
        "age": 60,
        "mortalityRate": 0.231168
      },
      {
        "age": 61,
        "mortalityRate": 0.281085
      },
      {
        "age": 62,
        "mortalityRate": 0.673673
      },
      {
        "age": 63,
        "mortalityRate": 0.380071
      },
      {
        "age": 64,
        "mortalityRate": 0.765203
      },
      {
        "age": 65,
        "mortalityRate": 0.135419
      },
      {
        "age": 66,
        "mortalityRate": 0.3089
      },
      {
        "age": 67,
        "mortalityRate": 0.175807
      },
      {
        "age": 68,
        "mortalityRate": 0.639936
      },
      {
        "age": 69,
        "mortalityRate": 0.763984
      },
      {
        "age": 70,
        "mortalityRate": 0.377636
      },
      {
        "age": 71,
        "mortalityRate": 0.918355
      },
      {
        "age": 72,
        "mortalityRate": 0.5325
      },
      {
        "age": 73,
        "mortalityRate": 0.795479
      },
      {
        "age": 74,
        "mortalityRate": 0.319612
      },
      {
        "age": 75,
        "mortalityRate": 0.472157
      },
      {
        "age": 76,
        "mortalityRate": 0.426147
      },
      {
        "age": 77,
        "mortalityRate": 0.428151
      },
      {
        "age": 78,
        "mortalityRate": 0.726891
      },
      {
        "age": 79,
        "mortalityRate": 0.816717
      },
      {
        "age": 80,
        "mortalityRate": 0.497407
      },
      {
        "age": 81,
        "mortalityRate": 0.44238
      },
      {
        "age": 82,
        "mortalityRate": 0.754648
      },
      {
        "age": 83,
        "mortalityRate": 0.966799
      },
      {
        "age": 84,
        "mortalityRate": 0.444117
      },
      {
        "age": 85,
        "mortalityRate": 0.343569
      },
      {
        "age": 86,
        "mortalityRate": 0.394318
      },
      {
        "age": 87,
        "mortalityRate": 0.921233
      },
      {
        "age": 88,
        "mortalityRate": 0.45401
      },
      {
        "age": 89,
        "mortalityRate": 0.658303
      },
      {
        "age": 90,
        "mortalityRate": 0.943011
      },
      {
        "age": 91,
        "mortalityRate": 0.393198
      },
      {
        "age": 92,
        "mortalityRate": 0.560026
      },
      {
        "age": 93,
        "mortalityRate": 0.952064
      },
      {
        "age": 94,
        "mortalityRate": 0.972725
      },
      {
        "age": 95,
        "mortalityRate": 0.511939
      },
      {
        "age": 96,
        "mortalityRate": 0.307632
      },
      {
        "age": 97,
        "mortalityRate": 0.828638
      },
      {
        "age": 98,
        "mortalityRate": 0.153551
      },
      {
        "age": 99,
        "mortalityRate": 0.766053
      },
      {
        "age": 100,
        "mortalityRate": 0.96433
      },
      {
        "age": 101,
        "mortalityRate": 0.532433
      },
      {
        "age": 102,
        "mortalityRate": 0.996299
      },
      {
        "age": 103,
        "mortalityRate": 0.658657
      },
      {
        "age": 104,
        "mortalityRate": 0.457449
      },
      {
        "age": 105,
        "mortalityRate": 0.560454
      },
      {
        "age": 106,
        "mortalityRate": 0.721458
      },
      {
        "age": 107,
        "mortalityRate": 0.179324
      },
      {
        "age": 108,
        "mortalityRate": 0.915029
      },
      {
        "age": 109,
        "mortalityRate": 0.117756
      },
      {
        "age": 110,
        "mortalityRate": 0.794421
      },
      {
        "age": 111,
        "mortalityRate": 0.506187
      },
      {
        "age": 112,
        "mortalityRate": 0.144052
      },
      {
        "age": 113,
        "mortalityRate": 0.275225
      },
      {
        "age": 114,
        "mortalityRate": 0.570134
      },
      {
        "age": 115,
        "mortalityRate": 0.514986
      },
      {
        "age": 116,
        "mortalityRate": 0.252635
      },
      {
        "age": 117,
        "mortalityRate": 0.433072
      },
      {
        "age": 118,
        "mortalityRate": 0.662152
      },
      {
        "age": 119,
        "mortalityRate": 0.148032
      },
      {
        "age": 120,
        "mortalityRate": 0.467298
      },
      {
        "age": 121,
        "mortalityRate": 0.113865
      },
      {
        "age": 122,
        "mortalityRate": 0.447995
      },
      {
        "age": 123,
        "mortalityRate": 0.707832
      },
      {
        "age": 124,
        "mortalityRate": 0.54717
      },
      {
        "age": 125,
        "mortalityRate": 0.710636
      }
    ]
  }
}
{
  "type": "object",
  "properties": {
    "correlationId": {
      "type": "string"
    },
    "vitaCurves": {
      "uniqueItems": false,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vitaCode": {
            "description": "The unique code for the specific VitaCurvesLITE. For example: “DEMO_Indigo_CV16v1_1214_MP1_2646_20170302”.",
            "type": "string"
          },
          "mortalityRate": {
            "uniqueItems": false,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "age": {
                  "format": "int32",
                  "description": "In the range 16 to 125.",
                  "type": "integer",
                  "readOnly": true
                },
                "mortalityRate": {
                  "format": "double",
                  "description": "For example: “0.023484”.",
                  "type": "number",
                  "readOnly": true
                }
              }
            },
            "readOnly": true
          }
        }
      }
    },
    "members": {
      "uniqueItems": false,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "memberId": {
            "type": "string",
            "readOnly": true
          },
          "firstLifeCode": {
            "type": "string",
            "readOnly": true
          },
          "secondLifeCode": {
            "type": "string",
            "readOnly": true
          }
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "exercise": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
{
  "correlationId": "string",
  "vitaCurves": [
    {
      "vitaCode": "string",
      "mortalityRate": [
        {
          "age": 0,
          "mortalityRate": 0.0
        }
      ]
    }
  ],
  "members": [
    {
      "memberId": "string",
      "firstLifeCode": "string",
      "secondLifeCode": "string"
    }
  ],
  "_links": {
    "self": {
      "href": "string"
    },
    "next": {
      "href": "string"
    },
    "exercise": {
      "href": "string"
    }
  }
}
{
  "type": "object",
  "properties": {
    "correlationId": {
      "type": "string"
    },
    "vitaCurves": {
      "uniqueItems": false,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vitaCode": {
            "description": "The unique code for the specific VitaCurvesLITE. For example: “DEMO_Indigo_CV16v1_1214_MP1_2646_20170302”.",
            "type": "string"
          },
          "mortalityRate": {
            "uniqueItems": false,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "age": {
                  "format": "int32",
                  "description": "In the range 16 to 125.",
                  "type": "integer",
                  "readOnly": true
                },
                "mortalityRate": {
                  "format": "double",
                  "description": "For example: “0.023484”.",
                  "type": "number",
                  "readOnly": true
                }
              }
            },
            "readOnly": true
          }
        }
      }
    },
    "members": {
      "uniqueItems": false,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "memberId": {
            "type": "string",
            "readOnly": true
          },
          "firstLifeCode": {
            "type": "string",
            "readOnly": true
          },
          "secondLifeCode": {
            "type": "string",
            "readOnly": true
          }
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        },
        "exercise": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

303 See Other

Redirect

Code samples

@ECHO OFF

curl -v -X GET "https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}?page=1"
-H "Accept: application/hal+json;v=1"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers

            client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/hal+json;v=1"));
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            // Request parameters
            queryString["page"] = "1";
            var uri = "https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}");

            builder.setParameter("page", "1");

            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Accept", "application/hal+json;v=1");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
            "page": "1",
        };
      
        $.ajax({
            url: "https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Accept","application/hal+json;v=1");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                         @"page=1",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"application/hal+json;v=1" forHTTPHeaderField:@"Accept"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Accept' => 'application/hal+json;v=1',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'page' => '1',
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Accept': 'application/hal+json;v=1',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
    # Request parameters
    'page': '1',
})

try:
    conn = httplib.HTTPSConnection('hymans-api.co.uk')
    conn.request("GET", "/evitacurves/literesults/{exerciseId}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Accept': 'application/hal+json;v=1',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
    # Request parameters
    'page': '1',
})

try:
    conn = http.client.HTTPSConnection('hymans-api.co.uk')
    conn.request("GET", "/evitacurves/literesults/{exerciseId}?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://hymans-api.co.uk/evitacurves/literesults/{exerciseId}')

query = URI.encode_www_form({
    # Request parameters
    'page' => '1'
})
if query.length > 0
  if uri.query && uri.query.length > 0
    uri.query += '&' + query
  else
    uri.query = query
  end
end

request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Accept'] = 'application/hal+json;v=1'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body