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
RegistrationStatusispending, the upload targets the temp S3 bucket. - When
RegistrationStatusis notpending, 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
completedcheck 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
- 200
- 300
- 400
- 500
Successfully generated S3 presigned URL for sample schema file upload
Response Headers
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Permanent or Temporary redirect errors
Response Headers
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Invalid input - dataset not found, empty body field, missing editor access, or resource-synced external s3athena dataset
Response Headers
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Unexpected internal error during presigned URL generation
Response Headers
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers