{"id":36418145,"url":"https://github.com/stackitcloud/stackit-sdk-java","last_synced_at":"2026-01-11T17:01:22.231Z","repository":{"id":313374599,"uuid":"1023588610","full_name":"stackitcloud/stackit-sdk-java","owner":"stackitcloud","description":"The STACKIT SDK for Java","archived":false,"fork":false,"pushed_at":"2025-12-22T10:26:05.000Z","size":889,"stargazers_count":7,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-24T07:55:57.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackitcloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-21T11:43:19.000Z","updated_at":"2025-12-17T15:34:22.000Z","dependencies_parsed_at":"2025-09-05T17:42:51.388Z","dependency_job_id":"9d09969d-1ac7-4bed-bc03-49a1312d877a","html_url":"https://github.com/stackitcloud/stackit-sdk-java","commit_stats":null,"previous_names":["stackitcloud/stackit-sdk-java"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/stackitcloud/stackit-sdk-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackitcloud%2Fstackit-sdk-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackitcloud%2Fstackit-sdk-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackitcloud%2Fstackit-sdk-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackitcloud%2Fstackit-sdk-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackitcloud","download_url":"https://codeload.github.com/stackitcloud/stackit-sdk-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackitcloud%2Fstackit-sdk-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T17:00:51.360Z","updated_at":"2026-01-11T17:01:22.219Z","avatar_url":"https://github.com/stackitcloud.png","language":"Java","readme":"\u003cdiv align=\"center\"\u003e\n\u003cbr\u003e\n\u003cimg src=\".github/images/stackit-logo.svg\" alt=\"STACKIT logo\" width=\"50%\"/\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003c/div\u003e\n\n# STACKIT SDK for Java (BETA)\n\n[![GitHub License](https://img.shields.io/github/license/stackitcloud/stackit-sdk-java)](https://www.apache.org/licenses/LICENSE-2.0)\n[![CI/CD](https://github.com/stackitcloud/stackit-sdk-java/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/stackitcloud/stackit-sdk-java/actions/workflows/ci.yaml)\n\nThis repository contains the STACKIT SDKs for Java.\n\n## Getting started\n\nRequires Java 8 or higher.\n\nThe release artifacts of the STACKIT Java SDK are available on [Maven Central](https://central.sonatype.com/namespace/cloud.stackit.sdk).\nSee below how to use them in your Java project.\n\n### Maven\n\nAdd the dependencies for the services you want to interact with to your project's POM, e.g. `iaas` and `resourcemanager` (replace `\u003cSDK_VERSION\u003e` with the latest version of each SDK submdoule):\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecloud.stackit.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003eiaas\u003c/artifactId\u003e\n  \u003cversion\u003e\u003cSDK_VERSION\u003e\u003c/version\u003e\n  \u003cscope\u003ecompile\u003c/scope\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003ecloud.stackit.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003eresourcemanager\u003c/artifactId\u003e\n  \u003cversion\u003e\u003cSDK_VERSION\u003e\u003c/version\u003e\n  \u003cscope\u003ecompile\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\nAdd the dependencies to your project's build file (replace `\u003cSDK_VERSION\u003e` with the latest version of each SDK submdoule):\n\n```groovy\n  repositories {\n    mavenCentral()\n  }\n\n  dependencies {\n     // add the dependencies of the services you want to interact with here,\n     // e.g. \"iaas\" and \"resourcemanager\"\n     implementation \"cloud.stackit.sdk:iaas:\u003cSDK_VERSION\u003e\"\n     implementation \"cloud.stackit.sdk:resourcemanger:\u003cSDK_VERSION\u003e\"\n  }\n```\n\n## Examples\n\nExamples on services, configuration and authentication possibilities can be found in the [examples folder](/examples).\n\n\u003e [!WARNING]\n\u003e For production usage, especially when working with multiple STACKIT SDK modules, consider passing your own `OkHttpClient` \n\u003e object (as recommended in the [OkHttpClient lib docs](https://square.github.io/okhttp/3.x/okhttp/index.html?okhttp3/OkHttpClient.html)).\n\u003e See our [custom HTTP client example](/examples/custom-http-client/src/main/java/cloud/stackit/sdk/customhttpclient/examples/CustomHttpClientExample.java) for reference.\n\n## Authorization\n\nTo authenticate to the SDK, you will need a [service account](https://docs.stackit.cloud/platform/access-and-identity/service-accounts/). Create it in the STACKIT Portal and assign it the necessary permissions, e.g. `project.owner`.\n\nThe Java SDK supports only Key flow for authentication.\n\nWhen setting up authentication, the SDK will search for credentials in several locations, following a specific order:\n\n1. Explicit configuration, e.g. by using the option `new CoreConfiguration().serviceAccountKeyPath(\"path/to/sa_key.json\")`\n2. Environment variable, e.g. by setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH`\n3. Credentials file\n\n   The SDK will check the credentials file located in the path defined by the `STACKIT_CREDENTIALS_PATH` env var, if specified,\n   or in `$HOME/.stackit/credentials.json` as a fallback.\n   The credentials file should be a json and each credential should be set using the name of the respective environment variable, as stated below in each flow. Example:\n\n   ```json\n   {\n     \"STACKIT_SERVICE_ACCOUNT_KEY_PATH\": \"path/to/sa_key.json\",\n     \"STACKIT_PRIVATE_KEY_PATH\": \"(OPTIONAL) when the private key isn't included in the Service Account key\"\n   }\n   ```\n\n### Example\n\nThe following instructions assume that you have created a service account and assigned it the necessary permissions, e.g. `project.owner`.\n\nTo use the key flow, you need to have a service account key, which must have an RSA key-pair attached to it.\n\nWhen creating the service account key, a new pair can be created automatically, which will be included in the service account key.\nThis will make it much easier to configure the key flow authentication in the SDK, by just providing the service account key.\n\n\u003e **Optionally**, you can provide your own private key when creating the service account key, which will then require you to also provide it explicitly to the SDK, additionally to the service account key.\n\u003e Check the STACKIT Docs for an [example of how to create your own key-pair](https://docs.stackit.cloud/platform/access-and-identity/service-accounts/how-tos/manage-service-account-keys/).\n\nTo configure the key flow, follow this steps:\n\n1. Create a service account key:\n   - Use the STACKIT Portal: go to the `Service Accounts` tab, choose a `Service Account` and go to `Service Account Keys` to create a key. For more details, see [Create a service account key](https://docs.stackit.cloud/platform/access-and-identity/service-accounts/how-tos/manage-service-account-keys/).\n2. Save the content of the service account key by copying it and saving it in a JSON file. The expected format of the service account key is **JSON** with the following structure:\n\n   ```json\n   {\n     \"id\": \"uuid\",\n     \"publicKey\": \"public key\",\n     \"createdAt\": \"2023-08-24T14:15:22Z\",\n     \"validUntil\": \"2023-08-24T14:15:22Z\",\n     \"keyType\": \"USER_MANAGED\",\n     \"keyOrigin\": \"USER_PROVIDED\",\n     \"keyAlgorithm\": \"RSA_2048\",\n     \"active\": true,\n     \"credentials\": {\n       \"kid\": \"string\",\n       \"iss\": \"my-sa@sa.stackit.cloud\",\n       \"sub\": \"uuid\",\n       \"aud\": \"string\",\n       \"privateKey\": \"(OPTIONAL) private key when generated by the SA service\"\n     }\n   }\n   ```\n\n3. Configure the service account key for authentication in the SDK by following one of the alternatives below:\n\n   - using the configuration options:\n\n     ```java\n     CoreConfiguration config =\n                new CoreConfiguration()\n                        ...\n                        .serviceAccountKeyPath(\"/path/to/service_account_key.json\");\n\n     ResourceManagerApi api = new ResourceManagerApi(config);\n     ```\n\n   - setting the environment variable: `STACKIT_SERVICE_ACCOUNT_KEY_PATH`\n   - setting `STACKIT_SERVICE_ACCOUNT_KEY_PATH` in the credentials file (see above)\n\n\u003e **Optionally, only if you have provided your own RSA key-pair when creating the service account key**, you also need to configure your private key (takes precedence over the one included in the service account key, if present). **The private key must be PEM encoded** and can be provided using one of the options below:\n\u003e\n\u003e - using the configuration options:\n\u003e   ```java\n\u003e     CoreConfiguration config =\n\u003e                new CoreConfiguration()\n\u003e                        ...\n\u003e                        .privateKeyPath(\"/path/to/private_key.pem\");\n\u003e   ```\n\u003e - setting the environment variable: `STACKIT_PRIVATE_KEY_PATH`\n\u003e - setting `STACKIT_PRIVATE_KEY_PATH` in the credentials file (see above)\n\n\u003e **Alternatively, if you can't store the credentials in a file, e.g. when using it in a pipeline**, you can store the credentials in environment variables:\n\u003e\n\u003e - setting the environment variable `STACKIT_SERVICE_ACCOUNT_KEY` with the content of the service account key\n\u003e - (OPTIONAL) setting the environment variable `STACKIT_PRIVATE_KEY` with the content of the private key\n\n4. The SDK will search for the keys and, if valid, will use them to get access and refresh tokens which will be used to authenticate all the requests.\n\nCheck the [authentication example](examples/authentication/src/main/java/cloud/stackit/sdk/authentication/examples/AuthenticationExample.java) for more details.\n\n## Using custom endpoints\n\nThe example below shows how to use the STACKIT Java SDK in custom STACKIT enviroments.\n\n```java\nimport cloud.stackit.sdk.core.config.CoreConfiguration;\nimport cloud.stackit.sdk.resourcemanager.api.ResourceManagerApi;\nimport cloud.stackit.sdk.resourcemanager.model.ListOrganizationsResponse;\n\nimport java.io.IOException;\n\nclass CustomEndpointExample {\n    public static void main(String[] args) {\n        CoreConfiguration config =\n                new CoreConfiguration()\n                        .serviceAccountKey(\"/path/to/sa_key.json\")\n                        .customEndpoint(\"https://resource-manager.api.stackit.cloud\")\n                        .tokenCustomUrl(\"https://service-account.api.stackit.cloud/token\");\n\n        try {\n            ResourceManagerApi resourceManagerApi = new ResourceManagerApi(config);\n\n            /* list all organizations */\n            ListOrganizationsResponse response =\n                    resourceManagerApi.listOrganizations(\n                            null,\n                            \"service-account-mail@sa.stackit.cloud\",\n                            null,\n                            null,\n                            null\n                    );\n\n            System.out.println(response);\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n    }\n}\n```\n\n## Reporting issues\n\nIf you encounter any issues or have suggestions for improvements, please open an issue in the repository or create a ticket in the [STACKIT Help Center](https://support.stackit.cloud/).\n\n## Contribute\n\nYour contribution is welcome! For more details on how to contribute, refer to our [Contribution Guide](./CONTRIBUTION.md).\n\n## Release creation\n\nSee the [release documentation](./RELEASE.md) for further information.\n\n## License\n\nApache 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackitcloud%2Fstackit-sdk-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackitcloud%2Fstackit-sdk-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackitcloud%2Fstackit-sdk-java/lists"}