0.0.1 • Published 2 years ago

hk_atlas_rest_api v0.0.1

Weekly downloads
-
License
The Apache Softwa...
Repository
-
Last release
2 years ago

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/

ClassMethodHTTP requestDescription
AtlasRestApi.DiscoveryRESTApiresourceDiscoveryRESTSearchUsingBasicGETGET /v2/search/basicRetrieve data for the specified fulltext query.
AtlasRestApi.DiscoveryRESTApiresourceDiscoveryRESTSearchUsingDSLGETGET /v2/search/dslRetrieve data for the specified DSL.
AtlasRestApi.DiscoveryRESTApiresourceDiscoveryRESTSearchUsingFullTextGETGET /v2/search/fulltextRetrieve data for the specified fulltext query.
AtlasRestApi.EntityRESTApiresourceEntityRESTAddClassificationPOSTPOST /v2/entity/bulk/classificationBulk API to associate a tag to multiple entities.
AtlasRestApi.EntityRESTApiresourceEntityRESTAddClassificationsPOSTPOST /v2/entity/guid/{guid}/classificationsAdds classifications to an existing entity represented by a guid.
AtlasRestApi.EntityRESTApiresourceEntityRESTCreateOrUpdatePOSTPOST /v2/entityCreate new entity or update existing entity in Atlas.
AtlasRestApi.EntityRESTApiresourceEntityRESTCreateOrUpdatePOST_0POST /v2/entity/bulkBulk API to create new entities or update existing entities in Atlas.
AtlasRestApi.EntityRESTApiresourceEntityRESTDeleteByGuidDELETEDELETE /v2/entity/guid/{guid}Delete an entity identified by its GUID.
AtlasRestApi.EntityRESTApiresourceEntityRESTDeleteByGuidsDELETEDELETE /v2/entity/bulkBulk API to delete list of entities identified by its GUIDs.
AtlasRestApi.EntityRESTApiresourceEntityRESTDeleteByUniqueAttributeDELETEDELETE /v2/entity/uniqueAttribute/type/{typeName}Delete an entity identified by its type and unique attributes.
AtlasRestApi.EntityRESTApiresourceEntityRESTDeleteClassificationDELETEDELETE /v2/entity/guid/{guid}/classification/{classificationName}Deletes a given classification from an existing entity represented by a guid.
AtlasRestApi.EntityRESTApiresourceEntityRESTGetByGuidsGETGET /v2/entity/bulkBulk API to retrieve list of entities identified by its GUIDs.
AtlasRestApi.EntityRESTApiresourceEntityRESTGetByIdGETGET /v2/entity/guid/{guid}Fetch complete definition of an entity given its GUID.
AtlasRestApi.EntityRESTApiresourceEntityRESTGetByUniqueAttributesGETGET /v2/entity/uniqueAttribute/type/{typeName}Fetch complete definition of an entity given its type and unique attribute.
AtlasRestApi.EntityRESTApiresourceEntityRESTGetClassificationGETGET /v2/entity/guid/{guid}/classification/{classificationName}Gets the list of classifications for a given entity represented by a guid.
AtlasRestApi.EntityRESTApiresourceEntityRESTGetClassificationsGETGET /v2/entity/guid/{guid}/classificationsGets the list of classifications for a given entity represented by a guid.
AtlasRestApi.EntityRESTApiresourceEntityRESTPartialUpdateEntityAttrByGuidPUTPUT /v2/entity/guid/{guid}Entity Partial Update - Add/Update entity attribute identified by its GUID.
AtlasRestApi.EntityRESTApiresourceEntityRESTPartialUpdateEntityByUniqueAttrsPUTPUT /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.LineageRESTApiresourceLineageRESTGetLineageGraphGETGET /v2/lineage/{guid}Returns lineage info about entity.
AtlasRestApi.TypesRESTApiresourceTypesRESTCreateAtlasTypeDefsPOSTPOST /v2/types/typedefsBulk create APIs for all atlas type definitions, only new definitions will be created.
AtlasRestApi.TypesRESTApiresourceTypesRESTDeleteAtlasTypeDefsDELETEDELETE /v2/types/typedefsBulk delete API for all types.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetAllTypeDefsGETGET /v2/types/typedefsBulk retrieval API for retrieving all type definitions in Atlas.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetClassificationDefByGuidGETGET /v2/types/classificationdef/guid/{guid}Get the classification definition for the given guid.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetClassificationDefByNameGETGET /v2/types/classificationdef/name/{name}Get the classification definition by it's name (unique).
AtlasRestApi.TypesRESTApiresourceTypesRESTGetEntityDefByGuidGETGET /v2/types/entitydef/guid/{guid}Get the Entity definition for the given guid.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetEntityDefByNameGETGET /v2/types/entitydef/name/{name}Get the entity definition by it's name (unique).
AtlasRestApi.TypesRESTApiresourceTypesRESTGetEnumDefByGuidGETGET /v2/types/enumdef/guid/{guid}Get the enum definition for the given guid.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetEnumDefByNameGETGET /v2/types/enumdef/name/{name}Get the enum definition by it's name (unique).
AtlasRestApi.TypesRESTApiresourceTypesRESTGetStructDefByGuidGETGET /v2/types/structdef/guid/{guid}Get the struct definition for the given guid.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetStructDefByNameGETGET /v2/types/structdef/name/{name}Get the struct definition by it's name (unique).
AtlasRestApi.TypesRESTApiresourceTypesRESTGetTypeDefByGuidGETGET /v2/types/typedef/guid/{guid}
AtlasRestApi.TypesRESTApiresourceTypesRESTGetTypeDefByNameGETGET /v2/types/typedef/name/{name}Get type definition by it's name.
AtlasRestApi.TypesRESTApiresourceTypesRESTGetTypeDefHeadersGETGET /v2/types/typedefs/headersBulk retrieval API for all type definitions returned as a list of minimal information header.
AtlasRestApi.TypesRESTApiresourceTypesRESTUpdateAtlasTypeDefsPUTPUT /v2/types/typedefsBulk update API for all types, changes detected in the type definitions would be persisted.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.