API Documentation
Overview
Python SDK Reference
End to End example
List custom tools
Get a custom tool
Create a custom tool
Update a custom tool
Delete a custom tool
Create a source upload
Build a custom tool
List build logs
Cancel a custom tool build
Run a custom tool
Publish a custom tool version
List custom tool versions
Build a custom tool
/api/custom-tools/{name}/buildBuild a version from an uploaded source archive. The archive also updates the tool’s editable source and configuration. Returns immediately with the new or reused version and its current status.
tool.build(source_dir)Builds progress through Queued, Running, and then Complete or Stopped. The build response includes the version string at version.version, such as v1. Use this string when checking build status or logs, cancelling or publishing the build, and when submitting a job.
Parameters
namepathrequiredThe custom tool name.
Idempotency-KeyheaderoptionalRetries the same build request without admitting duplicate work. Reusing a key with different source or runtime facts returns 409 Conflict.
uploadIdbodystringrequiredThe uploadId returned when the source upload was created.
HTTP Response Status Codes
| Status code | Description |
|---|---|
| 202 | The admitted Version. |
| 401 | API key missing or invalid. |
| 404 | The addressed resource does not exist, or is not visible to your tenant. |
| 409 | The request conflicts with current resource state. |
| 412 | A supplied request condition did not match the current resource. Fetch the resource again before retrying. |
| 422 | The request was malformed or failed validation; see `errors` for the offending fields. |
1import requests
2
3api_key = "***************"
4url = "https://app.tamarind.bio/api/custom-tools/your-name/build"
5headers = {"x-api-key": api_key}
6
7payload = {
8 "uploadId": "string"
9}
10resp = requests.post(url, headers=headers, json=payload)
11print(resp.status_code, resp.json())Response
1{
2 "action": "build",
3 "version": "v1"
4}