3.0.0 • Published 5 years ago

@datafire/openapi_space v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/openapi_space

Client library for OpenAPI space

Installation and Usage

npm install --save @datafire/openapi_space
let openapi_space = require('@datafire/openapi_space').create({
  AuthToken: ""
});

.then(data => {
  console.log(data);
});

Description

This is the API for OpenAPI space.

Actions

search_apis

Retrieves a list of currently defined APIs in API meta list format.

openapi_space.search_apis({}, context)

Input

  • input object
    • query string: free text query to match
    • limit integer: the maximum number of APIs to return
    • offset integer: the offset where to start from when fetching a limited number of APIs
    • sort string (values: NAME, UPDATED, CREATED, OWNER): sort criteria or result set
    • order string (values: ASC, DESC): sort order

Output

get_owner_apis

Retrieves an API meta listing of all APIs defined for this owner

openapi_space.get_owner_apis({
  "owner": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • sort string (values: NAME, UPDATED, CREATED, OWNER): sort criteria or result set
    • order string (values: ASC, DESC): sort order

Output

delete_api

Deletes the specified API

openapi_space.delete_api({
  "owner": "",
  "api": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier

Output

get_api_versions

Retrieves an API meta listing for all API versions for this owner and API

openapi_space.get_api_versions({
  "owner": "",
  "api": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier

Output

save_definition

Saves the provided Swagger definition; the owner must match the token owner. The version will be extracted from the Swagger definitions itself.

openapi_space.save_definition({
  "owner": "",
  "api": "",
  "definition": {}
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier
    • private boolean: Defines whether the API has to be private
    • definition required object
    • force boolean: force update

Output

delete_api_version

Deletes a particular version of the specified API

openapi_space.delete_api_version({
  "owner": "",
  "api": "",
  "version": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier
    • version required string: version identifier

Output

publish_api_version

Publish a particular version of the specified API

openapi_space.publish_api_version({
  "owner": "",
  "api": "",
  "version": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier
    • version required string: version identifier

Output

Output schema unknown

get_json_definition

Retrieves the Swagger definition for the specified API and version in JSON format

openapi_space.get_json_definition({
  "owner": "",
  "api": "",
  "version": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier
    • version required string: version identifier

Output

  • output object

get_yaml_definition

Retrieves the Swagger definition for the specified API and version in YAML format

openapi_space.get_yaml_definition({
  "owner": "",
  "api": "",
  "version": ""
}, context)

Input

  • input object
    • owner required string: API owner identifier
    • api required string: API identifier
    • version required string: version identifier

Output

  • output object

login

Log in to OpenAPI space

openapi_space.login({}, context)

Input

Output

login_apinf

Log in to OpenAPI space using an APInf account

openapi_space.login_apinf({}, context)

Input

  • input object
    • body object
      • password required string
      • username required string

Output

login_apinf_token

Log in to OpenAPI space using an APInf authentication token

openapi_space.login_apinf_token({}, context)

Input

  • input object
    • body object
      • auth_token required string
      • user_id required string

Output

logout

Log out from OpenAPI space

openapi_space.logout(null, context)

Input

This action has no parameters

Output

Output schema unknown

ping

Check whether or not you are authenticated

openapi_space.ping(null, context)

Input

This action has no parameters

Output

register

Register to OpenAPI space

openapi_space.register({}, context)

Input

Output

Definitions

APIMeta

  • APIMeta object
    • created string
    • description string
    • modified string
    • name string
    • owner string
    • swagger object: An optional Swagger spec. Not included in meta lists.
    • url string
    • versions array

APIMetaList

Credentials

  • Credentials object
    • password required string
    • username required string

LoginToken

  • LoginToken object
    • token string: The authentication token sent from the server after a successful login
    • username string

Registration

  • Registration
    • password required string
    • username required string
    • email required string