Package com.signadot.api
Class SandboxesApi
- java.lang.Object
-
- com.signadot.api.SandboxesApi
-
public class SandboxesApi extends Object
-
-
Constructor Summary
Constructors Constructor Description SandboxesApi()
SandboxesApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CreateSandboxResponse
createNewSandbox(String orgName, CreateSandboxRequest data)
Create a new sandbox Creates a new sandbox with the provided parameterscom.squareup.okhttp.Call
createNewSandboxAsync(String orgName, CreateSandboxRequest data, ApiCallback<CreateSandboxResponse> callback)
Create a new sandbox (asynchronously) Creates a new sandbox with the provided parameterscom.squareup.okhttp.Call
createNewSandboxCall(String orgName, CreateSandboxRequest data, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for createNewSandboxApiResponse<CreateSandboxResponse>
createNewSandboxWithHttpInfo(String orgName, CreateSandboxRequest data)
Create a new sandbox Creates a new sandbox with the provided parametersHandlerEmptyResponse
deleteSandboxById(String orgName, String sandboxID)
Delete a Sandbox by ID Delete the sandbox when its ID is specifiedcom.squareup.okhttp.Call
deleteSandboxByIdAsync(String orgName, String sandboxID, ApiCallback<HandlerEmptyResponse> callback)
Delete a Sandbox by ID (asynchronously) Delete the sandbox when its ID is specifiedcom.squareup.okhttp.Call
deleteSandboxByIdCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for deleteSandboxByIdApiResponse<HandlerEmptyResponse>
deleteSandboxByIdWithHttpInfo(String orgName, String sandboxID)
Delete a Sandbox by ID Delete the sandbox when its ID is specifiedHandlerEmptyResponse
deleteSandboxByName(String orgName, String name)
Delete Sandbox By Name Delete Sandbox with given namecom.squareup.okhttp.Call
deleteSandboxByNameAsync(String orgName, String name, ApiCallback<HandlerEmptyResponse> callback)
Delete Sandbox By Name (asynchronously) Delete Sandbox with given namecom.squareup.okhttp.Call
deleteSandboxByNameCall(String orgName, String name, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for deleteSandboxByNameApiResponse<HandlerEmptyResponse>
deleteSandboxByNameWithHttpInfo(String orgName, String name)
Delete Sandbox By Name Delete Sandbox with given nameApiClient
getApiClient()
GetSandboxByIdResponse
getSandboxById(String orgName, String sandboxID)
Get a Sandbox by ID Fetch the details about a sandbox when its ID is specifiedcom.squareup.okhttp.Call
getSandboxByIdAsync(String orgName, String sandboxID, ApiCallback<GetSandboxByIdResponse> callback)
Get a Sandbox by ID (asynchronously) Fetch the details about a sandbox when its ID is specifiedcom.squareup.okhttp.Call
getSandboxByIdCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for getSandboxByIdApiResponse<GetSandboxByIdResponse>
getSandboxByIdWithHttpInfo(String orgName, String sandboxID)
Get a Sandbox by ID Fetch the details about a sandbox when its ID is specifiedGetSandboxesResponse
getSandboxes(String orgName)
List Sandboxes List all sandboxes under the specified Signadot org.com.squareup.okhttp.Call
getSandboxesAsync(String orgName, ApiCallback<GetSandboxesResponse> callback)
List Sandboxes (asynchronously) List all sandboxes under the specified Signadot org.com.squareup.okhttp.Call
getSandboxesCall(String orgName, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for getSandboxesApiResponse<GetSandboxesResponse>
getSandboxesWithHttpInfo(String orgName)
List Sandboxes List all sandboxes under the specified Signadot org.SandboxReadyResponse
getSandboxReady(String orgName, String sandboxID)
Deprecated.com.squareup.okhttp.Call
getSandboxReadyAsync(String orgName, String sandboxID, ApiCallback<SandboxReadyResponse> callback)
Deprecated.com.squareup.okhttp.Call
getSandboxReadyCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Deprecated.ApiResponse<SandboxReadyResponse>
getSandboxReadyWithHttpInfo(String orgName, String sandboxID)
Deprecated.SandboxStatusResponse
getSandboxStatusById(String orgName, String sandboxID)
Get Sandbox Status by Sandbox ID with rate limiting.com.squareup.okhttp.Call
getSandboxStatusByIdAsync(String orgName, String sandboxID, ApiCallback<SandboxStatusResponse> callback)
Get Sandbox Status by Sandbox ID with rate limiting.com.squareup.okhttp.Call
getSandboxStatusByIdCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for getSandboxStatusByIdApiResponse<SandboxStatusResponse>
getSandboxStatusByIdWithHttpInfo(String orgName, String sandboxID)
Get Sandbox Status by Sandbox ID with rate limiting.void
setApiClient(ApiClient apiClient)
UpsertWorkspaceResponse
upsertPrWorkspace(String githubOrg, String githubRepo, Integer prNumber, UpsertPRWorkspacesRequest data)
Deprecated.com.squareup.okhttp.Call
upsertPrWorkspaceAsync(String githubOrg, String githubRepo, Integer prNumber, UpsertPRWorkspacesRequest data, ApiCallback<UpsertWorkspaceResponse> callback)
Deprecated.com.squareup.okhttp.Call
upsertPrWorkspaceCall(String githubOrg, String githubRepo, Integer prNumber, UpsertPRWorkspacesRequest data, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Deprecated.ApiResponse<UpsertWorkspaceResponse>
upsertPrWorkspaceWithHttpInfo(String githubOrg, String githubRepo, Integer prNumber, UpsertPRWorkspacesRequest data)
Deprecated.
-
-
-
Constructor Detail
-
SandboxesApi
public SandboxesApi()
-
SandboxesApi
public SandboxesApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
createNewSandboxCall
public com.squareup.okhttp.Call createNewSandboxCall(String orgName, CreateSandboxRequest data, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Build call for createNewSandbox- Parameters:
orgName
- Signadot Org Name (required)data
- Request to create sandbox (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object
-
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
-
deleteSandboxByIdCall
public com.squareup.okhttp.Call deleteSandboxByIdCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Build call for deleteSandboxById- Parameters:
orgName
- Signadot Org Name (required)sandboxID
- Sandbox ID (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
deleteSandboxByNameCall
public com.squareup.okhttp.Call deleteSandboxByNameCall(String orgName, String name, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Build call for deleteSandboxByName- Parameters:
orgName
- Signadot Org Name (required)name
- Sandbox Name to search for (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
getSandboxByIdCall
public com.squareup.okhttp.Call getSandboxByIdCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Build call for getSandboxById- Parameters:
orgName
- Signadot Org Name (required)sandboxID
- Sandbox ID (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
getSandboxReadyCall
@Deprecated public com.squareup.okhttp.Call getSandboxReadyCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Deprecated.Build call for getSandboxReady- Parameters:
orgName
- Signadot Org Name (required)sandboxID
- Sandbox ID (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
getSandboxStatusByIdCall
public com.squareup.okhttp.Call getSandboxStatusByIdCall(String orgName, String sandboxID, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Build call for getSandboxStatusById- Parameters:
orgName
- Signadot Org Name (required)sandboxID
- Sandbox ID (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
getSandboxesCall
public com.squareup.okhttp.Call getSandboxesCall(String orgName, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Build call for getSandboxes- Parameters:
orgName
- Signadot Org Name (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
upsertPrWorkspaceCall
@Deprecated public com.squareup.okhttp.Call upsertPrWorkspaceCall(String githubOrg, String githubRepo, Integer prNumber, UpsertPRWorkspacesRequest data, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
Deprecated.Build call for upsertPrWorkspace- Parameters:
githubOrg
- GitHub Org Name (required)githubRepo
- GitHub Repository Name (required)prNumber
- Pull Request Number (required)data
- Request to upsert workspace (required)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize 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
-
-