Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

3.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.

 

Resource URL Summary

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.

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.

 


API Specifics

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

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.

Otherwise, on error, the API returns the standard response object.

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

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. 

[
	{
		"Name": " "
	}
]

Otherwise, on error, the API returns the standard response object.

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

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

HTTP Request Body

This request does not require a request body. 

HTTP Response

The API returns the standard response object on both success and error.

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

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.

JSON Format
[
    "${PhotoID}",
	"${PhotoID}",
    // etc., as required
]

HTTP Response

The API returns the standard response object on both success and error.

  • No labels