{"id":52038245,"url":"https://github.com/adobe/aem-headless-client-js","last_synced_at":"2026-08-01T21:05:06.824Z","repository":{"id":44700603,"uuid":"335100873","full_name":"adobe/aem-headless-client-js","owner":"adobe","description":"AEM Headless Client for JavaScript","archived":false,"fork":false,"pushed_at":"2026-07-08T07:56:29.000Z","size":1043,"stargazers_count":34,"open_issues_count":13,"forks_count":12,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-07-08T08:21:19.564Z","etag":null,"topics":["adobe","aem","headless","javascript","sdk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/adobe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2021-02-01T22:24:52.000Z","updated_at":"2026-05-09T06:22:24.000Z","dependencies_parsed_at":"2024-06-18T18:24:48.382Z","dependency_job_id":"83ad72b6-6987-47d2-9130-bc3eb7abc6cb","html_url":"https://github.com/adobe/aem-headless-client-js","commit_stats":{"total_commits":42,"total_committers":9,"mean_commits":4.666666666666667,"dds":0.6666666666666667,"last_synced_commit":"e1c58feec1d9dd09d07af611855e37095630110d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/adobe/aem-headless-client-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Faem-headless-client-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Faem-headless-client-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Faem-headless-client-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Faem-headless-client-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adobe","download_url":"https://codeload.github.com/adobe/aem-headless-client-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adobe%2Faem-headless-client-js/sbom","scorecard":{"id":167149,"data":{"date":"2025-08-11","repo":{"name":"github.com/adobe/aem-headless-client-js","commit":"4d85e9620d8286faab9510462e6e76e054b3edf5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.1,"checks":[{"name":"Code-Review","score":4,"reason":"Found 5/11 approved changesets -- score normalized to 4","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":"14 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":"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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"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":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-release.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/manual-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/manual-release.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/manual-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/manual-release.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/manual-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/adobe/aem-headless-client-js/release.yml/main?enable=pin","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   3 out of   3 npmCommand 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/manual-release.yml:1","Warn: no topLevel permission defined: .github/workflows/release.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: Apache License 2.0: 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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/adobe/.github/.github/SECURITY.md:1","Info: Found linked content: github.com/adobe/.github/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/adobe/.github/.github/SECURITY.md:1","Info: Found text in security policy: github.com/adobe/.github/.github/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":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 21 commits out of 26 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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"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-16T15:13:41.192Z","repository_id":44700603,"created_at":"2025-08-16T15:13:41.192Z","updated_at":"2025-08-16T15:13:41.192Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36170427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-01T02:00:05.789Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["adobe","aem","headless","javascript","sdk"],"created_at":"2026-08-01T21:05:06.070Z","updated_at":"2026-08-01T21:05:06.811Z","avatar_url":"https://github.com/adobe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright 2021 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n--\u003e\n\n[![Version](https://img.shields.io/npm/v/@adobe/aem-headless-client-js.svg)](https://npmjs.org/package/@adobe/aem-headless-client-js)\n[![Downloads/week](https://img.shields.io/npm/dw/@adobe/aem-headless-client-js.svg)](https://npmjs.org/package/@adobe/aem-headless-client-js)\n[![Build Status](https://github.com/adobe/aem-headless-client-js/workflows/Node.js%20CI/badge.svg?branch=main)](https://github.com/adobe/aem-headless-client-js/actions)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# AEM Headless Client for JavaScript\n\nSee [aem-headless-client-java](https://github.com/adobe/aem-headless-client-java) for the Java variant of this client\nand [aem-headless-client-nodejs](https://github.com/adobe/aem-headless-client-nodejs) for the server-side Node.js variant.\n\n## Installation\n\n```bash\n$ npm install @adobe/aem-headless-client-js\n```\n\n## Usage\n\n### Create AEMHeadless client\n\n```javascript\nconst AEMHeadless = require('@adobe/aem-headless-client-js');\n```\nConfigure SDK with Host and Auth data (if needed)\n```javascript\nconst aemHeadlessClient = new AEMHeadless({\n    serviceURL: '\u003caem_host\u003e',\n    endpoint: '\u003cgraphql_endpoint\u003e',\n    auth: '\u003caem_token\u003e' || ['\u003caem_user\u003e', '\u003caem_pass\u003e'],\n    headers: {'\u003cheadername\u003e': '\u003cheadervalue\u003e', ...}\n})\n// Eg:\nconst aemHeadlessClient = new AEMHeadless({\n    serviceURL: AEM_HOST_URI,\n    endpoint: 'content/graphql/endpoint.gql',\n    auth: [AEM_USER, AEM_PASS],\n    headers: {'customerheadername': 'customerheadervalue'}\n})\n```\n### Use AEMHeadless client \n\n#### Promise syntax:\n```javascript\naemHeadlessClient.runQuery(queryString)\n  .then(data =\u003e console.log(data))\n  .catch(e =\u003e console.error(e.toJSON()))\n\naemHeadlessClient.listPersistedQueries()\n   .then(data =\u003e console.log(data))\n   .catch(e =\u003e console.error(e.toJSON()))\n\naemHeadlessClient.persistQuery(queryString, 'wknd/persist-query-name')\n   .then(data =\u003e console.log(data))\n   .catch(e =\u003e console.error(e.toJSON()))\n\naemHeadlessClient.runPersistedQuery('wknd/persist-query-name')\n   .then(data =\u003e console.log(data))\n   .catch(e =\u003e console.error(e.toJSON()))\n\naemHeadlessClient.runPersistedQuery('wknd/persist-query-name-with-variables', { name: 'John Doe'})\n    .then(data =\u003e console.log(data))\n    .catch(e =\u003e console.error(e.toJSON()))\n```\n#### Within async/await:\n```javascript\n(async () =\u003e {\n    let postData\n    try {\n        postData = await aemHeadlessClient.runQuery(queryString)\n    } catch (e) {\n        console.error(e.toJSON())\n    }\n    \n    let list\n    try {\n        list = await aemHeadlessClient.listPersistedQueries()\n    } catch (e) {\n        console.error(e.toJSON())\n    }\n\n    try {\n        await aemHeadlessClient.persistQuery(queryString, 'wknd/persist-query-name')\n    } catch (e) {\n        console.error(e.toJSON())\n    }\n    \n    let getData\n    try {\n        getData = await aemHeadlessClient.runPersistedQuery('wknd/persist-query-name')\n    } catch (e) {\n        console.error(e.toJSON())\n    }\n})()    \n```\n\n#### Pagination:\n```javascript\n(async () =\u003e {\n    const model = 'article'\n    const fields = `{\n        title\n        _path\n        authorFragment {\n          firstName\n          profilePicture {\n            ...on ImageRef {\n              _authorUrl\n            }\n          }\n        }\n      }`\n    \n    // Loop all pages (default Cursor based)\n    const cursorQueryAll = await aemHeadlessClient.runPaginatedQuery(model, fields, { pageSize: 3 })\n    for await (let value of cursorQueryAll) {\n        console.log('cursorQueryAll', value)\n    }\n    // Manually get next page (default pageSize = 10)\n    const cursorQuery = await aemHeadlessClient.runPaginatedQuery(model, fields)\n    while (true) {\n        const { done, value } = await cursorQuery.next();\n        if (done) break\n        console.log('cursorQuery', value)\n    }\n})()\n```\n\n## Authorization\n\nIf `auth` param is a string, it's treated as a Bearer token\n\nIf `auth` param is an array, expected data is ['user', 'pass'] pair, and Basic Authorization will be used\n\nIf `auth` is not defined, Authorization header will not be set\n\n## API Reference\n\nSee generated [API Reference](./api-reference.md)\n\n## Contributing\n\nContributions are welcome! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.\n\n## Licensing\n\nThis project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Faem-headless-client-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadobe%2Faem-headless-client-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadobe%2Faem-headless-client-js/lists"}