Skip to main content
 print this page

Generate a presigned URL for sample schema file upload

POST 

/datasets/samplefile

Generates an S3 presigned URL for uploading a sample schema file to a dataset in pending registration status.

This endpoint uses the same Lambda as POST /datasets/file. The behavior switches automatically based on RegistrationStatus:

  • When RegistrationStatus is pending, the upload targets the temp S3 bucket.
  • When RegistrationStatus is not pending, the behavior is identical to POST /datasets/file.

Validations skipped for pending datasets:

  • DatasetType does not need to be internal
  • DatasourceType does not need to be api
  • RegistrationStatus completed check is skipped

Validations still enforced:

  • Dataset must exist
  • Caller must have atleast editor access on the dataset
  • Resource-synced external s3athena datasets are blocked
  • Empty body field values are rejected (IPV-1001)
  • Redshift cluster availability is checked if dataset targets Redshift

PartitionKeys are not needed for sample schema uploads (the dataset is still pending and has no partition definitions yet).

File name handling:

  • Special characters are replaced with underscores for S3 key compliance (same as POST /datasets/file).

Request

Responses

Successfully generated S3 presigned URL for sample schema file upload

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers