Skip to main content

Retrieve a list of historic values for the specified entity id/ids.

POST 

https://app.testiny.io/api/v1/history/entity/:entity

Retrieves a list of historic values for entities specified with the given id value. The entity type needs to support history tracking.

Request

Path Parameters

    entity stringrequired

Body

required

    id integer
    ids integer[]

Responses

Returns 'EntityHistoryResult'

Schema

    from date-time

    Timestamp of first history entry

    to date-time

    Timestamp of last history entry

    data

    object[]

    required

    List of requested entity ids and a list of historical values (for each entity)

  • Array [

  • id number

    The entity id

    values object[]

    The list of historical entity values, one for each step, with 'valid_from' and 'valid_to' interval properties

  • ]

Authorization: X-Api-Key

name: X-Api-Keytype: apiKeyin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://app.testiny.io/api/v1/history/entity/:entity");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("X-Api-Key", "<API_KEY_VALUE>");
var content = new StringContent("{\n \"id\": 0,\n \"ids\": [\n 0\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://app.testiny.io/api/v1
Auth
Parameters
— pathrequired
Body required
{
"id": 0,
"ids": [
0
]
}
ResponseClear

Click the Send API Request button above and see the response here!