POST | /machines/{MachineId}/telemetries |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class AddTelemetryRequest : PutPatchOperationTenanted<AddTelemetryResponse>()
{
var machineId:String? = null
var telemetries:ArrayList<Telemetry> = ArrayList<Telemetry>()
}
open class PutPatchOperationTenanted<TResponse> : PutPatchOperationUnTenanted<TResponse>(), ITenantedRequest
{
var organisationId:String? = null
}
open class PutPatchOperationUnTenanted<TResponse> : IPatch, IPut
{
}
open class AddTelemetryResponse
{
var responseStatus:ResponseStatus? = null
}
open class Telemetry : IIdentifiableResource
{
@SerializedName("type") var Type:String? = null
var value:String? = null
var observedAt:Date? = null
var id:String? = null
}
Kotlin AddTelemetryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /machines/{MachineId}/telemetries HTTP/1.1
Host: foundrystage-api-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
machineId: String,
telemetries:
[
{
type: String,
value: String,
id: String
}
],
organisationId: String
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }