From 202e7cabb46e0ffedb9470dc8deeb9583ce76b3f Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 15:06:50 +0530 Subject: [PATCH 1/7] SK-2849: Add v1.x deprecation warning and EOL notic (#327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(SK-2849): add v1.x deprecation warning and EOL notice - Print WARN-level deprecation message on Skyflow.init() startup - Update pom.xml description with EOL date (2026-10-31) and migration guide link Co-Authored-By: Claude Sonnet 4.6 * SK-2837: Add V2.1 migration guide and README upgrade banner (#313) * docs: add V2.1 migration guide and README upgrade banner Adds docs/migrate_to_v2.md covering auth options, client init, request/response structure, error format, and camelCase field name changes for V1 → V2 migration. Adds README banner pointing V1 users to the guide and noting EOL on 2026-10-31. Co-Authored-By: Claude Sonnet 4.6 * docs: update migration guide with v2.1 changes Add sections for UpdateRequest skyflowId preference, updateLogLevel and getBYOT deprecations. Co-Authored-By: Claude Sonnet 4.6 * docs: add downloadURL→downloadUrl rename to migration guide method renames table Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 * chore: update internal release workflow to trigger on v1/release/* branches Co-Authored-By: Claude Sonnet 4.6 * chore: update internal release trigger to release/v1/* branches Co-Authored-By: Claude Sonnet 4.6 * chore: add workflow_dispatch and upgrade action versions * [AUTOMATED] Private Release 2.1.0-dev-7a0438b * chore: skip tests in v1 internal release deploy * chore: internal release manual-only trigger for v1 Co-Authored-By: Claude Sonnet 4.6 * chore: rename internal release workflow for consistency Co-Authored-By: Claude Sonnet 4.6 * chore: restore release/v1/* trigger, remove unintentional tag trigger Co-Authored-By: Claude Sonnet 4.6 * chore: remove manual trigger after merge Co-Authored-By: Claude Sonnet 4.6 * chore: revert workflow changes to v1 baseline Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 Co-authored-by: Devesh-Skyflow --- README.md | 3 + docs/migrate_to_v2.md | 284 +++++++++++++++++++ pom.xml | 6 +- src/main/java/com/skyflow/vault/Skyflow.java | 2 + 4 files changed, 292 insertions(+), 3 deletions(-) create mode 100644 docs/migrate_to_v2.md diff --git a/README.md b/README.md index 647e8fe5..efc15e19 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # Skyflow Java + +> **Java V2.1.0 IS NOW AVAILABLE:** A new, improved version of the Skyflow SDK is ready with flexible authentication, multi-vault support, builder patterns, and richer error diagnostics. V1 is in maintenance mode (security patches only) and will reach End of Life on October 31, 2026. We recommend upgrading to v2.1.0 — see the **[Migration Guide](docs/migrate_to_v2.md)** for step-by-step instructions. + The Skyflow Java SDK is designed to help with integrating Skyflow into a Java backend. [![CI](https://img.shields.io/static/v1?label=CI&message=passing&color=green?style=plastic&logo=github)](https://github.com/skyflowapi/skyflow-java/actions) diff --git a/docs/migrate_to_v2.md b/docs/migrate_to_v2.md new file mode 100644 index 00000000..671210fd --- /dev/null +++ b/docs/migrate_to_v2.md @@ -0,0 +1,284 @@ +# Skyflow Java SDK — V1 to V2 Migration Guide + +This guide covers the steps to migrate the Skyflow Java SDK from v1 to v2. + +--- + +## Authentication options + +In V2, multiple authentication options are available. You can now provide credentials in the following ways: + +- Environment variable (`SKYFLOW_CREDENTIALS`) _(Recommended)_ +- API Key +- Path to credentials JSON file +- Stringified JSON of credentials +- Bearer token + +**V1 (Old)** + +```java +static class DemoTokenProvider implements TokenProvider { + @Override + public String getBearerToken() throws Exception { + ResponseToken res = null; + try { + String filePath = ""; + res = Token.generateBearerToken(filePath); + } catch (SkyflowException e) { + e.printStackTrace(); + } + return res.getAccessToken(); + } +} +``` + +**V2 (New): Choose one of the following:** + +```java +// Option 1: API Key (Recommended) +Credentials skyflowCredentials = new Credentials(); +skyflowCredentials.setApiKey(""); + +// Option 2: Environment Variable (Recommended) +// Set SKYFLOW_CREDENTIALS in your environment + +// Option 3: Credentials File +skyflowCredentials.setPath(""); + +// Option 4: Stringified JSON +skyflowCredentials.setCredentialsString(""); + +// Option 5: Bearer Token +skyflowCredentials.setToken(""); +``` + +> **Notes:** +> - Use only ONE authentication method per credentials object. +> - API Key or environment variable are recommended for production. +> - For priority order see [Quickstart — Initialize the client](../README.md#initialize-the-client). + +--- + +## Initializing the client + +V2 introduces a builder pattern for client initialization with multi-vault support. + +**Key changes:** +- `vaultUrl` replaced with `clusterId` (derived from vault URL) +- Added `env` specification (e.g. `Env.PROD`, `Env.SANDBOX`) +- Log level is now per-client-instance + +**V1 (Old)** + +```java +DemoTokenProvider demoTokenProvider = new DemoTokenProvider(); +SkyflowConfiguration skyflowConfig = new SkyflowConfiguration( + "", "", demoTokenProvider +); +Skyflow skyflowClient = Skyflow.init(skyflowConfig); +``` + +**V2 (New)** + +```java +Credentials credentials = new Credentials(); +credentials.setPath(""); + +VaultConfig config = new VaultConfig(); +config.setVaultId(""); +config.setClusterId(""); +config.setEnv(Env.PROD); +config.setCredentials(credentials); + +Skyflow skyflowClient = Skyflow.builder() + .setLogLevel(LogLevel.DEBUG) + .addVaultConfig(config) + .build(); +``` + +--- + +## Request and response structure + +V2 removes third-party JSON objects in favour of native `ArrayList` and `HashMap` with a builder pattern for requests. + +**V1 (Old) — Request** + +```java +JSONObject recordsJson = new JSONObject(); +JSONArray recordsArrayJson = new JSONArray(); +JSONObject recordJson = new JSONObject(); +recordJson.put("table", "cards"); +JSONObject fieldsJson = new JSONObject(); +fieldsJson.put("cardNumber", "41111111111"); +fieldsJson.put("cvv", "123"); +recordJson.put("fields", fieldsJson); +recordsArrayJson.add(recordJson); +recordsJson.put("records", recordsArrayJson); +try { + JSONObject insertResponse = skyflowClient.insert(records); +} catch (SkyflowException e) { + System.out.println(e); +} +``` + +**V2 (New) — Request** + +```java +HashMap value = new HashMap<>(); +value.put("", ""); +value.put("", ""); +ArrayList> values = new ArrayList<>(); +values.add(value); + +InsertRequest insertRequest = InsertRequest.builder() + .table("") + .values(values) + .returnTokens(true) + .build(); + +InsertResponse response = skyflowClient.vault().insert(insertRequest); +``` + +**V1 (Old) — Response** + +```json +{ + "records": [ + { + "table": "cards", + "fields": { + "skyflow_id": "16419435-aa63-4823-aae7-19c6a2d6a19f", + "cardNumber": "f3907186-e7e2-466f-91e5-48e12c2bcbc1", + "cvv": "1989cb56-63da-4482-a2df-1f74cd0dd1a5" + } + } + ] +} +``` + +**V2 (New) — Response** + +```json +{ + "insertedFields": [ + { + "skyflowId": "9fac9201-7b8a-4446-93f8-5244e1213bd1", + "card_number": "5484-7829-1702-9110", + "cardholder_name": "b2308e2a-c1f5-469b-97b7-1f193159399b" + } + ], + "errors": null +} +``` + +--- + +## Request options + +V2 builder pattern replaces V1 options objects. + +**V1 (Old)** + +```java +InsertOptions insertOptions = new InsertOptions(true); +``` + +**V2 (New)** + +```java +InsertRequest request = InsertRequest.builder() + .table("") + .values(values) + .continueOnError(false) + .tokenMode(TokenMode.DISABLE) + .returnTokens(false) + .upsert("") + .build(); +``` + +--- + +## Error structure + +V2 provides richer error details for easier debugging. + +**V1 (Old)** + +```json +{ + "code": "", + "description": "" +} +``` + +**V2 (New)** + +```json +{ + "httpStatus": "", + "grpcCode": "", + "httpCode": "", + "message": "", + "requestId": "", + "details": ["
"] +} +``` + +--- + +## Credential field names (v2.1+) + +The credentials JSON file field names are updated to follow Java camelCase conventions. Both old and new forms are permanently accepted. + +| Old form (still accepted) | New form (preferred) | +|---|---| +| `clientID` | `clientId` | +| `keyID` | `keyId` | +| `tokenURI` | `tokenUri` | + +--- + +## Response field names (v2.1+) + +Response maps now return `skyflowId` (camelCase). The legacy `skyflow_id` key is still present for backward compatibility but is deprecated. + +| Deprecated (still returned) | Preferred | +|---|---| +| `skyflow_id` | `skyflowId` | + +--- + +## Update request data key (v2.1+) + +When calling `update()`, use `skyflowId` (camelCase) as the key in the data map to identify the record. Using `skyflow_id` still works but emits a deprecation warning. If both keys are present, `skyflowId` takes precedence. + +```java +HashMap data = new HashMap<>(); +data.put("skyflowId", ""); // preferred +data.put("card_number", ""); + +UpdateRequest request = UpdateRequest.builder() + .table("") + .data(data) + .returnTokens(true) + .build(); + +skyflowClient.vault().update(request); +``` + +--- + +## Method renames (v2.1+) + +The following instance methods have been renamed for consistency. The old names still work but emit deprecation warnings. + +| Deprecated | Preferred | +|---|---| +| `skyflowClient.updateLogLevel(logLevel)` | `skyflowClient.setLogLevel(logLevel)` | +| `TokenMode.getBYOT()` | `TokenMode.getByot()` | +| `DetokenizeRequest.builder().downloadURL(b)` | `DetokenizeRequest.builder().downloadUrl(b)` | + +--- + +For the full list of changes see [CHANGELOG.md](../CHANGELOG.md). diff --git a/pom.xml b/pom.xml index 87e2d899..195127e8 100644 --- a/pom.xml +++ b/pom.xml @@ -6,11 +6,11 @@ com.skyflow skyflow-java - 1.15.0 + 2.1.0-dev.7a0438b jar ${project.groupId}:${project.artifactId} - Skyflow SDK for the Java programming language + [DEPRECATED - EOL 2026-10-31] Skyflow Java SDK v1.x. Migrate to v2: https://github.com/skyflowapi/skyflow-java/blob/main/docs/migrate_to_v2.md https://github.com/skyflowapi/skyflow-java/tree/main @@ -233,4 +233,4 @@ - \ No newline at end of file + diff --git a/src/main/java/com/skyflow/vault/Skyflow.java b/src/main/java/com/skyflow/vault/Skyflow.java index b444dc4d..0cc1e18b 100644 --- a/src/main/java/com/skyflow/vault/Skyflow.java +++ b/src/main/java/com/skyflow/vault/Skyflow.java @@ -37,6 +37,8 @@ private Skyflow(SkyflowConfiguration config) { } public static Skyflow init(SkyflowConfiguration clientConfig) throws SkyflowException { + LogUtil.printWarningLog("skyflow-java v1.x is deprecated and will reach End of Life on October 31, 2026. " + + "Please migrate to v2: https://github.com/skyflowapi/skyflow-java/blob/main/docs/migrate_to_v2.md"); return new Skyflow(clientConfig); } From 53decb4015b10f1a5ee2869ae1e0765f9dd44651 Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 09:37:05 +0000 Subject: [PATCH 2/7] [AUTOMATED] Private Release 2.1.0-dev-202e7ca --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 195127e8..fbb8cc9d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.skyflow skyflow-java - 2.1.0-dev.7a0438b + 2.1.0-dev.202e7ca jar ${project.groupId}:${project.artifactId} From 9ad0ca1ee8be8c19fc687fa5afac6b0d8b6a932f Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 16:06:14 +0530 Subject: [PATCH 3/7] Devesh/sk 2849 v1 deprication (#328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(SK-2849): add v1.x deprecation warning and EOL notice - Print WARN-level deprecation message on Skyflow.init() startup - Update pom.xml description with EOL date (2026-10-31) and migration guide link Co-Authored-By: Claude Sonnet 4.6 * SK-2837: Add V2.1 migration guide and README upgrade banner (#313) * docs: add V2.1 migration guide and README upgrade banner Adds docs/migrate_to_v2.md covering auth options, client init, request/response structure, error format, and camelCase field name changes for V1 → V2 migration. Adds README banner pointing V1 users to the guide and noting EOL on 2026-10-31. Co-Authored-By: Claude Sonnet 4.6 * docs: update migration guide with v2.1 changes Add sections for UpdateRequest skyflowId preference, updateLogLevel and getBYOT deprecations. Co-Authored-By: Claude Sonnet 4.6 * docs: add downloadURL→downloadUrl rename to migration guide method renames table Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 * chore: update internal release workflow to trigger on v1/release/* branches Co-Authored-By: Claude Sonnet 4.6 * chore: update internal release trigger to release/v1/* branches Co-Authored-By: Claude Sonnet 4.6 * chore: add workflow_dispatch and upgrade action versions * [AUTOMATED] Private Release 2.1.0-dev-7a0438b * chore: skip tests in v1 internal release deploy * chore: internal release manual-only trigger for v1 Co-Authored-By: Claude Sonnet 4.6 * chore: rename internal release workflow for consistency Co-Authored-By: Claude Sonnet 4.6 * chore: restore release/v1/* trigger, remove unintentional tag trigger Co-Authored-By: Claude Sonnet 4.6 * chore: remove manual trigger after merge Co-Authored-By: Claude Sonnet 4.6 * chore: revert workflow changes to v1 baseline Co-Authored-By: Claude Sonnet 4.6 * fix: fix dead links in README for InsertBulk examples Co-Authored-By: Claude Sonnet 4.6 * chore: upgrade action versions and skip tests for v1 release Co-Authored-By: Claude Sonnet 4.6 * fix: fix sample links in README to point to v1 branch Co-Authored-By: Claude Sonnet 4.6 * fix: fix dead link in migration guide to point to v2 README Co-Authored-By: Claude Sonnet 4.6 * fix: point migration guide link to v1 README vault-apis section Co-Authored-By: Claude Sonnet 4.6 * fix: point migration guide link to main README initialize-the-client section Co-Authored-By: Claude Sonnet 4.6 * docs: add breaking changes summary table to migration guide Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 Co-authored-by: Devesh-Skyflow --- .github/workflows/shared-build-and-deploy.yml | 8 ++--- README.md | 32 +++++++++---------- docs/migrate_to_v2.md | 15 ++++++++- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/shared-build-and-deploy.yml b/.github/workflows/shared-build-and-deploy.yml index 43a54dec..22456b4c 100644 --- a/.github/workflows/shared-build-and-deploy.yml +++ b/.github/workflows/shared-build-and-deploy.yml @@ -38,15 +38,15 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} fetch-depth: 0 - name: Set up maven or jfrog repository - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: '1.8' + java-version: '8' distribution: 'adopt' server-id: ${{ inputs.server-id }} server-username: SERVER_USERNAME @@ -98,7 +98,7 @@ jobs: json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }} - name: Publish package - run: mvn clean deploy -P ${{ inputs.profile }} + run: mvn clean deploy -P ${{ inputs.profile }} -DskipTests env: SERVER_USERNAME: ${{ secrets.server-username }} SERVER_PASSWORD: ${{ secrets.server-password }} diff --git a/README.md b/README.md index efc15e19..80db25f7 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ The [Service Account](https://github.com/skyflowapi/skyflow-java/tree/main/src/m The `generateBearerToken(filepath)` function takes the credentials file path for token generation, alternatively, you can also send the entire credentials as string, by using `generateBearerTokenFromCreds(credentials)` -[Example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/TokenGenerationExample.java +[Example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/TokenGenerationExample.java ): ```java @@ -112,7 +112,7 @@ Context-Aware Authorization enables you to embed context values into a Bearer to The service account generated with `context_id` identifier enabled can be used to generate bearer tokens with `context`, which is a `jwt` claim for a skyflow generated bearer token. The token generated from this service account will have a `context_identifier` claim and is valid for 60 minutes and can be used to make API calls to vault services as well as management API(s) based on the permissions of the service account. -[Example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/BearerTokenWithContextGenerationExample.java): +[Example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/BearerTokenWithContextGenerationExample.java): ``` java import com.skyflow.entities.ResponseToken; @@ -157,13 +157,13 @@ public class BearerTokenWithContextGeneration { Note: - You can pass either a service account key credentials file path or a service account key credentials as string to the `setCredentials` method of the BearerTokenBuilder class. - If you pass both a file path and string to the `setCredentials` method, the last method used takes precedence. -- To generate multiple bearer tokens using a thread, see this [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/BearerTokenGenerationUsingThreadsExample.java) +- To generate multiple bearer tokens using a thread, see this [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/BearerTokenGenerationUsingThreadsExample.java) ## Service Account Scoped Bearer Token Generation A service account that has multiple roles can generate bearer tokens with access restricted to a specific role by providing the appropriate `roleID`. Generated bearer tokens are valid for 60 minutes and can only perform operations with the permissions associated with the specified role. -[Example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/ScopedTokenGenerationExample.java): +[Example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/ScopedTokenGenerationExample.java): ```java import java.io.File; @@ -197,7 +197,7 @@ Note: Skyflow generates data tokens when sensitive data is inserted into the vault. These data tokens can be digitally signed with the private key of the service account credentials, which adds an additional layer of protection. Signed tokens can be detokenized by passing the signed data token and a bearer token generated from service account credentials. The service account must have appropriate permissions and context to detokenize the signed data tokens. -[Example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/SignedTokenGenerationExample.java): +[Example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/SignedTokenGenerationExample.java): ``` java import com.skyflow.errors.SkyflowException; @@ -352,7 +352,7 @@ InsertOptions insertOptions = new InsertOptions( ); ``` -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/InsertWithUpsertExample.java) of insert call with upsert support +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/InsertWithUpsertExample.java) of insert call with upsert support ```java JSONObject recordsJson = new JSONObject(); JSONArray recordsArrayJson = new JSONArray(); @@ -398,7 +398,7 @@ Sample insert Response } ``` -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/InsertWithContinueOnErrorExample.java) of Insert call with `continueOnError` support: +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/InsertWithContinueOnErrorExample.java) of Insert call with `continueOnError` support: ```java JSONObject records = new JSONObject(); JSONArray recordsArray = new JSONArray(); @@ -494,7 +494,7 @@ InsertBulkOptions insertOptions = new InsertBulkOptions( upsertOptions ); ``` -An [example]() of insert call with upsert support: +An [example](samples/src/main/java/com/example/InsertBulkWithUpsertExample.java) of insert call with upsert support: ```java JSONObject recordsJson = new JSONObject(); @@ -541,7 +541,7 @@ Sample insert Response } ``` -An [example]() of Insert using bulk call: +An [example](samples/src/main/java/com/example/InsertBulkExample.java) of Insert using bulk call: ```java JSONObject records = new JSONObject(); JSONArray recordsArray = new JSONArray(); @@ -622,7 +622,7 @@ recordsJson.put("records", recordsArrayJson); Note: `redaction` defaults to [`RedactionType.PLAIN_TEXT`](#redaction-types). -The following [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/DetokenizeExample.java) code makes a detokenize call to reveal the masked value of a token: +The following [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/DetokenizeExample.java) code makes a detokenize call to reveal the masked value of a token: ```java JSONObject recordsJson = new JSONObject(); @@ -771,7 +771,7 @@ There are four accepted values for RedactionType: * `DEFAULT` ### Examples -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/GetExample.java) call using Skyflow IDs with RedactionType. +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/GetExample.java) call using Skyflow IDs with RedactionType. ```java import com.skyflow.entities.RedactionType; @@ -918,7 +918,7 @@ Sample response: ] } ``` -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/GetExample.java) call using column names and values. +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/GetExample.java) call using column names and values. ```java import com.skyflow.entities.RedactionType; @@ -1025,7 +1025,7 @@ There are 4 accepted values in RedactionType: - `REDACTED` - `DEFAULT` -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/GetByIdExample.java) getById call +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/GetByIdExample.java) getById call ```java import com.skyflow.entities.RedactionType; @@ -1118,7 +1118,7 @@ records.put("records", recordsArray); UpdateOptions updateOptions = new UpdateOptions(true); ``` -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/UpdateExample.java) of update call: +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/UpdateExample.java) of update call: ```java JSONObject records = new JSONObject(); JSONArray recordsArray = new JSONArray(); @@ -1255,7 +1255,7 @@ invokeConfig.put("requestBody", requestBodyJson); **pathParams, queryParams, requestHeader, requestBody** are the JSON objects that will be sent through the connection integration url. -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/InvokeConnectionExample.java) of invokeConnection: +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/InvokeConnectionExample.java) of invokeConnection: ```java JSONObject invokeConfig = new JSONObject(); invokeConfig.put("connectionURL", ""); @@ -1305,7 +1305,7 @@ skyflowClient.query(queryInput); ``` See [Query your data](https://docs.skyflow.com/query-data/) and [Execute Query](https://docs.skyflow.com/record/#QueryService_ExecuteQuery) for guidelines and restrictions on supported SQL statements, operators, and keywords. -An [example](https://github.com/skyflowapi/skyflow-java/blob/main/samples/src/main/java/com/example/QueryExample.java) of query call: +An [example](https://github.com/skyflowapi/skyflow-java/blob/v1/samples/src/main/java/com/example/QueryExample.java) of query call: ```java JSONObject queryInput = new JSONObject(); queryInput.put("query", "SELECT * FROM cards WHERE skyflow_id='3ea3861-x107-40w8-la98-106sp08ea83f'"); diff --git a/docs/migrate_to_v2.md b/docs/migrate_to_v2.md index 671210fd..fe996e1b 100644 --- a/docs/migrate_to_v2.md +++ b/docs/migrate_to_v2.md @@ -4,6 +4,19 @@ This guide covers the steps to migrate the Skyflow Java SDK from v1 to v2. --- +## Breaking Changes from V1 to V2 + +| Area | V1 | V2 | +|------|----|----| +| **Client initialization** | `TokenProvider` / `vaultURL` pattern | `Credentials` + `VaultConfig` passed to `Skyflow.builder()` | +| **Vault URL** | Single `vaultURL` string | Split into `vaultId` + `clusterId` | +| **Request/response types** | Raw JSON (`JSONObject`) | Typed objects (e.g. `InsertRequest` / `InsertResponse`) | +| **Error handling** | Basic error message | Restructured with `httpStatus`, `details`, and `requestId` | +| **Logging** | Global log level | Per-instance `logLevel` set via `Skyflow.builder().setLogLevel(LogLevel.INFO)` | +| **Import paths** | `com.skyflow.vault.*` | New module structure across all packages | + +--- + ## Authentication options In V2, multiple authentication options are available. You can now provide credentials in the following ways: @@ -55,7 +68,7 @@ skyflowCredentials.setToken(""); > **Notes:** > - Use only ONE authentication method per credentials object. > - API Key or environment variable are recommended for production. -> - For priority order see [Quickstart — Initialize the client](../README.md#initialize-the-client). +> - For priority order see [Quickstart — Initialize the client](https://github.com/skyflowapi/skyflow-java/blob/main/README.md#initialize-the-client). --- From 265f87c8682247c09184c910c8e6a6dbf569cddf Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 10:36:29 +0000 Subject: [PATCH 4/7] [AUTOMATED] Private Release 2.1.0-dev-9ad0ca1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fbb8cc9d..2ade760c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.skyflow skyflow-java - 2.1.0-dev.202e7ca + 2.1.0-dev.9ad0ca1 jar ${project.groupId}:${project.artifactId} From 4cf2ab82dca159001caff0c3006badb9ce3316aa Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 16:20:34 +0530 Subject: [PATCH 5/7] docs: convert breaking changes table to bullet points in migration guide Co-Authored-By: Claude Sonnet 4.6 --- docs/migrate_to_v2.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/migrate_to_v2.md b/docs/migrate_to_v2.md index fe996e1b..e019141f 100644 --- a/docs/migrate_to_v2.md +++ b/docs/migrate_to_v2.md @@ -6,14 +6,12 @@ This guide covers the steps to migrate the Skyflow Java SDK from v1 to v2. ## Breaking Changes from V1 to V2 -| Area | V1 | V2 | -|------|----|----| -| **Client initialization** | `TokenProvider` / `vaultURL` pattern | `Credentials` + `VaultConfig` passed to `Skyflow.builder()` | -| **Vault URL** | Single `vaultURL` string | Split into `vaultId` + `clusterId` | -| **Request/response types** | Raw JSON (`JSONObject`) | Typed objects (e.g. `InsertRequest` / `InsertResponse`) | -| **Error handling** | Basic error message | Restructured with `httpStatus`, `details`, and `requestId` | -| **Logging** | Global log level | Per-instance `logLevel` set via `Skyflow.builder().setLogLevel(LogLevel.INFO)` | -| **Import paths** | `com.skyflow.vault.*` | New module structure across all packages | +- **Client initialization**: `TokenProvider` / `vaultURL` pattern replaced by `Credentials` + `VaultConfig` passed to `Skyflow.builder()`. +- **Vault URL**: `vaultURL` is now split into `vaultId` + `clusterId`. +- **Request/response types**: Operations like insert, get, detokenize now use typed request/response objects (e.g. `InsertRequest` / `InsertResponse`) instead of raw JSON (`JSONObject`). +- **Error handling**: Error objects restructured to include `httpStatus`, `details`, and `requestId`. +- **Logging**: Global log level replaced by per-instance `logLevel` set via `Skyflow.builder().setLogLevel(LogLevel.INFO)`. +- **Import paths**: New module structure across all packages. --- From 17e243c9d95ca5316bdb8651a74ce024dac08bf1 Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 10:50:53 +0000 Subject: [PATCH 6/7] [AUTOMATED] Private Release 2.1.0-dev-4cf2ab8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2ade760c..533f6b5d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.skyflow skyflow-java - 2.1.0-dev.9ad0ca1 + 2.1.0-dev.4cf2ab8 jar ${project.groupId}:${project.artifactId} From ed00daa474ccc7b9644b3f643af2d75f5ee8c162 Mon Sep 17 00:00:00 2001 From: Devesh-Skyflow Date: Wed, 27 May 2026 17:15:25 +0530 Subject: [PATCH 7/7] fix: version --- pom.xml | 2 +- src/main/java/com/skyflow/common/utils/Constants.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 533f6b5d..a478ab04 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.skyflow skyflow-java - 2.1.0-dev.4cf2ab8 + 1.15.1 jar ${project.groupId}:${project.artifactId} diff --git a/src/main/java/com/skyflow/common/utils/Constants.java b/src/main/java/com/skyflow/common/utils/Constants.java index 05e22578..5ec00897 100644 --- a/src/main/java/com/skyflow/common/utils/Constants.java +++ b/src/main/java/com/skyflow/common/utils/Constants.java @@ -3,6 +3,6 @@ public class Constants { public static final String SDK_METRICS_HEADER_KEY = "sky-metadata"; - public static final String SDK_VERSION = "1.15.0"; + public static final String SDK_VERSION = "1.15.1"; }