10. Upload Token API

The Upload Token API allows third party applications to use the Aperture backend to process and upload datasets. For this, the Upload Token API hands out tokens that allow third party applications to process and upload data without further user authentication.

The basic flow:

  • Third party (TP) web backend requests a token for a specific user and a specific project via the /management/provision/uploadtoken interface.
  • TP web backend provides token to TP web frontend / end user
  • TP web frontend / end user posts a dataset upload together with the token to Aperture
  • Aperture checks token validity and if valid accepts dataset upload for processing.

Validity checks include:

  • Token validity, a token can be used once, and only within a timed window
  • Is the user a known user; checked at emission and upload
  • Does the user have owner rights on a preprovisioned project; checked at emission and upload

10.1. Methods

10.1.1. /-/token/dataset_import

10.1.1.1. POST

Define a new Aperture dataset.

Values in the body:

  • token (String)
    A token retrieved via the management token API. This token communicates the associated preprovisioned Aperture project, and a user with the authorisation to upload within that project.
  • file_csv (File)
    CSV file sent as multipart/form-data inside the post
  • file_def (File)
    Table definition file sent as multipart/form-data inside the post

Response:

A JSON object that contains the status of the import.

Status Code:

  • 200 - Dataset import succeeded
  • 500 - Any server failure

Depending on the context the response body may contain more details about errors.

10.1.1.2. OPTIONS

Response: json

10.1.2. /-/token/ephemeral_dataset_import

10.1.2.1. POST

Define a new Aperture dataset.

Datasets processed using this entrypoint are ephemeral. After processing all knowledge about this dataset is dropped from Aperture. This is useful in situations where an enterprise wants to apply a preset policy on a dataset without that dataset becoming available for further use inside Aperture.

Values in the body:

  • token (String)
    A token retrieved via the management token API. This token communicates the associated preprovisioned Aperture project, and a user with the authorisation to upload within that project.
  • file_csv (File)
    CSV file sent as multipart/form-data inside the post
  • file_def (File)
    Table definition file sent as multipart/form-data inside the post

Response:

A JSON object that contains the status of the import.

Status Code:

  • 200 - Dataset import succeeded
  • 500 - Any server failure

Depending on the context the response body may contain more details about errors.

10.1.2.2. OPTIONS

Response: json

10.1.3. /-/token/external_dataset_import

10.1.3.1. POST

Define a new Aperture dataset to be reachable via an external uuid.

Datasets processed using this entrypoint will be available for reuse via a url by authorized users.

Note that the dataset will be subjected to the proscribed deidentification before storage in Aperture.

Values in the body:

  • token (String)

    A token retrieved via the management token API. This token communicates the associated preprovisioned Aperture project, and a user with the authorisation to upload within that project.

  • file_csv (File)

    CSV file sent as multipart/form-data inside the post

  • file_def (File)

    Table definition file sent as multipart/form-data inside the post

    This definition must contain a CatalogueIdentifier.Uuid that provides the unique external identifier for this dataset.

Response:

A JSON object that contains the status of the import.

Status Code:

  • 200 - Dataset import succeeded
  • 500 - Any server failure

Depending on the context the response body may contain more details about errors.

10.1.3.2. OPTIONS

Response: json