{"id":39398011,"url":"https://github.com/assembla/assembla-api","last_synced_at":"2026-01-18T03:20:34.495Z","repository":{"id":57184931,"uuid":"102582052","full_name":"assembla/assembla-api","owner":"assembla","description":"JavaScript API client for assembla.com","archived":false,"fork":false,"pushed_at":"2017-09-28T12:55:56.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-06T14:45:14.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/assembla.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":"2017-09-06T08:15:13.000Z","updated_at":"2022-02-04T17:58:29.000Z","dependencies_parsed_at":"2022-09-14T09:50:24.434Z","dependency_job_id":null,"html_url":"https://github.com/assembla/assembla-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/assembla/assembla-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assembla%2Fassembla-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assembla%2Fassembla-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assembla%2Fassembla-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assembla%2Fassembla-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assembla","download_url":"https://codeload.github.com/assembla/assembla-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assembla%2Fassembla-api/sbom","scorecard":{"id":213001,"data":{"date":"2025-08-11","repo":{"name":"github.com/assembla/assembla-api","commit":"47723f1aec910957eebabbc8029ed762cfa03dcb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":1,"reason":"Found 2/12 approved changesets -- score normalized to 1","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":-1,"reason":"No tokens found","details":null,"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 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"}}]},"last_synced_at":"2025-08-17T01:06:00.079Z","repository_id":57184931,"created_at":"2025-08-17T01:06:00.079Z","updated_at":"2025-08-17T01:06:00.079Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":[],"created_at":"2026-01-18T03:20:29.937Z","updated_at":"2026-01-18T03:20:34.453Z","avatar_url":"https://github.com/assembla.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript API client for https://assembla.com\n\n**NOTE:** This library does not contain authentication mechanism.\nAssembla provides various authorization options, more details can be found [here](http://api-docs.assembla.cc/content/authentication.html)\nRefresh, however, might be performed automatically, with the help of back-end processing\n\n## Install\n```$ npm i --save-dev assembla-api```\n\n## Supported endpoints:\n* /v1/users/ID\n* /v1/spaces\n* /v1/spaces/SPACE_ID/search\n* /v1/spaces/SPACE_ID/space_tools\n* /v1/spaces/SPACE_ID/space_tools/TOOL_ID/merge_requests\n* /v1/spaces/SPACE_ID/space_tools/TOOL_ID/merge_requests/MR_ID\n* /v1/spaces/SPACE_ID/space_tools/TOOL_ID/merge_requests/MR_ID/versions\n* /v1/spaces/SPACE_ID/space_tools/TOOL_ID/merge_requests/MR_ID/versions/VERSION_ID/votes\n* /v1/spaces/SPACE_ID/space_tools/TOOL_ID/merge_requests/MR_ID/versions/VERSION_ID/comments\n\nFor more details about Assembla API, particular request and responses, please refer to http://api-docs.assembla.com\n\n## Setup \u0026 Usage\n```javascript\nimport AssemblaApi from 'assembla-api';\n\n// use Promise-based storage for token data, by default lib/simple_storage being used\nlet data = {};\nlet store = {\n  get: name =\u003e new Promise(resolve =\u003e resolve(data[name])),\n  set: (name, value) =\u003e {\n    data[name] = value;\n    return new Promise(resolve =\u003e resolve());\n  }\n};\nAssemblaApi.useStorage(store);\n\n// assign access/refresh token\nlet tokenData = { accessToken: 'access-token', refreshToken: 'refresh-token' };\nAssemblaApi.storeToken(tokenData).then(() =\u003e { /* do stuff */ });\n\nAssemblaApi.getToken().then(token =\u003e {\n  // token =\u003e { accessToken: 'access-token', refreshToken: 'refresh-token', expires: 1504863811911 /* timestamp */ }\n  /* do stuff */\n});\n\nAssemblaApi\n  .spaces.find('space-id')\n  .spaceTools.find('tool-id')\n  .mergeRequests\n  .params({ status: 'open' }).all()\n  .read()\n  .then(parsedJson =\u003e { /* do stuff with response */ })\n  .catch(err =\u003e { /* process errors */ });\n\nAssemblaApi\n  .spaces.find('space-id')\n  .spaceTools.find('tool-id')\n  .mergeRequests\n  .find('mr-id')\n  .update({ description: 'new text' })\n  .then(parsedJson =\u003e { /* do stuff with response */ })\n  .catch(err =\u003e { /* process errors */ });\n\nAssemblaApi\n  .spaces.find('space-id')\n  .spaceTools.find('tool-id')\n  .mergeRequests\n  .create({ /* create data, check API docs for details */ })\n  .then(parsedJson =\u003e { /* do stuff with response */ })\n  .catch(err =\u003e { /* process errors */ });\n\nAssemblaApi\n  .spaces.find('space-id')\n  .search({\n    q: 'query input',\n    page: 1,\n    per_page: 20,\n    order_by: 'last_updated',\n    object_scope: 'merge_requests',\n    filter: { target_space_tool_id: 'toolId' }\n  })\n  .then(parsedJson =\u003e { /* do stuff with response */ })\n  .catch(err =\u003e { /* process errors */ });\n```\n## Preprocessing avatars on back-end\nAssembla responds with redirect to AWS on profile picture request\nDue to CORS restrictions, such sort of redirect is not allowed in browser\n\nFor these purposes, you can use a back-end preprocessing, `responding with the plain text link`:\n```javascript\n// assign preprocessor endpoint pattern:\n// accessToken will be substituted automatically, from the stored credentials\nAssemblaApi.useAvatarLoader('/user_picture?user_id=:userId\u0026token=:accessToken');\n\n// GET request will be performed to /user_picture?user_id=user-id\u0026access_token=access-token\nAssemblaApi.getAvatarUrl('user-id').then(link =\u003e { /* do stuff with the link */ });\n```\n\n## Refreshing credentials\nTo prevent exposing secrets, you may want to setup refresh token data\nIf token refresher is set - application will try to refresh token automatically, based on Assembla access token expiration policy\n\nThe endpoint must `respond JSON of format: { \"accessToken\": \"actual-access-token\", \"refreshToken\": \"actual-refresh-token\" }`\n```javascript\n// assign refresh token processor endpoint:\n// refreshToken will be substituted automatically, from the stored credentials\nAssemblaApi.useTokenRefresher('/auth_refresh?token=:refreshToken');\n\n// token validation and update will be performed for further requests:\nAssemblaApi.spaces.find('id').read().then(/* usual flow */);\n```\n## Using custom HTTP client\nBy default, `assemlba-api` uses `whatwg-fetch` as HTTP client\nThat might be changed, however, with any custom one, that supports [whatwg-fetch](https://github.com/github/fetch) API calls\n```javascript\n// proto: fetch(url, { method, headers, body })\nlet testHttpClient = (url, options={}) =\u003e {\n  let { method, headers, body } = options;\n  method = method || (!!body ? 'POST' : 'GET');\n\n  let headersString = '';\n  if(headers) {\n    headersString = 'Headers: ';\n    for(let name in headers) {\n      headersString += `${name}:${headers[name]}`;\n    }\n  }\n  let data = `requested ${method} ${url} ${headersString} body: ${body}`;\n\n  return new Promise(resolve =\u003e resolve(data));\n};\n\nAssemblaApi.useClient(testHttpClient);\n\n// ... do requests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassembla%2Fassembla-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassembla%2Fassembla-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassembla%2Fassembla-api/lists"}