{"id":19472033,"url":"https://github.com/ibm/node-igc-rest","last_synced_at":"2025-04-25T12:31:17.036Z","repository":{"id":57270683,"uuid":"133032509","full_name":"IBM/node-igc-rest","owner":"IBM","description":"Re-usable functions for interacting with IBM Information Governance Catalog's REST API","archived":true,"fork":false,"pushed_at":"2019-01-08T09:16:23.000Z","size":592,"stargazers_count":3,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-24T21:57:04.855Z","etag":null,"topics":["igc","information-server","metadata","node-js","node-module","rest-api"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ibm-igc-rest","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/IBM.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":"2018-05-11T11:40:35.000Z","updated_at":"2024-06-17T19:44:00.000Z","dependencies_parsed_at":"2022-09-06T21:52:46.681Z","dependency_job_id":null,"html_url":"https://github.com/IBM/node-igc-rest","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Fnode-igc-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Fnode-igc-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Fnode-igc-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Fnode-igc-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBM","download_url":"https://codeload.github.com/IBM/node-igc-rest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250817606,"owners_count":21492182,"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":["igc","information-server","metadata","node-js","node-module","rest-api"],"created_at":"2024-11-10T19:11:54.223Z","updated_at":"2025-04-25T12:31:16.432Z","avatar_url":"https://github.com/IBM.png","language":"JavaScript","readme":"# README\n\nObjective of this module is to provide re-usable functionality and utilities for interacting with the IBM Information Governance Catalog through its REST API, using NodeJS.\n\n# Utilities\n\n## findAssets.js\n\nRun a query for IGC assets and (optionally) take action against the results. Usage:\n\n```shell\nnode ./findAssets.js\n\t\t-f \u003cfile\u003e\n\t\t[-a \u003cauthfile\u003e]\n\t\t[-p \u003cpassword\u003e]\n```\n\nSearches IGC based on the query conditions defined in the provided file; and if there is also an action section it will apply that action to each of the query results.  The provided file is expected to contain at least a \"query\" key, under which a set of IGC query conditions is specified; and optionally an action key [`update` or `delete`].\n\nBy default (if not specified using the optional `-a` parameter), the utility will look for environment details in `~/.infosvrauth` and will prompt the user for a password.\n\nThe authorisation file can be generated using the \u003chttps://npmjs.com/package/ibm-iis-commons\u003e module.  Refer to the `createInfoSvrAuthFile.js` utility there for more details.\n\n##### Examples:\n\nUsing this input file `queryAndUpdate.json`:\n\n```json\n{\n  \"query\":\n  {\n    \"properties\": [\"name\"],\n    \"types\": [\"database_table\"],\n    \"where\":\n    {\n      \"operator\": \"and\",\n      \"conditions\": [\n        {\n          \"property\": \"name\",\n          \"operator\": \"=\",\n          \"value\": \"MY_DB_TABLE\"\n        }\n      ]\n    }\n  },\n  \"update\":\n  {\n    \"value\":\n    {\n      \"assigned_to_terms\": [\"6662c0f2.e1b1ec6c.svu583pvk.3sr7b7n.mq748u.ru37pccq07437ncqvhvjs\"]\n     }\n   }\n}\n```\n\nthe following command will find all database tables whose name is `MY_DB_TABLE`, and update the tables so that they are assigned to the term with RID `6662c0f2.e1b1ec6c.svu583pvk.3sr7b7n.mq748u.ru37pccq07437ncqvhvjs`.\n\n```shell\nnode ./findAssets.js\n\t-f queryAndUpdate.json\n```\n\n## generateIGCRESTDocumentation.js\n\nCreate documentation on the various types (and their properties) available within the Information Governance Catalog REST API. Usage:\n\n```shell\nnode ./generateIGCRESTDocumentation.js\n\t\t-f \u003cfile\u003e\n\t\t[-t \u003ctype\u003e]\n\t\t[-a \u003cauthfile\u003e]\n\t\t[-p \u003cpassword\u003e]\n```\n\nCreates a markdown file in the location provided by the file parameter, by default using GitHub-style markdown (unless overridden through the type parameter).\n\nBy default (if not specified using the optional `-a` parameter), the utility will look for environment details in `~/.infosvrauth` and will prompt the user for a password.\n\nThe authorisation file can be generated using the \u003chttps://npmjs.com/package/ibm-iis-commons\u003e module.  Refer to the `createInfoSvrAuthFile.js` utility there for more details.\n\nExample output of running this against various versions of vanilla (uncustomised) Information Server environments can be found under the [`doc/`](https://github.com/IBM/node-igc-rest/tree/master/doc) directory of this GitHub repository.  Note that because these are vanilla (uncustomised) environments, they will not contain any details about custom attributes or OpenIGC objects that you may have in your own environment -- to see those details, run this utility against your own environment.\n\n##### Examples:\n\n```shell\nnode ./generateIGCRESTDocumentation.js\n\t-f IGC_REST.md\n```\n\nCreates markdown documentation in `IGC_REST.md` covering all of the data types and their properties that are available for use in the IGC REST API.\n\n# API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n## ibm-igc-rest\n\nRe-usable functions for interacting with IBM Information Governance Catalog's REST API\n\n**Examples**\n\n```javascript\n// retrieves all of the \"types\" from IGC's REST API\nvar igcrest = require('ibm-igc-rest');\nvar commons = require('ibm-iis-commons');\nvar restConnect = new commons.RestConnection(\"isadmin\", \"isadmin\", \"hostname\", \"9445\");\nigcrest.setConnection(restConnect);\nigcrest.getTypes(function(err, resTypes) {\n  // do something with the types within resTypes object\n});\n```\n\n**Meta**\n\n-   **license**: Apache-2.0\n\n## setConnection\n\nSet the connection for the REST API\n\n**Parameters**\n\n-   `restConnect` **RestConnection** RestConnection object, from ibm-iis-commons\n\n## openSession\n\n-   **See: module:ibm-igc-rest.setConnection**\n-   **See: module:ibm-igc-rest.closeSession**\n\nSetup a re-usable session against the IGC REST API -- a connection must first\nbe setup\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the opened sessionId\n\n## closeSession\n\n-   **See: module:ibm-igc-rest.setConnection**\n-   **See: module:ibm-igc-rest.openSession**\n\nLogout of (close) a re-usable session against the IGC REST API\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved will have logged out / closed the session\n\n## replaceQueryVars\n\nReplace any variables (text that starts with `$`) that show up in a query\n\n**Parameters**\n\n-   `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the query (as a JSON object)\n-   `variables` **Dict** a dictionary indexed by variable name\n\nReturns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n## replaceRelatedUpdateVars\n\nReplace `$relatedObjectRID` in the query with the provided RID\n\n**Parameters**\n\n-   `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the query (as a JSON object)\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID to inject into the query\n\nReturns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n## verifySingleItem\n\nVerify that one and only one item was returned by a query\n\n**Parameters**\n\n-   `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the data returned from a query (as a JSON object)\n\n\n-   Throws **any** will throw an error if either no item or multiple items are found\n\nReturns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the single item returned\n\n## getSingleItem\n\nRetrieve the first item returned by a query\n\n**Parameters**\n\n-   `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the data returned from a query (as a JSON object)\n\n\n-   Throws **any** will throw an error if no items are found\n\nReturns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n## logUpdateResults\n\nLog to the console the results of an update\n\n**Parameters**\n\n-   `results` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the data returned from an update (as a JSON object)\n\n## compareObjectsForSorting\n\nCompare two objects for sorting purposes\n\n**Parameters**\n\n-   `a`  \n-   `b`  \n\nReturns **integer** \\-1 (a\u0026lt;b), 0 (a=b), 1 (a\u003eb)\n\n## getAssetContainerId\n\nRetrieve the RID of the container of an asset (for example, the database table of a database column)\n\n**Parameters**\n\n-   `assetObj` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the asset object, as returned from REST API\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of assetObj's container\n\n## getContainerIdentity\n\nGet an identity object for the provided asset's container\n\n**Parameters**\n\n-   `assetCtx` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the context object for the asset\n-   `containerId` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the RID of the asset's container\n-   `callback` **[identityCallback](#identitycallback)** callback that handles the response, since further requests may be needed\n\n## getAssetIdentity\n\nGet an identity object for the provided asset\n\n**Parameters**\n\n-   `assetObj` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the asset for which to get an identity object\n-   `containerIdentities` **Dict** a dict cache of container identities\n\nReturns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the identity of this object\n\n## getItemIdentityString\n\nConstructs an asset identity string provide a REST API item (which must include `_context`)\n\n**Parameters**\n\n-   `restItem` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** a single entry from the `items` array of a REST API response, including `_context` member\n-   `delimiter` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** a delimiter to use for separating the components of the identity (default: `::`)\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n## getRIDFromItem\n\nRetrieves an asset's RID based on its `_context` and name (ie. in a different environment)\n\n**Parameters**\n\n-   `restItem` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** a single entry from an `items` array of a REST API response, including `_context` member\n-   `replacements` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** a dict keyed by REST type whose value should be the replacement value for the corresponding type in the `_context` provided\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the RID of the asset\n\n## getContextForItem\n\nRetrieves an asset's `_context` based on its RID and type\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the IGC RID of the asset\n-   `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the IGC REST type of the asset\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the `_context` of the asset\n\n## addRelationshipToAsset\n\nAdds a relationship to the provided asset\n\n**Parameters**\n\n-   `fromAsset` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the IGC asset (as REST item response) to which to add the relationship\n-   `toAssetRIDs` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** the IGC RIDs of the assets to which to relate\n-   `relnProperty` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the property of the fromAssetRID against which to add the relationship\n-   `mode` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** how to add the relationship [ APPEND, REPLACE_ALL, REPLACE_SOME ]\n-   `replaceType` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** the IGC REST type of object relationships to replace (for REPLACE_SOME)\n-   `conditions` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e?** array of conditions objects (property, operator, value) defining what relationships to replace (for REPLACE_SOME)\n-   `batch` **integer?** how many relationships to retrieve at a time (default = 100)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the result of the relationship processing\n\n## makeRequest\n\n-   **See: module:ibm-igc-rest.setServer**\n-   **See: module:ibm-igc-rest.setAuth**\n\nMake a request against IGC's REST API\n\n**Parameters**\n\n-   `method` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** type of request, one of [`GET`, `PUT`, `POST`, `DELETE`]\n-   `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the path to the end-point (e.g. `/ibm/iis/igc-rest/v1/...`)\n-   `input` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** any input for the request, i.e. for PUT, POST\n-   `contentType` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** the type of content, e.g. `application/json` or `application/xml`\n-   `drillDown` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** the key into which to drill-down within the response\n-   `callback` **[requestCallback](#requestcallback)** callback that handles the response\n\n\n-   Throws **any** will throw an error if connectivity details are incomplete or there is a fatal error during the request\n\n## create\n\nCreate an asset\n\n**Parameters**\n\n-   `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the type of asset to create\n-   `value` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the set of values with which to create the asset\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (if not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the RID of the created asset\n\n## update\n\nUpdate a RID with a specific set of data\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the asset to update\n-   `value` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the set of data with which to update the asset\n-   `callback` **[requestCallback](#requestcallback)?** optional callback to handles the response (if not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the update\n\n## search\n\nSearch IGC\n\n**Parameters**\n\n-   `query` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the search to run against IGC (as a JSON object)\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (if not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the search\n\n## getTypes\n\nGet a list of all of the IGC asset types\n\n**Parameters**\n\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (if not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the IGC types\n\n## getAssetTypeNamesToIds\n\nGet a mapping of all asset types from display name to unique type id\n\n**Parameters**\n\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises), with an object keyed by display name and each value the unique type id for that display name\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains an object keyed by display name and each value the unique type id for that display name\n\n## getOther\n\nMake a general GET request against IGC's REST API\n\n**Parameters**\n\n-   `path` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the path to the end-point (e.g. `/ibm/iis/igc-rest/v1/...`)\n-   `successCode` **integer** the HTTP response code that indicates success for this operation\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the response body from the request\n\n## deleteAssetById\n\nDelete a specific asset from IGC\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the asset to delete\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the result of the deletion\n\n## detectLineageForJob\n\nRequest IGC to detect lineage for a specific job (requires v11.5.0.1 GOVRUP3 or higher)\n\n-   Actual status comes from the \"message\" within the callback results: starts with SUCCESS, WARNING or FAILURE\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the job for which to detect lineage\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains results of the lineage detection\n\n## uploadLineageFlow\n\nCreate new lineage flow as defined by a flow XML document\n\n**Parameters**\n\n-   `xml` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the flow document XML containing the lineage to upload\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the lineage flow upload\n\n## getBundles\n\nGet list of bundles (asset type definitions) already deployed\n\n**Parameters**\n\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains a String\\[] of bundle names\n\n## createBundle\n\nCreate a new Open IGC bundle (asset type definition)\n\n**Parameters**\n\n-   `zipFile` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the location of the zip file from which to create the bundle\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the bundle upload\n\n## updateBundle\n\nUpdate an existing Open IGC bundle (asset type definition)\n\n**Parameters**\n\n-   `zipFile` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the location of the zip file from which to create the bundle\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the bundle upload\n\n## createBundleAssets\n\nCreate instances of assets defined by an Open IGC bundle\n\n**Parameters**\n\n-   `xml` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the flow document XML containing the asset instance definitions\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the asset instantiations\n\n## createCustomAttribute\n\nCreate a new Custom Attribute (available in v11.7 onwards only)\n\n**Parameters**\n\n-   `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the JSON object which describes the custom attribute\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the custom attribute creation\n\n## updateCustomAttribute\n\nUpdate a new Custom Attribute (available in v11.7 onwards only)\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the custom attribute to update\n-   `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the JSON object which describes the custom attribute\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the results of the custom attribute update\n\n## getCustomAttributes\n\nGet list of custom attributes already deployed\n\n**Parameters**\n\n-   `maxItems` **integer** maximum number of custom attributes to retrieve\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains an array of objects with custom attribute definitions: \"id\", \"name\", \"attributeType\", and \"appliesTo\"\\[]\n\n## getAssetsInCollection\n\nGet a listing of all of the assets in a collection\n\n**Parameters**\n\n-   `collectionName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n-   `maxItems` **integer** maximum number of items to retrieve\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the list of assets in the collection\n\n## getAssetById\n\n-   **See: module:ibm-igc-rest.getAssetPropertiesById**\n\nRequest all details of an asset\n\nNOTE: this function should be used with caution -- it will build a large object and\ncan be measurably slower (\u003e 5x) than explicitly defining the properties and searching\nusing `getAssetPropertiesById` instead\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the asset\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains all of the asset's details\n\n## getAssetPropertyById\n\nRetrieve only the single specified property of an asset\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the asset\n-   `property` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the property of the asset to retrieve (e.g. `name`)\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the specified property of the asset\n\n## getAssetPropertiesById\n\n-   **See: module:ibm-igc-rest.getTypes**\n\nRetrieve only the specified details of an asset\n\n**Parameters**\n\n-   `rid` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the RID of the asset\n-   `type` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the type of the asset\n-   `properties` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** array of properties to retrieve for the asset\n-   `maxItems` **integer** maximum number of detailed properties\n-   `bIncludeContext` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether to include contextual information (true) or drill-down just to the resulting properties (false)\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the specified properties of the asset\n\n## getNextPage\n\n-   **See: module:ibm-igc-rest.search**\n\nRetrieve the next page of information\n\n**Parameters**\n\n-   `paging` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `paging` sub-object of a results object\n-   `callback` **[requestCallback](#requestcallback)?** optional callback that handles the response (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the next page of results\n\n## getAllPages\n\n-   **See: module:ibm-igc-rest.search**\n-   **See: module:ibm-igc-rest.getNextPage**\n\nRetrieve all remaining pages of information\n\n**Parameters**\n\n-   `items` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `items` sub-object of a results object\n-   `paging` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the `paging` sub-object of a results object\n-   `callback` **[itemSetCallback](#itemsetcallback)?** optional callback that provides the list of all items from all pages (when not using Promises)\n\nReturns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** when resolved contains the list of all items from all pages of results\n\n## isDataContainer\n\n**Parameters**\n\n-   `type`  \n\nReturns **any** true if the provided type is a data container\n\n## getDataContainerChildTypes\n\n**Parameters**\n\n-   `type`  \n\nReturns **any** the data type name for the child object of the provided container type\n\n## requestCallback\n\nThis callback is invoked as the result of an IGC REST API call, providing the response of that request.\n\nType: [Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)\n\n**Parameters**\n\n-   `errorMessage` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** any error message, or null if no errors\n-   `responseObject` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the JSON object containing the response\n\n## itemSetCallback\n\nThis callback is invoked as the result of obtaining a set of items, providing an array of items.\n\nType: [Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)\n\n**Parameters**\n\n-   `errorMessage` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** any error message, or null if no errors\n-   `itemArray` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** an array of JSON objects, each being an item\n\n## identityCallback\n\nThis callback is invoked as the result of obtaining an object's identity, providing the response of that request.\n\nType: [Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)\n\n**Parameters**\n\n-   `errorMessage` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** any error message, or null if no errors\n-   `identityObject` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** the JSON object containing the identity\n\n## Conversion\n\nConversion class -- for encapsulating mapping / transformation information between REST concepts and other representations\n\n### getRESTTypeFromSchemaType\n\nRetrieves the IGC REST type equivalent for the provided schema type\n\n**Parameters**\n\n-   `schemaType` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the xmeta schema type (eg. 'ASCLModel.DatabaseField')\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the REST type (eg. 'database_column')\n\n### getSchemaTypeFromRESTType\n\nRetrieves the xmeta schema type equivalent for the provided REST type\n\n**Parameters**\n\n-   `restType` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the REST type (eg. 'database_column')\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the xmeta schema type (eg. 'ASCLModel.DatabaseField')\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibm%2Fnode-igc-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibm%2Fnode-igc-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibm%2Fnode-igc-rest/lists"}