Skip to main content
Back to API List This API imports a new tool by providing the necessary file IDs, ensuring all the necessary configurations, including the tool’s flow data, app definitions, and environment variables are correctly imported. After triggering the import, the response returns a dockStatusId. Use this ID to call the Get Dock Status API and verify the successful import of the tool. To import a tool, follow the steps below:
  1. Upload Files: Use the File Upload API to upload the files for the flow definition, app definition, and environment variables. Learn more. This API returns unique file IDs for each file.
  2. Import the Tool: Call the Import Tools API using the retrieved file IDs along with the tool name.
  3. Track import Status: The API response returns a dockStatusId that helps monitor the import progress using the Get Dock Status API.
MethodPOST
Endpointhttps://{host}/api/public/tools/import
Content Typeapplication/json
AuthorizationX-api-key - The API key used for authentication.
Where can I find the API key? To use the API, you will need an API key. Learn more.

Query Parameters

PARAMETERDESCRIPTIONTYPEREQUIRED/OPTIONAL
hostThe environment URL. For example, https://agent-platform.domain.ai/StringRequired

Sample Request

curl --location 'https://{host}/api/public/tools/import' 
--header 'x-api-key: kg-90xxxxx5-9xxe-5xxf-9xx7-9xxxxxxxxxx4-55xxxxx4-axx9-4xx2-axx2-fxxxxxxxxxxa' 
--header 'Content-Type: application/json' 
--data '{
    "toolDataFileId": "67bxxxxxxxxxxxxxxxxxxxxc",
    "flowDataFileId": "67bxxxxxxxxxxxxxxxxxxxx2",
    "envVariablesFileId": "67bxxxxxxxxxxxxxxxxxxxxx2",
    "toolName":"Staging Tool"
}'

Body Parameters

PARAMETERDESCRIPTIONTYPEREQUIRED/OPTIONAL
toolDataFileIdThe file ID for the tool data file.StringRequired
flowDataFileIdThe file ID for the flow data file.StringRequired
envVariablesFileIdThefile IDfor the environment variablesStringOptional
toolNameThe name of the tool.StringRequired

Sample Response

{
   "dockStatusId": "{dockStatusId}",
   "toolId": "{toolId}",
   "jobType": "TOOLS",
   "action": "IMPORT",
   "status": "IN_PROGRESS"
}

Response Parameters

PARAMETERDESCRIPTIONTYPESAMPLE VALUE
dockStatusIdThe unique identifier to track the status of the import action.StringExample: ds-cxxxxxx5-dxxd-5xxf-9xxd-0xxxxx6c5xx8
toolIdThe unique identifier for the tool.StringExample: a-8xxxxxxe-6xxe-5xx1-8xxc-b3xxxxx80xx6
jobTypeThe type of job being performed.StringTOOLS
actionThe action that’s performed on the tool/model.StringIMPORT
statusThe current status of the job.StringIN_PROGRESS, SUCCESS, or FAILED