Generate and Post Samples

This API generates random samples for the specified timeseriesId and posts them. You can supply the number of desired samples as a query parameter.

URL

https://{{HOST}}/timeseries/timeseries/{timeseries_id}/samples/generateandpost

Method

POST

Required IMS Scopes

  • Read
  • Write

Required ACL Permissions Required

  • owner
  • admin
  • readwrite

Versions Supported

  • 2.0 (Default)
  • 2.1

URL Path Parameters

Name Description Example Type
timeseries_id
required
Timeseries ID to post samples to GUID string

URL Query Parameters

Name Description Example Type
v
optional
Version of the API to use v=2.0 string
numberOfSamples
optional
Number of samples to post 50 integer(int32)

Request Header Parameters

Type Value Description
Authentication Bearer {access_token}
required
Retrieve access token
Content-Type application/json
required
Description

Example

Request

curl -X POST 
  'https://{{HOST}}/timeseries/timeseries/4bb1ef19-056e-4893-a2ba-f52b0ed81a34/samples/generateandpost?numberOfSamples=10' 
  -H 'Authorization: Bearer {access_token}' 
  -H 'Cache-Control: no-cache' 
  -H 'Content-Type: application/json'

Response

{
    "psrIds": [
        "227c361e-41ae-4b94-9727-d2973500af26"
    ]
}

Errors

Error Description
403 Forbidden

Response Body Parameters

Name Description Schema
psrIds Post Sample Request Ids PSRId (GUID)