AssetDocuments - Intergraph Smart Completions - Intergraph Smart Completions Update 24 - Customization & Programming - Hexagon

Intergraph Smart Completions Smart API Programmer's Reference Guide (5.3.24)

Language
English
Product
Intergraph Smart Completions
Search by Category
Customization & Programming
Smart Completions Version
5.3.24

Assign or remove documents from assets. This association is critical for supporting field execution.

Documents must have already been loaded to Smart Completions before the association can be created.

Supported HTTPS Methods: GET, PUT, PATCH, POST

Request URL:

<HOSTNAME>/sc/datalake/v1/Instances(2)/AssetDocuments

Header parameters:

Header Parameter

Description

Authorization

A token required for authenticating a request.

The bearer token is a string, usually generated by the server in response to a login request.

You must include this header in every request.

Content-Type

The request format or the original media type of the resource.

Sample request payload for assigning documents to assets:

{

"AssetId" : 482253,

"DocumentId" : 37786

}

Sample request payload for removing documents from assets:

{

"dtRemoved": "2023-07-14T16:09:13-06:00"

}

Request payload parameters:



Request Parameter



Data Type

Required, Optional,
Recommended, or
Unused



Description

AssetId

Integer

GET - Required

PUT - Required

PATCH - Required

POST - Required

Smart Completions ID for the asset.

DocumentId

Integer

GET - Required

PUT - Required

PATCH - Required

POST - Required

Smart Completions ID for the document to assign to the asset.

dtRemoved

String (Date)

GET - Optional

PUT - Optional

PATCH - Optional

POST - Unused

Date on which the document was removed from the asset.

Sample response:

{

"@odata.context": "https://localhost:5001/ DataLake/v1/$metadata#Instances(2)/Assets(482253)/AssetDocuments/$entity",

"Id": 24277,

"AssetId": 482253,

"AssetTag": "0.5\"-BS-3500-125-CSI423",

"DocumentId": 37786,

"DocumentTypeId": 882,

"DocumentName": "_CE_SMART FORM (STP02)",

"DocumentDescription": "All Inspection Types for Smart Forms",

"DocumentType": "test",

"DocumentCategory": "Test Form",

"DocumentDiscipline": "MULTI",

"Revision": "0",

"FileId": null,

"PDFFileId": null,

"DocumentURL": null,

"IncludeInSteps": null,

"PDFFileSize": null,

"DataExchangeId": null,

"ExternalSourceId": null,

"FileName": null,

"PDFFileName": null,

"FileMimeType": null,

"PDFFileMimeType": null,

"RecordCreated": "2023-11-14T05:55:36.78Z",

"RecordCreatedBy": "Sai, Sai",

"RecordCreatedById": 1039,

"RecordLastModified": null,

"RecordLastModifiedBy": "Sai, Sai",

"RecordLastModifiedById": null,

"dtRemoved": null,

"RecordRemovedBy": null,

"RecordRemovedById": null,

"CompanyInstanceId": 2

}

Response parameters:

Response Parameter

Data Type

Description

@odata.context

String

Request URL.

Id

Integer

Smart Completions ID assigned to the asset upon linking to the document.

AssetId

Integer

Smart Completions ID for the asset.

AssetTag

String

Tag for the asset.

DocumentId

Integer

Smart Completions ID for the document to assign to the asset.

DocumentTypeId

Integer

Smart Completions ID for the document type.

DocumentName

String

Name of the document in Smart Completions.

DocumentDescription

String

Smart Completions description for the document to assign to the asset.

DocumentType

String

Smart Completions name for the type of the document identified by the DocumentTypeId.

DocumentCategory

String

Smart Completions name for the document category, for example mechanical, electrical, instrumentation, piping, or civil. Identified by DocumentCategoryId.

DocumentDiscipline

String

Smart Completions name for the document discipline, for example cable, civil, or electrical. Identified by DocumentDisciplineId.

Revision

String

Revision number of the version of the controlled document. A controlled document has version control through workflow and revisions.

FileId

Integer

ID of the non-PDF file attached to the document.

PDFFileId

Integer

ID of the PDF file attached to the document.

DocumentURL

String (Link)

The path used to retrieve the latest document from the system. Users with different programs to house the document can upload the URL into this field.

IncludeInSteps

Boolean

Read only. Indicates whether a document should be downloaded for offline use when using a mobile device.

PDFFileSize

Integer

Size of the PDF File attached to the asset.

DataExchangeId

Integer

Internal ID of the Smart Completions Data Exchange module. This module configures point-to-point integrations with external systems, such as HxGN SDx, Aconex, and Team Binder.

ExternalSourceId

Integer

Document ID from the external system. This can be different than what is imported or loaded into Smart Completions.

Usually, the Smart Completions document ID is the same as the external source document ID. But if they are not, you can use this field to find documents based on the external source ID.

FileName

String

Name of the non-PDF file attached to the asset document. Identified by FileID.

PDFFileName

String

Name of the PDF file attached to the asset document. Identified by PDFFileID.

FileMimeType

String

File type of the file identified by FileName, for example PDF, docx, or pid.

PDFFileMimeType

String

File type of the file identified by PDFFileName, for example PDF.

RecordCreated

String (Date)

Read only. Date when the document was assigned to the asset in Smart Completions. Captured by Smart Completions.

RecordCreatedBy

String

Read only. Smart Completions name for the user who assigned the document to the asset in Smart Completions. Captured by Smart Completions.

RecordCreatedById

Integer

Read only. Smart Completions ID for the user who assigned the document to the asset in Smart Completions. Captured by Smart Completions.

RecordLastModified

String (Date)

Read only. Date when the document assignment to an asset was last updated in Smart Completions. Captured by Smart Completions.

If the document assignment has not been updated since creation, this is the date the assignment was created.

RecordLastModifiedBy

String

Read only. Smart Completions name for the user who last updated the document assignment to an asset in Smart Completions. Captured by Smart Completions.

If the document assignment has not been updated since creation, this is the user who created the assignment.

RecordLastModifiedById

Integer

Read only. Smart Completions ID for the user who last updated the document assignment to an asset in Smart Completions. Captured by Smart Completions.

If the assignment has not been updated since creation, this is the user who created the assignment.

dtRemoved

String (Date)

Read only. Date when the document was removed from an asset in Smart Completions. Captured by Smart Completions.

RecordRemovedBy

String

Read only. Smart Completions name for the user who removed the document assignment to the asset in Smart Completions. Captured by Smart Completions.

RecordRemovedById

Integer

Read only. Smart Completions ID for the user who removed the document assignment to the asset in Smart Completions. Captured by Smart Completions.

CompanyInstanceId

Integer

Smart Completions ID for the Instance that contains the Project.