Unit Test Sets
Group unit tests into suites with configurable run counts for batch execution.
Create a Unit Test Set
curl --request POST \
--url 'https://api.amigo.ai/v1/<YOUR-ORG-ID>/simulation/unit_test_set/' \
--header 'Authorization: Bearer <AUTH-TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Onboarding Suite - Release Validation",
"description": "Full onboarding test suite for release candidate validation.",
"unit_test_runs": [
{"unit_test_id": "6618791275130b73714e8d5d", "run_count": 5},
{"unit_test_id": "6618791275130b73714e8d6e", "run_count": 3}
],
"tags": {"suite": "onboarding", "stage": "release"}
}'Create a new simulation unit test set.
Permissions
This endpoint requires the following permissions:
Simulation:CreateSimulationUnitTestSetfor the simulation unit test set.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
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.
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.
[]The name of the simulation unit test set.
The description of the simulation unit test set.
Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization or unit test was not found.
A simulation unit test set with the same name already exists.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
List Unit Test Sets
Retrieve the simulation unit test sets that match the given filters.
Permissions
This endpoint may be impacted by the following permissions:
- Only simulation unit test sets that the authenticated user has
Simulation:GetSimulationUnitTestSetpermission for will be retrieved.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
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.
The IDs of the simulation unit test sets to retrieve.
[]The maximum number of simulation unit test sets to return.
20The continuation token from the previous request used to retrieve the next page of simulation unit test sets.
0Whether the simulation unit test set is deleted.
The IDs of the unit tests that are part of the simulation unit test sets.
[]The creators of the simulation unit test sets.
[]The tags of the simulation unit test 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.
[]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.
[]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.
[]Succeeded.
Whether there are more simulation unit test sets to retrieve.
The continuation token to use to retrieve the next page of simulation unit test sets.
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 simulation unit test sets, so they might differ from how many sets are actually retrieved.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
Search Unit Test Sets
Search for simulation unit test sets that match the given filters and whose name or description contains the specified query.
Permissions
This endpoint may be impacted by the following permissions:
- Only simulation unit test sets that the authenticated user has
Simulation:GetSimulationUnitTestSetpermission for will be retrieved.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
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.
The query to search for. Any simulation unit test sets containing the terms in its name or description would be returned.
The creators of the simulation unit test sets. Each value must be of the format org_id,user_id.
[]The tags of the simulation unit test 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.
[]The IDs of the unit tests that are part of the simulation unit test sets.
[]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.
[]Succeeded.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
Update a Unit Test Set
Update a simulation unit test set
Update a simulation unit test set.
Permissions
This endpoint requires the following permissions:
Simulation:ModifySimulationUnitTestSetfor the simulation unit test set.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
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.
The ID of the simulation unit test set to update.
^[a-f0-9]{24}$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.
[]The name of the simulation unit test set.
The description of the simulation unit test set. If not specified or an empty object is provided, the description will not be updated.
{}A specific type to indicate that a field is not set in the request.
The unit test runs that are part of this set.
The tags of the simulation unit test set.
Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation unit test set was not found
A simulation unit test set with this name already exists.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
No content
Delete a Unit Test Set
Delete a simulation unit test set
Delete a simulation unit test set.
Permissions
This endpoint requires the following permissions:
Simulation:DeleteSimulationUnitTestSetfor the simulation unit test set.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
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.
The ID of the simulation unit test set to delete.
^[a-f0-9]{24}$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.
[]Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation unit test set was not found
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
No content
Related
Last updated
Was this helpful?

