Getting Started
  • 15 Apr 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Getting Started

  • Dark
    Light
  • PDF

Article summary

An API bearer token is required to access the API. A token that gives you access based on your user privileges can be created on the Ion Channel Account Settings page. In the usage examples, provided below for each endpoint, TOKEN should be replaced with your API token.

To help you get started, guidance for the following endpoints are listed below:

  • Get Organizations

  • Create a Software List

  • Resolve Components

GET ORGANIZATIONS

First, you will need to obtain your Organization ID. This ID will later be used when you create your first software list. The getOwnOrganizations endpoint returns information on all the organizations you are a member of and your user role in that organization.

Endpoint

v1/organizations/getOwnOrganizations

Request Method

GET

Example Usage

curl --location 'https://api.ionchannel.io/v1/organizations/getOwnOrganizations’  \

--header 'Authorization: Bearer TOKEN'  \

CREATE A SOFTWARE LIST

Once you have obtained your Organization ID, you can create a software list. This endpoint will create a new blank software list and return a Software List ID which can be used in subsequent workflows.

Endpoint

v1/project/createSBOM

Request Method

POST

Parameter

Description

name

The name of the software list

version

(optional) The version of the software list

supplier_name

(optional) The supplier of the software list

contact_name

(optional) The contact person for the software list

contact_email

(optional) The email address of the contact person

org_id

The ID of the organization where this software list will be created

Example Usage

curl --location 'https://api.test.ionchannel.io/v1/project/createSBOM'  \

--header 'Content-Type: application/json'  \

--header 'Authorization: Bearer TOKEN’  \

--data '{

"name": "Software List Name",

"org_id": "{{organization_id}}"

}'

RESOLVE COMPONENTS

This endpoint allows you to input any parameter(s) to receive additional information on the component.

Endpoint

v1/search/resolveComponents

Request Method

POST

Parameter

Description

name

The name of the software list

org

(optional) The supplier of the software component

version

(optional) The version of the software list

repo_id

(optional) The purl of the repository

package_id

(optional) The purl of the package

product_id

(optional) The purl of the product (CPE)

Example Usage

curl --location 'https://api.ionchannel.io/v1/search/resolveComponents’  \

--header 'Content-Type: application/json'  \

--header 'Authorization: Bearer TOKEN'  \

--data '{

"name": "lodash",

"org": "lodash",

"version": "4.17.21",

"entity_input":{

"repo_id": "pkg:github.com/lodash/lodash",

"package_id": "pkg:npm/lodash/lodash@4.17.19",

"product_id": "cpe:/a:lodash:lodash:4.17.19::~~~node.js~~"

}

}'


Was this article helpful?

What's Next