Services API
Bookmark

DeltaV Services API

Most of the endpoints depends on various instances and are considered parameters for the actual endpoint, but these are not meant to be passed directly by the user.

Instead, these instance-dependent elements are integrated and managed directly by the backend system. We refer to them as *name_parameter, where the asterisk (*) is used to denote a specific instance-dependent parameter that the route relies on.

Mind that: to access these APIs, user must be authenticated and have the correct permissions.

Overview

The DeltaV Services API allows you to interact with the DeltaV backend, allowing you to interact with your agents and more.

Endpoints
POST /v1beta1/services
 
GET /v1beta1/services
 
GET /v1beta1/services/:service_id
 
PUT /v1beta1/services
 
DELETE /v1beta1/services/:service_id
 
POST /v1beta1/services/service-sg/
 
DELETE /v1beta1/services/service-sg/:service_id/:service_group_id

Create a service

Endpoint: POST /v1beta1/services

Request

Create a new service for a user authenticated through JWT.
  • Name
    agent
    Type
    string
    Description
    Address of agent.
  • Name
    name
    Type
    string
    Description
    Name of service.
  • Name
    description
    Type
    string
    Description
    Description of service.
  • Name
    protocolDigest
    Type
    string
    Description
    Digest of protocol associated with the agent.
  • Name
    modelDigest
    Type
    string
    Description
    Digest of model associated with the protocol.
  • Name
    modelName
    Type
    string
    Description
    Request model name and protocol name separated by a slash character.
  • Name
    fields
    Type
    JSON
    Description
    Properties of all request model fields as a list. Every element contains the name of the respective field, the fact that the field is required or not (true/false), the type of the field, and the description.
  • Name
    taskType
    Type
    string
    Description
    Type of the service. Can be task or subtask.
bash
curl \
-X POST \
-H Authorization: bearer <your token here> \nhttps://agentverse.ai/v1beta1/services \
-d '{"agent":"agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy","name":"Stock price service","description":"Retrieves the stock price of a share.","protocolDigest":"proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a","modelDigest":"model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2","modelName":"StockPrice/StocksProtocol","fields":[{"name":"symbol","required":true,"field_type":"string","description":"The symbol of the share, for example: AAPL, GOOG, MSFT, etc."}],"taskType":"task"}'

Responses

Returns the newly created Service object
json
{
  "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d",
  "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy",
  "name": "Stock price service",
  "description": "Retrieves the stock price of a share.",
  "category": null,
  "location": null,
  "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a",
  "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2",
  "modelName": "StockPrice/StocksProtocol",
  "fields": [
    {
      "name": "symbol",
      "required": true,
      "field_type": "string",
      "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc."
    }
  ],
  "taskType": "task",
  "created_at": "2023-10-22T21:28:46",
  "updated_at": "2023-10-22T21:28:46",
  "num_conversions": 0,
  "conversion_rate": 0,
  "uptime": 0
}

Get all services of a user

Endpoint: GET /v1beta1/services

Request

Retrieves all services of a user authenticated through JWT.
bash
curl \
-X GET \
-H Authorization: bearer <your token here> \nhttps://engine-canary.sandbox-london-b.fetch-ai.com/v1beta1/services

Responses

Returns a list of Service objects associated with the user
json
[
  {
    "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d",
    "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy",
    "name": "Stock price service",
    "description": "Retrieves the stock price of a share.",
    "created_at": "2023-10-22T21:28:46",
    "updated_at": "2023-10-22T21:28:46"
  },
  {
    "uuid": "ebfa27ec-c978-4109-bb77-9d1809e3b0f6",
    "agent": "agent1q0vmxjv06dwdlppuvspmfyff4ys2t4mdndpa09gulpsuq90n22xqy8k89l8",
    "name": "Flights service",
    "description": "Searches for flight offers.",
    "created_at": "2023-10-22T21:08:47",
    "updated_at": "2023-10-22T21:08:47"
  }
]

Fetch a service

Endpoint: GET /v1beta1/services/{service_id}

Request

Fetches a specific service of a user authenticated through JWT identified by the service_id.
bash
curl \
-X GET \
-H Authorization: bearer <your token here> \nhttps://engine-canary.sandbox-london-b.fetch-ai.com/v1beta1/services/{service_id}

Responses

Returns a service identified by a specific session_id.
json
{
  "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d",
  "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy",
  "name": "Stock price service",
  "description": "Retrieves the stock price of a share.",
  "category": null,
  "location": null,
  "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a",
  "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2",
  "modelName": "StockPrice/StocksProtocol",
  "fields": [
    {
      "name": "symbol",
      "required": true,
      "field_type": "string",
      "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc."
    }
  ],
  "taskType": "task",
  "created_at": "2023-10-22T21:28:46",
  "updated_at": "2023-10-22T21:28:46",
  "num_conversions": 0,
  "conversion_rate": 0,
  "uptime": 0
}

