Upload Artifact
Upload a single artifact to the lake through your ramp.Endpoint
Request
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
X-API-Secret | Yes | Your API secret |
Content-Type | Yes | Must be application/json |
X-Idempotency-Key | No | Unique key to prevent duplicate uploads |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | Yes | ID of the artifact type template |
locks | object | Yes | Lock values and weights |
threshold | integer | Yes | Minimum score for access (1-100) |
content | string | Yes | Base64-encoded file content |
content_type | string | No | MIME type (default: application/pdf) |
Locks Object
Each lock in the object should have:| Parameter | Type | Required | Description |
|---|---|---|---|
value | string/number | Yes | The lock value |
weight | integer | No | Override template weight |
Example Request
Response
Success (201 Created)
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique artifact identifier |
status | string | Current status: active, processing, revoked |
template_id | string | Template used |
template_name | string | Template name |
locks | object | Lock values and weights |
threshold | integer | Access threshold |
created_at | string | Upload timestamp |
Error Responses
Validation Error (422)
Template Not Found (404)
Missing Required Lock (422)
Idempotency
Use theX-Idempotency-Key header to prevent duplicate uploads:
Code Examples
Node.js
Python
Related Endpoints
- Batch Upload - Upload multiple artifacts
- Get Artifact - Get artifact details
- Revoke Artifact - Revoke an artifact