Teams
Overview
Use the Teams API call to create, update, retrieve, and delete AI teams. With this REST API, you can do the following:
Using the namespace filter
Note: The
nsfilter(namespace filter) query parameter is mandatory for every API request. It sets the context, helping you look up resources within that namespace.
Example:
GET /aisvc/api/v1/teams?nsfilter=your_namespace
Create Teams
Endpoint
POST /aisvc/api/v1/teams
Request
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Filter by namespace. | Required |
Body parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Name of the team. | Required |
_namespaces | Array of String | Namespaces to include. | Required |
_agents | Array of Object | List of agents with _userType. | Required |
_flow | Array of Object | Defines the team flow. | Required |
Body example
{
"_name": "The BIM Analyst",
"_namespaces": ["testproject_Lik2UwIN"],
"_agents": [{ "_userType": "bim_analyst" }],
"_flow": [
{ "from": "__start__", "to": "bim_analyst" },
{ "from": "bim_analyst", "to": "__end__" }
]
}
Response codes
| Code | Description |
|---|---|
200 | Success |
Update Teams
Endpoint
POST /aisvc/api/v1/teams
Request
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Filter by namespace. | Required |
Body parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Name of the team. | Required |
_agents | Array of Object | List of agents with _userType. | Required |
_flow | Array of Object | Defines the team flow. | Required |
_namespaces | Array of String | Namespaces to include. | Required |
_id | String | ID of the team (for update). | Required when updating |
Body example
{
"_name": "The BIM Analyzer",
"_agents": [
{
"_userType": "bim_analyst"
}
],
"_flow": [
{ "from": "__start__", "to": "bim_analyst" },
{ "from": "bim_analyst", "to": "__end__" }
],
"_namespaces": ["testproject_Lik2UwIN"],
"_id": "1e82300b-f8e9-410d-a89b-c14b104e464c"
}
Response codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Get Teams
Endpoint
GET /aisvc/api/v1/teams
Request
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Filter by namespace. | Required |
offset | Number | Offset for pagination. | Optional |
pagesize | Number | Number of results per page. | Optional |
Response codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
Response data example
{
"_offset": 2,
"_pageSize": 2,
"_total": 10,
"_list": [
{
"id": "f1deea65-7b9d-4678-96c7-7094be0becde",
"_name": "The BIM Analyzer",
"_agents": [
{ "_userType": "bim_analyst" }
],
"_flow": [
{ "from": "__start__", "to": "bim_analyst" },
{ "from": "bim_analyst", "to": "__end__" }
],
"_namespaces": ["testproject_Lik2UwIN"]
}
]
}
Get Teams by ID
Endpoint
GET /aisvc/api/v1/teams/{id}
Request
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | ID of the team. | Required |
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Filter by namespace. | Required |
Response codes
| Code | Description |
|---|---|
200 | Success |
404 | Not Found |
Response data example
{
"id": "f1deea65-7b9d-4678-96c7-7094be0becde",
"_name": "The BIM Analyzer",
"_agents": [
{ "_userType": "bim_analyst" }
],
"_flow": [
{ "from": "__start__", "to": "bim_analyst" },
{ "from": "bim_analyst", "to": "__end__" }
],
"_namespaces": ["testproject_Lik2UwIN"]
}
Delete Teams by ID
Endpoint
DELETE /aisvc/api/v1/teams/{id}
Request
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | ID of the team. | Required |
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Filter by namespace. | Required |
Response codes
| Code | Description |
|---|---|
204 | Success |
404 | Not Found |