Foundry API

<back to all web services

UploadMachineLogRequest

Requires Authentication
The following routes are available for this service:
POST/machines/{MachineId}/log

export class PostOperationUnTenanted<TResponse> implements IPost
{

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

export class PostOperationTenanted<TResponse> extends PostOperationUnTenanted<TResponse> implements ITenantedRequest
{
    public organisationId?: string;

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

export class MachineLog
{
    public id?: string;
    public machineId?: string;
    public uploadedAt: string;
    public warnings: number;
    public errors: number;

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

export class UploadMachineLogResponse
{
    public responseStatus?: ResponseStatus;
    public log?: MachineLog;

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

export class UploadMachineLogRequest extends PostOperationTenanted<UploadMachineLogResponse>
{
    public machineId?: string;

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

TypeScript UploadMachineLogRequest 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 /machines/{MachineId}/log HTTP/1.1 
Host: foundrystage-api-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	machineId: 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
		}
	},
	log: 
	{
		id: String,
		machineId: String,
		warnings: 0,
		errors: 0
	}
}