{"id":36412856,"url":"https://github.com/contentstack/contentstack-java","last_synced_at":"2026-02-23T14:01:01.793Z","repository":{"id":25935492,"uuid":"106927781","full_name":"contentstack/contentstack-java","owner":"contentstack","description":"Java SDK for Contentstack Content Delivery API","archived":false,"fork":false,"pushed_at":"2026-02-20T10:45:23.000Z","size":1069,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-02-20T14:36:40.514Z","etag":null,"topics":["contentstack","contentstack-delivery-sdk","contentstack-java","contentstack-java-sdk","java","sdk"],"latest_commit_sha":null,"homepage":"https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/java/reference","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contentstack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-14T12:56:11.000Z","updated_at":"2026-02-16T10:05:26.000Z","dependencies_parsed_at":"2023-10-03T10:59:21.115Z","dependency_job_id":"14963414-8a5a-446c-8936-da4c785f03fa","html_url":"https://github.com/contentstack/contentstack-java","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/contentstack/contentstack-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentstack","download_url":"https://codeload.github.com/contentstack/contentstack-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-java/sbom","scorecard":{"id":303463,"data":{"date":"2025-08-11","repo":{"name":"github.com/contentstack/contentstack-java","commit":"e46959973b63b988b3d94769b077adf44d5e0739"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/check-branch.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/check-branch.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-package-publish.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/github-package-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/github-package-publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/github-package-publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/issues-jira.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/issues-jira.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/issues-jira.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/issues-jira.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven--package-publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/maven--package-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven--package-publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/maven--package-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/policy-scan.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/policy-scan.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/policy-scan.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/policy-scan.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/sca-scan.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/sca-scan.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/sca-scan.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/sca-scan.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/secrets-scan.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/contentstack/contentstack-java/secrets-scan.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/secrets-scan.yml:29","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:24","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:25","Info: jobLevel 'contents' permission set to 'read': .github/workflows/maven--package-publish.yml:10","Warn: no topLevel permission defined: .github/workflows/check-branch.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/github-package-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/issues-jira.yml:1","Warn: no topLevel permission defined: .github/workflows/maven--package-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/policy-scan.yml:1","Warn: no topLevel permission defined: .github/workflows/sca-scan.yml:1","Warn: no topLevel permission defined: .github/workflows/secrets-scan.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/maven--package-publish.yml:7"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool detected","details":["Info: SAST configuration detected: CodeQL","Info: SAST configuration detected: Snyk","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-269g-pwp5-87pp","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-6r3c-xf4w-jxjm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T21:21:51.061Z","repository_id":25935492,"created_at":"2025-08-17T21:21:51.061Z","updated_at":"2025-08-17T21:21:51.061Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29745111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"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":["contentstack","contentstack-delivery-sdk","contentstack-java","contentstack-java-sdk","java","sdk"],"created_at":"2026-01-11T16:54:33.915Z","updated_at":"2026-02-23T14:01:01.786Z","avatar_url":"https://github.com/contentstack.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [![Contentstack](https://www.contentstack.com/docs/static/images/contentstack.png)](https://www.contentstack.com/)\n\n## Java SDK for Contentstack\n\nContentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. [Read More](https://www.contentstack.com/).\n\nContentstack provides Java SDK to build application on top of Java. Given below is the detailed guide and helpful resources to get started with our Java SDK.\n\n### Prerequisite\n\nYou will need JDK installed on your machine. You can install it from [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html).\n\n### Setup and Installation\n\nTo use the Contentstack Java SDK to your existing project, perform the steps given below:\n\nGroup Id: ```com.contentstack.sdk```\n\nArtifact Id: ```java```\n\n[LATEST VERSION](https://search.maven.org/artifact/com.contentstack.sdk/java)\n\n#### Maven\n\n```java\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.contentstack.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003ejava\u003c/artifactId\u003e\n  \u003cversion\u003e{version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle\n\n```java\nimplementation 'com.contentstack.sdk:java:{version}'\n```\n\n_Get updated version from_ [_version_](https://search.maven.org/artifact/com.contentstack.sdk/java)\n\n### Key Concepts for using Contentstack\n\n#### Stack\n\nA stack is like a container that holds the content of your app. Learn more about [Stacks](https://www.contentstack.com/docs/guide/stack).\n\n#### Content Type\n\nContent type lets you define the structure or blueprint of a page or a section of your digital property. It is a form-like page that gives Content Managers an interface to input and upload content. [Read more](https://www.contentstack.com/docs/guide/content-types).\n\n#### Entry\n\nAn entry is the actual piece of content created using one of the defined content types. Learn more about [Entries](https://www.contentstack.com/docs/guide/content-management#working-with-entries).\n\n#### Asset\n\nAssets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded to Contentstack. These files can be used in multiple entries. Read more about [Assets](https://www.contentstack.com/docs/guide/content-management#working-with-assets).\n\n#### Environment\n\nA publishing environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published. Learn how to work with [Environments](https://www.contentstack.com/docs/guide/environments).\n\n### Contentstack Java SDK: 5-minute Quickstart\n\n#### Initializing your SDK\n\nTo initialize the SDK, specify application  API key, access token, and environment name of the stack as shown in the snippet given below:\n\n```java\nStack stack=Contentstack.stack(\"apiKey\",\"accessToken\",\"environment\");\n```\n\nTo get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings \u0026gt; Stack to view the API Key and Access Token.\n\n#### Querying content from your stack\n\nTo retrieve a single entry from a content type use the code snippet given below:\n\n```java\n//stack is an instance of Stack class\nContentType contentType = stack.contentType(\"content_type_uid\");\nEntry entry = contentType.entry(\"entry_uid\");\nentry.fetch(new EntryResultCallBack(){\n@Override\npublic void onCompletion(ResponseType responseType, Error error){\n    if(error==null){\n        //Success block\n    }else{\n        //Error block\n    }}\n});\n```\n\n##### Get Multiple Entries\n\nTo retrieve multiple entries of a particular content type, use the code snippet given below:\n\n```java\n//stack is an instance of Stack class\nQuery query = stack.contentType(\"content_type_uid\").query();\nquery.find(new QueryResultsCallBack(){\n@Override\npublic void onCompletion(ResponseType responseType, QueryResult queryResult, Error error) {\n        if(error == null){\n           //Success block\n        }else{\n           //Error block\n    }}\n});\n  ```\n\n### Advanced Queries\n\nYou can query for content types, entries, assets and more using our Java API Reference.\n\n[Java API Reference Doc](https://www.contentstack.com/docs/platforms/java/api-reference/)\n\n### Working with Images\n\nWe have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize them for your digital properties. It lets you perform a host of other actions such as crop, trim, resize, rotate, overlay, and so on.\n\nFor example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query parameters at the end of the image URL, such as, \u003chttps://images.contentstack.io/v3/assets/download?crop=300\u003e,400. There are several more parameters that you can use for your images.\n\n[Read Image Delivery API documentation](https://www.contentstack.com/docs/apis/image-delivery-api/).\n\nYou can use the Image Delivery API functions in this SDK as well. Here are a few examples of its usage in the SDK.\n\n```java\n//set the image quality to 100\nLinkedHashMap imageParams = new LinkedHashMap();\nimageParams.put(\"quality\", 100);\nimageUrl = Stack.ImageTransform(imageUrl, imageParams);\n\n//resize the image by specifying width and height\nLinkedHashMap imageParams = new LinkedHashMap();\nimageParams.put(\"width\", 100);\nimageParams.put(\"height\",100);\nimageUrl = Stack.ImageTransform(imageUrl, imageParams);\n\n//enable auto optimization for the image\nLinkedHashMap imageParams = new LinkedHashMap();\nimageParams.put(\"auto\", \"webp\");\nimageUrl = Stack.ImageTransform(imageUrl, imageParams);\n```\n\n### Helpful Links\n\n- [Contentstack Website](https://www.contentstack.com)\n- [Official Documentation](https://contentstack.com/docs)\n- [Content Delivery API Docs](https://contentstack.com/docs/apis/content-delivery-api/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fcontentstack-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentstack%2Fcontentstack-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fcontentstack-java/lists"}