Test

<back to all web services

StoreLogs


export class Channel
{
    public name: string;
    public value: string;

    public constructor(init?: Partial<Channel>) { (Object as any).assign(this, init); }
}

export class Device
{
    public id: number;
    public type: string;
    public timeStamp: number;
    public channels: Channel[];

    public constructor(init?: Partial<Device>) { (Object as any).assign(this, init); }
}

export class Logger
{
    public id: number;
    public devices: Device[];

    public constructor(init?: Partial<Logger>) { (Object as any).assign(this, init); }
}

export class StoreLogs
{
    public loggers: Logger[];

    public constructor(init?: Partial<StoreLogs>) { (Object as any).assign(this, init); }
}

export class StoreLogsResponse
{
    public existingLogs: Logger[];
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<StoreLogsResponse>) { (Object as any).assign(this, init); }
}

TypeScript 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
		}
	}
}