Class SandboxesApi


  • public class SandboxesApi
    extends Object
    • Constructor Detail

      • SandboxesApi

        public SandboxesApi()
      • SandboxesApi

        public SandboxesApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • createNewSandbox

        public CreateSandboxResponse createNewSandbox​(String orgName,
                                                      CreateSandboxRequest data)
                                               throws ApiException
        Create a new sandbox Creates a new sandbox with the provided parameters
        Parameters:
        orgName - Signadot Org Name (required)
        data - Request to create sandbox (required)
        Returns:
        CreateSandboxResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • createNewSandboxWithHttpInfo

        public ApiResponse<CreateSandboxResponse> createNewSandboxWithHttpInfo​(String orgName,
                                                                               CreateSandboxRequest data)
                                                                        throws ApiException
        Create a new sandbox Creates a new sandbox with the provided parameters
        Parameters:
        orgName - Signadot Org Name (required)
        data - Request to create sandbox (required)
        Returns:
        ApiResponse<CreateSandboxResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • createNewSandboxAsync

        public com.squareup.okhttp.Call createNewSandboxAsync​(String orgName,
                                                              CreateSandboxRequest data,
                                                              ApiCallback<CreateSandboxResponse> callback)
                                                       throws ApiException
        Create a new sandbox (asynchronously) Creates a new sandbox with the provided parameters
        Parameters:
        orgName - Signadot Org Name (required)
        data - Request to create sandbox (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • deleteSandboxById

        public HandlerEmptyResponse deleteSandboxById​(String orgName,
                                                      String sandboxID)
                                               throws ApiException
        Delete a Sandbox by ID Delete the sandbox when its ID is specified
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        HandlerEmptyResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteSandboxByIdWithHttpInfo

        public ApiResponse<HandlerEmptyResponse> deleteSandboxByIdWithHttpInfo​(String orgName,
                                                                               String sandboxID)
                                                                        throws ApiException
        Delete a Sandbox by ID Delete the sandbox when its ID is specified
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        ApiResponse<HandlerEmptyResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteSandboxByIdAsync

        public com.squareup.okhttp.Call deleteSandboxByIdAsync​(String orgName,
                                                               String sandboxID,
                                                               ApiCallback<HandlerEmptyResponse> callback)
                                                        throws ApiException
        Delete a Sandbox by ID (asynchronously) Delete the sandbox when its ID is specified
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • deleteSandboxByName

        public HandlerEmptyResponse deleteSandboxByName​(String orgName,
                                                        String name)
                                                 throws ApiException
        Delete Sandbox By Name Delete Sandbox with given name
        Parameters:
        orgName - Signadot Org Name (required)
        name - Sandbox Name to search for (required)
        Returns:
        HandlerEmptyResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteSandboxByNameWithHttpInfo

        public ApiResponse<HandlerEmptyResponse> deleteSandboxByNameWithHttpInfo​(String orgName,
                                                                                 String name)
                                                                          throws ApiException
        Delete Sandbox By Name Delete Sandbox with given name
        Parameters:
        orgName - Signadot Org Name (required)
        name - Sandbox Name to search for (required)
        Returns:
        ApiResponse<HandlerEmptyResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteSandboxByNameAsync

        public com.squareup.okhttp.Call deleteSandboxByNameAsync​(String orgName,
                                                                 String name,
                                                                 ApiCallback<HandlerEmptyResponse> callback)
                                                          throws ApiException
        Delete Sandbox By Name (asynchronously) Delete Sandbox with given name
        Parameters:
        orgName - Signadot Org Name (required)
        name - Sandbox Name to search for (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getSandboxById

        public GetSandboxByIdResponse getSandboxById​(String orgName,
                                                     String sandboxID)
                                              throws ApiException
        Get a Sandbox by ID Fetch the details about a sandbox when its ID is specified
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        GetSandboxByIdResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxByIdWithHttpInfo

        public ApiResponse<GetSandboxByIdResponse> getSandboxByIdWithHttpInfo​(String orgName,
                                                                              String sandboxID)
                                                                       throws ApiException
        Get a Sandbox by ID Fetch the details about a sandbox when its ID is specified
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        ApiResponse<GetSandboxByIdResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxByIdAsync

        public com.squareup.okhttp.Call getSandboxByIdAsync​(String orgName,
                                                            String sandboxID,
                                                            ApiCallback<GetSandboxByIdResponse> callback)
                                                     throws ApiException
        Get a Sandbox by ID (asynchronously) Fetch the details about a sandbox when its ID is specified
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getSandboxReady

        @Deprecated
        public SandboxReadyResponse getSandboxReady​(String orgName,
                                                    String sandboxID)
                                             throws ApiException
        Deprecated.
        Check sandbox readiness Checks readiness of a sandbox with rate limiting enforced by polling. Deprecated, please use getSandboxStatusById instead.
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        SandboxReadyResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxReadyWithHttpInfo

        @Deprecated
        public ApiResponse<SandboxReadyResponse> getSandboxReadyWithHttpInfo​(String orgName,
                                                                             String sandboxID)
                                                                      throws ApiException
        Deprecated.
        Check sandbox readiness Checks readiness of a sandbox with rate limiting enforced by polling. Deprecated, please use getSandboxStatusById instead.
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        ApiResponse<SandboxReadyResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxReadyAsync

        @Deprecated
        public com.squareup.okhttp.Call getSandboxReadyAsync​(String orgName,
                                                             String sandboxID,
                                                             ApiCallback<SandboxReadyResponse> callback)
                                                      throws ApiException
        Deprecated.
        Check sandbox readiness (asynchronously) Checks readiness of a sandbox with rate limiting enforced by polling. Deprecated, please use getSandboxStatusById instead.
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getSandboxStatusById

        public SandboxStatusResponse getSandboxStatusById​(String orgName,
                                                          String sandboxID)
                                                   throws ApiException
        Get Sandbox Status by Sandbox ID with rate limiting. Gets
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        SandboxStatusResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxStatusByIdWithHttpInfo

        public ApiResponse<SandboxStatusResponse> getSandboxStatusByIdWithHttpInfo​(String orgName,
                                                                                   String sandboxID)
                                                                            throws ApiException
        Get Sandbox Status by Sandbox ID with rate limiting. Gets
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        Returns:
        ApiResponse<SandboxStatusResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxStatusByIdAsync

        public com.squareup.okhttp.Call getSandboxStatusByIdAsync​(String orgName,
                                                                  String sandboxID,
                                                                  ApiCallback<SandboxStatusResponse> callback)
                                                           throws ApiException
        Get Sandbox Status by Sandbox ID with rate limiting. (asynchronously) Gets
        Parameters:
        orgName - Signadot Org Name (required)
        sandboxID - Sandbox ID (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getSandboxes

        public GetSandboxesResponse getSandboxes​(String orgName)
                                          throws ApiException
        List Sandboxes List all sandboxes under the specified Signadot org.
        Parameters:
        orgName - Signadot Org Name (required)
        Returns:
        GetSandboxesResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxesWithHttpInfo

        public ApiResponse<GetSandboxesResponse> getSandboxesWithHttpInfo​(String orgName)
                                                                   throws ApiException
        List Sandboxes List all sandboxes under the specified Signadot org.
        Parameters:
        orgName - Signadot Org Name (required)
        Returns:
        ApiResponse<GetSandboxesResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSandboxesAsync

        public com.squareup.okhttp.Call getSandboxesAsync​(String orgName,
                                                          ApiCallback<GetSandboxesResponse> callback)
                                                   throws ApiException
        List Sandboxes (asynchronously) List all sandboxes under the specified Signadot org.
        Parameters:
        orgName - Signadot Org Name (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • upsertPrWorkspace

        @Deprecated
        public UpsertWorkspaceResponse upsertPrWorkspace​(String githubOrg,
                                                         String githubRepo,
                                                         Integer prNumber,
                                                         UpsertPRWorkspacesRequest data)
                                                  throws ApiException
        Deprecated.
        Create or Update workspace from Pull Request Create a workspace that is associated with a specified pull request. If no workspaces already exist for the given pull request, this creates a new workspace. Otherwise, the new changes are applied to the existing workspaces. This endpoint uses the old terminology \"workspace\" instead of \"sandbox\" for backward compatability. ### Example Here's an example to create/update a workspace from a pull request in the [HotROD](https://github.com/signadot/hotrod) application. To simplify the use case, consider that only the [Route Service](https://github.com/signadot/hotrod/tree/main/services/route) had changes, and that the changes were published to an image file named `signadot/hotrod-route` and tag `4e75b0b822ecbbbb4c917b0fffeb337589d82456`. This could be tagged as anything e.g. `latest`, `e2e-test` etc. As a part of workspace creation, Signadot creates forked Kubernetes workloads (such as deployments) from existing workloads using the provided images. In order to access the forked workloads(s), `endpoints` are specified and corresponding to each endpoint, a preview URL is generated. These preview URLs are returned as part of the response. In the example below, we're dealing with a deployment named `route` in the `hotrod` namespace that is running the docker image `signadot/hotrod-route`. In the below request to create a workspace, the deployment named `route` is forked and the fork will be created with the new docker image tag as specified by `newTag`. The new deployment that is created will be running the a new docker image tag as specified by `newTag`. There will be a single preview URL associated with this workspace as specified in `endpoints` and it will point to the fork of the `route` deployment that was created. ```json { \"cluster\": \"signadot\", \"namespace\": \"hotrod\", \"headCommit\": \"5e35abfa94626c4853eca51ecd435a779ded4123\", \"images\": [ { \"name\": \"signadot/hotrod-route\", \"newTag\": \"4e75b0b822ecbbbb4c917b0fffeb337589d82456\" } ], \"endpoints\": [ { \"routeType\": \"fork\", \"protocol\": \"http\", \"forkOf\": { \"kind\": \"Deployment\", \"name\": \"route\", \"namespace\": \"hotrod\" } } ] } ``` In response the API call returns us a confirmation of the workspace created / updated along with the information on preview endpoints. ```json { \"workspaceIDs\": [ \"xtc54uh8p2rhs\" ], \"previewEndpoints\": [ { \"id\": \"fbm4983sxb111\", \"routeType\": \"fork\", \"name\": \"route\", \"protocol\": \"http\", \"clusterID\": \"55rjfjf3rn222\", \"cluster\": \"signadot\", \"forkOf\": { \"kind\": \"Deployment\", \"namespace\": \"hotrod\", \"name\": \"route\" }, \"previewURL\": \"https://route--hotrod-131.preview.signadot.com\" } ] } ``` You can parse the `previewEndpoints` section in the response to find the previewURL associated with the endpoint created as part of the workspace.
        Parameters:
        githubOrg - GitHub Org Name (required)
        githubRepo - GitHub Repository Name (required)
        prNumber - Pull Request Number (required)
        data - Request to upsert workspace (required)
        Returns:
        UpsertWorkspaceResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • upsertPrWorkspaceWithHttpInfo

        @Deprecated
        public ApiResponse<UpsertWorkspaceResponse> upsertPrWorkspaceWithHttpInfo​(String githubOrg,
                                                                                  String githubRepo,
                                                                                  Integer prNumber,
                                                                                  UpsertPRWorkspacesRequest data)
                                                                           throws ApiException
        Deprecated.
        Create or Update workspace from Pull Request Create a workspace that is associated with a specified pull request. If no workspaces already exist for the given pull request, this creates a new workspace. Otherwise, the new changes are applied to the existing workspaces. This endpoint uses the old terminology \"workspace\" instead of \"sandbox\" for backward compatability. ### Example Here's an example to create/update a workspace from a pull request in the [HotROD](https://github.com/signadot/hotrod) application. To simplify the use case, consider that only the [Route Service](https://github.com/signadot/hotrod/tree/main/services/route) had changes, and that the changes were published to an image file named `signadot/hotrod-route` and tag `4e75b0b822ecbbbb4c917b0fffeb337589d82456`. This could be tagged as anything e.g. `latest`, `e2e-test` etc. As a part of workspace creation, Signadot creates forked Kubernetes workloads (such as deployments) from existing workloads using the provided images. In order to access the forked workloads(s), `endpoints` are specified and corresponding to each endpoint, a preview URL is generated. These preview URLs are returned as part of the response. In the example below, we're dealing with a deployment named `route` in the `hotrod` namespace that is running the docker image `signadot/hotrod-route`. In the below request to create a workspace, the deployment named `route` is forked and the fork will be created with the new docker image tag as specified by `newTag`. The new deployment that is created will be running the a new docker image tag as specified by `newTag`. There will be a single preview URL associated with this workspace as specified in `endpoints` and it will point to the fork of the `route` deployment that was created. ```json { \"cluster\": \"signadot\", \"namespace\": \"hotrod\", \"headCommit\": \"5e35abfa94626c4853eca51ecd435a779ded4123\", \"images\": [ { \"name\": \"signadot/hotrod-route\", \"newTag\": \"4e75b0b822ecbbbb4c917b0fffeb337589d82456\" } ], \"endpoints\": [ { \"routeType\": \"fork\", \"protocol\": \"http\", \"forkOf\": { \"kind\": \"Deployment\", \"name\": \"route\", \"namespace\": \"hotrod\" } } ] } ``` In response the API call returns us a confirmation of the workspace created / updated along with the information on preview endpoints. ```json { \"workspaceIDs\": [ \"xtc54uh8p2rhs\" ], \"previewEndpoints\": [ { \"id\": \"fbm4983sxb111\", \"routeType\": \"fork\", \"name\": \"route\", \"protocol\": \"http\", \"clusterID\": \"55rjfjf3rn222\", \"cluster\": \"signadot\", \"forkOf\": { \"kind\": \"Deployment\", \"namespace\": \"hotrod\", \"name\": \"route\" }, \"previewURL\": \"https://route--hotrod-131.preview.signadot.com\" } ] } ``` You can parse the `previewEndpoints` section in the response to find the previewURL associated with the endpoint created as part of the workspace.
        Parameters:
        githubOrg - GitHub Org Name (required)
        githubRepo - GitHub Repository Name (required)
        prNumber - Pull Request Number (required)
        data - Request to upsert workspace (required)
        Returns:
        ApiResponse<UpsertWorkspaceResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • upsertPrWorkspaceAsync

        @Deprecated
        public com.squareup.okhttp.Call upsertPrWorkspaceAsync​(String githubOrg,
                                                               String githubRepo,
                                                               Integer prNumber,
                                                               UpsertPRWorkspacesRequest data,
                                                               ApiCallback<UpsertWorkspaceResponse> callback)
                                                        throws ApiException
        Deprecated.
        Create or Update workspace from Pull Request (asynchronously) Create a workspace that is associated with a specified pull request. If no workspaces already exist for the given pull request, this creates a new workspace. Otherwise, the new changes are applied to the existing workspaces. This endpoint uses the old terminology \"workspace\" instead of \"sandbox\" for backward compatability. ### Example Here's an example to create/update a workspace from a pull request in the [HotROD](https://github.com/signadot/hotrod) application. To simplify the use case, consider that only the [Route Service](https://github.com/signadot/hotrod/tree/main/services/route) had changes, and that the changes were published to an image file named `signadot/hotrod-route` and tag `4e75b0b822ecbbbb4c917b0fffeb337589d82456`. This could be tagged as anything e.g. `latest`, `e2e-test` etc. As a part of workspace creation, Signadot creates forked Kubernetes workloads (such as deployments) from existing workloads using the provided images. In order to access the forked workloads(s), `endpoints` are specified and corresponding to each endpoint, a preview URL is generated. These preview URLs are returned as part of the response. In the example below, we're dealing with a deployment named `route` in the `hotrod` namespace that is running the docker image `signadot/hotrod-route`. In the below request to create a workspace, the deployment named `route` is forked and the fork will be created with the new docker image tag as specified by `newTag`. The new deployment that is created will be running the a new docker image tag as specified by `newTag`. There will be a single preview URL associated with this workspace as specified in `endpoints` and it will point to the fork of the `route` deployment that was created. ```json { \"cluster\": \"signadot\", \"namespace\": \"hotrod\", \"headCommit\": \"5e35abfa94626c4853eca51ecd435a779ded4123\", \"images\": [ { \"name\": \"signadot/hotrod-route\", \"newTag\": \"4e75b0b822ecbbbb4c917b0fffeb337589d82456\" } ], \"endpoints\": [ { \"routeType\": \"fork\", \"protocol\": \"http\", \"forkOf\": { \"kind\": \"Deployment\", \"name\": \"route\", \"namespace\": \"hotrod\" } } ] } ``` In response the API call returns us a confirmation of the workspace created / updated along with the information on preview endpoints. ```json { \"workspaceIDs\": [ \"xtc54uh8p2rhs\" ], \"previewEndpoints\": [ { \"id\": \"fbm4983sxb111\", \"routeType\": \"fork\", \"name\": \"route\", \"protocol\": \"http\", \"clusterID\": \"55rjfjf3rn222\", \"cluster\": \"signadot\", \"forkOf\": { \"kind\": \"Deployment\", \"namespace\": \"hotrod\", \"name\": \"route\" }, \"previewURL\": \"https://route--hotrod-131.preview.signadot.com\" } ] } ``` You can parse the `previewEndpoints` section in the response to find the previewURL associated with the endpoint created as part of the workspace.
        Parameters:
        githubOrg - GitHub Org Name (required)
        githubRepo - GitHub Repository Name (required)
        prNumber - Pull Request Number (required)
        data - Request to upsert workspace (required)
        callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object