Tool

Manage Tools

Listing tools

get

Retrieves tools based on the provided query.

Required scopes

  • ai.agent_read

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

Query parameters
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard Practices - Query parameter

pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Responses
200

List of tools.

application/json
get
/ai-service/{tenant}/agentic/tools
GET /ai-service/{tenant}/agentic/tools HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "slack-1",
    "name": "Slack Native Tool",
    "type": "slack",
    "config": {
      "teamId": "12345"
    }
  }
]

Searching tools

post

Searches for tools based on the provided query.

Required scopes

  • ai.agent_read

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

Query parameters
pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Body
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard Practices - Query parameter

Responses
200

List of tools.

application/json
post
/ai-service/{tenant}/agentic/tools/search
POST /ai-service/{tenant}/agentic/tools/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "q": "name:~Support"
}
[
  {
    "id": "slack-1",
    "name": "Slack Native Tool",
    "type": "slack",
    "config": {
      "teamId": "12345"
    }
  }
]

Retrieving tool by ID

get

Retrieves the tool by given ID.

Required scopes

  • ai.agent_read

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

toolIdstringRequired
Query parameters
fieldsstringOptional

Fields to be returned in the response.

Responses
200

A single tool.

application/json
Responseone of
all ofOptional
get
/ai-service/{tenant}/agentic/tools/{toolId}
GET /ai-service/{tenant}/agentic/tools/{toolId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "slack-1",
  "name": "Slack Native Tool",
  "type": "slack",
  "config": {
    "teamId": "12345"
  }
}

Upserting tool

put

Updates or creates a specified tool by replacing all of its existing data with data from the request body. If the metadata.version is provided then optimistic locking is enabled and version must match the version in the database.

Required scopes

  • ai.agent_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

toolIdstringRequired
Body
one ofOptional
all ofOptional
Responses
201

ID of created tool.

application/json
put
/ai-service/{tenant}/agentic/tools/{toolId}
PUT /ai-service/{tenant}/agentic/tools/{toolId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "name": "Slack Native Tool",
  "type": "slack",
  "config": {
    "teamId": "12345",
    "botToken": "xoxb-35354"
  }
}
{
  "id": "a81bc81b-dead-4e5d-abff-90865d1e13b1"
}

Deleting tool

delete

Deletes tool by given ID.

Important: If tool is being used by an agent then delete operation is not possible without force flag set to true.

Required scopes

  • ai.agent_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

toolIdstringRequired
Query parameters
forcebooleanOptional

Allows you to remove a given entity even if it is used as a dependency in other entries. In that case, the removed entity is unassigned from other entries.

Example: false
Responses
204

Given tool has been deleted.

No content

delete
/ai-service/{tenant}/agentic/tools/{toolId}
DELETE /ai-service/{tenant}/agentic/tools/{toolId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Partially updating tool

patch

Partially updates a single tool document with given information. Single update may contain multiple partial updates in the form of an array. It contains the allowed operations list:

  • add (adding an item to the items list)

  • remove (removing an item from the items list)

  • replace (replacing an item with given ID with new definition)

Required scopes

  • ai.agent_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

toolIdstringRequired
Bodyobject[]

Partial update operation list.

opany ofRequired
undefined · enumOptionalPossible values:
pathstringRequiredExample: /name
valueany ofOptional
stringOptional

Value of the string type.

or
objectOptional

Any part of the details object.

Responses
204

No Content

No content

patch
/ai-service/{tenant}/agentic/tools/{toolId}
PATCH /ai-service/{tenant}/agentic/tools/{toolId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 125

[
  {
    "op": "REPLACE",
    "path": "/config/botToken",
    "value": "New bot token"
  },
  {
    "op": "REPLACE",
    "path": "/name",
    "value": "New slack name"
  }
]

No content

Last updated

Was this helpful?