Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
title3.5.0

The Work Order Photos REST API is used to manage photos that have been captured and saved with a work order. If photos were taken and associated with the work order then a Photos object will be present in the work order object. The Photos object is a collection of photo details including the photo ID (required by this API), date photo was captured and notes.

 



Panel
borderColorgrey
bgColorwhitesmoke

On this page:

Table of Contents
maxLevel2

Related pages:


Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

Retrieve a Photograph for a specific Work Order

GET /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/${PhotoID}

Attach Photographs to a specific Work Order

POST /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/

Delete a Photograph for a specific Work Order

DELETE /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/${PhotoID}

Bulk Delete Photographs for a specific Work Order

DELETE /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/

API Specific Parameters

ParameterDescription
${PhotoID}Identifies the ID of the photo to be accessed.

${WorkOrderNum}

Identifies the
REST Object Definitions Work Order Activity Related Objects
Work Order Object.

Include Page
_Default HTTP Headers
_Default HTTP Headers
 



API Specifics


Panel
borderColor#D3D3D3

Retrieve a Photograph for a specific Work Order

This REST API will return the binary image data (with appropriate mime type HTTP header set) for the Photograph with the specified ID, for the Work Order with the specified ID. The Photograph with the specified ID and the Work Order with the specified ID must already exist in the system.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

GET /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/${PhotoID}

HTTP Request Body

This request does not require a request body. 

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will contain the the binary data for the Photograph.

Include Page
_Default Response Object on Error
_Default Response Object on Error


Panel
borderColor#D3D3D3

Attach Photographs to a specific Work Order

This REST API will associate one or more Photographs to the Work Order with specified ID. The Work Order with the specified ID must already exist in the system.

The REST API will store each Photograph as a jpeg file in the storage service. In addition, the Work Order object with specified ID will be updated to contain a reference to the Photograph(s) in the Photos object.

The Photos object is a collection of Photograph details including the Photograph ID, date the Photograph was captured, and notes.

This REST API requires that the Content-Type HTTP header be set to multipart/form-data.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

POST /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/

HTTP Request Body

This request does not require a request body. 

HTTP Response Body

On success, an HTTP response code of 201 will be returned, and the response body will contain a collection of objects. Each object will contain a file name for the Photograph. 

Code Block
languagejs
[
	{
		"Name": " "
	}
]

Include Page
_Default Response Object on Error
_Default Response Object on Error


Panel
borderColor#D3D3D3

Delete a Photograph for a specific Work Order

This REST API will delete a Photograph with the specified ID, for the Work Order with the specified ID, from the system. The Photograph with the specified ID and the Work Order with the specified ID must already exist in the system.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

DELETE /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/${PhotoID}

HTTP Request Body

This request does not require a request body. 

Include Page
_Default Response Object Only
_Default Response Object Only


Panel
borderColor#D3D3D3

Bulk Delete Photographs for a specific Work Order

This REST API will delete Photographs with the specified IDs, for the Work Order with the specified ID, from the system. The Photographs with the specified IDs and the Work Order with the specified ID must already exist in the system.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

DELETE /seiapi/v3/trans/WorkOrder/${WorkOrderNum}/Photos/

HTTP Request Body

The HTTP request body must contain a a JSON array of Photograph IDs to be deleted.

Code Block
languagejs
firstline1
titleJSON Formatfirstline1
linenumberstrue
collapsetrue
[
    "${PhotoID}",
	"${PhotoID}",
    // etc., as required
]

Include Page
_Default Response Object Only
_Default Response Object Only