Search for the components based on the given input and return list of components which includes registered,popular and unpopular.Response will not include vulnerabilities and licenses of the version
curl -X GET "http://localhost/codeinsight/api//components/search?searchBy=&filter=&searchTerm=&includeVersions=&vendor=&product=&forgeName=&projectName=&packageName=&groupId=&artifactId=&moduleOrDistributionName=&packageOrDistributionName=&author=&repositoryName=&vendorName=&gemName=&crate=&limit=&offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ComponentApi;
import java.io.File;
import java.util.*;
public class ComponentApiExample {
public static void main(String[] args) {
ComponentApi apiInstance = new ComponentApi();
String searchBy = searchBy_example; // String | Search Type. default is NAME.
String authorization = authorization_example; // String | Bearer JWT Token
String filter = filter_example; // String | Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
String searchTerm = searchTerm_example; // String | Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component.
Boolean includeVersions = true; // Boolean | If true , response will include versions as well.
String vendor = vendor_example; // String | Vendor name
String product = product_example; // String | Product name
String forgeName = forgeName_example; // String | Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
String projectName = projectName_example; // String | Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab
String packageName = packageName_example; // String | Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project
String groupId = groupId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
String artifactId = artifactId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
String moduleOrDistributionName = moduleOrDistributionName_example; // String | Required param for forge: CPAN
String packageOrDistributionName = packageOrDistributionName_example; // String | Required param for forge: CRAN | Fedora Koji
String author = author_example; // String | Required param for forge: GitHub | GitLab (It accepts Author/Org value)
String repositoryName = repositoryName_example; // String | Required param for forge: GitHub
String vendorName = vendorName_example; // String | Required param for forge: Packagist
String gemName = gemName_example; // String | Required param for forge: RubyGems
String crate = crate_example; // String | Required param for forge: crates.io
Integer limit = 56; // Integer | Page Size. Number Of Records to fetch per page
Integer offset = 56; // Integer | Page Number. Index of the page to start with(starts from 1)
try {
ComponentListModel result = apiInstance.componentSearch(searchBy, authorization, filter, searchTerm, includeVersions, vendor, product, forgeName, projectName, packageName, groupId, artifactId, moduleOrDistributionName, packageOrDistributionName, author, repositoryName, vendorName, gemName, crate, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ComponentApi#componentSearch");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ComponentApi;
public class ComponentApiExample {
public static void main(String[] args) {
ComponentApi apiInstance = new ComponentApi();
String searchBy = searchBy_example; // String | Search Type. default is NAME.
String authorization = authorization_example; // String | Bearer JWT Token
String filter = filter_example; // String | Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
String searchTerm = searchTerm_example; // String | Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component.
Boolean includeVersions = true; // Boolean | If true , response will include versions as well.
String vendor = vendor_example; // String | Vendor name
String product = product_example; // String | Product name
String forgeName = forgeName_example; // String | Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
String projectName = projectName_example; // String | Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab
String packageName = packageName_example; // String | Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project
String groupId = groupId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
String artifactId = artifactId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
String moduleOrDistributionName = moduleOrDistributionName_example; // String | Required param for forge: CPAN
String packageOrDistributionName = packageOrDistributionName_example; // String | Required param for forge: CRAN | Fedora Koji
String author = author_example; // String | Required param for forge: GitHub | GitLab (It accepts Author/Org value)
String repositoryName = repositoryName_example; // String | Required param for forge: GitHub
String vendorName = vendorName_example; // String | Required param for forge: Packagist
String gemName = gemName_example; // String | Required param for forge: RubyGems
String crate = crate_example; // String | Required param for forge: crates.io
Integer limit = 56; // Integer | Page Size. Number Of Records to fetch per page
Integer offset = 56; // Integer | Page Number. Index of the page to start with(starts from 1)
try {
ComponentListModel result = apiInstance.componentSearch(searchBy, authorization, filter, searchTerm, includeVersions, vendor, product, forgeName, projectName, packageName, groupId, artifactId, moduleOrDistributionName, packageOrDistributionName, author, repositoryName, vendorName, gemName, crate, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ComponentApi#componentSearch");
e.printStackTrace();
}
}
}
String *searchBy = searchBy_example; // Search Type. default is NAME.
String *authorization = authorization_example; // Bearer JWT Token (default to )
String *filter = filter_example; // Search Filter. This is required for searchBy NAME, default is ALL_TERMS. (optional)
String *searchTerm = searchTerm_example; // Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component. (optional)
Boolean *includeVersions = true; // If true , response will include versions as well. (optional)
String *vendor = vendor_example; // Vendor name (optional)
String *product = product_example; // Product name (optional)
String *forgeName = forgeName_example; // Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE (optional)
String *projectName = projectName_example; // Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab (optional)
String *packageName = packageName_example; // Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project (optional)
String *groupId = groupId_example; // Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (optional)
String *artifactId = artifactId_example; // Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (optional)
String *moduleOrDistributionName = moduleOrDistributionName_example; // Required param for forge: CPAN (optional)
String *packageOrDistributionName = packageOrDistributionName_example; // Required param for forge: CRAN | Fedora Koji (optional)
String *author = author_example; // Required param for forge: GitHub | GitLab (It accepts Author/Org value) (optional)
String *repositoryName = repositoryName_example; // Required param for forge: GitHub (optional)
String *vendorName = vendorName_example; // Required param for forge: Packagist (optional)
String *gemName = gemName_example; // Required param for forge: RubyGems (optional)
String *crate = crate_example; // Required param for forge: crates.io (optional)
Integer *limit = 56; // Page Size. Number Of Records to fetch per page (optional)
Integer *offset = 56; // Page Number. Index of the page to start with(starts from 1) (optional)
ComponentApi *apiInstance = [[ComponentApi alloc] init];
// Component Search
[apiInstance componentSearchWith:searchBy
authorization:authorization
filter:filter
searchTerm:searchTerm
includeVersions:includeVersions
vendor:vendor
product:product
forgeName:forgeName
projectName:projectName
packageName:packageName
groupId:groupId
artifactId:artifactId
moduleOrDistributionName:moduleOrDistributionName
packageOrDistributionName:packageOrDistributionName
author:author
repositoryName:repositoryName
vendorName:vendorName
gemName:gemName
crate:crate
limit:limit
offset:offset
completionHandler: ^(ComponentListModel output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');
var api = new CodeInsightRestApiDocumentation.ComponentApi()
var searchBy = searchBy_example; // {String} Search Type. default is NAME.
var authorization = authorization_example; // {String} Bearer JWT Token
var opts = {
'filter': filter_example, // {String} Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
'searchTerm': searchTerm_example, // {String} Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component.
'includeVersions': true, // {Boolean} If true , response will include versions as well.
'vendor': vendor_example, // {String} Vendor name
'product': product_example, // {String} Product name
'forgeName': forgeName_example, // {String} Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
'projectName': projectName_example, // {String} Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab
'packageName': packageName_example, // {String} Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project
'groupId': groupId_example, // {String} Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
'artifactId': artifactId_example, // {String} Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
'moduleOrDistributionName': moduleOrDistributionName_example, // {String} Required param for forge: CPAN
'packageOrDistributionName': packageOrDistributionName_example, // {String} Required param for forge: CRAN | Fedora Koji
'author': author_example, // {String} Required param for forge: GitHub | GitLab (It accepts Author/Org value)
'repositoryName': repositoryName_example, // {String} Required param for forge: GitHub
'vendorName': vendorName_example, // {String} Required param for forge: Packagist
'gemName': gemName_example, // {String} Required param for forge: RubyGems
'crate': crate_example, // {String} Required param for forge: crates.io
'limit': 56, // {Integer} Page Size. Number Of Records to fetch per page
'offset': 56 // {Integer} Page Number. Index of the page to start with(starts from 1)
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.componentSearch(searchBy, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class componentSearchExample
{
public void main()
{
var apiInstance = new ComponentApi();
var searchBy = searchBy_example; // String | Search Type. default is NAME.
var authorization = authorization_example; // String | Bearer JWT Token (default to )
var filter = filter_example; // String | Search Filter. This is required for searchBy NAME, default is ALL_TERMS. (optional)
var searchTerm = searchTerm_example; // String | Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component. (optional)
var includeVersions = true; // Boolean | If true , response will include versions as well. (optional)
var vendor = vendor_example; // String | Vendor name (optional)
var product = product_example; // String | Product name (optional)
var forgeName = forgeName_example; // String | Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE (optional)
var projectName = projectName_example; // String | Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab (optional)
var packageName = packageName_example; // String | Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project (optional)
var groupId = groupId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (optional)
var artifactId = artifactId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (optional)
var moduleOrDistributionName = moduleOrDistributionName_example; // String | Required param for forge: CPAN (optional)
var packageOrDistributionName = packageOrDistributionName_example; // String | Required param for forge: CRAN | Fedora Koji (optional)
var author = author_example; // String | Required param for forge: GitHub | GitLab (It accepts Author/Org value) (optional)
var repositoryName = repositoryName_example; // String | Required param for forge: GitHub (optional)
var vendorName = vendorName_example; // String | Required param for forge: Packagist (optional)
var gemName = gemName_example; // String | Required param for forge: RubyGems (optional)
var crate = crate_example; // String | Required param for forge: crates.io (optional)
var limit = 56; // Integer | Page Size. Number Of Records to fetch per page (optional)
var offset = 56; // Integer | Page Number. Index of the page to start with(starts from 1) (optional)
try
{
// Component Search
ComponentListModel result = apiInstance.componentSearch(searchBy, authorization, filter, searchTerm, includeVersions, vendor, product, forgeName, projectName, packageName, groupId, artifactId, moduleOrDistributionName, packageOrDistributionName, author, repositoryName, vendorName, gemName, crate, limit, offset);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ComponentApi.componentSearch: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\ComponentApi();
$searchBy = searchBy_example; // String | Search Type. default is NAME.
$authorization = authorization_example; // String | Bearer JWT Token
$filter = filter_example; // String | Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
$searchTerm = searchTerm_example; // String | Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component.
$includeVersions = true; // Boolean | If true , response will include versions as well.
$vendor = vendor_example; // String | Vendor name
$product = product_example; // String | Product name
$forgeName = forgeName_example; // String | Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
$projectName = projectName_example; // String | Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab
$packageName = packageName_example; // String | Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project
$groupId = groupId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
$artifactId = artifactId_example; // String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
$moduleOrDistributionName = moduleOrDistributionName_example; // String | Required param for forge: CPAN
$packageOrDistributionName = packageOrDistributionName_example; // String | Required param for forge: CRAN | Fedora Koji
$author = author_example; // String | Required param for forge: GitHub | GitLab (It accepts Author/Org value)
$repositoryName = repositoryName_example; // String | Required param for forge: GitHub
$vendorName = vendorName_example; // String | Required param for forge: Packagist
$gemName = gemName_example; // String | Required param for forge: RubyGems
$crate = crate_example; // String | Required param for forge: crates.io
$limit = 56; // Integer | Page Size. Number Of Records to fetch per page
$offset = 56; // Integer | Page Number. Index of the page to start with(starts from 1)
try {
$result = $api_instance->componentSearch($searchBy, $authorization, $filter, $searchTerm, $includeVersions, $vendor, $product, $forgeName, $projectName, $packageName, $groupId, $artifactId, $moduleOrDistributionName, $packageOrDistributionName, $author, $repositoryName, $vendorName, $gemName, $crate, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ComponentApi->componentSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ComponentApi;
my $api_instance = WWW::SwaggerClient::ComponentApi->new();
my $searchBy = searchBy_example; # String | Search Type. default is NAME.
my $authorization = authorization_example; # String | Bearer JWT Token
my $filter = filter_example; # String | Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
my $searchTerm = searchTerm_example; # String | Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component.
my $includeVersions = true; # Boolean | If true , response will include versions as well.
my $vendor = vendor_example; # String | Vendor name
my $product = product_example; # String | Product name
my $forgeName = forgeName_example; # String | Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
my $projectName = projectName_example; # String | Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab
my $packageName = packageName_example; # String | Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project
my $groupId = groupId_example; # String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
my $artifactId = artifactId_example; # String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
my $moduleOrDistributionName = moduleOrDistributionName_example; # String | Required param for forge: CPAN
my $packageOrDistributionName = packageOrDistributionName_example; # String | Required param for forge: CRAN | Fedora Koji
my $author = author_example; # String | Required param for forge: GitHub | GitLab (It accepts Author/Org value)
my $repositoryName = repositoryName_example; # String | Required param for forge: GitHub
my $vendorName = vendorName_example; # String | Required param for forge: Packagist
my $gemName = gemName_example; # String | Required param for forge: RubyGems
my $crate = crate_example; # String | Required param for forge: crates.io
my $limit = 56; # Integer | Page Size. Number Of Records to fetch per page
my $offset = 56; # Integer | Page Number. Index of the page to start with(starts from 1)
eval {
my $result = $api_instance->componentSearch(searchBy => $searchBy, authorization => $authorization, filter => $filter, searchTerm => $searchTerm, includeVersions => $includeVersions, vendor => $vendor, product => $product, forgeName => $forgeName, projectName => $projectName, packageName => $packageName, groupId => $groupId, artifactId => $artifactId, moduleOrDistributionName => $moduleOrDistributionName, packageOrDistributionName => $packageOrDistributionName, author => $author, repositoryName => $repositoryName, vendorName => $vendorName, gemName => $gemName, crate => $crate, limit => $limit, offset => $offset);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ComponentApi->componentSearch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.ComponentApi()
searchBy = searchBy_example # String | Search Type. default is NAME.
authorization = authorization_example # String | Bearer JWT Token (default to )
filter = filter_example # String | Search Filter. This is required for searchBy NAME, default is ALL_TERMS. (optional)
searchTerm = searchTerm_example # String | Any Keyword. This is required for searchBy NAME/URL and optional for CPE. For searchBy CPE, the supplied searchTerm E.g."apache commons" would perform exact match against the component. (optional)
includeVersions = true # Boolean | If true , response will include versions as well. (optional)
vendor = vendor_example # String | Vendor name (optional)
product = product_example # String | Product name (optional)
forgeName = forgeName_example # String | Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE (optional)
projectName = projectName_example # String | Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab (optional)
packageName = packageName_example # String | Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project (optional)
groupId = groupId_example # String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (optional)
artifactId = artifactId_example # String | Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (optional)
moduleOrDistributionName = moduleOrDistributionName_example # String | Required param for forge: CPAN (optional)
packageOrDistributionName = packageOrDistributionName_example # String | Required param for forge: CRAN | Fedora Koji (optional)
author = author_example # String | Required param for forge: GitHub | GitLab (It accepts Author/Org value) (optional)
repositoryName = repositoryName_example # String | Required param for forge: GitHub (optional)
vendorName = vendorName_example # String | Required param for forge: Packagist (optional)
gemName = gemName_example # String | Required param for forge: RubyGems (optional)
crate = crate_example # String | Required param for forge: crates.io (optional)
limit = 56 # Integer | Page Size. Number Of Records to fetch per page (optional)
offset = 56 # Integer | Page Number. Index of the page to start with(starts from 1) (optional)
try:
# Component Search
api_response = api_instance.component_search(searchBy, authorization, filter=filter, searchTerm=searchTerm, includeVersions=includeVersions, vendor=vendor, product=product, forgeName=forgeName, projectName=projectName, packageName=packageName, groupId=groupId, artifactId=artifactId, moduleOrDistributionName=moduleOrDistributionName, packageOrDistributionName=packageOrDistributionName, author=author, repositoryName=repositoryName, vendorName=vendorName, gemName=gemName, crate=crate, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling ComponentApi->componentSearch: %s\n" % e)