{"id":13618641,"url":"https://github.com/solidfire/solidfire-sdk-java","last_synced_at":"2026-01-16T06:07:25.559Z","repository":{"id":51724625,"uuid":"45862849","full_name":"solidfire/solidfire-sdk-java","owner":"solidfire","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-24T06:03:23.000Z","size":22605,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-11-27T23:59:24.872Z","etag":null,"topics":["netapp-public"],"latest_commit_sha":null,"homepage":"https://solidfire.github.io/solidfire-sdk-java/","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/solidfire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-09T19:53:19.000Z","updated_at":"2025-03-15T19:51:02.000Z","dependencies_parsed_at":"2022-09-26T21:51:18.372Z","dependency_job_id":null,"html_url":"https://github.com/solidfire/solidfire-sdk-java","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/solidfire/solidfire-sdk-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidfire%2Fsolidfire-sdk-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidfire%2Fsolidfire-sdk-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidfire%2Fsolidfire-sdk-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidfire%2Fsolidfire-sdk-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidfire","download_url":"https://codeload.github.com/solidfire/solidfire-sdk-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidfire%2Fsolidfire-sdk-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":["netapp-public"],"created_at":"2024-08-01T21:00:28.012Z","updated_at":"2026-01-16T06:07:25.543Z","avatar_url":"https://github.com/solidfire.png","language":"Java","readme":"# \u003cimg src=\"https://raw.githubusercontent.com/solidfire/solidfire-sdk-java/master/Java-SDK-Icon-RGB-02.png\" height=\"50\" width=\"50\" \u003e SolidFire Java SDK\n\nJava SDK library for interacting with SolidFire Element API\n\n## Description\n\nThe SolidFire Java SDK is a collection of software modules and libraries that facilitate integration and orchestration between proprietary systems and third-party applications. The Java SDK allows developers to deeply integrate SolidFire system API with the Java programming language. The SolidFire Java SDK reduces the amount of additional coding time required for integration.\n\n## Compatibility\n\n| Component    | Version             |\n| ------------ | ------------------- |\n| Java         | 7.0 \u0026 8.0           |\n| SolidFire OS | Element 11.0 - 12.3 |\n\n## Getting Help\n\nContacting SolidFire SDK Support\nIf you have any questions or comments about this product, submit an issue on github or reach out to the developer community at [ThePub](http://netapp.io). Your feedback helps us focus our efforts on new features and capabilities.\n\n## Download\n\n[Download](jar/solidfire-sdk-java-12.3.0.196.jar) the latest jar:\n\n~~~ xml\n\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.solidfire\u003c/groupId\u003e\n  \u003cartifactId\u003esolidfire-sdk-java\u003c/artifactId\u003e\n  \u003cversion\u003e12.3.0.196\u003c/version\u003e\n\u003c/dependency\u003e\n\n~~~\n\nor SBT:\n\n~~~ scala\n\nlibraryDependencies += \"com.solidfire\" % \"solidfire-sdk-java\" % \"12.3\"\n\n~~~\n\nor Gradle:\n\n~~~ groovy\n\ncompile 'com.solidfire:solidfire-sdk-java:12.3'\n\n~~~\n\n##Dependencies\n\n| Component           | Version |\n| ------------------- | ------- |\n| base64              | 2.3.9   |\n| solidfire.code.gson | 2.6.2   |\n| joda-time           | 2.9.3   |\n| joda-convert        | 1.8.1   |\n| slf4j-api           | 1.7.25  |\n\n\n### Limitations with a Certificate Signed Assembly Jar\n\nThe SDK assembly is signed with a certificate controlled by SolidFire, Inc, assuring the archive is official and legitimate.  One caveat to having a set of components also signed with SolidFire's certificate, is no other version of these components can exist on the classpath. This will cause a security exception in the JVM.  \n\n## Documentation\n\n[Latest JavaDoc](https://solidfire.github.io/solidfire-sdk-java/docs/index.html)\n\n[Release Notes](NetApp_Element_Java_SDK_Release_Notes_12.3.pdf)\n\n## Examples\n\nStep 1 - Build a [SolidFireElement](https://solidfire.github.io/solidfire-sdk-java/docs/com/solidfire/element/api/SolidFireElement.html) object using the factory\n---\nThis is the preferred way to construct the [SolidFireElement](https://solidfire.github.io/solidfire-sdk-java/docs/com/solidfire/element/api/SolidFireElement.html) object. The factory will make a call to the SolidFire cluster using the credentials supplied to test the connection. It will also set the version to communicate with based on the highest number supported by the\nSDK and Element OS. Optionally, you can choose to set the version manually and whether or not to verify SSL. Read more about it in the [ElementFactory](https://solidfire.github.io/solidfire-sdk-java/docs/com/solidfire/client/ElementFactory.html) documentation.\n\n#### Java:\n\n~~~ java\n\nimport com.solidfire.client.ElementFactory;\nimport com.solidfire.element.api.*;\nimport com.solidfire.core.javautil.Optional;\n\n// Import Optional common empty types (String, Long, \u0026 Map)\nimport static com.solidfire.core.javautil.Optional.*;\n\n...\n    // Use ElementFactory to get a SolidFireElement object.\n    SolidFireElement sfe = ElementFactory.create(\"mvip\", \"username\", \"password\");\n\n~~~\n\n#### Scala:\n\n~~~ scala\n\nimport com.solidfire.client.ElementFactory\nimport com.solidfire.element.api._\nimport com.solidfire.core.javautil.Optional.{empty, of}\n\n...\n  // Use ElementFactory to get a SolidFireElement object.\n  val sf = ElementFactory.create( \"mvip\", \"username\", \"password\" )\n\n~~~\n\n## Step 2 - Call the API method and retrieve the result\n\nAll service methods in SolidFireElement call API endpoints and they all return result objects. The naming convention is \u003ci\u003e[methodName]Result\u003c/i\u003e. For example, \u003ci\u003elistAccounts()\u003c/i\u003e returns a \u003ci\u003eListAccountsResult\u003c/i\u003e object which has a property called \u003ci\u003egetAccounts()\u003c/i\u003e returns an array of \u003ci\u003eAccounts\u003c/i\u003e that can be iterated.\n\nThis example sends a request to list accounts then pulls the first account\nfrom the \u003ci\u003eAddAccountResult\u003c/i\u003e object.\n\n#### Java:\n\n~~~ java\n\n    // Send the request and wait for the result then pull the Account\n    ListAccountsResult listAccountsResult = sfe.listAccounts(ListAccountsRequest.builder().build());\n    Account account = listAccountsResult.getAccounts()[0];\n\n~~~\n\n#### Scala:\n\n~~~ scala\n\n    // Send the request and wait for the result then pull the first Account\n    val listAccountsResult = sfe.listAccounts(ListAccountsRequest.builder.build)\n    val account = listAccountsResult.getAccounts()(0)\n\n~~~\n\n### Examples of using the API (Java)\n\n~~~ java\n\nimport com.solidfire.client.ElementFactory;\nimport com.solidfire.element.api.*;\nimport com.solidfire.core.javautil.Optional;\n\n// Import Optional common empty types (String, Long, \u0026 Map)\nimport static com.solidfire.core.javautil.Optional.*;\npublic class ReadmeJavaExample {\n    public static void main(String[] args) {\n        // Create Connection to SF Cluster\n        SolidFireElement sf = ElementFactory.create(\"mvip\", \"username\", \"password\", \"8.0\");\n\n        //* --------- EXAMPLE 1 - CREATE AN ACCOUNT ----------- *//\n        // Construct an \"AddAccount\" request with only required parameters using the builder\n        AddAccountRequest addAccountRequest = AddAccountRequest.builder()\n                                                               .username(\"username\")\n                                                               .build();\n        // Send the request and pull the account ID from the result object\n        Long accountId = sf.addAccount(addAccountRequest).getAccountID();\n\n        //* --------- EXAMPLE 2 - CREATE A VOLUME ------------- *//\n        // Construct a request with parameters using the constructor.\n        CreateVolumeRequest createVolumeRequest = new CreateVolumeRequest(\"volumeName\", accountId,\n                                                                          1000000000l, false,\n                                                                          Optional.\u003cQoS\u003eempty(),\n                                                                          EMPTY_MAP);\n                                                            \n        // Send the \"CreateVolume\" request pull the VolumeID off the result object\n        Long volumeId = sf.createVolume(createVolumeRequest).getVolumeID();\n\n        //* --------- EXAMPLE 3 - LIST ONE VOLUME FOR AN ACCOUNT ------------- *//\n        // Send the \"ListVolume\" request with desired parameters inline and pull the first volume in the result\n        Volume volume = sf.listVolumesForAccount(accountId, of(volumeId), of(1l)).getVolumes()[0];\n        // Pull the iqn from the volume\n        String iqn = volume.getIqn();\n\n        //* --------- EXAMPLE 3 - MODIFY A VOLUME ------------- *//\n        // Change Min and Burst QoS while keeping Max and Burst Time the same\n        QoS qos = new QoS(of(5000l), EMPTY_LONG, of(30000l), EMPTY_LONG);\n\n        // Construct request to modify the volume size and QoS using the builder\n        ModifyVolumeRequest modifyVolumeRequest = ModifyVolumeRequest.builder()\n                                                                     .volumeID(volumeId)\n                                                                     .optionalQos(qos)\n                                                                     .optionalTotalSize(2000000000l)\n                                                                     .build();\n\n        // Send the modify volume request\n        sf.modifyVolume(modifyVolumeRequest);\n    }\n}\n\n~~~\n\n### Examples of using the API (Scala)\n\n~~~ scala    \n\nimport com.solidfire.client.ElementFactory\nimport com.solidfire.element.api._\nimport com.solidfire.core.javautil.Optional.{empty, of}\n\nclass ReadmeScalaExample {\n\n  // Create Connection to SF Cluster\n  val sf = ElementFactory.create( \"mvip\", \"username\", \"password\", \"8.0\" )\n\n  //* --------- EXAMPLE 1 - CREATE AN ACCOUNT ----------- *//\n  // Construct an \"AddAccount\" request with only required parameters using the builder\n  val addAccount = AddAccountRequest.builder.username( \"username\" ).build\n\n  // Send the request and pull the account ID from the result object\n  val accountId = sf.addAccount( addAccount ).getAccountID\n\n  //* --------- EXAMPLE 2 - CREATE A VOLUME ------------- *//\n  // Construct a \"CreateVolume\" request with parameters using the constructor.\n  val createVolume = new CreateVolumeRequest( \"volumeName\", accountId, \n                                              1000000000L, false, empty[QoS], empty( ) )\n  \n  // Send the request pull the VolumeID off the result object\n  val volumeId = sf.createVolume( createVolume ).getVolumeID\n\n  //* --------- EXAMPLE 3 - LIST ONE VOLUME FOR AN ACCOUNT ------------- *//\n  // Send the \"ListVolume\" request with desired parameters inline and pull the first volume in the result\n  val iqn: Volume = sf.listVolumesForAccount( accountId, of( volumeId ), of( 1L ) ).getVolumes()(0)\n  \n  // pull the iqn from the volume\n  val iqn: String = volume.getIqn\n\n  //* --------- EXAMPLE 4 - MODIFY A VOLUME ------------- *//\n  // Change Min and Burst QoS while keeping Max and Burst Time the same\n  val qos: QoS = new QoS( of( 5000l ), empty(), of( 30000l ), empty() )\n\n  // Construct request to modify the volume size and QoS using the builder.\n  val modifyVolume = ModifyVolumeRequest.builder\n                                        .volumeID( volumeId )\n                                        .optionalQos( qos )\n                                        .optionalTotalSize( 2000000000l )\n                                        .build\n\n  // Send the modify volume request\n  sf.modifyVolume( modifyVolume )\n}\n\n~~~\n\n## Timeout\n\n\nConnection timeout (useful for failing fast when a host becomes unreachable):\n\n#### Java:\n\n~~~ java\n\n    import com.solidfire.client.ElementFactory;\n    import com.solidfire.element.api.*;\n    ...\n    SolidFireElement sfe = ElementFactory.create(\"ip-address-of-cluster\", \"username\", \"password\");\n    sfe.getRequestDispatcher().setConnectionTimeout(600);\n\n~~~\n\nRead timeout (useful for extending time for a service call to return):\n\n#### Java:\n\n~~~ java\n\n    import com.solidfire.client.ElementFactory;\n    import com.solidfire.element.api.*;\n    ...\n    SolidFireElement sfe = ElementFactory.create(\"ip-address-of-cluster\", \"username\", \"password\");\n    sfe.getRequestDispatcher().setReadTimeout(600);\n\n~~~\n\n### [More Examples](examples) \n\nFor more examples check out the tutorials in the [examples folder](examples) of this repo.\n\n## Logging and Logback\n\nThe SDK and the Assembly leverage the [SLF4J API](http://www.slf4j.org/) for logging with the assembly also including  [logback-classic](http://logback.qos.ch/reasonsToSwitch.html) implementation.  An advantage to using the SLF4J interface is the availability of legacy logging framework [bridges](http://www.slf4j.org/legacy.html), for intercepting and consolidating all logging calls into a single log.\n\n### Logback (Assembly Only) Tracing Request / Response calls in the log\n\nAn example logback.xml: \n\n~~~ xml\n\u003cconfiguration debug=\"true\"\u003e\n\n    \u003cappender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\"\u003e\n        \u003c!-- encoders are assigned the type\n             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --\u003e\n        \u003cencoder\u003e\n            \u003cpattern\u003e%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n\u003c/pattern\u003e\n        \u003c/encoder\u003e\n    \u003c/appender\u003e\n\n    \u003clogger name=\"com.solidfire.core.client.ServiceBase\" level=\"DEBUG\" /\u003e\n\n    \u003croot level=\"INFO\"\u003e\n        \u003cappender-ref ref=\"STDOUT\" /\u003e\n    \u003c/root\u003e\n\u003c/configuration\u003e\n~~~\n\nYou also need to add the appropriate SLF4J dependency. Continuing with the logback example:\n\n~~~\n\u003cdependency\u003e\n    \u003cgroupId\u003ech.qos.logback\u003c/groupId\u003e\n    \u003cartifactId\u003elogback-classic\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.3\u003c/version\u003e\n\u003c/dependency\u003e\n~~~\n        \n## License\n\nCopyright © 2021 NetApp, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions andlimitations under the License.\n\n\n","funding_links":[],"categories":["Resources and Solutions"],"sub_categories":["CLI, API, SDK Resources"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidfire%2Fsolidfire-sdk-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidfire%2Fsolidfire-sdk-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidfire%2Fsolidfire-sdk-java/lists"}