Foundry API

<back to all web services

ReportMachineStatusRequest

Requires Authentication
The following routes are available for this service:
All Verbs/machines/{Id}/statuses

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 MachineStatus
{
    public component?: string;
    public observedAt: string;
    public code?: string;
    public errorCode?: string;
    public errorDetails?: string;

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

export class ReportMachineStatusResponse
{
    public status?: MachineStatus;
    public responseStatus?: ResponseStatus;

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

export class ReportMachineStatusRequest extends PostOperationTenanted<ReportMachineStatusResponse>
{
    public id?: string;
    public component?: string;
    public observedAt: string;
    public code?: string;
    public errorCode?: string;
    public errorDetails?: string;

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

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

{
	id: String,
	component: String,
	code: String,
	errorCode: String,
	errorDetails: String,
	organisationId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	status: 
	{
		component: String,
		code: String,
		errorCode: String,
		errorDetails: String
	},
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}