Skip to content

Presigned Upload Request ​

To upload a file into the Aplos NCA SaaS system, you will need to create a request for an AWS Presigned URL, which will allow you to upload the file. You will use the response information to upload your file.

Route ​

The final routes are subject to change before Go-Live Summer 2024

The following applies to EARLY ACCESS prior to Go Live.

Some of our routes will be changing prior to our final go-live date this summer (2024). They won't change during Early Access, but be sure to check the documentation.

In order to make a smooth tranistion, we'll provide detailed information on which routes changed and which remained the same. As a good programming practice, you store the routes in a central library for easier migration.

Older routes may be kept active for short period of time to help with any transitions.

Endpoint URL
Method Type
https://api.<tenant>.aplos-nca.com/tenants/{tenant-id}/users/{user-id}/nca/files
POST

Payload ​

In the payload you will need to specify two fields.

NameDescription
file_nameThe name of the file. Whatever you enter here will be name of the file stored in our system. Typically you will name this the same as the actual file name, but you have an opportunity to override it here.
method_typepost
json
{
    
    "file_name": "<file-name>",
    "method_type": "post"
}

Response ​

The response will contain a decent amount of information that you will need to carry along for the next steps.

Fields needed for the File Upload Process ​

In the next section, we'll cover the process of uploading a file. You will need the following fields during that process.

NameDescription
urlThe endpoint for the file upload
fieldsAll the necessary fields you'll need to submit in the body of the payload (along with the file)

Fields needed when submitting an Analysis for an Execution ​

Later after the file is uploaded, you will want to run an execution. Part of the payload to start an execution is the file location in S3. You will need the bucket name and object key which can be found in this payload.

Example with 🐍 Python ​

This code sample wraps up the process of requesting the pre-signed URL and doing the upload.

For this section, we'll focus on def __get_presigned_upload_info(self, input_file: str) -> S3PresignedPayload:, which generates the request.

The result of the request is then handed off to another python modulewhich processes the resulting payload and creates aform` upload object for uploading