API ReferenceBuckets
Send To
Send a bucket file to a model, classifier, or splitter for processing
POST
/api/v1/buckets/{bucketId}/files/{fileId}/send-toSends a file from a bucket to a model, classifier, or splitter for processing. Optionally keeps the file in the bucket after sending.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
bucketId | string | path | Yes | The bucket ID |
fileId | string | path | Yes | The file ID |
targetType | string | body | Yes | Target type: DEPLOYMENT, CLASSIFIER, or SPLITTER |
targetId | string | body | Yes | ID of the target model, classifier, or splitter. DEPLOYMENT takes a model ID. |
keepInBucket | boolean | body | No | Keep the file in the bucket after sending(default: false) |
Request
const res = await fetch(
"https://app.limai.io/api/v1/buckets/bkt_abc123/files/file_001/send-to",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
targetType: "DEPLOYMENT",
targetId: "dep_001",
keepInBucket: true,
}),
}
);Response
sent counts the files that reached the target; errors carries one message per file that did not.
Response200
{
"sent": 1,
"errors": []
}