Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ibm-cloud/ibm-schematics

Package Overview
Dependencies
Maintainers
22
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ibm-cloud/ibm-schematics

IBM Cloud Schematics Node.js SDK

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
22
Created
Source

Build Status semantic-release

IBM Cloud Schematics Node.js SDK

Node.js client library to interact with various “Schematics APIs.

Disclaimer: this SDK is being released initially as a pre-release version. Changes might occur which impact applications that use this SDK.

Table of Contents

Overview

The IBM Cloud “Schematics Node.js SDK allows developers to programmatically interact with the following IBM Cloud services:

Service NameImport Path
Schematics@ibm-cloud/ibm-schematics/schematics/v1

Prerequisites

  • You need an IBM Cloud account.
  • Node.js >=10: This SDK is tested with Node.js versions 10 and up. It may work on previous versions but this is not officially supported.

Installation

npm install @ibm-cloud/ibm-schematics

Authentication

The library requires Identity and Access Management (IAM) to authenticate requests. There are several ways to set the properties for authentication

  1. As environment variables
  2. The programmatic approach
  3. With an external credentials file

Authenticate with environment variables

For Schematics IAM authentication set the following environmental variables by replacing with your proper service credentials.

SCHEMATICS_URL = https://schematics.cloud.ibm.com
SCHEMATICS_APIKEY = <apikey>

Authenticate with external configuration

To use an external configuration file, see the related documentation in the Node.js SDK Core document about authentication.

Authenticate programmatically

To learn more about how to use programmatic authentication, see the related documentation in the Node.js SDK Core document about authentication.

Getting Started

A quick example to get you up and running with Schematics Node.js SDK service


const { IamAuthenticator } = require('@ibm-cloud/ibm-schematics/auth');
const SchematicsV1 = require('@ibm-cloud/ibm-schematics/schematics/v1');

// Create an IAM authenticator.
const authenticator = new IamAuthenticator({
  apikey: '<apiKey>',
});

// Construct the service client.
const schematicsService = new SchematicsV1({
  authenticator,                                  // required
  serviceUrl: 'https://schematics.cloud.ibm.com', // optional
});

// List all schematics workspaces
schematicsService
  .listWorkspaces()
  .then(response => {
    console.log(response.result);
  })
  .catch(err => {
    console.warn(err);
  });

Error handling

For sample code on handling errors, please see Schematics API docs.

Using the SDK

For general SDK usage information, please see this link

Questions

If you are having difficulties using this SDK or have a question about the IBM Cloud services, please ask a question at Stack Overflow.

Issues

If you encounter an issue with the SDK, you are welcome to submit a bug report. Before that, please search for similar issues. It's possible someone has already encountered this issue.

Open source @ IBM

Find more open source projects on the IBM Github Page

Contributing

See CONTRIBUTING.

License

This project is released under the Apache 2.0 license. The license's full text can be found in LICENSE.

Keywords

FAQs

Package last updated on 08 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc