Tool

Access the Git interface of the tool repo.

get
/v1/{organization}/tool/git/{git_path}

Access the underlying tool repo for this organization through the standard Git interface. This endpoint effectively serves as the Git URL for the underlying tool repo, and permits all standard Git operations on it through Git protocol version 2arrow-up-right over HTTPS, which should be the default protocol selected by most Git clients.

Permissions

This endpoint requires the following permissions:

  • Tool:AccessRepo for the organization's tool repo.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
git_pathstringRequired

The Git path to forward the request to.

Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Successful Response

application/json
anyOptional
get
/v1/{organization}/tool/git/{git_path}

No content

Access the Git interface of the tool repo.

post
/v1/{organization}/tool/git/{git_path}

Access the underlying tool repo for this organization through the standard Git interface. This endpoint effectively serves as the Git URL for the underlying tool repo, and permits all standard Git operations on it through Git protocol version 2arrow-up-right over HTTPS, which should be the default protocol selected by most Git clients.

Permissions

This endpoint requires the following permissions:

  • Tool:AccessRepo for the organization's tool repo.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
git_pathstringRequired

The Git path to forward the request to.

Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/v1/{organization}/tool/git/{git_path}

No content

Get the latest tool scaffold release

get
/v1/{organization}/tool/amigo_tool_scaffold.tar.gz
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
anyOptional
get
/v1/{organization}/tool/amigo_tool_scaffold.tar.gz

No content

Get the raw content of a file in the tool repository

get
/v1/{organization}/tool/repo/file/{file_path}

Get the raw content of a file in the tool repository. Usually, the Get Tool Repo Files endpoint is sufficient to fetch the file contents. For files that are too large, this endpoint should be used.

Permissions

This endpoint requires the following permissions:

  • Tool:AccessRepo for the repo to access.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
file_pathstring · min: 1Required

The path of the file to get.

Query parameters
refstring · min: 1Optional

The name of a branch or a commit SHA to view.

Default: main
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
anyOptional
get
/v1/{organization}/tool/repo/file/{file_path}

No content

Get a directory inside the tool repository.

get
/v1/{organization}/tool/repo/directory/{directory_path}

View the entries of a directory of the specified ref in the tool repository.

Permissions

This endpoint requires the following permissions:

  • Tool:AccessRepo for the repo to access.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
directory_pathstringRequired

The path of the directory to view.

Query parameters
refstring · min: 1Optional

The name of a branch or a commit SHA to view.

Default: main
include_last_commit_infobooleanOptional

Whether to include the most recent commit information for each file and directory entry. Enabling this will cause the endpoint to be slow.

Default: false
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
get
/v1/{organization}/tool/repo/directory/{directory_path}

Get files inside the tool repository.

get
/v1/{organization}/tool/repo/file

Get the metadata and contents of specified files of the repository. For large files, the content field will be None, and you should use the specific GetFileContent endpoint to fetch it.

Permissions

This endpoint requires the following permissions:

  • Tool:AccessRepo for the repo to access.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
refstring · min: 1Optional

The name of a branch or a commit SHA to view.

Default: main
file_pathsstring[] · min: 1 · max: 5Optional

The list of file paths to view.

Default: []
Responses
chevron-right
200

Succeeded.

application/json
get
/v1/{organization}/tool/repo/file

Get the commits of the tool repository.

get
/v1/{organization}/tool/repo/commit

Get the commits in the tool repository of the organization with the specified filters. The commits are returned with the ref in the query parameters as the first entry, and then in the order by its ancestry.

Permissions

This endpoint requires the following permissions:

  • Tool:AccessRepo for the repo to access.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Query parameters
refstring · min: 1Optional

The name of a branch or a commit SHA to start retrieving commits from. The specified ref and its ancestors will be returned.

Default: main
pathany ofOptional

The path to filter commits by. Only commits that modified this path or its children will be returned.

string · min: 1Optional
or
nullOptional
committed_on_or_afterany ofOptional

Only commits that were committed on or after this timestamp will be returned.

string · date-timeOptional
or
nullOptional
committed_on_or_beforeany ofOptional

Only commits that were committed on or before this timestamp will be returned.

string · date-timeOptional
or
nullOptional
limitinteger · max: 20Optional

The maximum number of commits to return.

Default: 20
continuation_tokenintegerOptional

The continuation token to use to retrieve the next set of commits.

Default: 1
show_changed_filesbooleanOptional

Whether to include the list of changed files in the response. Enabling this will cause the endpoint to be slow.

Default: false
show_change_statsbooleanOptional

Whether to include the stats of all changed files (number of additions and deletions) in the response. Enabling this will cause the endpoint to be slow.

Default: false
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
next_continuation_tokenany ofOptional

The continuation token to use to retrieve the next set of commits. This will be None if there are no more commits to retrieve.

integerOptional
or
nullOptional
has_morebooleanRequired

