hk_atlas_rest_api
v0.0.1
Published
Atlas_exposes_a_variety_of_REST_endpoints_to_work_with_types_entities_lineage_and_data_discovery_
Downloads
3
Readme
atlas_rest_api
AtlasRestApi - JavaScript client for atlas_rest_api Atlas exposes a variety of REST endpoints to work with types, entities, lineage and data discovery. This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.9-incubating-SNAPSHOT
- Package version: 0.9-incubating-SNAPSHOT
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install atlas_rest_api --save
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:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your atlas_rest_api from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('atlas_rest_api')
in javascript files from the directory you ran the last
command above from.
git
If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/atlas_rest_api then install it via:
npm install YOUR_USERNAME/atlas_rest_api --save
For browser
The library also works in the browser environment via npm and browserify. 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, that's to say your javascript file where you actually
use this library):
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:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var AtlasRestApi = require('atlas_rest_api');
var api = new AtlasRestApi.DiscoveryRESTApi()
var opts = {
'classification': "classification_example", // {String} limit the result to only entities tagged with the given classification or or its sub-types
'limit': 56, // {Number} limit the result set to only include the specified number of entries
'offset': 56, // {Number} start offset of the result set (useful for pagination)
'query': "query_example", // {String} Fulltext query
'typeName': "typeName_example" // {String} limit the result to only entities of specified type or its sub-types
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.resourceDiscoveryRESTSearchUsingBasicGET(opts, callback);
Documentation for API Endpoints
All URIs are relative to https://localhost:21000/api/atlas/
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AtlasRestApi.DiscoveryRESTApi | resourceDiscoveryRESTSearchUsingBasicGET | GET /v2/search/basic | Retrieve data for the specified fulltext query. AtlasRestApi.DiscoveryRESTApi | resourceDiscoveryRESTSearchUsingDSLGET | GET /v2/search/dsl | Retrieve data for the specified DSL. AtlasRestApi.DiscoveryRESTApi | resourceDiscoveryRESTSearchUsingFullTextGET | GET /v2/search/fulltext | Retrieve data for the specified fulltext query. AtlasRestApi.EntityRESTApi | resourceEntityRESTAddClassificationPOST | POST /v2/entity/bulk/classification | Bulk API to associate a tag to multiple entities. AtlasRestApi.EntityRESTApi | resourceEntityRESTAddClassificationsPOST | POST /v2/entity/guid/{guid}/classifications | Adds classifications to an existing entity represented by a guid. AtlasRestApi.EntityRESTApi | resourceEntityRESTCreateOrUpdatePOST | POST /v2/entity | Create new entity or update existing entity in Atlas. AtlasRestApi.EntityRESTApi | resourceEntityRESTCreateOrUpdatePOST_0 | POST /v2/entity/bulk | Bulk API to create new entities or update existing entities in Atlas. AtlasRestApi.EntityRESTApi | resourceEntityRESTDeleteByGuidDELETE | DELETE /v2/entity/guid/{guid} | Delete an entity identified by its GUID. AtlasRestApi.EntityRESTApi | resourceEntityRESTDeleteByGuidsDELETE | DELETE /v2/entity/bulk | Bulk API to delete list of entities identified by its GUIDs. AtlasRestApi.EntityRESTApi | resourceEntityRESTDeleteByUniqueAttributeDELETE | DELETE /v2/entity/uniqueAttribute/type/{typeName} | Delete an entity identified by its type and unique attributes. AtlasRestApi.EntityRESTApi | resourceEntityRESTDeleteClassificationDELETE | DELETE /v2/entity/guid/{guid}/classification/{classificationName} | Deletes a given classification from an existing entity represented by a guid. AtlasRestApi.EntityRESTApi | resourceEntityRESTGetByGuidsGET | GET /v2/entity/bulk | Bulk API to retrieve list of entities identified by its GUIDs. AtlasRestApi.EntityRESTApi | resourceEntityRESTGetByIdGET | GET /v2/entity/guid/{guid} | Fetch complete definition of an entity given its GUID. AtlasRestApi.EntityRESTApi | resourceEntityRESTGetByUniqueAttributesGET | GET /v2/entity/uniqueAttribute/type/{typeName} | Fetch complete definition of an entity given its type and unique attribute. AtlasRestApi.EntityRESTApi | resourceEntityRESTGetClassificationGET | GET /v2/entity/guid/{guid}/classification/{classificationName} | Gets the list of classifications for a given entity represented by a guid. AtlasRestApi.EntityRESTApi | resourceEntityRESTGetClassificationsGET | GET /v2/entity/guid/{guid}/classifications | Gets the list of classifications for a given entity represented by a guid. AtlasRestApi.EntityRESTApi | resourceEntityRESTPartialUpdateEntityAttrByGuidPUT | PUT /v2/entity/guid/{guid} | Entity Partial Update - Add/Update entity attribute identified by its GUID. AtlasRestApi.EntityRESTApi | resourceEntityRESTPartialUpdateEntityByUniqueAttrsPUT | PUT /v2/entity/uniqueAttribute/type/{typeName} | Entity Partial Update - Allows a subset of attributes to be updated on an entity which is identified by its type and unique attribute eg: Referenceable. AtlasRestApi.LineageRESTApi | resourceLineageRESTGetLineageGraphGET | GET /v2/lineage/{guid} | Returns lineage info about entity. AtlasRestApi.TypesRESTApi | resourceTypesRESTCreateAtlasTypeDefsPOST | POST /v2/types/typedefs | Bulk create APIs for all atlas type definitions, only new definitions will be created. AtlasRestApi.TypesRESTApi | resourceTypesRESTDeleteAtlasTypeDefsDELETE | DELETE /v2/types/typedefs | Bulk delete API for all types. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetAllTypeDefsGET | GET /v2/types/typedefs | Bulk retrieval API for retrieving all type definitions in Atlas. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetClassificationDefByGuidGET | GET /v2/types/classificationdef/guid/{guid} | Get the classification definition for the given guid. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetClassificationDefByNameGET | GET /v2/types/classificationdef/name/{name} | Get the classification definition by it's name (unique). AtlasRestApi.TypesRESTApi | resourceTypesRESTGetEntityDefByGuidGET | GET /v2/types/entitydef/guid/{guid} | Get the Entity definition for the given guid. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetEntityDefByNameGET | GET /v2/types/entitydef/name/{name} | Get the entity definition by it's name (unique). AtlasRestApi.TypesRESTApi | resourceTypesRESTGetEnumDefByGuidGET | GET /v2/types/enumdef/guid/{guid} | Get the enum definition for the given guid. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetEnumDefByNameGET | GET /v2/types/enumdef/name/{name} | Get the enum definition by it's name (unique). AtlasRestApi.TypesRESTApi | resourceTypesRESTGetStructDefByGuidGET | GET /v2/types/structdef/guid/{guid} | Get the struct definition for the given guid. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetStructDefByNameGET | GET /v2/types/structdef/name/{name} | Get the struct definition by it's name (unique). AtlasRestApi.TypesRESTApi | resourceTypesRESTGetTypeDefByGuidGET | GET /v2/types/typedef/guid/{guid} | AtlasRestApi.TypesRESTApi | resourceTypesRESTGetTypeDefByNameGET | GET /v2/types/typedef/name/{name} | Get type definition by it's name. AtlasRestApi.TypesRESTApi | resourceTypesRESTGetTypeDefHeadersGET | GET /v2/types/typedefs/headers | Bulk retrieval API for all type definitions returned as a list of minimal information header. AtlasRestApi.TypesRESTApi | resourceTypesRESTUpdateAtlasTypeDefsPUT | PUT /v2/types/typedefs | Bulk update API for all types, changes detected in the type definitions would be persisted.
Documentation for Models
- AtlasRestApi.JsonAtlasAttributeDef
- AtlasRestApi.JsonAtlasBaseTypeDef
- AtlasRestApi.JsonAtlasClassification
- AtlasRestApi.JsonAtlasClassificationDef
- AtlasRestApi.JsonAtlasClassifications
- AtlasRestApi.JsonAtlasConstraintDef
- AtlasRestApi.JsonAtlasEntitiesWithExtInfo
- AtlasRestApi.JsonAtlasEntity
- AtlasRestApi.JsonAtlasEntityDef
- AtlasRestApi.JsonAtlasEntityExtInfo
- AtlasRestApi.JsonAtlasEntityHeader
- AtlasRestApi.JsonAtlasEntityWithExtInfo
- AtlasRestApi.JsonAtlasEnumDef
- AtlasRestApi.JsonAtlasEnumElementDef
- AtlasRestApi.JsonAtlasFullTextResult
- AtlasRestApi.JsonAtlasLineageInfo
- AtlasRestApi.JsonAtlasQueryType
- AtlasRestApi.JsonAtlasSearchResult
- AtlasRestApi.JsonAtlasStruct
- AtlasRestApi.JsonAtlasStructDef
- AtlasRestApi.JsonAtlasTypeDefHeader
- AtlasRestApi.JsonAtlasTypesDef
- AtlasRestApi.JsonAttributeSearchResult
- AtlasRestApi.JsonCardinality
- AtlasRestApi.JsonClassificationAssociateRequest
- AtlasRestApi.JsonEntityMutationResponse
- AtlasRestApi.JsonEntityOperation
- AtlasRestApi.JsonLineageDirection
- AtlasRestApi.JsonLineageRelation
- AtlasRestApi.JsonPList
- AtlasRestApi.JsonSortType
- AtlasRestApi.JsonStatus
- AtlasRestApi.JsonTypeCategory
Documentation for Authorization
All endpoints do not require authorization.