Package ai.shipeasy.admin.api
Class FlagsApi
java.lang.Object
ai.shipeasy.admin.api.FlagsApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateGate(CreateGateRequest createGateRequest, String xProjectId) Create a feature gate Creates a new gate.okhttp3.CallcreateGateAsync(CreateGateRequest createGateRequest, String xProjectId, ApiCallback<CreateGateResponse> _callback) Create a feature gate (asynchronously) Creates a new gate.okhttp3.CallcreateGateCall(CreateGateRequest createGateRequest, String xProjectId, ApiCallback _callback) Build call for createGatecreateGateWithHttpInfo(CreateGateRequest createGateRequest, String xProjectId) Create a feature gate Creates a new gate.deleteGate(String id, String xProjectId) Delete a feature gate Soft-deletes the gate.okhttp3.CalldeleteGateAsync(String id, String xProjectId, ApiCallback<DeleteGateResponse> _callback) Delete a feature gate (asynchronously) Soft-deletes the gate.okhttp3.CalldeleteGateCall(String id, String xProjectId, ApiCallback _callback) Build call for deleteGatedeleteGateWithHttpInfo(String id, String xProjectId) Delete a feature gate Soft-deletes the gate.disableGate(String id, String xProjectId) Disable a gate Sets `enabled: false` so the gate evaluates to `false` for every caller, regardless of `rollout_pct` or `rules`.okhttp3.CalldisableGateAsync(String id, String xProjectId, ApiCallback<DisableGateResponse> _callback) Disable a gate (asynchronously) Sets `enabled: false` so the gate evaluates to `false` for every caller, regardless of `rollout_pct` or `rules`.okhttp3.CalldisableGateCall(String id, String xProjectId, ApiCallback _callback) Build call for disableGatedisableGateWithHttpInfo(String id, String xProjectId) Disable a gate Sets `enabled: false` so the gate evaluates to `false` for every caller, regardless of `rollout_pct` or `rules`.enableGate(String id, String xProjectId) Enable a gate Sets `enabled: true`.okhttp3.CallenableGateAsync(String id, String xProjectId, ApiCallback<EnableGateResponse> _callback) Enable a gate (asynchronously) Sets `enabled: true`.okhttp3.CallenableGateCall(String id, String xProjectId, ApiCallback _callback) Build call for enableGateenableGateWithHttpInfo(String id, String xProjectId) Enable a gate Sets `enabled: true`.intList feature gates Returns a single page of gates ordered by `updated_at desc, id desc`.okhttp3.CalllistGatesAsync(String xProjectId, Integer limit, String cursor, String q, ApiCallback<ListGatesResponse> _callback) List feature gates (asynchronously) Returns a single page of gates ordered by `updated_at desc, id desc`.okhttp3.CalllistGatesCall(String xProjectId, Integer limit, String cursor, String q, ApiCallback _callback) Build call for listGateslistGatesWithHttpInfo(String xProjectId, Integer limit, String cursor, String q) List feature gates Returns a single page of gates ordered by `updated_at desc, id desc`.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) updateGate(String id, UpdateGateRequest updateGateRequest, String xProjectId) Update a feature gate Partial update — only supplied fields change.okhttp3.CallupdateGateAsync(String id, UpdateGateRequest updateGateRequest, String xProjectId, ApiCallback<UpdateGateResponse> _callback) Update a feature gate (asynchronously) Partial update — only supplied fields change.okhttp3.CallupdateGateCall(String id, UpdateGateRequest updateGateRequest, String xProjectId, ApiCallback _callback) Build call for updateGateupdateGateWithHttpInfo(String id, UpdateGateRequest updateGateRequest, String xProjectId) Update a feature gate Partial update — only supplied fields change.
-
Constructor Details
-
FlagsApi
public FlagsApi() -
FlagsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createGateCall
public okhttp3.Call createGateCall(@Nonnull CreateGateRequest createGateRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for createGate- Parameters:
createGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createGate
public CreateGateResponse createGate(@Nonnull CreateGateRequest createGateRequest, @Nullable String xProjectId) throws ApiException Create a feature gate Creates a new gate. Default `enabled: true` at the supplied `rollout_pct` (`0` = fully dark). Only `name` is required. Request fields use snake_case (`owner_email`); the GET response returns camelCase (`ownerEmail`, `groupName`). Returns `409` if `name` already exists in the project (case-sensitive). **Use cases** - **Dark create + ramp later** — `{ \"name\": \"checkout_v2\" }` at 0% rollout. Ramp via PATCH after deploy validation. - **Targeted rollout** — supply `rules` to gate the caller (e.g. only `plan = pro` users) plus a `rollout_pct` to bucket within that audience. - **Gatekeeper stack** — supply `stack` instead of `rules`/`rollout_pct` for `internal ∪ beta ∪ public` fall-through. Stack entries evaluated top-to-bottom; first match wins. - **Dashboard metadata** — populate `title`, `description`, `folder`, `group`, `owner_email` so the admin UI is self-documenting from day one. - **Disabled on create** — pre-provision with `enabled: false` for a future launch; flip on with `POST /{id}/enable` at go-live.- Parameters:
createGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- CreateGateResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createGateWithHttpInfo
public ApiResponse<CreateGateResponse> createGateWithHttpInfo(@Nonnull CreateGateRequest createGateRequest, @Nullable String xProjectId) throws ApiException Create a feature gate Creates a new gate. Default `enabled: true` at the supplied `rollout_pct` (`0` = fully dark). Only `name` is required. Request fields use snake_case (`owner_email`); the GET response returns camelCase (`ownerEmail`, `groupName`). Returns `409` if `name` already exists in the project (case-sensitive). **Use cases** - **Dark create + ramp later** — `{ \"name\": \"checkout_v2\" }` at 0% rollout. Ramp via PATCH after deploy validation. - **Targeted rollout** — supply `rules` to gate the caller (e.g. only `plan = pro` users) plus a `rollout_pct` to bucket within that audience. - **Gatekeeper stack** — supply `stack` instead of `rules`/`rollout_pct` for `internal ∪ beta ∪ public` fall-through. Stack entries evaluated top-to-bottom; first match wins. - **Dashboard metadata** — populate `title`, `description`, `folder`, `group`, `owner_email` so the admin UI is self-documenting from day one. - **Disabled on create** — pre-provision with `enabled: false` for a future launch; flip on with `POST /{id}/enable` at go-live.- Parameters:
createGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<CreateGateResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createGateAsync
public okhttp3.Call createGateAsync(@Nonnull CreateGateRequest createGateRequest, @Nullable String xProjectId, ApiCallback<CreateGateResponse> _callback) throws ApiException Create a feature gate (asynchronously) Creates a new gate. Default `enabled: true` at the supplied `rollout_pct` (`0` = fully dark). Only `name` is required. Request fields use snake_case (`owner_email`); the GET response returns camelCase (`ownerEmail`, `groupName`). Returns `409` if `name` already exists in the project (case-sensitive). **Use cases** - **Dark create + ramp later** — `{ \"name\": \"checkout_v2\" }` at 0% rollout. Ramp via PATCH after deploy validation. - **Targeted rollout** — supply `rules` to gate the caller (e.g. only `plan = pro` users) plus a `rollout_pct` to bucket within that audience. - **Gatekeeper stack** — supply `stack` instead of `rules`/`rollout_pct` for `internal ∪ beta ∪ public` fall-through. Stack entries evaluated top-to-bottom; first match wins. - **Dashboard metadata** — populate `title`, `description`, `folder`, `group`, `owner_email` so the admin UI is self-documenting from day one. - **Disabled on create** — pre-provision with `enabled: false` for a future launch; flip on with `POST /{id}/enable` at go-live.- Parameters:
createGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_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
-
deleteGateCall
public okhttp3.Call deleteGateCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for deleteGate- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
deleteGate
public DeleteGateResponse deleteGate(@Nonnull String id, @Nullable String xProjectId) throws ApiException Delete a feature gate Soft-deletes the gate. Returns 409 if the gate is still referenced by a running experiment as a targeting gate — stop the experiment first. **Use case:** Tear down a gate after a feature has fully shipped and the rollout flag is no longer needed.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- DeleteGateResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteGateWithHttpInfo
public ApiResponse<DeleteGateResponse> deleteGateWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Delete a feature gate Soft-deletes the gate. Returns 409 if the gate is still referenced by a running experiment as a targeting gate — stop the experiment first. **Use case:** Tear down a gate after a feature has fully shipped and the rollout flag is no longer needed.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<DeleteGateResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
deleteGateAsync
public okhttp3.Call deleteGateAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DeleteGateResponse> _callback) throws ApiException Delete a feature gate (asynchronously) Soft-deletes the gate. Returns 409 if the gate is still referenced by a running experiment as a targeting gate — stop the experiment first. **Use case:** Tear down a gate after a feature has fully shipped and the rollout flag is no longer needed.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_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
-
disableGateCall
public okhttp3.Call disableGateCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for disableGate- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
disableGate
public DisableGateResponse disableGate(@Nonnull String id, @Nullable String xProjectId) throws ApiException Disable a gate Sets `enabled: false` so the gate evaluates to `false` for every caller, regardless of `rollout_pct` or `rules`. Use as a quick kill switch. **Use case:** Flip a gate off in production without redeploying — the canonical kill-switch flow.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- DisableGateResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
disableGateWithHttpInfo
public ApiResponse<DisableGateResponse> disableGateWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Disable a gate Sets `enabled: false` so the gate evaluates to `false` for every caller, regardless of `rollout_pct` or `rules`. Use as a quick kill switch. **Use case:** Flip a gate off in production without redeploying — the canonical kill-switch flow.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<DisableGateResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
disableGateAsync
public okhttp3.Call disableGateAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DisableGateResponse> _callback) throws ApiException Disable a gate (asynchronously) Sets `enabled: false` so the gate evaluates to `false` for every caller, regardless of `rollout_pct` or `rules`. Use as a quick kill switch. **Use case:** Flip a gate off in production without redeploying — the canonical kill-switch flow.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_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
-
enableGateCall
public okhttp3.Call enableGateCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for enableGate- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
enableGate
public EnableGateResponse enableGate(@Nonnull String id, @Nullable String xProjectId) throws ApiException Enable a gate Sets `enabled: true`. The current `rollout_pct` is preserved. **Use case:** Re-enable a previously disabled gate without re-issuing a full update.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- EnableGateResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
enableGateWithHttpInfo
public ApiResponse<EnableGateResponse> enableGateWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException Enable a gate Sets `enabled: true`. The current `rollout_pct` is preserved. **Use case:** Re-enable a previously disabled gate without re-issuing a full update.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<EnableGateResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
enableGateAsync
public okhttp3.Call enableGateAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<EnableGateResponse> _callback) throws ApiException Enable a gate (asynchronously) Sets `enabled: true`. The current `rollout_pct` is preserved. **Use case:** Re-enable a previously disabled gate without re-issuing a full update.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_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
-
listGatesCall
public okhttp3.Call listGatesCall(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q, ApiCallback _callback) throws ApiException Build call for listGates- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listGates
public ListGatesResponse listGates(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q) throws ApiException List feature gates Returns a single page of gates ordered by `updated_at desc, id desc`. Use the `cursor` query parameter to paginate. **Use case:** Snapshot every gate in the project — for example to render an admin overview or to drive a CI check that asserts no gate is left at 100% in staging.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)- Returns:
- ListGatesResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listGatesWithHttpInfo
public ApiResponse<ListGatesResponse> listGatesWithHttpInfo(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q) throws ApiException List feature gates Returns a single page of gates ordered by `updated_at desc, id desc`. Use the `cursor` query parameter to paginate. **Use case:** Snapshot every gate in the project — for example to render an admin overview or to drive a CI check that asserts no gate is left at 100% in staging.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)- Returns:
- ApiResponse<ListGatesResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listGatesAsync
public okhttp3.Call listGatesAsync(@Nullable String xProjectId, @Nullable Integer limit, @Nullable String cursor, @Nullable String q, ApiCallback<ListGatesResponse> _callback) throws ApiException List feature gates (asynchronously) Returns a single page of gates ordered by `updated_at desc, id desc`. Use the `cursor` query parameter to paginate. **Use case:** Snapshot every gate in the project — for example to render an admin overview or to drive a CI check that asserts no gate is left at 100% in staging.- Parameters:
xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)limit- Page size (1–500). Defaults to 100. (optional, default to 100)cursor- Opaque cursor returned in the previous page's `next_cursor`. Omit for the first page. (optional)q- Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)_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
-
updateGateCall
public okhttp3.Call updateGateCall(@Nonnull String id, @Nonnull UpdateGateRequest updateGateRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException Build call for updateGate- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)updateGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateGate
public UpdateGateResponse updateGate(@Nonnull String id, @Nonnull UpdateGateRequest updateGateRequest, @Nullable String xProjectId) throws ApiException Update a feature gate Partial update — only supplied fields change. Array fields (`rules`, `stack`) **replace** wholesale; there is no merge or append. `name` and the gate id are immutable. The response carries only `{ id }` — re-fetch via `GET /api/admin/gates` for the new row. **Use cases** - **Ramp rollout** — `{ \"rollout_pct\": 5000 }` for 50%. Basis points (0–10000); `100` = 1%. - **Kill switch** — `{ \"enabled\": false }`. Forces evaluation to `false` for every caller regardless of rules/rollout. Re-enable with `POST /{id}/enable` or `{ \"enabled\": true }`. - **Modify a rule's `in` set** — send the full new `rules` array. To add `'GB'` to `['US','CA']`: `{ \"rules\": [{ \"attr\": \"country\", \"op\": \"in\", \"value\": [\"US\",\"CA\",\"GB\"] }] }`. No per-rule patch endpoint. - **Add targeting from scratch** — `{ \"rules\": [{ \"attr\": \"email\", \"op\": \"regex\", \"value\": \"@acme\\\\.com$\" }] }`. - **Switch to gatekeeper stack** — send a non-null `stack`. To revert to flat eval, send `{ \"stack\": null }`. - **Update metadata** — any subset of `title`, `description`, `folder`, `group`, `owner_email`.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)updateGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- UpdateGateResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateGateWithHttpInfo
public ApiResponse<UpdateGateResponse> updateGateWithHttpInfo(@Nonnull String id, @Nonnull UpdateGateRequest updateGateRequest, @Nullable String xProjectId) throws ApiException Update a feature gate Partial update — only supplied fields change. Array fields (`rules`, `stack`) **replace** wholesale; there is no merge or append. `name` and the gate id are immutable. The response carries only `{ id }` — re-fetch via `GET /api/admin/gates` for the new row. **Use cases** - **Ramp rollout** — `{ \"rollout_pct\": 5000 }` for 50%. Basis points (0–10000); `100` = 1%. - **Kill switch** — `{ \"enabled\": false }`. Forces evaluation to `false` for every caller regardless of rules/rollout. Re-enable with `POST /{id}/enable` or `{ \"enabled\": true }`. - **Modify a rule's `in` set** — send the full new `rules` array. To add `'GB'` to `['US','CA']`: `{ \"rules\": [{ \"attr\": \"country\", \"op\": \"in\", \"value\": [\"US\",\"CA\",\"GB\"] }] }`. No per-rule patch endpoint. - **Add targeting from scratch** — `{ \"rules\": [{ \"attr\": \"email\", \"op\": \"regex\", \"value\": \"@acme\\\\.com$\" }] }`. - **Switch to gatekeeper stack** — send a non-null `stack`. To revert to flat eval, send `{ \"stack\": null }`. - **Update metadata** — any subset of `title`, `description`, `folder`, `group`, `owner_email`.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)updateGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)- Returns:
- ApiResponse<UpdateGateResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateGateAsync
public okhttp3.Call updateGateAsync(@Nonnull String id, @Nonnull UpdateGateRequest updateGateRequest, @Nullable String xProjectId, ApiCallback<UpdateGateResponse> _callback) throws ApiException Update a feature gate (asynchronously) Partial update — only supplied fields change. Array fields (`rules`, `stack`) **replace** wholesale; there is no merge or append. `name` and the gate id are immutable. The response carries only `{ id }` — re-fetch via `GET /api/admin/gates` for the new row. **Use cases** - **Ramp rollout** — `{ \"rollout_pct\": 5000 }` for 50%. Basis points (0–10000); `100` = 1%. - **Kill switch** — `{ \"enabled\": false }`. Forces evaluation to `false` for every caller regardless of rules/rollout. Re-enable with `POST /{id}/enable` or `{ \"enabled\": true }`. - **Modify a rule's `in` set** — send the full new `rules` array. To add `'GB'` to `['US','CA']`: `{ \"rules\": [{ \"attr\": \"country\", \"op\": \"in\", \"value\": [\"US\",\"CA\",\"GB\"] }] }`. No per-rule patch endpoint. - **Add targeting from scratch** — `{ \"rules\": [{ \"attr\": \"email\", \"op\": \"regex\", \"value\": \"@acme\\\\.com$\" }] }`. - **Switch to gatekeeper stack** — send a non-null `stack`. To revert to flat eval, send `{ \"stack\": null }`. - **Update metadata** — any subset of `title`, `description`, `folder`, `group`, `owner_email`.- Parameters:
id- Stable opaque gate id (`gat_…`) or the gate's `name`. (required)updateGateRequest- (required)xProjectId- Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)_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
-