Saltar al contenido principal
POST
/
v1
/
integration
/
{integration_id}
/
tool
Create HTTP tool
import requests

url = "https://api.diga.io/v1/integration/{integration_id}/tool"

payload = {
    "name": "<string>",
    "description": "<string>",
    "endpoint_path": "<string>",
    "method": "GET",
    "query": [],
    "body": [],
    "headers": {},
    "timeout": 5,
    "approval_required": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "headers": {},
  "method": "GET",
  "type": "HTTP",
  "description": "<string>",
  "endpoint_path": "<string>",
  "query": [],
  "body": [],
  "timeout": 5,
  "approval_required": false
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

integration_id
string<uuid>
requerido

Integration ID

Cuerpo

application/json
name
string
requerido

The name of the tool

description
string
requerido

The description given to the agent to understand the tool

endpoint_path
string
requerido

The URL to the endpoint of the tool

method
enum<string>
requerido

The HTTP method for the tool

Opciones disponibles:
GET,
POST,
PUT,
DELETE,
PATCH
query
QueryParamSchema · object[] | null

The query parameters for the tool

body
BodyParamSchema · object[] | null

The body parameters for the tool

headers
Headers · object

The headers for the tool

timeout
integer | null
predeterminado:5

Timeout for the API to send a response

approval_required
boolean
predeterminado:false

If true, the agent will ask for confirmation before executing

Respuesta

Successful Response

id
string<uuid>
requerido

The unique identifier for the tool

name
string
requerido

The name of the tool

headers
Headers · object
requerido

The headers for the tool

method
enum<string>
requerido

The HTTP method for the tool

Opciones disponibles:
GET,
POST,
PUT,
DELETE,
PATCH
type
string
predeterminado:HTTP
Allowed value: "HTTP"
description
string | null

The description given to the agent to understand the tool

endpoint_path
string | null

The URL to the endpoint of the tool

query
QueryParamSchema · object[] | null

The query parameters for the tool

body
BodyParamSchema · object[] | null

The body parameters for the tool

timeout
integer | null
predeterminado:5

Timeout for the API to send a response

approval_required
boolean
predeterminado:false

If true, the agent will ask for confirmation before executing