Whether there are more commits to retrieve.

get
/v1/{organization}/tool/repo/commit

Get a branch of the tool repository.

get
/v1/{organization}/tool/repo/branch/{branch_name}
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
branch_namestringRequired

The name of the branch to retrieve.

Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
commit_shastringRequired

The SHA of the latest commit on the branch.

commit_messagestringRequired

The commit message of the latest commit on the branch.

commit_timestampstring · date-timeRequired

The timestamp of the latest commit on the branch.

committerany ofRequired

The committer of the latest commit on the branch. If None, the committer is unknown because it's outside of the Amigo tool system.

or
nullOptional
get
/v1/{organization}/tool/repo/branch/{branch_name}

Get the branches of the tool repository.

get
/v1/{organization}/tool/repo/branch
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Query parameters
limitinteger · max: 20Optional

The maximum number of branches to return.

Default: 20
continuation_tokenintegerOptional

The continuation token to use to retrieve the next set of branches.

Default: 1
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
continuation_tokenany ofRequired

The continuation token to use to retrieve the next set of branches.

integerOptional
or
nullOptional
has_morebooleanRequired

Whether there are more branches to retrieve after this set.

get
/v1/{organization}/tool/repo/branch

Get tools

get
/v1/{organization}/tool/
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The IDs of the tools to retrieve.

Default: []
deprecatedany ofOptional

Whether the tools are deprecated.

booleanOptional
or
nullOptional
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are name and deprecated. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
tagstring[]Optional

The tags of the simulation personas. 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: []
limitinteger · max: 20Optional

The maximum number of tools to return.

Default: 10
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of tools.

Default: 0
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
has_morebooleanRequired

Whether there are more tools to retrieve.

continuation_tokenany ofRequired

A token to supply to the next request to retrieve the next page of tools. Only populated if has_more is True.

anyOptional
or
nullOptional
filter_valuesany ofRequired

For each filter that this endpoint supports that can take on dynamic values, this field includes what these values are. This is only provided for the first page in the pagination results.

Note that the values are counted assuming the authenticated user has access to all the tools, so they might differ from how many tools are actually retrieved.

or
nullOptional
get
/v1/{organization}/tool/

Create a new tool

post
/v1/{organization}/tool/

Create a new tool. The tool will not contain any versions initially so is not usable until at least one version is published.

Permissions

This endpoint requires the following permissions:

  • Tool:CreateTool for the tool to create.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
namestring · min: 1Required

The name of the tool. It must be unique among all non-deprecated tools in the organization.

Pattern: ^[a-z0-9_]+$
descriptionstring · min: 1Required

A description of the tool.

Responses
post
/v1/{organization}/tool/

Deprecate tool versions

delete
/v1/{organization}/tool/{tool_id}/version/{versions}

Deprecate tool versions that match the specified semver constraint.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool on the tool whose versions to deprecate.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to deprecate.

Pattern: ^[a-f0-9]{24}$
versionsstringRequired

A semver constraint that specifies the version to deprecate in the Python packaging specification. All versions that match this constraint will be deprecated.

Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
delete
/v1/{organization}/tool/{tool_id}/version/{versions}

No content

Modify a tool

post
/v1/{organization}/tool/{tool_id}

Modify basic properties of a tool, such as its description and tags.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool for the tool to modify.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to modify

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
descriptionany ofOptional

A description of this tool. Only updates if not-null.

string · min: 1Optional
or
nullOptional
tagsany ofOptional

The tags of this tool. Only updates if not-null.

or
nullOptional
Responses
post
/v1/{organization}/tool/{tool_id}

No content

Deprecate a tool

delete
/v1/{organization}/tool/{tool_id}

Deprecate the specified tool. All versions of the tool will be deprecated and the tool will no longer be used.

After the endpoint concludes, the deprecation will take around 1 minute to propagate across the system.

Permissions

This endpoint requires the following permissions:

  • Tool:DeleteTool on the tool to deprecate.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to deprecate.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
delete
/v1/{organization}/tool/{tool_id}

No content

Test a tool

post
/v1/{organization}/tool/test
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
commit_branchstringRequired

The branch in the tools repo whose tip will be tested.

project_pathstringRequired

The directory in the tools repo that contains the pyproject.toml file corresponding to the tool version to publish.

Pattern: ^[-\w\d_/]+$
Responses
chevron-right
200

Succeeded

application/json
post
/v1/{organization}/tool/test

Modify the environment variables of a tool

post
/v1/{organization}/tool/{tool_id}/envvar

Add, update, or delete the environment variables of a tool. Environment variables must be present in the tool before any versions requiring them can be published.

You cannot delete variables that are required by non-deprecated tool versions.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool for the tool whose environment variables to modify.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to modify

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
post
/v1/{organization}/tool/{tool_id}/envvar

No content

Get tool versions

