Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Asset Information Management

Simple File Upload

  • Last UpdatedOct 08, 2024
  • 4 minute read

Simple Upload is meant for uploading files of size 5 GB or smaller. The Ingestion API performs a simple upload in three basic steps:

  1. Initiate a transaction: While initiating a transaction, the user token is authenticated and authorized. When it is successfully authorized, the API returns a Transaction ID that is the unique identifier for this upload.

  2. Upload files: After Transaction ID is received, the user can now use this Transaction ID to upload files. Multiple files can be uploaded as a part of the same transaction. Every file must have a set of API request parameters defined in the section Ingestion API Request Parameters, that enable orchestration to understand the type of processing required for this file. Once it is successfully called, Ingestion API returns a pre-signed S3 URL for each file in the transaction. The actual file is then put into this pre-signed S3 URL.

    To upload files of size 5 GB or smaller, you can use the Simple Upload API. To upload files above the size 5 GB, you must use the Multipart Upload API.

  3. Complete the transaction: Once all the files are successfully uploaded into their respective S3 URLs, the transaction can now be closed.

For each of these steps, an endpoint has been created in the API. To perform these steps, the Ingestion API provides respective endpoints:

  • /api/load/init - Initiate a new transaction.

  • /api/load/uploadurl - Get S3 presigned URLs to upload files.

  • /api/load/complete - Complete the transaction.

This Load API internally has the following three calls in sequence:

A sequence diagram of: Initiate a new load, Get the redirect URL for uploading the file, and Complete the load.

Initiate a New Load

/api/load/init – Initiate a new load.

This endpoint returns a new Transaction ID to be used for the subsequent API calls.

HEADERS

You must pass the following two headers as described below:

  • Authorization

    You must pass a valid CONNECT Bearer JWT token.

  • Transaction ID

This is optional. You may pass the Transaction ID in the Header.

REQUEST BODY

Example Value

{

"assetId": "string"

}

Parameter

Description

Parameter type

Required

assetId

A valid asset/folder created in CONNECT account

string

Yes

RESPONSES

Code

Description

Media type

Response json

200

Success

application/json

{

"transactionId": "string"

}

400

Bad Request

application/json

{

"invalidParametersDetails": [

{

"parameterName": "string",

"parameterValue": "string",

"message": "string"

}

],

"details": "string",

"isRetryable": true

}

500

Server Error

application/json

{

"details": "string",

"isRetryable": true

}

Get the Upload URL

/api/load/uploadurl – Get the redirect URL for uploading the file.

This endpoint returns the redirect URL for uploading the file. The number of redirect URLs varies based on the number of files required to be uploaded.

Notes:

  • The redirect URL is valid for one hour only.

  • You must write your own code to upload your files depending on the redirect URL you have received.

Each load can have multiple files and you can call the API once or multiple times by providing details of one or more files in the Request Body and passing the appropriate headers.

HEADERS

You must pass the following two headers:

  • Authorization

    This is a valid CONNECT Bearer JWT token.

  • Transaction ID

    This is generated as part of the init API request.

REQUEST BODY

Example Value

[{

"target": "string",

"source": "string",

"publishOriginal": true,

"publishRendition": true,

"publishReference": true,

"documentIdentifier": "string",

"context": "string",

"additionalMetadata": {

"additionalProp1": "string",

"additionalProp2": "string",

"additionalProp3": "string"

},

"fileName": "string",

"registerIdentifier": "string"

}]

Parameter Type

Description

Parameter

Required

fileName

Name of the file

string

Yes

registerIdentifier

ISM Class Library

Register path to be used for data processing through the Registers Gateway.

string

Yes

context

When given, it is used as a subcontext.

string

No

target

Use any one of the following processing targets – CL, AC2D, Regi, DE, Model, MS2D.

Note:

  • CL – Class Library

  • AC2D – Gateway for 2D Data

  • Regi – The Registers Gateway

  • DE – Data Extractor Gateway

  • Model – 3D Model

  • MS2D – Gateway for 2D Data

string

Yes

source

The actual source information of the file.

string

No

publishOriginal

Whether the file needs to be published to AIM Advanced.

Boolean

Yes for 2D

No for 1D and 3D

publishRendition

Whether the rendition extracted out of a file needs to be published to AIM Advanced.

Boolean

Yes for 2D

No for 1D and 3D

publishReference

Whether the tags scraped off a file need to be published to AIM Advanced.

Boolean

Yes for 2D

No for 1D and 3D

documentIdentifier

This value is used to create the association between the current file and a document.

string

Yes for 2D

No for 1D and 3D

additionalMetadata

Currently not in use. In future, it can be used to add more properties when required.

string

No

RESPONSES

Code

Description

Media Type

Response Json

200

Success

application/json

[

{

"fileName": "string",

"registerIdentifier": "string",

"redirectUrl": "string",

"expires": 0

}

]

400

Bad Request

application/json

{

"invalidParametersDetails": [

{

"parameterName": "string",

"parameterValue": "string",

"message": "string"

}

],

"details": "string",

"isRetryable": true

}

500

Server Error

application/json

{

"details": "string",

"isRetryable": true

}

Complete the load

/api/load/complete – Complete the load.

This endpoint is used to either complete or abort the load which is started as part of the init API request.

When you choose to complete the load, the orchestration happens. When you choose to abort the load process, no orchestration happens.

HEADERS

You must pass the following two headers:

  • Authorization

    This is a valid CONNECT Bearer JWT token.

  • Transaction ID

    This is generated as part of the init API request.

REQUEST BODY

{

"status": "completed"

}

Parameter

Description

Parameter Type

Required

Status

It can either be completed or aborted

string

Yes

RESPONSES

Code

Description

Media Type

Response Json

200

Success

application/json

{

"receivedFilesCount": 0,

"receivedFilesCountIdentifier":

"string"

}

400

Bad Request

application/json

{

"invalidParametersDetails": [

{

"parameterName": "string",

"parameterValue": "string",

"message": "string"

}

],

"details": "string",

"isRetryable": true

}

500

Server Error

application/json

{

"details": "string",

"isRetryable": true

}

TitleResults for “How to create a CRG?”Also Available in