Retrieval of bundling options (v2)

9.2.34 Available from 9.2.34.

You use the GET operation on the api/sam/v2/bundling_options element to request information about possible assignments of the discovered software components in your catalog. The API returns details of existing components as well as historical data about components that were removed.

Permissions

An icon representing a user. You must have the Manage Software Classification permission to perform this task.

Resource URL

https://hostname:port/api/sam/v2/bundling_options

Resource information

Table 1. Resource information
Operation details Description
HTTP method GET
Request headers
Accept-Language (optional)
  • Use: Used to negotiate the language of the response. If this header is not specified, the content is returned in the server language.
  • Values: en-US (only English is supported)
Token
  • Use: Used to authenticate REST API requests. The header is required when you set the value of the api_token_in_url_enabled parameter to false. Otherwise, you can specify the token in the request header or in the URL. For more information, see: Authenticating REST API requests.
  • Values: an alphanumeric string that is generated in License Metric Tool
Request format application/json
Response headers
Content-Type
  • Use: Specifies the content type of the response.
  • Values: application/json
Content-Language
  • Use: Specifies the language of the response content. If this header is not specified, the content is returned in the server language.
  • Values: en-US, …
Response payload Bundling Options element
Response format application/json
Response codes

200 – OK

500 – “Bad Request” if a query parameter contains errors or is missing

Schema description

To retrieve the list of all columns that are returned by this REST API together with their descriptions, use the following request.
GET https://hostname:port/api/sam/v2/schemas/bundling_option.json

Available columns

Table 2. Available columns
Column Description Displayed by default Type
component_name Component name. String
component_release Component version number. String
discoverable_guid GUID of the component in given version. String
product_name Product name. String
product_release Product version number. String
product_guid Product GUID.   String
product_release_guid GUID of the product in given version. String
product_metric_id Identifier of the metric.
Note: Starting from application update 9.2.35, the column is deprecated and substituted with the metric_id column.
  Numeric
product_metric_code_name Metric code name.
Note: Starting from application update 9.2.35, the column is deprecated and substituted with the metric_code_name column.
  String
9.2.35metric_id Identifier of the metric. Numeric
9.2.35metric_code_name Metric code name. String
bundle_name Cloud Pak or FlexPoint Bundle name. String
bundle_guid Cloud Pak or FlexPoint Bundle GUID. String
is_charged Indicates whether the component contributes to license metric utilization of the product or not. Boolean
is_custom Indicates whether the product does not have the component listed as a bundling option in the software catalog provided by IBM. Boolean

Query parameters

Table 3. Query parameters
Parameter Description Required Value
columns[] Specify which columns to retrieve. If you do not specify this parameter, only default columns are retrieved.
Example: Retrieve component name and product name
URL?columns[]=component_name&columns[]=product_name
  String
order Specify how to sort the returned data. The default direction for sorting columns is ascending. If you want to specify a descending sort, append desc to the column name.
Example: Order by component name descending
URL?order[]=component_name desc
  Alphanumeric
limit Specify the number of rows to retrieve. If you omit this parameter, all rows are retrieved.
Example: Retrieve 100 records
URL?limit=100
  Numeric
offset Specify the number of rows to skip for retrieving results. You can use it together with the limit parameter to paginate results.
Example: Retrieve 50 records starting after record 150
URL?limit=50&offset=150
  Numeric
criteria Retrieve records which match specific conditions. The parameter should have the following structure, written in one line:
<criteria> ::= <left-brace> <boolean-operator> <colon> <left-bracket> 
<criterion> [{ <comma> <criterion> }...] <right-bracket> <right-brace>
<boolean-operator> ::= "and" | "or"
<criterion> ::= <criteria> | <left-bracket> <column> <comma> <operator> <comma> <value> <right-bracket>
<column> ::= <json-string>
<operator> ::= <json-string>
<value> ::= <json-array> | <json-string> | <json-number> | <json-null>

For more information about operators, see: Common connectors and operators.

  String

Example conversation - bundling options of a component with given GUID

Request
GET https://hostname:port/api/sam/v2/bundling_options?criteria={"and":[["discoverable_guid","=","B1BAC35F-7486-44E3-A44E-4FE143CB4034"]]}
Request header
Accept: application/json 
Accept-Language: en-US
Token: <token>
Response body
{
   "total":6766,
   "rows":[
      {
         "component_name":"IBM MQ",
         "component_release":"9.0",
         "discoverable_guid":"B1BAC35F-7486-44E3-A44E-4FE143CB4034",
         "product_name":"IBM MQ Advanced",
         "product_release":"9.0",
         "product_release_guid":"A205E872-0EB5-4BE9-8F55-02DB73A6C27E",
         "product_metric_id":5844,
         "product_metric_code_name":"VIRTUAL_PROCESSOR_CORE",
         "bundle_name":"IBM Cloud Pak for Integration",
         "bundle_guid":"C8B82D18-9E75-45F0-892D-B9EF2731B90D",
         "is_charged":1,
         "is_custom":0
      },
(...)
   ]
}