Foundry API

<back to all web services

UploadViewpointPhotoRequest

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

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 Photo implements IIdentifiableResource
{
    public uploadedAt: string;
    public imageUrl?: string;
    public thumbnailUrl?: string;
    public id?: string;

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

export class UploadViewpointPhotoResponse
{
    public responseStatus?: ResponseStatus;
    public photo?: Photo;

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

export class UploadViewpointPhotoRequest extends PostOperationTenanted<UploadViewpointPhotoResponse>
{
    public machineId?: string;
    public uploadedAt: string;

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

TypeScript UploadViewpointPhotoRequest 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}/viewpoint 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
		}
	},
	photo: 
	{
		imageUrl: String,
		thumbnailUrl: String,
		id: String
	}
}