Amigo Dynamic Behavior Set API
The Dynamic Behavior Set API from Amigo — 5 operation(s) for dynamic behavior set.
The Dynamic Behavior Set API from Amigo — 5 operation(s) for dynamic behavior set.
openapi: 3.1.0
info:
title: Amigo Account Dynamic Behavior Set API
version: 0.1.0
servers:
- url: https://api.amigo.ai
- url: https://internal-api.amigo.ai
- url: https://api-eu-central-1.amigo.ai
- url: https://api-ap-southeast-2.amigo.ai
- url: https://api-ca-central-1.amigo.ai
security:
- Bearer-Authorization: []
Bearer-Authorization-Organization: []
Basic: []
tags:
- name: Dynamic Behavior Set
paths:
/v1/{organization}/dynamic_behavior_set/:
post:
tags:
- Dynamic Behavior Set
summary: Create a dynamic behavior set
description: 'Create a new dynamic behavior set as well as its initial version.
#### Permissions
This endpoint requires the following permissions:
* `DynamicBehaviorInstruction:CreateDynamicBehaviorInstruction` on the set to create.
* `DynamicBehaviorInstruction:UpdateDynamicBehaviorInstruction` on the set to create.'
operationId: create-dynamic-behavior-set
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__create_dynamic_behavior_set__Request'
responses:
'201':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__create_dynamic_behavior_set__Response'
'422':
description: Invalid request path parameter or request body failed validation.
'404':
description: The specified organization, service, or tool does not exist.
'409':
description: If the initial version is defined and `is_active` is set to `True`, an active dynamic behavior set with the same name already exists.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 200 requests per minute for this endpoint.
get:
tags:
- Dynamic Behavior Set
summary: Get dynamic behavior sets
description: 'Retrieve dynamic behavior sets that match the given filters.
#### Permissions
This endpoint may be impacted by the following permissions:
* Only dynamic behavior sets that the authenticated user has `DynamicBehaviorInstruction:GetDynamicBehaviorInstruction` permission for will be retrieved.'
operationId: get-dynamic-behavior-sets
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: id
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
pattern: ^[a-f0-9]{24}$
description: The IDs of the dynamic behavior sets to retrieve.
default: []
title: Id
description: The IDs of the dynamic behavior sets to retrieve.
- name: limit
in: query
required: false
schema:
type: integer
maximum: 50
minimum: 0
description: The maximum number of dynamic behavior sets to return.
default: 50
title: Limit
description: The maximum number of dynamic behavior sets to return.
- name: continuation_token
in: query
required: false
schema:
type: integer
description: The continuation token to use to retrieve the next set of dynamic behavior sets.
default: 0
title: Continuation Token
description: The continuation token to use to retrieve the next set of dynamic behavior sets.
- name: is_active
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
description: Whether the dynamic behavior set is active.
title: Is Active
description: Whether the dynamic behavior set is active.
- name: applied_to_service
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
pattern: ^[a-f0-9]{24}$
description: The IDs of the services that the dynamic behavior set is applied to.
default: []
title: Applied To Service
description: The IDs of the services that the dynamic behavior set is applied to.
- name: creator
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
description: The creators of the dynamic behavior sets.
default: []
title: Creator
description: The creators of the dynamic behavior sets.
- name: tag
in: query
required: false
schema:
type: array
items:
type: string
description: The tags of the dynamic behavior sets. Must be specified using the syntax `key:value`, which means to match all sets with the given `key` and `value` pair among its tags. If `value` is `*`, it means the `value` does not matter. If `value` is empty, it matches against when the value is `None`.
default: []
title: Tag
description: The tags of the dynamic behavior sets. Must be specified using the syntax `key:value`, which means to match all sets with the given `key` and `value` pair among its tags. If `value` is `*`, it means the `value` does not matter. If `value` is empty, it matches against when the value is `None`.
- name: sort_by
in: query
required: false
schema:
type: array
items:
type: string
description: The fields to sort the sets by. Supported fields are `updated_at`. Specify a `+` before the field name to indicate ascending sorting and `-` for descending sorting. Multiple fields can be specified to break ties.
default: []
title: Sort By
description: The fields to sort the sets by. Supported fields are `updated_at`. Specify a `+` before the field name to indicate ascending sorting and `-` for descending sorting. Multiple fields can be specified to break ties.
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
responses:
'200':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__get_dynamic_behavior_sets__Response'
'404':
description: Specified organization is not found.
'422':
description: Invalid request path parameter or request query parameter failed validation.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 500 requests per minute for this endpoint.
/v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/:
delete:
tags:
- Dynamic Behavior Set
summary: Delete a dynamic behavior instruction
description: 'Delete a dynamic behavior set.
#### Permissions
This endpoint requires the following permissions:
* `DynamicBehaviorInstruction:DeleteDynamicBehaviorInstruction` on the dynamic behavior set to delete.'
operationId: delete-dynamic-behavior-instruction
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: dynamic_behavior_set_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the dynamic behavior set to delete.
title: Dynamic Behavior Set Id
description: The ID of the dynamic behavior set to delete.
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
responses:
'200':
description: Succeeded.
content:
application/json:
schema: {}
'422':
description: Invalid request path parameter failed validation.
'404':
description: The specified organization or dynamic behavior set does not exist.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 500 requests per minute for this endpoint.
post:
tags:
- Dynamic Behavior Set
summary: Update a dynamic behavior set
description: 'Update a dynamic behavior set.
#### Permissions
This endpoint requires the following permissions:
* `DynamicBehaviorInstruction:UpdateDynamicBehaviorInstruction` on the dynamic behavior set to update.'
operationId: update-dynamic-behavior-set
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: dynamic_behavior_set_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the dynamic behavior set to delete.
title: Dynamic Behavior Set Id
description: The ID of the dynamic behavior set to delete.
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__update_dynamic_behavior_set__Request'
responses:
'204':
description: Succeeded.
'422':
description: Invalid request path parameter or request body failed validation.
'404':
description: The specified organization, dynamic behavior set, or service does not exist.
'409':
description: Another active set with the same name already exists.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 500 requests per minute for this endpoint.
/v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/version/:
post:
tags:
- Dynamic Behavior Set
summary: Create a new version of a dynamic behavior set.
description: 'Create a new version of the given dynamic behavior set.
#### Permissions
This endpoint requires the following permissions:
* `DynamicBehaviorInstruction:UpdateDynamicBehaviorInstruction` on the dynamic behavior set to create a new version for.'
operationId: create-dynamic-behavior-set-version
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: dynamic_behavior_set_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the dynamic behavior set to delete.
title: Dynamic Behavior Set Id
description: The ID of the dynamic behavior set to delete.
- name: version
in: query
required: false
schema:
anyOf:
- type: integer
exclusiveMinimum: 1
- type: 'null'
description: The version number of the new version. If specified, this endpoint throws an error if the next version in the database doesn't equal to the value of this parameter.
title: Version
description: The version number of the new version. If specified, this endpoint throws an error if the next version in the database doesn't equal to the value of this parameter.
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__create_dynamic_behavior_set_version__Request'
responses:
'201':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__create_dynamic_behavior_set_version__Response'
'422':
description: Invalid request path parameter, request query parameter, or request body failed validation.
'404':
description: The specified organization, dynamic behavior set, or tool does not exist.
'400':
description: The specified version number is not the expected next version to be created.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 200 requests per minute for this endpoint.
get:
tags:
- Dynamic Behavior Set
summary: Get dynamic behavior set versions
description: 'Get the versions of a dynamic behavior set.
#### Permissions
This endpoint requires the following permissions:
* `DynamicBehaviorInstruction:GetDynamicBehaviorInstruction` for the dynamic behavior set to retrieve.'
operationId: get-dynamic-behavior-set-versions
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: dynamic_behavior_set_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the dynamic behavior set.
title: Dynamic Behavior Set Id
description: The ID of the dynamic behavior set.
- name: version
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'The versions of the dynamic behavior set to retrieve. One can specify an exact version to retrieve, which is either the version number or `latest`,
which retrieves the latest version. Alternatively, one can specify a range of inclusive lower and upper bound for the version number separated by `-`,
and every version within the range would be retrieved.'
examples:
- '1'
- 1-latest
- 2-5
- latest
title: Version
description: 'The versions of the dynamic behavior set to retrieve. One can specify an exact version to retrieve, which is either the version number or `latest`,
which retrieves the latest version. Alternatively, one can specify a range of inclusive lower and upper bound for the version number separated by `-`,
and every version within the range would be retrieved.'
- name: limit
in: query
required: false
schema:
type: integer
maximum: 10
exclusiveMinimum: 0
description: The maximum number of dynamic behavior set versions to return.
default: 10
title: Limit
description: The maximum number of dynamic behavior set versions to return.
- name: continuation_token
in: query
required: false
schema:
type: integer
description: The continuation token from the previous request used to retrieve the next page of dynamic behavior set versions.
default: 0
title: Continuation Token
description: The continuation token from the previous request used to retrieve the next page of dynamic behavior set versions.
- name: sort_by
in: query
required: false
schema:
type: array
items:
type: string
description: 'The fields to sort the versions by. Supported fields are `version`. Specify a `+` before the field name to indicate ascending sorting and `-`
for descending sorting. Multiple fields can be specified to break ties.'
default: []
title: Sort By
description: 'The fields to sort the versions by. Supported fields are `version`. Specify a `+` before the field name to indicate ascending sorting and `-`
for descending sorting. Multiple fields can be specified to break ties.'
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
responses:
'200':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__get_dynamic_behavior_set_versions__Response'
'404':
description: Specified organization or dynamic behavior set is not found.
'422':
description: Invalid request path parameter or request query parameter failed validation.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 1000 requests per minute for this endpoint.
/v1/{organization}/dynamic_behavior_set/search:
get:
tags:
- Dynamic Behavior Set
summary: Search dynamic behavior sets
description: 'Search for dynamic behavior sets that match the given filters and contain the given query in its name and the triggers of its latest version. Only the top 50 results will be returned. The results
will be sorted by the relevance of the search query.
#### Permissions
This endpoint may be impacted by the following permissions:
* Only dynamic behavior sets that the authenticated user has `DynamicBehaviorInstruction:GetDynamicBehaviorInstruction` permission for will be retrieved.'
operationId: search-dynamic-behavior-sets
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: query
in: query
required: true
schema:
$ref: '#/components/schemas/amigo_lib__pydantic__base_model__StrippedNonemptyString__1'
description: The query to search for. Any sets containing the terms in its name and the triggers of its latest version would be returned.
description: The query to search for. Any sets containing the terms in its name and the triggers of its latest version would be returned.
- name: is_active
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
description: Whether the dynamic behavior set is active.
title: Is Active
description: Whether the dynamic behavior set is active.
- name: applied_to_service
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
pattern: ^[a-f0-9]{24}$
description: The IDs of the services that the dynamic behavior set is applied to.
default: []
title: Applied To Service
description: The IDs of the services that the dynamic behavior set is applied to.
- name: creator
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
description: The creators of the dynamic behavior sets. Each value must be of the format `org_id,user_id`.
default: []
title: Creator
description: The creators of the dynamic behavior sets. Each value must be of the format `org_id,user_id`.
- name: tag
in: query
required: false
schema:
type: array
items:
type: string
description: 'The tags of the dynamic behavior sets. Must be specified using the syntax `key:value`, which means to match all sets with the given `key` and `value` pair among its tags.
If `value` is `*`, it means the `value` does not matter. If `value` is empty, it matches against when the value is `None`.'
default: []
title: Tag
description: 'The tags of the dynamic behavior sets. Must be specified using the syntax `key:value`, which means to match all sets with the given `key` and `value` pair among its tags.
If `value` is `*`, it means the `value` does not matter. If `value` is empty, it matches against when the value is `None`.'
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
responses:
'200':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__search_dynamic_behavior_sets__Response'
'404':
description: Specified organization is not found.
'422':
description: Invalid request path parameter or request query parameter failed validation.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 50 requests per minute for this endpoint.
/v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/invocation/:
get:
tags:
- Dynamic Behavior Set
summary: Get dynamic behavior invocations
description: 'Retrieve the dynamic behavior invocations for a dynamic behavior set.
#### Permissions
This endpoint requires the following permissions:
* `DynamicBehaviorInstruction:GetDynamicBehaviorInstruction` for the dynamic behavior set.
This endpoint is impacted by the following permissions:
* Only invocations from messages that the authenticated user has the `Conversation:GetMessage` permission for are returned.'
operationId: get-dynamic-behavior-invocations
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: dynamic_behavior_set_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the dynamic behavior set.
title: Dynamic Behavior Set Id
description: The ID of the dynamic behavior set.
- name: limit
in: query
required: false
schema:
type: integer
maximum: 30
exclusiveMinimum: 0
description: The maximum number of dynamic behavior invocations to return.
default: 30
title: Limit
description: The maximum number of dynamic behavior invocations to return.
- name: continuation_token
in: query
required: false
schema:
type: integer
description: The continuation token from the previous request used to retrieve the next page of dynamic behavior invocations.
default: 0
title: Continuation Token
description: The continuation token from the previous request used to retrieve the next page of dynamic behavior invocations.
- name: sort_by
in: query
required: false
schema:
type: array
items:
type: string
description: The fields to sort the versions by. Supported fields are `invoked_at`. Specify a `+` before the field name to indicate ascending sorting and `-` for descending sorting. Multiple fields can be specified to break ties.
default: []
title: Sort By
description: The fields to sort the versions by. Supported fields are `invoked_at`. Specify a `+` before the field name to indicate ascending sorting and `-` for descending sorting. Multiple fields can be specified to break ties.
- name: x-mongo-cluster-name
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
title: X-Mongo-Cluster-Name
description: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- name: Sec-WebSocket-Protocol
in: header
required: false
schema:
type: array
items:
type: string
default: []
title: Sec-Websocket-Protocol
responses:
'200':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__dynamic_behavior_set__get_dynamic_behavior_invocations__Response'
'404':
description: Specified organization or dynamic behavior set is not found.
'422':
description: Invalid request path parameter or request query parameter failed validation.
'401':
description: Invalid authorization credentials.
'403':
description: Missing required permissions.
'503':
description: The service is going through temporary maintenance.
'429':
description: The user has exceeded the rate limit of 50 requests per minute for this endpoint.
components:
schemas:
ResultPersistence:
type: string
enum:
- ephemeral
- persisted-preferred
- persisted
amigo_lib__mongo__collections__dynamic_behavior_set__DynamicBehaviorSet__UserInfo:
properties:
org_id:
type: string
title: Org Id
user_id:
type: string
title: User Id
type: object
required:
- org_id
- user_id
title: UserInfo
amigo_lib__pydantic__base_model__StrippedNonemptyString__1:
type: string
minLength: 1
# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amigo/refs/heads/main/openapi/amigo-dynamic-behavior-set-api-openapi.yml