npm package: @hra-api/js-client
Description: DEPRECATED: JavaScript client library for the HRA API
Latest version: 0.19.0

# DEPRECATED
Use [@hra-api/ts-client](https://www.npmjs.com/package/@hra-api/ts-client) instead!

# @hra-api/js-client

HraApiJsClient - JavaScript client for @hra-api/js-client
This API provides programmatic access to data registered to the Human Reference Atlas (HRA).
See the [HuBMAP HRA Portal](https://humanatlas.io/) for details.

This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.19.0
- Package version: 0.19.0
- Generator version: 7.19.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install @hra-api/js-client --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your @hra-api/js-client from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/x-atlas-consortia/hra-api
then install it via:

```shell
    npm install x-atlas-consortia/hra-api --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var HraApiJsClient = require('@hra-api/js-client');


var api = new HraApiJsClient.DsGraphApi()
var opts = {
  'token': "token_example" // {String} Authentication token to use for authenticated searches
};
api.atlasD2k(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


```

## Documentation for API Endpoints

All URIs are relative to *https://apps.humanatlas.io/api*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*HraApiJsClient.DsGraphApi* | [**atlasD2k**](docs/DsGraphApi.md#atlasD2k) | **GET** /ds-graph/atlas-d2k | Get Atlas D2K Dataset Graph
*HraApiJsClient.DsGraphApi* | [**gtex**](docs/DsGraphApi.md#gtex) | **GET** /ds-graph/gtex | Get GTEx Dataset Graph
*HraApiJsClient.DsGraphApi* | [**hubmap**](docs/DsGraphApi.md#hubmap) | **GET** /ds-graph/hubmap | Get HuBMAP Dataset Graph
*HraApiJsClient.DsGraphApi* | [**sennet**](docs/DsGraphApi.md#sennet) | **GET** /ds-graph/sennet | Get SenNet Dataset Graph
*HraApiJsClient.HraKgApi* | [**asctbTermOccurences**](docs/HraKgApi.md#asctbTermOccurences) | **GET** /kg/asctb-term-occurences | Get number of ASCT+B term occurrences for a search
*HraApiJsClient.HraKgApi* | [**digitalObjects**](docs/HraKgApi.md#digitalObjects) | **GET** /kg/digital-objects | List all digital objects in the HRA KG
*HraApiJsClient.HraKgApi* | [**doSearch**](docs/HraKgApi.md#doSearch) | **GET** /kg/do-search | Search for Digital Object PURLs
*HraApiJsClient.HraPopApi* | [**cellSummaryReport**](docs/HraPopApi.md#cellSummaryReport) | **POST** /hra-pop/cell-summary-report | Given a cell summary in csv format, retrieve a predicted cell summary report from HRApop showing relative anatomical structures, datasets, and rui locations.
*HraApiJsClient.HraPopApi* | [**ruiLocationCellSummary**](docs/HraPopApi.md#ruiLocationCellSummary) | **POST** /hra-pop/rui-location-cell-summary | Given a SpatialEntity already placed relative to a reference SpatialEntity, retrieve a predicted cell summary from HRApop
*HraApiJsClient.HraPopApi* | [**supportedOrgans**](docs/HraPopApi.md#supportedOrgans) | **GET** /hra-pop/supported-organs | Get all organs supported by HRApop
*HraApiJsClient.HraPopApi* | [**supportedReferenceOrgans**](docs/HraPopApi.md#supportedReferenceOrgans) | **GET** /hra-pop/supported-reference-organs | Get all reference organs supported by HRApop
*HraApiJsClient.HraPopApi* | [**supportedTools**](docs/HraPopApi.md#supportedTools) | **GET** /hra-pop/supported-tools | Get all tools supported by HRApop
*HraApiJsClient.V1Api* | [**aggregateResults**](docs/V1Api.md#aggregateResults) | **GET** /v1/aggregate-results | Get aggregate results / statistics
*HraApiJsClient.V1Api* | [**anatomicalSystemsTreeModel**](docs/V1Api.md#anatomicalSystemsTreeModel) | **GET** /v1/anatomical-systems-tree-model | Get anatomical systems partonomy tree nodes
*HraApiJsClient.V1Api* | [**asctbOmapSheetConfig**](docs/V1Api.md#asctbOmapSheetConfig) | **GET** /v1/asctb-omap-sheet-config | Get OMAP sheet config data for the ASCT+B Reporter
*HraApiJsClient.V1Api* | [**asctbSheetConfig**](docs/V1Api.md#asctbSheetConfig) | **GET** /v1/asctb-sheet-config | Get sheet config data for the ASCT+B Reporter
*HraApiJsClient.V1Api* | [**biomarkerTermOccurences**](docs/V1Api.md#biomarkerTermOccurences) | **GET** /v1/biomarker-term-occurences | Get number of biomarker type term occurrences for a search
*HraApiJsClient.V1Api* | [**biomarkerTreeModel**](docs/V1Api.md#biomarkerTreeModel) | **GET** /v1/biomarker-tree-model | Get biomarker tree nodes
*HraApiJsClient.V1Api* | [**cellTypeTermOccurences**](docs/V1Api.md#cellTypeTermOccurences) | **GET** /v1/cell-type-term-occurences | Get number of cell type term occurrences for a search
*HraApiJsClient.V1Api* | [**cellTypeTreeModel**](docs/V1Api.md#cellTypeTreeModel) | **GET** /v1/cell-type-tree-model | Get cell type tree nodes
*HraApiJsClient.V1Api* | [**collisions**](docs/V1Api.md#collisions) | **POST** /v1/collisions | Given an extraction site, get mesh-based collisions with the reference organ.
*HraApiJsClient.V1Api* | [**consortiumNames**](docs/V1Api.md#consortiumNames) | **GET** /v1/consortium-names | Get consortium names (for filtering)
*HraApiJsClient.V1Api* | [**corridor**](docs/V1Api.md#corridor) | **POST** /v1/corridor | Given an extraction site, generate a corridor with the reference organ.
*HraApiJsClient.V1Api* | [**dbStatus**](docs/V1Api.md#dbStatus) | **GET** /v1/db-status | Get current status of database
*HraApiJsClient.V1Api* | [**dsGraph**](docs/V1Api.md#dsGraph) | **GET** /v1/ds-graph | Get dataset graph
*HraApiJsClient.V1Api* | [**extractionSite**](docs/V1Api.md#extractionSite) | **GET** /v1/extraction-site | Lookup Extraction Site
*HraApiJsClient.V1Api* | [**ftuIllustrations**](docs/V1Api.md#ftuIllustrations) | **GET** /v1/ftu-illustrations | Get 2D FTU Illustration data
*HraApiJsClient.V1Api* | [**getSpatialPlacement**](docs/V1Api.md#getSpatialPlacement) | **POST** /v1/get-spatial-placement | Given a SpatialEntity already placed relative to a reference SpatialEntity, retrieve a new direct SpatialPlacement to the given SpatialEntity IRI
*HraApiJsClient.V1Api* | [**gtexRuiLocations**](docs/V1Api.md#gtexRuiLocations) | **GET** /v1/gtex/rui_locations.jsonld | Get all GTEx rui locations (if enabled)
*HraApiJsClient.V1Api* | [**hubmapRuiLocations**](docs/V1Api.md#hubmapRuiLocations) | **GET** /v1/hubmap/rui_locations.jsonld | Get all hubmap rui locations (if enabled)
*HraApiJsClient.V1Api* | [**mesh3dCellPopulation**](docs/V1Api.md#mesh3dCellPopulation) | **POST** /v1/mesh-3d-cell-population | Given a reference organ, 3d scene node, and cell population,  generate cells in that distribution to fit in that 3d scene node.
*HraApiJsClient.V1Api* | [**ontologyTermOccurences**](docs/V1Api.md#ontologyTermOccurences) | **GET** /v1/ontology-term-occurences | Get number of ontology term occurrences for a search
*HraApiJsClient.V1Api* | [**ontologyTreeModel**](docs/V1Api.md#ontologyTreeModel) | **GET** /v1/ontology-tree-model | Get ontology term tree nodes
*HraApiJsClient.V1Api* | [**providerNames**](docs/V1Api.md#providerNames) | **GET** /v1/provider-names | Get tissue provider names (for filtering)
*HraApiJsClient.V1Api* | [**referenceOrganScene**](docs/V1Api.md#referenceOrganScene) | **GET** /v1/reference-organ-scene | Get all nodes to form the 3D scene for an organ
*HraApiJsClient.V1Api* | [**referenceOrgans**](docs/V1Api.md#referenceOrgans) | **GET** /v1/reference-organs | Get all reference organs
*HraApiJsClient.V1Api* | [**ruiReferenceData**](docs/V1Api.md#ruiReferenceData) | **GET** /v1/rui-reference-data | Get reference data for the RUI tool
*HraApiJsClient.V1Api* | [**scene**](docs/V1Api.md#scene) | **GET** /v1/scene | Get all nodes to form the 3D scene of reference body, organs, and tissues
*HraApiJsClient.V1Api* | [**sennetRuiLocations**](docs/V1Api.md#sennetRuiLocations) | **GET** /v1/sennet/rui_locations.jsonld | Get all sennet rui locations (if enabled)
*HraApiJsClient.V1Api* | [**sessionToken**](docs/V1Api.md#sessionToken) | **POST** /v1/session-token | Get a session token
*HraApiJsClient.V1Api* | [**sparql**](docs/V1Api.md#sparql) | **GET** /v1/sparql | Run a SPARQL query
*HraApiJsClient.V1Api* | [**sparqlPost**](docs/V1Api.md#sparqlPost) | **POST** /v1/sparql | Run a SPARQL query (POST)
*HraApiJsClient.V1Api* | [**technologyNames**](docs/V1Api.md#technologyNames) | **GET** /v1/technology-names | Get technology names (for filtering)
*HraApiJsClient.V1Api* | [**tissueBlocks**](docs/V1Api.md#tissueBlocks) | **GET** /v1/tissue-blocks | Get Tissue Block Results


## Documentation for Models

 - [HraApiJsClient.AggregateCount](docs/AggregateCount.md)
 - [HraApiJsClient.CellSummaryReport](docs/CellSummaryReport.md)
 - [HraApiJsClient.CellSummaryReportRequest](docs/CellSummaryReportRequest.md)
 - [HraApiJsClient.CellSummaryRow](docs/CellSummaryRow.md)
 - [HraApiJsClient.DatabaseStatus](docs/DatabaseStatus.md)
 - [HraApiJsClient.DigitalObjectInfo](docs/DigitalObjectInfo.md)
 - [HraApiJsClient.DigitalObjectsJsonLd](docs/DigitalObjectsJsonLd.md)
 - [HraApiJsClient.ErrorMessage](docs/ErrorMessage.md)
 - [HraApiJsClient.ErrorMessageObject](docs/ErrorMessageObject.md)
 - [HraApiJsClient.Filter](docs/Filter.md)
 - [HraApiJsClient.FlatSpatialPlacement](docs/FlatSpatialPlacement.md)
 - [HraApiJsClient.GetSpatialPlacementRequest](docs/GetSpatialPlacementRequest.md)
 - [HraApiJsClient.IdLabelPair](docs/IdLabelPair.md)
 - [HraApiJsClient.JsonLdObject](docs/JsonLdObject.md)
 - [HraApiJsClient.Mesh3dCellPopulationRequest](docs/Mesh3dCellPopulationRequest.md)
 - [HraApiJsClient.MinMax](docs/MinMax.md)
 - [HraApiJsClient.OntologyTree](docs/OntologyTree.md)
 - [HraApiJsClient.OntologyTreeNode](docs/OntologyTreeNode.md)
 - [HraApiJsClient.SessionToken](docs/SessionToken.md)
 - [HraApiJsClient.SessionTokenRequest](docs/SessionTokenRequest.md)
 - [HraApiJsClient.SourceSimilarityRow](docs/SourceSimilarityRow.md)
 - [HraApiJsClient.SpacialPlacementSource](docs/SpacialPlacementSource.md)
 - [HraApiJsClient.SpacialPlacementTarget](docs/SpacialPlacementTarget.md)
 - [HraApiJsClient.SparqlQueryRequest](docs/SparqlQueryRequest.md)
 - [HraApiJsClient.SpatialEntity](docs/SpatialEntity.md)
 - [HraApiJsClient.SpatialEntityCommon](docs/SpatialEntityCommon.md)
 - [HraApiJsClient.SpatialEntityCreator](docs/SpatialEntityCreator.md)
 - [HraApiJsClient.SpatialEntityDimensions](docs/SpatialEntityDimensions.md)
 - [HraApiJsClient.SpatialEntityPlacement](docs/SpatialEntityPlacement.md)
 - [HraApiJsClient.SpatialObjectReference](docs/SpatialObjectReference.md)
 - [HraApiJsClient.SpatialPlacement](docs/SpatialPlacement.md)
 - [HraApiJsClient.SpatialPlacementCommon](docs/SpatialPlacementCommon.md)
 - [HraApiJsClient.SpatialPlacementRotation](docs/SpatialPlacementRotation.md)
 - [HraApiJsClient.SpatialPlacementScaling](docs/SpatialPlacementScaling.md)
 - [HraApiJsClient.SpatialPlacementTranslation](docs/SpatialPlacementTranslation.md)
 - [HraApiJsClient.SpatialSceneNode](docs/SpatialSceneNode.md)
 - [HraApiJsClient.SpatialSearch](docs/SpatialSearch.md)
 - [HraApiJsClient.TissueBlock](docs/TissueBlock.md)
 - [HraApiJsClient.TissueCommon](docs/TissueCommon.md)
 - [HraApiJsClient.TissueDataset](docs/TissueDataset.md)
 - [HraApiJsClient.TissueDonor](docs/TissueDonor.md)
 - [HraApiJsClient.TissueSampleCommon](docs/TissueSampleCommon.md)
 - [HraApiJsClient.TissueSection](docs/TissueSection.md)


## Documentation for Authorization

Endpoints do not require authorization.