get
/v1/{organization}/tool/{tool_id}/version
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to retrieve versions for.

Pattern: ^[a-f0-9]{24}$
Query parameters
deprecatedany ofOptional

Whether to filter by deprecated tool versions.

booleanOptional
or
nullOptional
versionsany ofOptional

A semver constraint that specifies the versions to retrieve.

stringOptional
or
nullOptional
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are created_at, version.major, version.minor, version.patch, and deprecated. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
creatorstring[]Optional

The creators of the tool versions. Each value must be of the format org_id,user_id.

Default: []
limitinteger · max: 50Optional

The maximum number of tool versions to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of tool versions.

Default: 0
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
has_morebooleanRequired

Whether there are more tool versions to retrieve.

continuation_tokenany ofRequired

A token to supply to the next request to retrieve the next page of tool versions. Only populated if has_more is True.

anyOptional
or
nullOptional
filter_valuesany ofRequired

For each filter that this endpoint supports that can take on dynamic values, this field includes what these values are. This is only provided for the first page in the pagination results.

Note that the values are counted assuming the authenticated user has access to all the tool versions, so they might differ from how many tool versions are actually retrieved.

or
nullOptional
get
/v1/{organization}/tool/{tool_id}/version

Publish a new version of a tool

post
/v1/{organization}/tool/{tool_id}/version

Publish a new version of the specified tool. After this endpoint finishes, the new version will be immediately available for use.

This endpoint will take roughly 1-5 minutes to complete, so please adjust the timeout settings of your HTTP client accordingly.

Permissions

This endpoint requires the following permissions:

  • Tool:ModifyTool for the tool.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to publish

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
project_pathstringRequired

The directory in the tools repo that contains the pyproject.toml file corresponding to the tool version to publish.

Pattern: ^[-\w\d_/]+$
bump_typestring · enumRequired

The type of bump to apply to the version. For initial version of the tool, use major.

Possible values:
Responses
post
/v1/{organization}/tool/{tool_id}/version

Get tool invocations

get
/v1/{organization}/tool/invocation

Retrieve tool invocations under the specified filters.

Permissions

This endpoint may require the following permission:

  • Conversation:GetInteractionInsights for ToolInvocations from a regular conversation.

  • Simulation:GetSimulationUnitTestSetRun for ToolInvocations from a simulation conversation.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Query parameters
tool_idstring[]Optional

The IDs of the tools to get invocations for.

Default: []
versionstring[]Optional

A list of semver constraints that specifies the versions to retrieve in the Python packaging specification. This must be the exact same length as tool_id, and each entry corresponds to the tool ID at the same index.

Default: []
conversation_idstring[]Optional

The conversation IDs associated with the invocations if they are of invocation source regular-conversation.

Default: []
simulation_unit_test_set_run_idstring[]Optional

The simulation unit test set run IDs associated with the invocations if they are of invocation source simulation-conversation.

Default: []
succeededany ofOptional

Whether the invocation succeeded.

booleanOptional
or
nullOptional
limitinteger · max: 100Optional

The maximum number of tool invocations to retrieve.

Default: 100
continuation_tokenintegerOptional

The token from the previous request to return the next page of tool invocations.

Default: 0
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are created_at, version.major, version.minor, version.patch, tool_id, invocation_source.type, and invocation_status.succeeded. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
has_morebooleanRequired

Whether there are more tool invocations to retrieve.

continuation_tokenany ofRequired

The continuation token to retrieve the next page of tool invocations, or null if there are no more tool invocations.

anyOptional
or
nullOptional
get
/v1/{organization}/tool/invocation

Invoke a tool version

post
/v1/{organization}/tool/{tool_id}/version/{version}/invoke

Invoke a specified tool version with the given input parameters.

Permissions

This endpoint requires the following permissions:

  • Tool:InvokeTool for the tool to invoke.

Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
tool_idstringRequired

The ID of the tool to invoke

Pattern: ^[a-f0-9]{24}$
versionstringRequired

The version of the tool to invoke

Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
chevron-right
200

Succeeded

application/json
post
/v1/{organization}/tool/{tool_id}/version/{version}/invoke
get
/v1/{organization}/tool/invocation/search
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.

Path parameters
organizationstringRequired
Query parameters
querystringRequired

The search query.

tool_idstring[]Optional

The IDs of the tools to get invocations for.

Default: []
conversation_idstring[]Optional

The conversation ID associated with the invocation if it's of invocation source regular-conversation.

Default: []
simulation_unit_test_set_run_idstring[]Optional

The simulation unit test set run ID associated with the invocation if it's of invocation source simulation-conversation.

Default: []
succeededany ofOptional

Whether the invocation succeeded.

booleanOptional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

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.

stringOptional
or
nullOptional
Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
chevron-right
200

Succeeded.

application/json
get
/v1/{organization}/tool/invocation/search

Last updated

Was this helpful?