apcera-ap-is

REST APIs used to manage an Apcera cluster and its resources.

Usage no npm install needed!

<script type="module">
  import apceraApIs from 'https://cdn.skypack.dev/apcera-ap-is';
</script>

README

apcera-ap-is

ApceraApIs - JavaScript client for apcera-ap-is REST APIs used to manage an Apcera cluster and its resources. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build date: 2016-05-06T22:36:41.864Z
  • Build package: class 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 apcera-ap-is --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/apcera-ap-is then install it via:

npm install YOUR_USERNAME/apcera-ap-is --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):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var ApceraApIs = require('apcera-ap-is');

var defaultClient = ApceraApIs.ApiClient.default;

// Configure API key authorization: authorization
var authorization = defaultClient.authentications['authorization'];
authorization.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authorization.apiKeyPrefix['authorization'] = "Token"

var api = new ApceraApIs.DefaultApi()

var opts = { 
  'startTime': 3.4, // {Number} UNIX timestamp. If specified, only events that occurred on or after the specified time are returned in the response.
  'endTime': 3.4, // {Number} UNIX timestamp. If specified, only events that occurred on or before the specified time are returned in the response.
  'fqn': "fqn_example", // {String} If specified, only events on the resource specified by `fqn` are returned in the response. You can also specify an FQN segment, which may include wildcards for the resource type. For example:\n * `*::/` returns all audit logs for all resource types.\n * `job::/` returns all audit logs for Job resource types. \n * `job::/apcera` returns all audit logs for Job resource types in the `/apcera` namespace and its sub-namespaces. \n * `*::/apcera` returns all audit logs for all resource types in the `/apcera` namespace its sub-namespaces.
  'eventType': "eventType_example", // {String} If specified, only events of the specified type are returned in the response.
  'authorization': "authorization_example" // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.auditGet(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://api.kiso.io/v1

Class Method HTTP request Description
ApceraApIs.DefaultApi auditGet GET /audit Returns audit log items for the cluster.
ApceraApIs.InstancesApi instanceManagersGet GET /instance_managers Returns a list of instance managers.
ApceraApIs.InstancesApi instanceManagersUuidGet GET /instance_managers/{uuid} Returns details for the specified instance manager.
ApceraApIs.InstancesApi instanceManagersUuidInstancesGet GET /instance_managers/{uuid}/instances Returns a list of instances managed by the specified instance manager.
ApceraApIs.InstancesApi instancesUuidSnapshotPost POST /instances/{uuid}/snapshot Creates a snapshot of a capsule.
ApceraApIs.InstancesApi tagsGet GET /tags Lists all tags on all instance managers in the cluster.
ApceraApIs.JobsApi bindingsPost POST /bindings Creates a new binding between a job and a service, or between two jobs (a job link).
ApceraApIs.JobsApi dockerJobCheck POST /jobs/docker-job-check Checks a Docker job before creation to see if it will be allowed by docker.allow policy.
ApceraApIs.JobsApi dockerJobsPost POST /jobs/docker Creates a new job from a Docker image.
ApceraApIs.JobsApi jobsGet GET /jobs List jobs.
ApceraApIs.JobsApi jobsHealthGet GET /jobs/health Retrieves health information for a job with a specific UUID.
ApceraApIs.JobsApi jobsPost POST /jobs Creates a new job.
ApceraApIs.JobsApi jobsRoutesEndpointGet GET /jobs/routes/{endpoint} Returns a map of the specified endpoint to an array of job UUIDs that are assigned to the endpoint.
ApceraApIs.JobsApi jobsRoutesGet GET /jobs/routes Returns a list of all route endpoints that each map to an array of job UUIDs assigned to the endpoint.
ApceraApIs.JobsApi jobsUuidComplianceGet GET /jobs/{uuid}/compliance Checks the specified job for policy compliance.
ApceraApIs.JobsApi jobsUuidDelete DELETE /jobs/{uuid} Deletes the specified job.
ApceraApIs.JobsApi jobsUuidFilesPathGet GET /jobs/{uuid}/files/{path} Returns information about an instance's underlying file system.
ApceraApIs.JobsApi jobsUuidGet GET /jobs/{uuid} Returns details about the specified job.
ApceraApIs.JobsApi jobsUuidInstancesGet GET /jobs/{uuid}/instances Returns instances from the health manager for a given job UUID.
ApceraApIs.JobsApi jobsUuidInstancesInstanceUuidDelete DELETE /jobs/{uuid}/instances/{instance_uuid} Stop a given instance of a job.
ApceraApIs.JobsApi jobsUuidLogsDrainsDrainUuidDelete DELETE /jobs/{uuid}/logs/drains/{drain_uuid} Deletes a log drain from a job.
ApceraApIs.JobsApi jobsUuidLogsDrainsGet GET /jobs/{uuid}/logs/drains Returns all log drains for the specified job.
ApceraApIs.JobsApi jobsUuidLogsDrainsPost POST /jobs/{uuid}/logs/drains Creates a log drain on the specified job.
ApceraApIs.JobsApi jobsUuidLogsGet GET /jobs/{uuid}/logs Returns logs for the specified job.
ApceraApIs.JobsApi jobsUuidPut PUT /jobs/{uuid} Updates a job.
ApceraApIs.JobsApi jobsUuidTunnelGet GET /jobs/{uuid}/tunnel Creates a bi-directional tunnel with the job/instance UUID specified.
ApceraApIs.JobsApi jobsUuidTunnelInstanceIdGet GET /jobs/{uuid}/tunnel/{instance_id} Creates a bi-directional tunnel with the job/instance UUID specified.
ApceraApIs.JobsApi tasksUuidGet GET /tasks/{uuid} Returns a list of task events for a given task.
ApceraApIs.JobsApi unbindPost POST /unbind Removes a service binding from a job.
ApceraApIs.JobsApi unlinkPost POST /unlink Removes a link between two jobs.
ApceraApIs.LogsApi auditLogsGet GET /audit_logs Returns audit log items for the cluster.
ApceraApIs.LogsApi logsChannelGet GET /logs/{channel} Streams logs for the specified channel.
ApceraApIs.MetricsApi metricsClusterGet GET /metrics/cluster Returns metrics data for the cluster.
ApceraApIs.MetricsApi metricsInstanceManagersGet GET /metrics/instance_managers Returns metrics for instance managers.
ApceraApIs.MetricsApi metricsJobsGet GET /metrics/jobs Returns job metrics.
ApceraApIs.MetricsApi metricsRouteCountersGet GET /metrics/route/counters Returns metrics for counters on the route.
ApceraApIs.MetricsApi metricsRouteTimersGet GET /metrics/route/timers Returns metrics for timers on the route.
ApceraApIs.PackagesApi packagesDependenciesPost POST /packages/dependencies Returns a list of packages that fulfill the specified dependency type and name for the specified namespace.
ApceraApIs.PackagesApi packagesGet GET /packages Returns a list of packages on the cluster.
ApceraApIs.PackagesApi packagesPackageUuidResourcesResourceUuidPut PUT /packages/{package_uuid}/resources/{resource_uuid} Uploads a package resource for the specified package.
ApceraApIs.PackagesApi packagesPost POST /packages Creates a new package.
ApceraApIs.PackagesApi packagesResourcesUuidGet GET /packages/resources/{uuid} Downloads the specified package's binary resource.
ApceraApIs.PackagesApi packagesResourcesUuidPut PUT /packages/resources/{uuid} Uploads package resources for the specified package.
ApceraApIs.PackagesApi packagesUuidDelete DELETE /packages/{uuid} Deletes the specified package.
ApceraApIs.PackagesApi packagesUuidGet GET /packages/{uuid} Returns the specified package.
ApceraApIs.PackagesApi packagesUuidPut PUT /packages/{uuid} Updates the specified package's properties.
ApceraApIs.ProvidersApi providersGet GET /providers Returns a list of providers defined on the cluster.
ApceraApIs.ProvidersApi providersPost POST /providers Creates a new provider.
ApceraApIs.ProvidersApi providersUuidDelete DELETE /providers/{uuid} Deletes the specified provider.
ApceraApIs.RulesApi rulesGet GET /rules Lists all policy rules.
ApceraApIs.RulesApi rulesPost POST /rules Creates a new semantic pipeline rule for governing a given provider's behavior.
ApceraApIs.RulesApi rulesUuidDelete DELETE /rules/{uuid} Deletes a policy event rule.
ApceraApIs.RulesApi rulesUuidGet GET /rules/{uuid} Returns information about a rule that that controls the behavior of semantic pipelines.
ApceraApIs.ServicesAndBindingsApi bindingsPost POST /bindings Creates a new binding between a job and a service, or between two jobs (a job link).
ApceraApIs.ServicesAndBindingsApi servicesGet GET /services Lists available services.
ApceraApIs.ServicesAndBindingsApi servicesPost POST /services Creates a new service.
ApceraApIs.ServicesAndBindingsApi servicesUuidDelete DELETE /services/{uuid} Deletes the specified service.
ApceraApIs.ServicesAndBindingsApi unbindPost POST /unbind Removes a service binding from a job.
ApceraApIs.StagingPipelinesApi stagingpipelinesGet GET /stagingpipelines Lists all staging pipelines
ApceraApIs.StagingPipelinesApi stagingpipelinesPost POST /stagingpipelines Creates a new staging pipeline.
ApceraApIs.StagingPipelinesApi stagingpipelinesUuidDelete DELETE /stagingpipelines/{uuid} Deletes the specified staging pipeline.
ApceraApIs.StagingPipelinesApi stagingpipelinesUuidGet GET /stagingpipelines/{uuid} Shows the specified staging pipeline.
ApceraApIs.StagingPipelinesApi stagingpipelinesUuidPut PUT /stagingpipelines/{uuid} Updates the specified staging pipeline.
ApceraApIs.UtilitiesApi apcDownloadPlatformGet GET /apc/download/{platform} Downloads the APC utility.
ApceraApIs.UtilitiesApi apcVersionGet GET /apc/version Returns the version of APC available for download.
ApceraApIs.UtilitiesApi infoGet GET /info Returns information about the API server.
ApceraApIs.UtilitiesApi namespaceDefaultGet GET /namespace/default Returns the default namespace for the currently logged-in user.
ApceraApIs.UtilitiesApi runtimesGet GET /runtimes Lists supported workload runtimes.
ApceraApIs.UtilitiesApi versionGet GET /version Returns the version number of the API Server.

Documentation for Models

Documentation for Authorization

authorization

  • Type: API key
  • API key parameter name: authorization
  • Location: HTTP header