{"id":15674559,"url":"https://github.com/lirantal/agilemanager-api","last_synced_at":"2025-05-06T23:17:55.804Z","repository":{"id":56149330,"uuid":"45746462","full_name":"lirantal/agilemanager-api","owner":"lirantal","description":"HPE's Agile Manager client API module for NodeJS","archived":false,"fork":false,"pushed_at":"2020-11-24T06:35:07.000Z","size":148,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T23:17:48.450Z","etag":null,"topics":["agile","agm","hpe","nodejs","scrum"],"latest_commit_sha":null,"homepage":null,"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/lirantal.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-07T17:25:17.000Z","updated_at":"2024-04-02T17:42:16.000Z","dependencies_parsed_at":"2022-08-15T13:40:18.574Z","dependency_job_id":null,"html_url":"https://github.com/lirantal/agilemanager-api","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Fagilemanager-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Fagilemanager-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Fagilemanager-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Fagilemanager-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lirantal","download_url":"https://codeload.github.com/lirantal/agilemanager-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782835,"owners_count":21803410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["agile","agm","hpe","nodejs","scrum"],"created_at":"2024-10-03T15:46:48.223Z","updated_at":"2025-05-06T23:17:55.757Z","avatar_url":"https://github.com/lirantal.png","language":"JavaScript","readme":"[![view on npm](http://img.shields.io/npm/v/agilemanager-api.svg)](https://www.npmjs.org/package/agilemanager-api)\n[![view on npm](http://img.shields.io/npm/l/agilemanager-api.svg)](https://www.npmjs.org/package/agilemanager-api)\n[![npm module downloads](http://img.shields.io/npm/dt/agilemanager-api.svg)](https://www.npmjs.org/package/agilemanager-api)\n[![Build](https://travis-ci.org/lirantal/agilemanager-api.svg?branch=master)](https://travis-ci.org/lirantal/agilemanager-api)\n[![Coverage Status](https://coveralls.io/repos/lirantal/agilemanager-api/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/lirantal/agilemanager-api?branch=master)\n[![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md)\n[![agilemanager-api](https://snyk.io/advisor/npm-package/agilemanager-api/badge.svg)](https://snyk.io/advisor/npm-package/agilemanager-api)\n\n\n# agilemanager-api\n\nHPE's Agile Manager client API module for NodeJS\n\n\n# Example Use Case: Dashboard\n\nEasily integrate with Agile Manager to create your very own dashboard UI:\n\n![image](https://cloud.githubusercontent.com/assets/316371/11165523/68f54c78-8b1a-11e5-81f0-9ab988d5cdc5.png)\n\n\n# Install\n\nnpm install agilemanager-api\n\n# Setup\n\nPrepare an options object with clientId and clientSecret keys from Agile Manager's configuration area:\n```javascript\nvar options = {\n\tclientId: 'api_client_0000000_0',\n\tclientSecret: 'lknNSDASY6458ub'\n};\n```\n\nRequire the `agilemanager-api` npm module after it was installed and instantiate the object with the prepared options:\n```javascript\nvar AGM = require('agilemanager-api');\nvar agm = new AGM(options);\n```\n\n## `login` Example\n\nPerform an AGM `login` method to authenticate the API and continue working with the rest of the methods available\n```javascript\nagm.login(function (err, body) {\n\n  /** body is an object with the token information\n   *\n   * { \n   *   access_token: '197247213_2639ed2e-6c73-4abg-7991-9872dbccf1',\n   *   token_type: 'bearer',\n   *   expires_in: 3599,\n   *   scope: 'read trust write'\n   * }\n   */ \n  \n  // Do something with token...\n});\n```\n\n## `query` Example\n\nPerform an AGM `agm.query(fn)` method on any type of resource.\n\nThe `agm.query(fn)` method expects an object with the following members:\n* workspaceId - the workspace id in AGM\n* resource - the resource type, can be any one of the listed [resources](https://github.com/lirantal/agilemanager-api#resources) \n* query - the actual query to perform, accepting statements with ; char as a logical AND and || as logical OR\n* fields - a list of specific fields to be filtered in the returned response\n* orderBy - a field to order the results, by default results are of ascending order or with a prefix - symbol for decesending results (for example: `fields: -name`)\n* limit and offset - both of these options allow to specify numbers for the purpose of paginated results\n\nFor example, to query for a list of backlog items, with id bigger than 2000, and getting back only the name field in the JSON response:\n```javascript\n\n// Prepare the query options object\nvar queryOptions = {\n\tworkspaceId: '1000',\n\tresource: 'backlog_items',\n\tquery: 'id\u003e2000',\n\tfields: 'id,name',\n\torderBy: 'name',\n\tlimit: 10,\n\toffset: 0\n};\n\n// Call the query method using the \nagm.query(queryOptions, function(err, body) {\n  /**\n   * body contains a JSON object response with data member and TotalResults member:\n   * {\n   *  data: \n   *   [{\n   *     type: 'backlog_item',\n   *     subtype: 'defect',\n   *     id: 2012,\n   *     name: 'URL uploaded images are not cropped\n   correctly'\n   *   }],\n   *  TotalResults: 1\n   * }\n   *\n   *\n   *\n   */\n\n  // Do something with body JSON object resopnse\n});\n```\n\n\n## `resources` Example\n\nUsing the `agm.resources(fn)` method it's possible to perform CRUD operations directly on any type of supported [resources](https://github.com/lirantal/agilemanager-api#resources).\n\n### Example of creating a user story:\n```javascript\n/**\n * Perform a query on a workspace and resource\n * Create a user story\n *\n * @param {object} resourceOptions - expect an object with the following:\n *   - workspaceId - the workspace id\n *   - resource - the type of resource to perform the action on (@see list of [resources](https://github.com/lirantal/agilemanager-api#resources)\n *   - method - one of: GET, POST, PUT, DELETE\n *   - data - an array of objects with the backlog item supported fields, allowing to create more than one backlog item with fie\n */\n\nvar resourceOptions = {\n\tworkspaceId: '1000',\n\tresource: 'backlog_items',\n\tmethod: 'POST',\n\tdata: [{\n\t\tname: 'New user story',\n\t\tsubtype: 'user_story'\n\t}]\n};\n\nagm.resource(resourceOptions, function(err, body) {\n\n\t// Returned JSON response object in body looks as follows:\n\t//\n\t// { data: \n\t//    [ { type: 'backlog_item',\n\t//        subtype: 'user_story',\n\t//        story_priority: null,\n\t//        num_of_tasks: null,\n\t//        cover_status: 'Not Covered',\n\t//        release_id: null,\n\t//        id: 1945,\n\t//        kanban_status_id: null,\n\t//        author: 'api_client_49871541_16',\n\t//        rank: 3610000,\n\t//        remaining: null,\n\t//        estimated: null,\n\t//        description: null,\n\t//        name: 'New user story',\n\t//        dev_comments: null,\n\t//        kan_status_duration: 0,\n\t//        blocked: null,\n\t//        application_id: null,\n\t//        kanban_parent_status_id: null,\n\t//        status: 'New',\n\t//        story_points: null,\n\t//        sprint_id: null,\n\t//        creation_date: '2015-11-09',\n\t//        kan_parent_duration: 0,\n\t//        last_modified: '2015-11-09T18:44:20Z',\n\t//        theme_id: null,\n\t//        team_id: null,\n\t//        invested: null,\n\t//        assigned_to: null,\n\t//        actual: null,\n\t//        archive_status: 0,\n\t//        feature_id: null } ],\n\t//   TotalResults: 1 }\n\n        // Do more things with the body response object...\n});\n```\n### Example of deleting a user story\nExample of creating a user story:\n```javascript\n/**\n * Perform a query on a workspace and resource\n * Create a user story\n *\n * @param {object} resourceOptions - expect an object with the following:\n *   - workspaceId - the workspace id\n *   - resource - the type of resource to perform the action on (@see list of [resources](https://github.com/lirantal/agilemanager-api#resources)\n *   - method - one of: GET, POST, PUT, DELETE\n *   - data - an array of objects with the backlog item supported fields, allowing to create more than one backlog item with fie\n */\n\nvar resourceOptions = {\n\tworkspaceId: '1000',\n\tresource: 'backlog_items',\n\tmethod: 'DELETE',\n\tentityId: '1945'\n};\n\nagm.resource(resourceOptions, function(err, body) {\n        // Do more things with the body response object...\n});\n```\n\n# Agile Manager API Usage\n\n## RESTful API\n\nAgile Manager's API is RESTful and supports \n\n* GET fetch a new item\n* POST creates a new item\n* PUT updates an item\n* DELETE removes an item\n\nAs can be illustrated in the following screenshot\n![image](https://cloud.githubusercontent.com/assets/316371/11032700/45644dd2-86e6-11e5-918d-65226aa6aaee.png)\n\n(image credit to HPE's Agile Manager API Intractive Help (beta)\n\n## Resources\nThe API supports the following resources, which can be used as part of the `query` method:\n* applications\n* backlog_items\n* backlog_item (attachments)\n* features\n* feature (attachments)\n* release_teams\n* releases\n* release (attachments)\n* sprints\n* tasks\n* team_members\n* teams\n* themes\n* theme (attachments)\n* workspaces\n\n\n# Author\nLiran Tal \u003cliran.tal@gmail.com\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flirantal%2Fagilemanager-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flirantal%2Fagilemanager-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flirantal%2Fagilemanager-api/lists"}