Update a service

Endpoint: PUT /v1beta1/services

Request

Update a service of a user authenticated through JWT.
  • Name
    uuid
    Type
    string
    Description
    Uuid of service in UUID4 format.
  • Name
    agent
    Type
    string
    Description
    Address of agent.
  • Name
    name
    Type
    string
    Description
    Name of service.
  • Name
    description
    Type
    string
    Description
    Description of service.
  • Name
    protocolDigest
    Type
    string
    Description
    Digest of protocol associated with the agent.
  • Name
    modelDigest
    Type
    string
    Description
    Digest of model associated with the protocol.
  • Name
    modelName
    Type
    string
    Description
    Request model name and protocol name separated my a slash character.
  • Name
    fields
    Type
    JSON
    Description
    Properties of all request model fields as a list. Every element contains the name of the respective field, the fact that the field is required or not (true/false), the type of the field, and the description.
  • Name
    taskType
    Type
    string
    Description
    Type of the service. Can be task or subtask.
  • Name
    created_at
    Type
    datetime
    Description
    The timestamp when the service was created. The timestamp is in ISO 8601 format.
  • Name
    updated_at
    Type
    datetime
    Description
    The timestamp when the service was updated. The timestamp is in ISO 8601 format.
  • Name
    num_conversions
    Type
    integer
    Description
    Number of conversions.
  • Name
    conversion_rate
    Type
    float
    Description
    Conversion rate.
  • Name
    uptime
    Type
    float
    Description
    Uptime.
bash
curl \
-X PUT \
-H Authorization: bearer <your token here> \nhttps://engine-canary.sandbox-london-b.fetch-ai.com/v1beta1/services \
-d '{"uuid":"37da66a9-9649-4b7a-9112-f461a2bd923d","agent":"agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy","name":"Stock price service modified name","description":"Retrieves the stock price of a share.","category":null,"location":null,"protocolDigest":"proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a","modelDigest":"model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2","modelName":"StockPrice/StocksProtocol","fields":[{"name":"symbol","required":true,"field_type":"string","description":"The symbol of the share, for example: AAPL, GOOG, MSFT, etc."}],"taskType":"task","created_at":"2023-10-22T21:28:46","updated_at":"2023-10-22T21:28:46","num_conversions":0,"conversion_rate":0,"uptime":0}'

Responses

Returns the updated Service object
json
{
  "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d",
  "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy",
  "name": "Stock price service modified name",
  "description": "Retrieves the stock price of a share.",
  "category": null,
  "location": null,
  "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a",
  "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2",
  "modelName": "StockPrice/StocksProtocol",
  "fields": [
    {
      "name": "symbol",
      "required": true,
      "field_type": "string",
      "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc."
    }
  ],
  "taskType": "task",
  "created_at": "2023-10-22T21:28:46",
  "updated_at": "2023-10-22T21:28:46",
  "num_conversions": 0,
  "conversion_rate": 0,
  "uptime": 0
}

Delete a service

Endpoint: DELETE /v1beta1/services/{service_id}

Request

Delete a specific service of a user authenticated through JWT identified by the service_id.
bash
curl \
-X DELETE \
-H Authorization: bearer <your token here> \nhttps://engine-canary.sandbox-london-b.fetch-ai.com/v1beta1/services/{service_id}

Responses

Returns an empty JSON object.
json
{}

Create a service-service group connection

Endpoint: POST /v1beta1/services/service-sg/

Request

Creates the connection between a service and a service group of a user authenticated through JWT.
  • Name
    service
    Type
    string
    Description
    Id of a service in UUID4 format.
  • Name
    serviceGroup
    Type
    string
    Description
    Id of a service group in UUID4 format.
bash
curl \
-X POST \
-H Authorization: bearer <your token here> \nhttps://engine-canary.sandbox-london-b.fetch-ai.com/v1beta1/services/service-sg/ \
-d '{"service":"beac0677-85fd-4bc5-820a-71038e355f2e","serviceGroup":"21d05673-3956-4d7d-81ef-8961b182fa37"}'

Responses

Returns the id of the service and the service group for which we created the connection.
json
{
  "service": "beac0677-85fd-4bc5-820a-71038e355f2e",
  "serviceGroup": "21d05673-3956-4d7d-81ef-8961b182fa37"
}

Delete a service-service group connection

Endpoint: DELETE /v1beta1/services/service-sg/{service_id}/{service_group_id}

Request

Deletes the connection between a service and a service group of a user authenticated through JWT.
bash
curl \
-X DELETE \
-H Authorization: bearer <your token here> \nhttps://engine-canary.sandbox-london-b.fetch-ai.com/v1beta1/services/service-sg/{service_id}/{service_group_id}

Responses

Returns an empty JSON object.
json
{}

Was this page helpful?

Bookmark