Amigo Simulation API
The Simulation API from Amigo — 17 operation(s) for simulation.
The Simulation API from Amigo — 17 operation(s) for simulation.
openapi: 3.1.0
info:
title: Amigo Account Simulation 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: Simulation
paths:
/v1/{organization}/simulation/persona/:
post:
tags:
- Simulation
summary: Create a simulation persona
description: 'Create a simulation persona.
#### Permissions
* `Simulation:CreateSimulationPersona` for the persona to create.
* `Simulation:ModifySimulationPersona` for the persona to create.'
operationId: create-simulation-persona
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__simulation__create_simulation_persona__Request'
responses:
'201':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__simulation__create_simulation_persona__Response'
'404':
description: The specified organization was not found.
'422':
description: Invalid request path parameter or request body failed validation.
'409':
description: A simulation persona with this 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 100 requests per minute for this endpoint.
get:
tags:
- Simulation
summary: Get simulation personas
description: 'Retrieve simulation personas that match the given filters.
#### Permissions
This endpoint may be impacted by the following permissions:
* Only simulation personas that the authenticated user has `Simulation:GetSimulationPersona` permission for will be retrieved.'
operationId: get-simulation-personas
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 simulation personas to retrieve.
default: []
title: Id
description: The IDs of the simulation personas to retrieve.
- name: limit
in: query
required: false
schema:
type: integer
maximum: 50
minimum: 0
description: The maximum number of simulation personas to return.
default: 50
title: Limit
description: The maximum number of simulation personas 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 simulation personas.
default: 0
title: Continuation Token
description: The continuation token from the previous request used to retrieve the next page of simulation personas.
- name: is_deleted
in: query
required: false
schema:
anyOf:
- type: boolean
- type: 'null'
description: Whether the simulation persona is deleted.
title: Is Deleted
description: Whether the simulation persona is deleted.
- name: role
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
description: The roles of the simulation personas.
default: []
title: Role
description: The roles of the simulation personas.
- name: creator
in: query
required: false
schema:
type: array
uniqueItems: true
items:
type: string
description: The creators of the simulation personas to retrieve. Each value must be of the format `org_id,user_id`.
default: []
title: Creator
description: The creators of the simulation personas to retrieve. 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 simulation personas to retrieve. Each value must be of the format `key:value`. 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 simulation personas to retrieve. Each value must be of the format `key:value`. 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__simulation__get_simulation_personas__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}/simulation/persona/{simulation_persona_id}/version/:
post:
tags:
- Simulation
summary: Create a new simulation persona version
description: 'Create a new version of the simulation persona.
#### Permissions
This endpoint requires the following permissions:
* `Simulation:ModifySimulationPersona` for the simulation persona.'
operationId: create-simulation-persona-version
parameters:
- name: simulation_persona_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the simulation persona to create a version for.
title: Simulation Persona Id
description: The ID of the simulation persona to create a version for.
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- 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__simulation__create_simulation_persona_version__Request'
responses:
'201':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__simulation__create_simulation_persona_version__Response'
'422':
description: Invalid request path parameter, request query parameter, or request body failed validation.
'404':
description: The specified organization or simulation persona 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 100 requests per minute for this endpoint.
get:
tags:
- Simulation
summary: Get simulation persona versions
description: 'Retrieve versions of a simulation persona.
#### Permissions
This endpoint requires the following permissions:
* `Simulation:GetSimulationPersona` for the simulation persona.'
operationId: get-simulation-persona-versions
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: simulation_persona_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the simulation persona to get versions for.
title: Simulation Persona Id
description: The ID of the simulation persona to get versions for.
- name: version
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The versions of the simulation persona 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 simulation persona 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 simulation persona versions to return.
default: 10
title: Limit
description: The maximum number of simulation persona 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 simulation persona versions.
default: 0
title: Continuation Token
description: The continuation token from the previous request used to retrieve the next page of simulation persona 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__simulation__get_simulation_persona_versions__Response'
'404':
description: The specified organization or simulation persona does not exist.
'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}/simulation/persona/{simulation_persona_id}/:
post:
tags:
- Simulation
summary: Update a simulation persona
description: 'Update a simulation persona.
#### Permissions
This endpoint requires the following permissions:
* `Simulation:ModifySimulationPersona` for the persona to update.'
operationId: update-simulation-persona
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: simulation_persona_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the simulation persona to update
title: Simulation Persona Id
description: The ID of the simulation persona to update
- 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__simulation__update_simulation_persona__Request'
responses:
'204':
description: Succeeded.
'422':
description: Invalid request path parameter or request body failed validation.
'404':
description: The specified organization or simulation persona 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 100 requests per minute for this endpoint.
delete:
tags:
- Simulation
summary: Delete a simulation persona
description: 'Delete a simulation persona. This endpoint only soft-deletes the simulation persona so any existing references to it would still be valid.
However, they cannot be used in any new simulations.
This endpoint will error if the simulation persona is used in any simulation unit tests.
#### Permissions
This endpoint requires the following permissions:
* `Simulation:DeleteSimulationPersona` on the simulation persona to delete.'
operationId: delete-simulation-persona
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: simulation_persona_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the simulation persona to delete.
title: Simulation Persona Id
description: The ID of the simulation persona 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:
'204':
description: Succeeded.
'422':
description: Invalid request path parameter failed validation.
'404':
description: The specified organization or simulation persona does not exist.
'400':
description: The specified simulation persona is used in a simulation unit test.
'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 100 requests per minute for this endpoint.
/v1/{organization}/simulation/scenario/{simulation_scenario_id}/version/:
get:
tags:
- Simulation
summary: Get simulation scenario versions
description: 'Retrieve the versions of a simulation scenario.
#### Permissions
This endpoint requires the following permissions:
- `Simulation:GetSimulationScenario` for the simulation scenario.'
operationId: get-simulation-scenario-versions
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: simulation_scenario_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the simulation scenario to get versions for.
title: Simulation Scenario Id
description: The ID of the simulation scenario to get versions for.
- name: version
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: The versions of the simulation scenario 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 simulation scenario 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 simulation scenario versions to return.
default: 10
title: Limit
description: The maximum number of simulation scenario 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 simulation scenario version.
default: 0
title: Continuation Token
description: The continuation token from the previous request used to retrieve the next page of simulation scenario version.
- 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__simulation__get_simulation_scenario_versions__Response'
'404':
description: The specified organization or simulation scenario does not exist.
'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.
post:
tags:
- Simulation
summary: Create a new simulation scenario version
description: 'Create a new version of the simulation scenario.
#### Permissions
This endpoint requires the following permissions:
* `Simulation:ModifySimulationScenario` for the simulation scenario.'
operationId: create-simulation-scenario-version
parameters:
- name: organization
in: path
required: true
schema:
type: string
title: Organization
- name: simulation_scenario_id
in: path
required: true
schema:
type: string
pattern: ^[a-f0-9]{24}$
description: The ID of the simulation scenario to create a version for.
title: Simulation Scenario Id
description: The ID of the simulation scenario to create a version for.
- 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__simulation__create_simulation_scenario_version__Request'
responses:
'201':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__simulation__create_simulation_scenario_version__Response'
'422':
description: Invalid request path parameter, request query parameter, or request body failed validation.
'404':
description: The specified organization or simulation scenario 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 500 requests per minute for this endpoint.
/v1/{organization}/simulation/scenario/:
post:
tags:
- Simulation
summary: Create a simulation scenario
description: 'Create a simulation scenario.
#### Permissions
This endpoint requires the following permissions:
* `Simulation:CreateSimulationScenario` for the simulation scenario.
* `Simulation:ModifySimulationScenario` for the simulation scenario.'
operationId: create-simulation-scenario
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__simulation__create_simulation_scenario__Request'
responses:
'201':
description: Succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/src__app__endpoints__simulation__create_simulation_scenario__Response'
'404':
description: The specified organization was not found.
'422':
# --- truncated at 32 KB (488 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amigo/refs/heads/main/openapi/amigo-simulation-api-openapi.yml