Test

<back to all web services

StoreLogs

import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class StoreLogs
{
    var loggers:ArrayList<Logger> = ArrayList<Logger>()
}

open class Logger
{
    var id:Long? = null
    var devices:ArrayList<Device> = ArrayList<Device>()
}

open class Device
{
    var id:Long? = null
    @SerializedName("type") var Type:String? = null
    var timeStamp:Long? = null
    var channels:ArrayList<Channel> = ArrayList<Channel>()
}

open class Channel
{
    var name:String? = null
    var value:String? = null
}

open class StoreLogsResponse
{
    var existingLogs:ArrayList<Logger> = ArrayList<Logger>()
    var responseStatus:ResponseStatus? = null
}

Kotlin StoreLogs DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsv/reply/StoreLogs HTTP/1.1 
Host: test.servicestack.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	loggers: 
	[
		{
			id: 0,
			devices: 
			[
				{
					id: 0,
					type: String,
					timeStamp: 0,
					channels: 
					[
						{
							name: String,
							value: String
						}
					]
				}
			]
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	existingLogs: 
	[
		{
			id: 0,
			devices: 
			[
				{
					id: 0,
					type: String,
					timeStamp: 0,
					channels: 
					[
						{
							name: String,
							value: String
						}
					]
				}
			]
		}
	],
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}