Code Insight 2021 R2 REST API Documentation

Component

componentSearch

Component Search

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


/components/search

Usage and SDK Samples

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
        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 
        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
        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 
        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 (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  (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
  '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 
  '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 (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  (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
$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 
$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
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 
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 (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  (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)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
searchBy*
String
Search Type. default is NAME.
Required
filter
String
Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
searchTerm
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
Boolean
If true , response will include versions as well.
vendor
String
Vendor name
product
String
Product name
forgeName
String
Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
projectName
String
Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code
packageName
String
Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project
groupId
String
Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
artifactId
String
Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2
moduleOrDistributionName
String
Required param for forge: CPAN
packageOrDistributionName
String
Required param for forge: CRAN | Fedora Koji
author
String
Required param for forge: GitHub
repositoryName
String
Required param for forge: GitHub
vendorName
String
Required param for forge: Packagist
gemName
String
Required param for forge: RubyGems
crate
String
Required param for forge: crates.io
limit
Integer (int32)
Page Size. Number Of Records to fetch per page
offset
Integer (int32)
Page Number. Index of the page to start with(starts from 1)

Responses

Status: 200 - OK

Status: 400 - Bad request

Status: 500 - Internal Server Error


createComponentVersion

Create a component custom version

Create a component custom version


/components/{componentId}/versions

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//components/{componentId}/versions"
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();
        Long componentId = 789; // Long | ID of the Component
        VersionModel body = ; // VersionModel | 
        String authorization = authorization_example; // String | 
        try {
            apiInstance.createComponentVersion(componentId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#createComponentVersion");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentApi;

public class ComponentApiExample {

    public static void main(String[] args) {
        ComponentApi apiInstance = new ComponentApi();
        Long componentId = 789; // Long | ID of the Component
        VersionModel body = ; // VersionModel | 
        String authorization = authorization_example; // String | 
        try {
            apiInstance.createComponentVersion(componentId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#createComponentVersion");
            e.printStackTrace();
        }
    }
}
Long *componentId = 789; // ID of the Component
VersionModel *body = ; // 
String *authorization = authorization_example; //  (default to )

ComponentApi *apiInstance = [[ComponentApi alloc] init];

// Create a component custom version
[apiInstance createComponentVersionWith:componentId
    body:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ComponentApi()

var componentId = 789; // {Long} ID of the Component

var body = ; // {VersionModel} 

var authorization = authorization_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createComponentVersion(componentId, body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createComponentVersionExample
    {
        public void main()
        {
            
            var apiInstance = new ComponentApi();
            var componentId = 789;  // Long | ID of the Component
            var body = new VersionModel(); // VersionModel | 
            var authorization = authorization_example;  // String |  (default to )

            try
            {
                // Create a component custom version
                apiInstance.createComponentVersion(componentId, body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentApi.createComponentVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ComponentApi();
$componentId = 789; // Long | ID of the Component
$body = ; // VersionModel | 
$authorization = authorization_example; // String | 

try {
    $api_instance->createComponentVersion($componentId, $body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling ComponentApi->createComponentVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ComponentApi;

my $api_instance = WWW::SwaggerClient::ComponentApi->new();
my $componentId = 789; # Long | ID of the Component
my $body = WWW::SwaggerClient::Object::VersionModel->new(); # VersionModel | 
my $authorization = authorization_example; # String | 

eval { 
    $api_instance->createComponentVersion(componentId => $componentId, body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling ComponentApi->createComponentVersion: $@\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()
componentId = 789 # Long | ID of the Component
body =  # VersionModel | 
authorization = authorization_example # String |  (default to )

try: 
    # Create a component custom version
    api_instance.create_component_version(componentId, body, authorization)
except ApiException as e:
    print("Exception when calling ComponentApi->createComponentVersion: %s\n" % e)

Parameters

Path parameters
Name Description
componentId*
Long (int64)
ID of the Component
Required
Header parameters
Name Description
Authorization*
String
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 500 - Internal Server Error


createCustomComponent

Create a custom component

Creates a custom component


/components

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//components"
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();
        ComponentModel body = ; // ComponentModel | To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createCustomComponent(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#createCustomComponent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentApi;

public class ComponentApiExample {

    public static void main(String[] args) {
        ComponentApi apiInstance = new ComponentApi();
        ComponentModel body = ; // ComponentModel | To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createCustomComponent(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#createCustomComponent");
            e.printStackTrace();
        }
    }
}
ComponentModel *body = ; // To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
String *authorization = authorization_example; // Bearer JWT Token (default to )

ComponentApi *apiInstance = [[ComponentApi alloc] init];

// Create a custom component
[apiInstance createCustomComponentWith:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ComponentApi()

var body = ; // {ComponentModel} To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createCustomComponent(body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createCustomComponentExample
    {
        public void main()
        {
            
            var apiInstance = new ComponentApi();
            var body = new ComponentModel(); // ComponentModel | To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Create a custom component
                apiInstance.createCustomComponent(body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentApi.createCustomComponent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ComponentApi();
$body = ; // ComponentModel | To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->createCustomComponent($body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling ComponentApi->createCustomComponent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ComponentApi;

my $api_instance = WWW::SwaggerClient::ComponentApi->new();
my $body = WWW::SwaggerClient::Object::ComponentModel->new(); # ComponentModel | To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->createCustomComponent(body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling ComponentApi->createCustomComponent: $@\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()
body =  # ComponentModel | To create a custom component the name, title and url field is required. 
 Allowable values of forgeId(Optional) are 
 1 : Other(This will be used as default when none is supplied) | 2 : SourceForge | 3 : Apache | 5 : MySQL AB |11 : kernel.org | 53 : Mozilla | 78 : Java.net | 87 : GNU | 175 : Free Software Directory | 176 : CodePlex | 186 : Savannah | 248 : CPAN | 419 : Google Code | 628 : Ibiblio Maven2 | 696 : GitHub | 2033 : NuGet Gallery | 2037 : npm |2039 : RubyGems | 2040 : CentOS Project | 2067 : PyPI | 2070 : Packagist | 2073 : Google's Maven Repository | 2076 : crates.io
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Create a custom component
    api_instance.create_custom_component(body, authorization)
except ApiException as e:
    print("Exception when calling ComponentApi->createCustomComponent: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 500 - Internal Server Error


getComponent

Get Component

Get Component by id.


/components/{componentId}

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//components/{componentId}?vulnerabilitySummary=&cvssVersion="
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();
        Long componentId = 789; // Long | ID of the Component
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean vulnerabilitySummary = true; // Boolean | If true , display vulnerabilty summary details and hide vulnerability list
        String cvssVersion = cvssVersion_example; // String | CVSS Version : This field is required only if vulnerabilitySummary is set to true
        try {
            ExtendedComponentModel result = apiInstance.getComponent(componentId, authorization, vulnerabilitySummary, cvssVersion);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#getComponent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentApi;

public class ComponentApiExample {

    public static void main(String[] args) {
        ComponentApi apiInstance = new ComponentApi();
        Long componentId = 789; // Long | ID of the Component
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean vulnerabilitySummary = true; // Boolean | If true , display vulnerabilty summary details and hide vulnerability list
        String cvssVersion = cvssVersion_example; // String | CVSS Version : This field is required only if vulnerabilitySummary is set to true
        try {
            ExtendedComponentModel result = apiInstance.getComponent(componentId, authorization, vulnerabilitySummary, cvssVersion);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#getComponent");
            e.printStackTrace();
        }
    }
}
Long *componentId = 789; // ID of the Component
String *authorization = authorization_example; // Bearer JWT Token (default to )
Boolean *vulnerabilitySummary = true; // If true , display vulnerabilty summary details and hide vulnerability list (optional) (default to false)
String *cvssVersion = cvssVersion_example; // CVSS Version : This field is required only if vulnerabilitySummary is set to true (optional)

ComponentApi *apiInstance = [[ComponentApi alloc] init];

// Get Component
[apiInstance getComponentWith:componentId
    authorization:authorization
    vulnerabilitySummary:vulnerabilitySummary
    cvssVersion:cvssVersion
              completionHandler: ^(ExtendedComponentModel 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 componentId = 789; // {Long} ID of the Component

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'vulnerabilitySummary': true, // {Boolean} If true , display vulnerabilty summary details and hide vulnerability list
  'cvssVersion': cvssVersion_example // {String} CVSS Version : This field is required only if vulnerabilitySummary is set to true
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getComponent(componentId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getComponentExample
    {
        public void main()
        {
            
            var apiInstance = new ComponentApi();
            var componentId = 789;  // Long | ID of the Component
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var vulnerabilitySummary = true;  // Boolean | If true , display vulnerabilty summary details and hide vulnerability list (optional)  (default to false)
            var cvssVersion = cvssVersion_example;  // String | CVSS Version : This field is required only if vulnerabilitySummary is set to true (optional) 

            try
            {
                // Get Component
                ExtendedComponentModel result = apiInstance.getComponent(componentId, authorization, vulnerabilitySummary, cvssVersion);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentApi.getComponent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ComponentApi();
$componentId = 789; // Long | ID of the Component
$authorization = authorization_example; // String | Bearer JWT Token
$vulnerabilitySummary = true; // Boolean | If true , display vulnerabilty summary details and hide vulnerability list
$cvssVersion = cvssVersion_example; // String | CVSS Version : This field is required only if vulnerabilitySummary is set to true

try {
    $result = $api_instance->getComponent($componentId, $authorization, $vulnerabilitySummary, $cvssVersion);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ComponentApi->getComponent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ComponentApi;

my $api_instance = WWW::SwaggerClient::ComponentApi->new();
my $componentId = 789; # Long | ID of the Component
my $authorization = authorization_example; # String | Bearer JWT Token
my $vulnerabilitySummary = true; # Boolean | If true , display vulnerabilty summary details and hide vulnerability list
my $cvssVersion = cvssVersion_example; # String | CVSS Version : This field is required only if vulnerabilitySummary is set to true

eval { 
    my $result = $api_instance->getComponent(componentId => $componentId, authorization => $authorization, vulnerabilitySummary => $vulnerabilitySummary, cvssVersion => $cvssVersion);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ComponentApi->getComponent: $@\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()
componentId = 789 # Long | ID of the Component
authorization = authorization_example # String | Bearer JWT Token (default to )
vulnerabilitySummary = true # Boolean | If true , display vulnerabilty summary details and hide vulnerability list (optional) (default to false)
cvssVersion = cvssVersion_example # String | CVSS Version : This field is required only if vulnerabilitySummary is set to true (optional)

try: 
    # Get Component
    api_response = api_instance.get_component(componentId, authorization, vulnerabilitySummary=vulnerabilitySummary, cvssVersion=cvssVersion)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComponentApi->getComponent: %s\n" % e)

Parameters

Path parameters
Name Description
componentId*
Long (int64)
ID of the Component
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
vulnerabilitySummary
Boolean
If true , display vulnerabilty summary details and hide vulnerability list
cvssVersion
String
CVSS Version : This field is required only if vulnerabilitySummary is set to true

Responses

Status: 200 - OK

Status: 404 - Not Found

Status: 500 - Internal Server Error


getVulnerabilties1

Get Component version vulnerabilities

Get vulnerability details of a component version


/components/{versionId}/vulnerabilities

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//components/{versionId}/vulnerabilities?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();
        Long versionId = 789; // Long | ID of the component version
        String authorization = authorization_example; // String | Bearer JWT Token
        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 {
            apiInstance.getVulnerabilties1(versionId, authorization, limit, offset);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#getVulnerabilties1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ComponentApi;

public class ComponentApiExample {

    public static void main(String[] args) {
        ComponentApi apiInstance = new ComponentApi();
        Long versionId = 789; // Long | ID of the component version
        String authorization = authorization_example; // String | Bearer JWT Token
        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 {
            apiInstance.getVulnerabilties1(versionId, authorization, limit, offset);
        } catch (ApiException e) {
            System.err.println("Exception when calling ComponentApi#getVulnerabilties1");
            e.printStackTrace();
        }
    }
}
Long *versionId = 789; // ID of the component version
String *authorization = authorization_example; // Bearer JWT Token (default to )
Integer *limit = 56; // Page Size. Number Of Records to fetch per page (optional) (default to 25)
Integer *offset = 56; // Page Number. Index of the page to start with(starts from 1) (optional) (default to 1)

ComponentApi *apiInstance = [[ComponentApi alloc] init];

// Get Component version vulnerabilities
[apiInstance getVulnerabilties1With:versionId
    authorization:authorization
    limit:limit
    offset:offset
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ComponentApi()

var versionId = 789; // {Long} ID of the component version

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  '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.');
  }
};
api.getVulnerabilties1(versionId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getVulnerabilties1Example
    {
        public void main()
        {
            
            var apiInstance = new ComponentApi();
            var versionId = 789;  // Long | ID of the component version
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var limit = 56;  // Integer | Page Size. Number Of Records to fetch per page (optional)  (default to 25)
            var offset = 56;  // Integer | Page Number. Index of the page to start with(starts from 1) (optional)  (default to 1)

            try
            {
                // Get Component version vulnerabilities
                apiInstance.getVulnerabilties1(versionId, authorization, limit, offset);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ComponentApi.getVulnerabilties1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ComponentApi();
$versionId = 789; // Long | ID of the component version
$authorization = authorization_example; // String | Bearer JWT Token
$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 {
    $api_instance->getVulnerabilties1($versionId, $authorization, $limit, $offset);
} catch (Exception $e) {
    echo 'Exception when calling ComponentApi->getVulnerabilties1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ComponentApi;

my $api_instance = WWW::SwaggerClient::ComponentApi->new();
my $versionId = 789; # Long | ID of the component version
my $authorization = authorization_example; # String | Bearer JWT Token
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 { 
    $api_instance->getVulnerabilties1(versionId => $versionId, authorization => $authorization, limit => $limit, offset => $offset);
};
if ($@) {
    warn "Exception when calling ComponentApi->getVulnerabilties1: $@\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()
versionId = 789 # Long | ID of the component version
authorization = authorization_example # String | Bearer JWT Token (default to )
limit = 56 # Integer | Page Size. Number Of Records to fetch per page (optional) (default to 25)
offset = 56 # Integer | Page Number. Index of the page to start with(starts from 1) (optional) (default to 1)

try: 
    # Get Component version vulnerabilities
    api_instance.get_vulnerabilties1(versionId, authorization, limit=limit, offset=offset)
except ApiException as e:
    print("Exception when calling ComponentApi->getVulnerabilties1: %s\n" % e)

Parameters

Path parameters
Name Description
versionId*
Long (int64)
ID of the component version
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
limit
Integer (int32)
Page Size. Number Of Records to fetch per page
offset
Integer (int32)
Page Number. Index of the page to start with(starts from 1)

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


DeprecatedAPIs

componentLookup

Component Lookup

This API is Deprecated and new API is codeinsight/api/components/search


/component/lookup

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//component/lookup?keyword=&size=&page="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeprecatedAPIsApi;

import java.io.File;
import java.util.*;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        String keyword = keyword_example; // String | Any Keyword
        String authorization = authorization_example; // String | Bearer JWT Token
        Integer size = 56; // Integer | Page Size
        Integer page = 56; // Integer | Page Number
        try {
            ComponentRestFormat result = apiInstance.componentLookup(keyword, authorization, size, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#componentLookup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeprecatedAPIsApi;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        String keyword = keyword_example; // String | Any Keyword
        String authorization = authorization_example; // String | Bearer JWT Token
        Integer size = 56; // Integer | Page Size
        Integer page = 56; // Integer | Page Number
        try {
            ComponentRestFormat result = apiInstance.componentLookup(keyword, authorization, size, page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#componentLookup");
            e.printStackTrace();
        }
    }
}
String *keyword = keyword_example; // Any Keyword
String *authorization = authorization_example; // Bearer JWT Token (default to )
Integer *size = 56; // Page Size (optional) (default to 100)
Integer *page = 56; // Page Number (optional) (default to 1)

DeprecatedAPIsApi *apiInstance = [[DeprecatedAPIsApi alloc] init];

// Component Lookup
[apiInstance componentLookupWith:keyword
    authorization:authorization
    size:size
    page:page
              completionHandler: ^(ComponentRestFormat output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.DeprecatedAPIsApi()

var keyword = keyword_example; // {String} Any Keyword

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'size': 56, // {Integer} Page Size
  'page': 56 // {Integer} Page Number
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.componentLookup(keyword, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class componentLookupExample
    {
        public void main()
        {
            
            var apiInstance = new DeprecatedAPIsApi();
            var keyword = keyword_example;  // String | Any Keyword
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var size = 56;  // Integer | Page Size (optional)  (default to 100)
            var page = 56;  // Integer | Page Number (optional)  (default to 1)

            try
            {
                // Component Lookup
                ComponentRestFormat result = apiInstance.componentLookup(keyword, authorization, size, page);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeprecatedAPIsApi.componentLookup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DeprecatedAPIsApi();
$keyword = keyword_example; // String | Any Keyword
$authorization = authorization_example; // String | Bearer JWT Token
$size = 56; // Integer | Page Size
$page = 56; // Integer | Page Number

try {
    $result = $api_instance->componentLookup($keyword, $authorization, $size, $page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DeprecatedAPIsApi->componentLookup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DeprecatedAPIsApi;

my $api_instance = WWW::SwaggerClient::DeprecatedAPIsApi->new();
my $keyword = keyword_example; # String | Any Keyword
my $authorization = authorization_example; # String | Bearer JWT Token
my $size = 56; # Integer | Page Size
my $page = 56; # Integer | Page Number

eval { 
    my $result = $api_instance->componentLookup(keyword => $keyword, authorization => $authorization, size => $size, page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeprecatedAPIsApi->componentLookup: $@\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.DeprecatedAPIsApi()
keyword = keyword_example # String | Any Keyword
authorization = authorization_example # String | Bearer JWT Token (default to )
size = 56 # Integer | Page Size (optional) (default to 100)
page = 56 # Integer | Page Number (optional) (default to 1)

try: 
    # Component Lookup
    api_response = api_instance.component_lookup(keyword, authorization, size=size, page=page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeprecatedAPIsApi->componentLookup: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
keyword*
String
Any Keyword
Required
size
Integer (int32)
Page Size
page
Integer (int32)
Page Number

Responses

Status: 200 - OK

Status: 400 - Bad request

Status: 500 - Internal Server Error


createProject1

Create Project

Use the enhanced '/projects' api.


/project/createProject

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//project/createProject"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeprecatedAPIsApi;

import java.io.File;
import java.util.*;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        CreateProjectModel body = ; // CreateProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            'Integer' result = apiInstance.createProject1(body, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#createProject1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeprecatedAPIsApi;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        CreateProjectModel body = ; // CreateProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            'Integer' result = apiInstance.createProject1(body, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#createProject1");
            e.printStackTrace();
        }
    }
}
CreateProjectModel *body = ; // To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
String *authorization = authorization_example; // Bearer JWT Token (default to )

DeprecatedAPIsApi *apiInstance = [[DeprecatedAPIsApi alloc] init];

// Create Project
[apiInstance createProject1With:body
    authorization:authorization
              completionHandler: ^('Integer' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.DeprecatedAPIsApi()

var body = ; // {CreateProjectModel} To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createProject1(body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createProject1Example
    {
        public void main()
        {
            
            var apiInstance = new DeprecatedAPIsApi();
            var body = new CreateProjectModel(); // CreateProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Create Project
                'Integer' result = apiInstance.createProject1(body, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeprecatedAPIsApi.createProject1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DeprecatedAPIsApi();
$body = ; // CreateProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->createProject1($body, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DeprecatedAPIsApi->createProject1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DeprecatedAPIsApi;

my $api_instance = WWW::SwaggerClient::DeprecatedAPIsApi->new();
my $body = WWW::SwaggerClient::Object::CreateProjectModel->new(); # CreateProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->createProject1(body => $body, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeprecatedAPIsApi->createProject1: $@\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.DeprecatedAPIsApi()
body =  # CreateProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Create Project
    api_response = api_instance.create_project1(body, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeprecatedAPIsApi->createProject1: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 500 - Error : error message


generateReport1

Generate Report

This API is deprecated please refer to /projects/{projectId}/reports/{reportId}/generate to Generate a report. Refer /projects/{projectId}/reports/{reportId}/download to Download a report. Generates Reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For CUSTOM_REPORT provide the name of the report. All project users including Observer, Reviewer and Analyst can generate reports for private projects. Try it out is not available for this API. This API can be tested using conventional REST API clients such as postman or cURL. When calling this API from a REST client, you need to redirect output to a zip file as follows curl -X GET "http://HOST:PORT/codeinsight/api/project/generateReport?reportType=REPORT_TYPE&projectId=PROJECT_ID" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" > report.zip


/project/generateReport

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//project/generateReport?projectId=&reportType=&otherProjectId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeprecatedAPIsApi;

import java.io.File;
import java.util.*;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        Integer projectId = 56; // Integer | ID of the Project
        String reportType = reportType_example; // String | Report Type
        String authorization = authorization_example; // String | Bearer JWT Token
        Integer otherProjectId = 56; // Integer | Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.
        try {
            InputStream result = apiInstance.generateReport1(projectId, reportType, authorization, otherProjectId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#generateReport1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeprecatedAPIsApi;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        Integer projectId = 56; // Integer | ID of the Project
        String reportType = reportType_example; // String | Report Type
        String authorization = authorization_example; // String | Bearer JWT Token
        Integer otherProjectId = 56; // Integer | Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.
        try {
            InputStream result = apiInstance.generateReport1(projectId, reportType, authorization, otherProjectId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#generateReport1");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *reportType = reportType_example; // Report Type
String *authorization = authorization_example; // Bearer JWT Token (default to )
Integer *otherProjectId = 56; // Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true. (optional)

DeprecatedAPIsApi *apiInstance = [[DeprecatedAPIsApi alloc] init];

// Generate Report
[apiInstance generateReport1With:projectId
    reportType:reportType
    authorization:authorization
    otherProjectId:otherProjectId
              completionHandler: ^(InputStream output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.DeprecatedAPIsApi()

var projectId = 56; // {Integer} ID of the Project

var reportType = reportType_example; // {String} Report Type

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'otherProjectId': 56 // {Integer} Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.generateReport1(projectId, reportType, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class generateReport1Example
    {
        public void main()
        {
            
            var apiInstance = new DeprecatedAPIsApi();
            var projectId = 56;  // Integer | ID of the Project
            var reportType = reportType_example;  // String | Report Type
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var otherProjectId = 56;  // Integer | Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true. (optional) 

            try
            {
                // Generate Report
                InputStream result = apiInstance.generateReport1(projectId, reportType, authorization, otherProjectId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeprecatedAPIsApi.generateReport1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DeprecatedAPIsApi();
$projectId = 56; // Integer | ID of the Project
$reportType = reportType_example; // String | Report Type
$authorization = authorization_example; // String | Bearer JWT Token
$otherProjectId = 56; // Integer | Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.

try {
    $result = $api_instance->generateReport1($projectId, $reportType, $authorization, $otherProjectId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DeprecatedAPIsApi->generateReport1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DeprecatedAPIsApi;

my $api_instance = WWW::SwaggerClient::DeprecatedAPIsApi->new();
my $projectId = 56; # Integer | ID of the Project
my $reportType = reportType_example; # String | Report Type
my $authorization = authorization_example; # String | Bearer JWT Token
my $otherProjectId = 56; # Integer | Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.

eval { 
    my $result = $api_instance->generateReport1(projectId => $projectId, reportType => $reportType, authorization => $authorization, otherProjectId => $otherProjectId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeprecatedAPIsApi->generateReport1: $@\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.DeprecatedAPIsApi()
projectId = 56 # Integer | ID of the Project
reportType = reportType_example # String | Report Type
authorization = authorization_example # String | Bearer JWT Token (default to )
otherProjectId = 56 # Integer | Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true. (optional)

try: 
    # Generate Report
    api_response = api_instance.generate_report1(projectId, reportType, authorization, otherProjectId=otherProjectId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeprecatedAPIsApi->generateReport1: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
reportType*
String
Report Type
Required
otherProjectId
Integer (int32)
Project Id of the secondary project to be included in the report. This parameter is required, if the enableProjectPicker property for this report type is set to true.

Responses

Status: 200 - OK

Status: 400 - Bad request: No project with id x


importProjectData

Import Project Data

Imports project data for a given projectId. Only Project Owner and Analyst can Import Project Data into a private project. Try it out is not available for this API. This API can be tested using conventional REST API clients such as postman or cURL When calling this API from a REST client, you need to run curl as follows curl -X POST "http://HOST:PORT/codeinsight/api/importer/importProjectData?projectId=PROJECT_ID&checkInventory=false&checkReviewed=false&createEmptyInventory=false&overwriteInventoryNotes=true" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" -H "content-type: application/octet-stream" --data-binary "@path/filename.zip" Since this is deprecated, you can find the new api under projects api i.e., /projects/{projectId}/import


/importer/importProjectData

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//importer/importProjectData?projectId=&checkInventory=&checkReviewed=&createEmptyInventory=&overwriteInventoryNotes="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeprecatedAPIsApi;

import java.io.File;
import java.util.*;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        Integer projectId = 56; // Integer | ID of the Project
        InputStream project data = ; // InputStream | Project data to import
        String authorization = authorization_example; // String | Bearer JWT Token
        String checkInventory = checkInventory_example; // String | Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.
        String checkReviewed = checkReviewed_example; // String | Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.
        String createEmptyInventory = createEmptyInventory_example; // String | Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false. 
        String overwriteInventoryNotes = overwriteInventoryNotes_example; // String | Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.
        try {
            'String' result = apiInstance.importProjectData(projectId, project data, authorization, checkInventory, checkReviewed, createEmptyInventory, overwriteInventoryNotes);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#importProjectData");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeprecatedAPIsApi;

public class DeprecatedAPIsApiExample {

    public static void main(String[] args) {
        DeprecatedAPIsApi apiInstance = new DeprecatedAPIsApi();
        Integer projectId = 56; // Integer | ID of the Project
        InputStream project data = ; // InputStream | Project data to import
        String authorization = authorization_example; // String | Bearer JWT Token
        String checkInventory = checkInventory_example; // String | Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.
        String checkReviewed = checkReviewed_example; // String | Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.
        String createEmptyInventory = createEmptyInventory_example; // String | Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false. 
        String overwriteInventoryNotes = overwriteInventoryNotes_example; // String | Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.
        try {
            'String' result = apiInstance.importProjectData(projectId, project data, authorization, checkInventory, checkReviewed, createEmptyInventory, overwriteInventoryNotes);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeprecatedAPIsApi#importProjectData");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
InputStream *project data = ; // Project data to import
String *authorization = authorization_example; // Bearer JWT Token (default to )
String *checkInventory = checkInventory_example; // Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory. (optional)
String *checkReviewed = checkReviewed_example; // Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed. (optional)
String *createEmptyInventory = createEmptyInventory_example; // Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false.  (optional)
String *overwriteInventoryNotes = overwriteInventoryNotes_example; // Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones. (optional)

DeprecatedAPIsApi *apiInstance = [[DeprecatedAPIsApi alloc] init];

// Import Project Data
[apiInstance importProjectDataWith:projectId
    project data:project data
    authorization:authorization
    checkInventory:checkInventory
    checkReviewed:checkReviewed
    createEmptyInventory:createEmptyInventory
    overwriteInventoryNotes:overwriteInventoryNotes
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.DeprecatedAPIsApi()

var projectId = 56; // {Integer} ID of the Project

var project data = ; // {InputStream} Project data to import

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'checkInventory': checkInventory_example, // {String} Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.
  'checkReviewed': checkReviewed_example, // {String} Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.
  'createEmptyInventory': createEmptyInventory_example, // {String} Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false. 
  'overwriteInventoryNotes': overwriteInventoryNotes_example // {String} Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.importProjectData(projectId, project data, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class importProjectDataExample
    {
        public void main()
        {
            
            var apiInstance = new DeprecatedAPIsApi();
            var projectId = 56;  // Integer | ID of the Project
            var project data = new InputStream(); // InputStream | Project data to import
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var checkInventory = checkInventory_example;  // String | Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory. (optional) 
            var checkReviewed = checkReviewed_example;  // String | Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed. (optional) 
            var createEmptyInventory = createEmptyInventory_example;  // String | Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false.  (optional) 
            var overwriteInventoryNotes = overwriteInventoryNotes_example;  // String | Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones. (optional) 

            try
            {
                // Import Project Data
                'String' result = apiInstance.importProjectData(projectId, project data, authorization, checkInventory, checkReviewed, createEmptyInventory, overwriteInventoryNotes);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeprecatedAPIsApi.importProjectData: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DeprecatedAPIsApi();
$projectId = 56; // Integer | ID of the Project
$project data = ; // InputStream | Project data to import
$authorization = authorization_example; // String | Bearer JWT Token
$checkInventory = checkInventory_example; // String | Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.
$checkReviewed = checkReviewed_example; // String | Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.
$createEmptyInventory = createEmptyInventory_example; // String | Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false. 
$overwriteInventoryNotes = overwriteInventoryNotes_example; // String | Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.

try {
    $result = $api_instance->importProjectData($projectId, $project data, $authorization, $checkInventory, $checkReviewed, $createEmptyInventory, $overwriteInventoryNotes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DeprecatedAPIsApi->importProjectData: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DeprecatedAPIsApi;

my $api_instance = WWW::SwaggerClient::DeprecatedAPIsApi->new();
my $projectId = 56; # Integer | ID of the Project
my $project data = WWW::SwaggerClient::Object::InputStream->new(); # InputStream | Project data to import
my $authorization = authorization_example; # String | Bearer JWT Token
my $checkInventory = checkInventory_example; # String | Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.
my $checkReviewed = checkReviewed_example; # String | Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.
my $createEmptyInventory = createEmptyInventory_example; # String | Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false. 
my $overwriteInventoryNotes = overwriteInventoryNotes_example; # String | Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.

eval { 
    my $result = $api_instance->importProjectData(projectId => $projectId, project data => $project data, authorization => $authorization, checkInventory => $checkInventory, checkReviewed => $checkReviewed, createEmptyInventory => $createEmptyInventory, overwriteInventoryNotes => $overwriteInventoryNotes);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeprecatedAPIsApi->importProjectData: $@\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.DeprecatedAPIsApi()
projectId = 56 # Integer | ID of the Project
project data =  # InputStream | Project data to import
authorization = authorization_example # String | Bearer JWT Token (default to )
checkInventory = checkInventory_example # String | Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory. (optional)
checkReviewed = checkReviewed_example # String | Check file MD5 for review.  If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed. (optional)
createEmptyInventory = createEmptyInventory_example # String | Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false.  (optional)
overwriteInventoryNotes = overwriteInventoryNotes_example # String | Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones. (optional)

try: 
    # Import Project Data
    api_response = api_instance.import_project_data(projectId, project data, authorization, checkInventory=checkInventory, checkReviewed=checkReviewed, createEmptyInventory=createEmptyInventory, overwriteInventoryNotes=overwriteInventoryNotes)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeprecatedAPIsApi->importProjectData: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
project data *
Query parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
checkInventory
String
Check file MD5 for inventory. If enabled, only files with matching MD5 in the import data file and the scanned file will be associated to inventory.
checkReviewed
String
Check file MD5 for review. If enabled, only files with matching MD5 in the import data file and the scanned file will be marked as reviewed.
createEmptyInventory
String
Create inventory even if no matching file is found. By default value of this parameter is retrieved from the Project Setting(On data import or rescan, delete inventory with no associated files). If you wish to override the project setting you can pass true or false.
overwriteInventoryNotes
String
Choose to overwrite or append inventory notes (Audit Notes, Notices Text, Usage Guidance, Remediation Notes). By default notes will be overwritten if the inventory is same. If set to false, notes will be appended to existing ones.

Responses

Status: 200 - OK


Files

getFileDetails

Get details of a file by Id

Get file details of a given fileId. If the remote flag is true, it'll fetch the corresponding remote file info, otherwise by default the flag is false and scanner file information will be shown.


/files/{fileId}

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//files/{fileId}?isRemote="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FilesApi;

import java.io.File;
import java.util.*;

public class FilesApiExample {

    public static void main(String[] args) {
        
        FilesApi apiInstance = new FilesApi();
        Integer fileId = 56; // Integer | ID of the File
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean isRemote = true; // Boolean | if true, fetch results of corresponding remote file
        try {
            apiInstance.getFileDetails(fileId, authorization, isRemote);
        } catch (ApiException e) {
            System.err.println("Exception when calling FilesApi#getFileDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FilesApi;

public class FilesApiExample {

    public static void main(String[] args) {
        FilesApi apiInstance = new FilesApi();
        Integer fileId = 56; // Integer | ID of the File
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean isRemote = true; // Boolean | if true, fetch results of corresponding remote file
        try {
            apiInstance.getFileDetails(fileId, authorization, isRemote);
        } catch (ApiException e) {
            System.err.println("Exception when calling FilesApi#getFileDetails");
            e.printStackTrace();
        }
    }
}
Integer *fileId = 56; // ID of the File
String *authorization = authorization_example; // Bearer JWT Token (default to )
Boolean *isRemote = true; // if true, fetch results of corresponding remote file (optional) (default to false)

FilesApi *apiInstance = [[FilesApi alloc] init];

// Get details of a file by Id
[apiInstance getFileDetailsWith:fileId
    authorization:authorization
    isRemote:isRemote
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.FilesApi()

var fileId = 56; // {Integer} ID of the File

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'isRemote': true // {Boolean} if true, fetch results of corresponding remote file
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getFileDetails(fileId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFileDetailsExample
    {
        public void main()
        {
            
            var apiInstance = new FilesApi();
            var fileId = 56;  // Integer | ID of the File
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var isRemote = true;  // Boolean | if true, fetch results of corresponding remote file (optional)  (default to false)

            try
            {
                // Get details of a file by Id
                apiInstance.getFileDetails(fileId, authorization, isRemote);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FilesApi.getFileDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FilesApi();
$fileId = 56; // Integer | ID of the File
$authorization = authorization_example; // String | Bearer JWT Token
$isRemote = true; // Boolean | if true, fetch results of corresponding remote file

try {
    $api_instance->getFileDetails($fileId, $authorization, $isRemote);
} catch (Exception $e) {
    echo 'Exception when calling FilesApi->getFileDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FilesApi;

my $api_instance = WWW::SwaggerClient::FilesApi->new();
my $fileId = 56; # Integer | ID of the File
my $authorization = authorization_example; # String | Bearer JWT Token
my $isRemote = true; # Boolean | if true, fetch results of corresponding remote file

eval { 
    $api_instance->getFileDetails(fileId => $fileId, authorization => $authorization, isRemote => $isRemote);
};
if ($@) {
    warn "Exception when calling FilesApi->getFileDetails: $@\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.FilesApi()
fileId = 56 # Integer | ID of the File
authorization = authorization_example # String | Bearer JWT Token (default to )
isRemote = true # Boolean | if true, fetch results of corresponding remote file (optional) (default to false)

try: 
    # Get details of a file by Id
    api_instance.get_file_details(fileId, authorization, isRemote=isRemote)
except ApiException as e:
    print("Exception when calling FilesApi->getFileDetails: %s\n" % e)

Parameters

Path parameters
Name Description
fileId*
Integer (int32)
ID of the File
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
isRemote
Boolean
if true, fetch results of corresponding remote file

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Folder

createFolder

Create Folder

Creates a folder for the given name and returns folderId with success message.


/folders

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//folders"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

import java.io.File;
import java.util.*;

public class FolderApiExample {

    public static void main(String[] args) {
        
        FolderApi apiInstance = new FolderApi();
        FolderModel body = ; // FolderModel | To create a folder, folderName is required and parentFolderId is optional. 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createFolder(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#createFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        FolderModel body = ; // FolderModel | To create a folder, folderName is required and parentFolderId is optional. 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createFolder(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#createFolder");
            e.printStackTrace();
        }
    }
}
FolderModel *body = ; // To create a folder, folderName is required and parentFolderId is optional. 
String *authorization = authorization_example; // Bearer JWT Token (default to )

FolderApi *apiInstance = [[FolderApi alloc] init];

// Create Folder
[apiInstance createFolderWith:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.FolderApi()

var body = ; // {FolderModel} To create a folder, folderName is required and parentFolderId is optional. 

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createFolder(body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createFolderExample
    {
        public void main()
        {
            
            var apiInstance = new FolderApi();
            var body = new FolderModel(); // FolderModel | To create a folder, folderName is required and parentFolderId is optional. 
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Create Folder
                apiInstance.createFolder(body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.createFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FolderApi();
$body = ; // FolderModel | To create a folder, folderName is required and parentFolderId is optional. 
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->createFolder($body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling FolderApi->createFolder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FolderApi;

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $body = WWW::SwaggerClient::Object::FolderModel->new(); # FolderModel | To create a folder, folderName is required and parentFolderId is optional. 
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->createFolder(body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling FolderApi->createFolder: $@\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.FolderApi()
body =  # FolderModel | To create a folder, folderName is required and parentFolderId is optional. 
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Create Folder
    api_instance.create_folder(body, authorization)
except ApiException as e:
    print("Exception when calling FolderApi->createFolder: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteFolder

Delete a folder

Deleting a folder will delete all subfolders, contained projects will be associated wih the parent folder(Projects(0)).


/folders/{folderId}

Usage and SDK Samples

curl -X DELETE "http://localhost/codeinsight/api//folders/{folderId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

import java.io.File;
import java.util.*;

public class FolderApiExample {

    public static void main(String[] args) {
        
        FolderApi apiInstance = new FolderApi();
        Integer folderId = 56; // Integer | ID of the folder
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.deleteFolder(folderId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#deleteFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        Integer folderId = 56; // Integer | ID of the folder
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.deleteFolder(folderId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#deleteFolder");
            e.printStackTrace();
        }
    }
}
Integer *folderId = 56; // ID of the folder
String *authorization = authorization_example; // Bearer JWT Token (default to )

FolderApi *apiInstance = [[FolderApi alloc] init];

// Delete a folder
[apiInstance deleteFolderWith:folderId
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.FolderApi()

var folderId = 56; // {Integer} ID of the folder

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteFolder(folderId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteFolderExample
    {
        public void main()
        {
            
            var apiInstance = new FolderApi();
            var folderId = 56;  // Integer | ID of the folder
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Delete a folder
                apiInstance.deleteFolder(folderId, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.deleteFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FolderApi();
$folderId = 56; // Integer | ID of the folder
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->deleteFolder($folderId, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling FolderApi->deleteFolder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FolderApi;

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $folderId = 56; # Integer | ID of the folder
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->deleteFolder(folderId => $folderId, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling FolderApi->deleteFolder: $@\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.FolderApi()
folderId = 56 # Integer | ID of the folder
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Delete a folder
    api_instance.delete_folder(folderId, authorization)
except ApiException as e:
    print("Exception when calling FolderApi->deleteFolder: %s\n" % e)

Parameters

Path parameters
Name Description
folderId*
Integer (int32)
ID of the folder
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getFolder

Get Folder By Id

Get existing folder by folderId


/folders/{folderId}

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//folders/{folderId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

import java.io.File;
import java.util.*;

public class FolderApiExample {

    public static void main(String[] args) {
        
        FolderApi apiInstance = new FolderApi();
        Integer folderId = 56; // Integer | 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.getFolder(folderId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#getFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        Integer folderId = 56; // Integer | 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.getFolder(folderId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#getFolder");
            e.printStackTrace();
        }
    }
}
Integer *folderId = 56; // 
String *authorization = authorization_example; // Bearer JWT Token (default to )

FolderApi *apiInstance = [[FolderApi alloc] init];

// Get Folder By Id
[apiInstance getFolderWith:folderId
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.FolderApi()

var folderId = 56; // {Integer} 

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getFolder(folderId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFolderExample
    {
        public void main()
        {
            
            var apiInstance = new FolderApi();
            var folderId = 56;  // Integer | 
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Get Folder By Id
                apiInstance.getFolder(folderId, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.getFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FolderApi();
$folderId = 56; // Integer | 
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->getFolder($folderId, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling FolderApi->getFolder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FolderApi;

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $folderId = 56; # Integer | 
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->getFolder(folderId => $folderId, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling FolderApi->getFolder: $@\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.FolderApi()
folderId = 56 # Integer | 
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Get Folder By Id
    api_instance.get_folder(folderId, authorization)
except ApiException as e:
    print("Exception when calling FolderApi->getFolder: %s\n" % e)

Parameters

Path parameters
Name Description
folderId*
Integer (int32)
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


searchFolders

Get folders based on the name provided

Return folders based on the name provided


/folders/search

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//folders/search?folderName=&offset=&limit="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

import java.io.File;
import java.util.*;

public class FolderApiExample {

    public static void main(String[] args) {
        
        FolderApi apiInstance = new FolderApi();
        String authorization = authorization_example; // String | Bearer JWT Token
        String folderName = folderName_example; // String | Search happens based on the name given 
        Integer offset = 56; // Integer | Index of the page to start with
        Integer limit = 56; // Integer | Number of records to fetch
        try {
            apiInstance.searchFolders(authorization, folderName, offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#searchFolders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        String authorization = authorization_example; // String | Bearer JWT Token
        String folderName = folderName_example; // String | Search happens based on the name given 
        Integer offset = 56; // Integer | Index of the page to start with
        Integer limit = 56; // Integer | Number of records to fetch
        try {
            apiInstance.searchFolders(authorization, folderName, offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#searchFolders");
            e.printStackTrace();
        }
    }
}
String *authorization = authorization_example; // Bearer JWT Token (default to )
String *folderName = folderName_example; // Search happens based on the name given  (optional)
Integer *offset = 56; // Index of the page to start with (optional) (default to 1)
Integer *limit = 56; // Number of records to fetch (optional) (default to 25)

FolderApi *apiInstance = [[FolderApi alloc] init];

// Get folders based on the name provided
[apiInstance searchFoldersWith:authorization
    folderName:folderName
    offset:offset
    limit:limit
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.FolderApi()

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'folderName': folderName_example, // {String} Search happens based on the name given 
  'offset': 56, // {Integer} Index of the page to start with
  'limit': 56 // {Integer} Number of records to fetch
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.searchFolders(authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class searchFoldersExample
    {
        public void main()
        {
            
            var apiInstance = new FolderApi();
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var folderName = folderName_example;  // String | Search happens based on the name given  (optional) 
            var offset = 56;  // Integer | Index of the page to start with (optional)  (default to 1)
            var limit = 56;  // Integer | Number of records to fetch (optional)  (default to 25)

            try
            {
                // Get folders based on the name provided
                apiInstance.searchFolders(authorization, folderName, offset, limit);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.searchFolders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FolderApi();
$authorization = authorization_example; // String | Bearer JWT Token
$folderName = folderName_example; // String | Search happens based on the name given 
$offset = 56; // Integer | Index of the page to start with
$limit = 56; // Integer | Number of records to fetch

try {
    $api_instance->searchFolders($authorization, $folderName, $offset, $limit);
} catch (Exception $e) {
    echo 'Exception when calling FolderApi->searchFolders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FolderApi;

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $authorization = authorization_example; # String | Bearer JWT Token
my $folderName = folderName_example; # String | Search happens based on the name given 
my $offset = 56; # Integer | Index of the page to start with
my $limit = 56; # Integer | Number of records to fetch

eval { 
    $api_instance->searchFolders(authorization => $authorization, folderName => $folderName, offset => $offset, limit => $limit);
};
if ($@) {
    warn "Exception when calling FolderApi->searchFolders: $@\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.FolderApi()
authorization = authorization_example # String | Bearer JWT Token (default to )
folderName = folderName_example # String | Search happens based on the name given  (optional)
offset = 56 # Integer | Index of the page to start with (optional) (default to 1)
limit = 56 # Integer | Number of records to fetch (optional) (default to 25)

try: 
    # Get folders based on the name provided
    api_instance.search_folders(authorization, folderName=folderName, offset=offset, limit=limit)
except ApiException as e:
    print("Exception when calling FolderApi->searchFolders: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
folderName
String
Search happens based on the name given
offset
Integer (int32)
Index of the page to start with
limit
Integer (int32)
Number of records to fetch

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateFolder

Update folder details

Update folder details for the given folderId.


/folders/{folderId}

Usage and SDK Samples

curl -X PUT "http://localhost/codeinsight/api//folders/{folderId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

import java.io.File;
import java.util.*;

public class FolderApiExample {

    public static void main(String[] args) {
        
        FolderApi apiInstance = new FolderApi();
        Integer folderId = 56; // Integer | 
        FolderModel body = ; // FolderModel | Update details of a folder.
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.updateFolder(folderId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#updateFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        Integer folderId = 56; // Integer | 
        FolderModel body = ; // FolderModel | Update details of a folder.
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.updateFolder(folderId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#updateFolder");
            e.printStackTrace();
        }
    }
}
Integer *folderId = 56; // 
FolderModel *body = ; // Update details of a folder.
String *authorization = authorization_example; // Bearer JWT Token (default to )

FolderApi *apiInstance = [[FolderApi alloc] init];

// Update folder details
[apiInstance updateFolderWith:folderId
    body:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.FolderApi()

var folderId = 56; // {Integer} 

var body = ; // {FolderModel} Update details of a folder.

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateFolder(folderId, body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateFolderExample
    {
        public void main()
        {
            
            var apiInstance = new FolderApi();
            var folderId = 56;  // Integer | 
            var body = new FolderModel(); // FolderModel | Update details of a folder.
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Update folder details
                apiInstance.updateFolder(folderId, body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.updateFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FolderApi();
$folderId = 56; // Integer | 
$body = ; // FolderModel | Update details of a folder.
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->updateFolder($folderId, $body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling FolderApi->updateFolder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FolderApi;

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $folderId = 56; # Integer | 
my $body = WWW::SwaggerClient::Object::FolderModel->new(); # FolderModel | Update details of a folder.
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->updateFolder(folderId => $folderId, body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling FolderApi->updateFolder: $@\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.FolderApi()
folderId = 56 # Integer | 
body =  # FolderModel | Update details of a folder.
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Update folder details
    api_instance.update_folder(folderId, body, authorization)
except ApiException as e:
    print("Exception when calling FolderApi->updateFolder: %s\n" % e)

Parameters

Path parameters
Name Description
folderId*
Integer (int32)
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


InventoryAPI

addFilesToInventory

Add Files and/or Folders to Inventory

Add files and/or folders to inventory item and returns the response message


/inventories/{inventoryId}/files

Usage and SDK Samples

curl -X PUT "http://localhost/codeinsight/api//inventories/{inventoryId}/files"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        InventoryFilesModel body = ; // InventoryFilesModel | To Add files and folders to the inventory provide file and folder paths.
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            Json result = apiInstance.addFilesToInventory(body, inventoryId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#addFilesToInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        InventoryFilesModel body = ; // InventoryFilesModel | To Add files and folders to the inventory provide file and folder paths.
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            Json result = apiInstance.addFilesToInventory(body, inventoryId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#addFilesToInventory");
            e.printStackTrace();
        }
    }
}
InventoryFilesModel *body = ; // To Add files and folders to the inventory provide file and folder paths.
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Add Files and/or Folders to Inventory
[apiInstance addFilesToInventoryWith:body
    inventoryId:inventoryId
    authorization:authorization
              completionHandler: ^(Json output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var body = ; // {InventoryFilesModel} To Add files and folders to the inventory provide file and folder paths.

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addFilesToInventory(body, inventoryId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addFilesToInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var body = new InventoryFilesModel(); // InventoryFilesModel | To Add files and folders to the inventory provide file and folder paths.
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Add Files and/or Folders to Inventory
                Json result = apiInstance.addFilesToInventory(body, inventoryId, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.addFilesToInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$body = ; // InventoryFilesModel | To Add files and folders to the inventory provide file and folder paths.
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->addFilesToInventory($body, $inventoryId, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->addFilesToInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $body = WWW::SwaggerClient::Object::InventoryFilesModel->new(); # InventoryFilesModel | To Add files and folders to the inventory provide file and folder paths.
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->addFilesToInventory(body => $body, inventoryId => $inventoryId, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->addFilesToInventory: $@\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.InventoryAPIApi()
body =  # InventoryFilesModel | To Add files and folders to the inventory provide file and folder paths.
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Add Files and/or Folders to Inventory
    api_response = api_instance.add_files_to_inventory(body, inventoryId, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->addFilesToInventory: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


createInventory

create Inventory

create an inventory. Name and Inventory type is a mandatory field.


/inventories

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//inventories"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        ProjectInventoryModel body = ; // ProjectInventoryModel | 
        String authorization = authorization_example; // String | 
        try {
            apiInstance.createInventory(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#createInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        ProjectInventoryModel body = ; // ProjectInventoryModel | 
        String authorization = authorization_example; // String | 
        try {
            apiInstance.createInventory(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#createInventory");
            e.printStackTrace();
        }
    }
}
ProjectInventoryModel *body = ; // 
String *authorization = authorization_example; //  (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// create Inventory
[apiInstance createInventoryWith:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var body = ; // {ProjectInventoryModel} 

var authorization = authorization_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createInventory(body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var body = new ProjectInventoryModel(); // ProjectInventoryModel | 
            var authorization = authorization_example;  // String |  (default to )

            try
            {
                // create Inventory
                apiInstance.createInventory(body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.createInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$body = ; // ProjectInventoryModel | 
$authorization = authorization_example; // String | 

try {
    $api_instance->createInventory($body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->createInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $body = WWW::SwaggerClient::Object::ProjectInventoryModel->new(); # ProjectInventoryModel | 
my $authorization = authorization_example; # String | 

eval { 
    $api_instance->createInventory(body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->createInventory: $@\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.InventoryAPIApi()
body =  # ProjectInventoryModel | 
authorization = authorization_example # String |  (default to )

try: 
    # create Inventory
    api_instance.create_inventory(body, authorization)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->createInventory: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteInventory

Delete the inventory

delete inventory


/inventories/{inventoryId}

Usage and SDK Samples

curl -X DELETE "http://localhost/codeinsight/api//inventories/{inventoryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.deleteInventory(inventoryId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#deleteInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.deleteInventory(inventoryId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#deleteInventory");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Delete the inventory
[apiInstance deleteInventoryWith:inventoryId
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteInventory(inventoryId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Delete the inventory
                apiInstance.deleteInventory(inventoryId, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.deleteInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->deleteInventory($inventoryId, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->deleteInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->deleteInventory(inventoryId => $inventoryId, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->deleteInventory: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Delete the inventory
    api_instance.delete_inventory(inventoryId, authorization)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->deleteInventory: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getInventory

Get the inventories of file/folder ids

Returns the inventories file and/or folder ids


/inventories/search

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//inventories/search?projectId=&fileIds=&folderIds=&published=&limit=&offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        String fileIds = fileIds_example; // String | Provide list of file ids
        String folderIds = folderIds_example; // String | Provide list of folder ids
        String published = published_example; // String | If true, then only published inventory items are returned; if false, then only un-published inventory items are returned
        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 {
            Json result = apiInstance.getInventory(projectId, authorization, fileIds, folderIds, published, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#getInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        String fileIds = fileIds_example; // String | Provide list of file ids
        String folderIds = folderIds_example; // String | Provide list of folder ids
        String published = published_example; // String | If true, then only published inventory items are returned; if false, then only un-published inventory items are returned
        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 {
            Json result = apiInstance.getInventory(projectId, authorization, fileIds, folderIds, published, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#getInventory");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *authorization = authorization_example; // Bearer JWT Token (default to )
String *fileIds = fileIds_example; // Provide list of file ids (optional)
String *folderIds = folderIds_example; // Provide list of folder ids (optional)
String *published = published_example; // If true, then only published inventory items are returned; if false, then only un-published inventory items are returned (optional)
Integer *limit = 56; // Page Size. Number Of Records to fetch per page (optional) (default to 25)
Integer *offset = 56; // Page Number. Index of the page to start with(starts from 1) (optional) (default to 1)

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Get the inventories of file/folder ids
[apiInstance getInventoryWith:projectId
    authorization:authorization
    fileIds:fileIds
    folderIds:folderIds
    published:published
    limit:limit
    offset:offset
              completionHandler: ^(Json output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var projectId = 56; // {Integer} ID of the Project

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'fileIds': fileIds_example, // {String} Provide list of file ids
  'folderIds': folderIds_example, // {String} Provide list of folder ids
  'published': published_example, // {String} If true, then only published inventory items are returned; if false, then only un-published inventory items are returned
  '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.getInventory(projectId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var fileIds = fileIds_example;  // String | Provide list of file ids (optional) 
            var folderIds = folderIds_example;  // String | Provide list of folder ids (optional) 
            var published = published_example;  // String | If true, then only published inventory items are returned; if false, then only un-published inventory items are returned (optional) 
            var limit = 56;  // Integer | Page Size. Number Of Records to fetch per page (optional)  (default to 25)
            var offset = 56;  // Integer | Page Number. Index of the page to start with(starts from 1) (optional)  (default to 1)

            try
            {
                // Get the inventories of file/folder ids
                Json result = apiInstance.getInventory(projectId, authorization, fileIds, folderIds, published, limit, offset);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.getInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$projectId = 56; // Integer | ID of the Project
$authorization = authorization_example; // String | Bearer JWT Token
$fileIds = fileIds_example; // String | Provide list of file ids
$folderIds = folderIds_example; // String | Provide list of folder ids
$published = published_example; // String | If true, then only published inventory items are returned; if false, then only un-published inventory items are returned
$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->getInventory($projectId, $authorization, $fileIds, $folderIds, $published, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->getInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $authorization = authorization_example; # String | Bearer JWT Token
my $fileIds = fileIds_example; # String | Provide list of file ids
my $folderIds = folderIds_example; # String | Provide list of folder ids
my $published = published_example; # String | If true, then only published inventory items are returned; if false, then only un-published inventory items are returned
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->getInventory(projectId => $projectId, authorization => $authorization, fileIds => $fileIds, folderIds => $folderIds, published => $published, limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->getInventory: $@\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.InventoryAPIApi()
projectId = 56 # Integer | ID of the Project
authorization = authorization_example # String | Bearer JWT Token (default to )
fileIds = fileIds_example # String | Provide list of file ids (optional)
folderIds = folderIds_example # String | Provide list of folder ids (optional)
published = published_example # String | If true, then only published inventory items are returned; if false, then only un-published inventory items are returned (optional)
limit = 56 # Integer | Page Size. Number Of Records to fetch per page (optional) (default to 25)
offset = 56 # Integer | Page Number. Index of the page to start with(starts from 1) (optional) (default to 1)

try: 
    # Get the inventories of file/folder ids
    api_response = api_instance.get_inventory(projectId, authorization, fileIds=fileIds, folderIds=folderIds, published=published, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->getInventory: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
fileIds
String
Provide list of file ids
folderIds
String
Provide list of folder ids
published
String
If true, then only published inventory items are returned; if false, then only un-published inventory items are returned
limit
Integer (int32)
Page Size. Number Of Records to fetch per page
offset
Integer (int32)
Page Number. Index of the page to start with(starts from 1)

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getInventoryById

Get details of an inventory

Get details of an inventory.


/inventories/{inventoryId}

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//inventories/{inventoryId}?skipVulnerabilities="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean skipVulnerabilities = true; // Boolean | If true , hide vulnerabilty details
        try {
            apiInstance.getInventoryById(inventoryId, authorization, skipVulnerabilities);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#getInventoryById");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean skipVulnerabilities = true; // Boolean | If true , hide vulnerabilty details
        try {
            apiInstance.getInventoryById(inventoryId, authorization, skipVulnerabilities);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#getInventoryById");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )
Boolean *skipVulnerabilities = true; // If true , hide vulnerabilty details (optional) (default to false)

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Get details of an inventory
[apiInstance getInventoryByIdWith:inventoryId
    authorization:authorization
    skipVulnerabilities:skipVulnerabilities
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'skipVulnerabilities': true // {Boolean} If true , hide vulnerabilty details
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getInventoryById(inventoryId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getInventoryByIdExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var skipVulnerabilities = true;  // Boolean | If true , hide vulnerabilty details (optional)  (default to false)

            try
            {
                // Get details of an inventory
                apiInstance.getInventoryById(inventoryId, authorization, skipVulnerabilities);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.getInventoryById: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token
$skipVulnerabilities = true; // Boolean | If true , hide vulnerabilty details

try {
    $api_instance->getInventoryById($inventoryId, $authorization, $skipVulnerabilities);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->getInventoryById: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token
my $skipVulnerabilities = true; # Boolean | If true , hide vulnerabilty details

eval { 
    $api_instance->getInventoryById(inventoryId => $inventoryId, authorization => $authorization, skipVulnerabilities => $skipVulnerabilities);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->getInventoryById: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )
skipVulnerabilities = true # Boolean | If true , hide vulnerabilty details (optional) (default to false)

try: 
    # Get details of an inventory
    api_instance.get_inventory_by_id(inventoryId, authorization, skipVulnerabilities=skipVulnerabilities)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->getInventoryById: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
skipVulnerabilities
Boolean
If true , hide vulnerabilty details

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getVulnerabilties

Get vulnerability details of an inventory

Get vulnerability details of an inventory.


/inventories/{inventoryId}/vulnerabilities

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//inventories/{inventoryId}/vulnerabilities?limit=&offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        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 {
            apiInstance.getVulnerabilties(inventoryId, authorization, limit, offset);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#getVulnerabilties");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        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 {
            apiInstance.getVulnerabilties(inventoryId, authorization, limit, offset);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#getVulnerabilties");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )
Integer *limit = 56; // Page Size. Number Of Records to fetch per page (optional) (default to 25)
Integer *offset = 56; // Page Number. Index of the page to start with(starts from 1) (optional) (default to 1)

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Get vulnerability details of an inventory
[apiInstance getVulnerabiltiesWith:inventoryId
    authorization:authorization
    limit:limit
    offset:offset
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  '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.');
  }
};
api.getVulnerabilties(inventoryId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getVulnerabiltiesExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var limit = 56;  // Integer | Page Size. Number Of Records to fetch per page (optional)  (default to 25)
            var offset = 56;  // Integer | Page Number. Index of the page to start with(starts from 1) (optional)  (default to 1)

            try
            {
                // Get vulnerability details of an inventory
                apiInstance.getVulnerabilties(inventoryId, authorization, limit, offset);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.getVulnerabilties: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token
$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 {
    $api_instance->getVulnerabilties($inventoryId, $authorization, $limit, $offset);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->getVulnerabilties: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token
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 { 
    $api_instance->getVulnerabilties(inventoryId => $inventoryId, authorization => $authorization, limit => $limit, offset => $offset);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->getVulnerabilties: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )
limit = 56 # Integer | Page Size. Number Of Records to fetch per page (optional) (default to 25)
offset = 56 # Integer | Page Number. Index of the page to start with(starts from 1) (optional) (default to 1)

try: 
    # Get vulnerability details of an inventory
    api_instance.get_vulnerabilties(inventoryId, authorization, limit=limit, offset=offset)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->getVulnerabilties: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
limit
Integer (int32)
Page Size. Number Of Records to fetch per page
offset
Integer (int32)
Page Number. Index of the page to start with(starts from 1)

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


publishInventory

Publish Inventory

Publish an inventory for a given inventoryId


/inventories/{inventoryId}/publish

Usage and SDK Samples

curl -X PUT "http://localhost/codeinsight/api//inventories/{inventoryId}/publish"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            'String' result = apiInstance.publishInventory(inventoryId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#publishInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            'String' result = apiInstance.publishInventory(inventoryId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#publishInventory");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Publish Inventory
[apiInstance publishInventoryWith:inventoryId
    authorization:authorization
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.publishInventory(inventoryId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class publishInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Publish Inventory
                'String' result = apiInstance.publishInventory(inventoryId, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.publishInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->publishInventory($inventoryId, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->publishInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->publishInventory(inventoryId => $inventoryId, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->publishInventory: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Publish Inventory
    api_response = api_instance.publish_inventory(inventoryId, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->publishInventory: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


recallInventory

Recall Inventory

Recall an inventory for a given inventoryId


/inventories/{inventoryId}/recall

Usage and SDK Samples

curl -X PUT "http://localhost/codeinsight/api//inventories/{inventoryId}/recall"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            'String' result = apiInstance.recallInventory(inventoryId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#recallInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            'String' result = apiInstance.recallInventory(inventoryId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#recallInventory");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// Recall Inventory
[apiInstance recallInventoryWith:inventoryId
    authorization:authorization
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recallInventory(inventoryId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class recallInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Recall Inventory
                'String' result = apiInstance.recallInventory(inventoryId, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.recallInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->recallInventory($inventoryId, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->recallInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->recallInventory(inventoryId => $inventoryId, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->recallInventory: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Recall Inventory
    api_response = api_instance.recall_inventory(inventoryId, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->recallInventory: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


updateInventory

update Inventory

update an inventory for a given inventoryId.


/inventories/{inventoryId}

Usage and SDK Samples

curl -X PUT "http://localhost/codeinsight/api//inventories/{inventoryId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        InventoryModel body = ; // InventoryModel | 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.updateInventory(inventoryId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#updateInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        InventoryModel body = ; // InventoryModel | 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.updateInventory(inventoryId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#updateInventory");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
InventoryModel *body = ; // 
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// update Inventory
[apiInstance updateInventoryWith:inventoryId
    body:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var body = ; // {InventoryModel} 

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateInventory(inventoryId, body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateInventoryExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var body = new InventoryModel(); // InventoryModel | 
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // update Inventory
                apiInstance.updateInventory(inventoryId, body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.updateInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$body = ; // InventoryModel | 
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->updateInventory($inventoryId, $body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->updateInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $body = WWW::SwaggerClient::Object::InventoryModel->new(); # InventoryModel | 
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->updateInventory(inventoryId => $inventoryId, body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->updateInventory: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
body =  # InventoryModel | 
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # update Inventory
    api_instance.update_inventory(inventoryId, body, authorization)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->updateInventory: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


updateInventoryStatus

inventory status

update an inventory status with DRAFT, APPROVED and REJECTED status.The approve/reject inventory affects Manual Review task only. Any changes made to Inventory will not affect Remediation and Miscellaneous tasks. On Approving Inventory, Inventory gets Approved and Manual review task will be closed with Approve status. On Rejecting Inventory, Inventory gets Rejected by creating an open Remediation task and the Manual review task will be closed with Reject status.


/inventories/{inventoryId}/status

Usage and SDK Samples

curl -X PUT "http://localhost/codeinsight/api//inventories/{inventoryId}/status?status="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryAPIApi;

import java.io.File;
import java.util.*;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String status = status_example; // String | 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.updateInventoryStatus(inventoryId, status, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#updateInventoryStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryAPIApi;

public class InventoryAPIApiExample {

    public static void main(String[] args) {
        InventoryAPIApi apiInstance = new InventoryAPIApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String status = status_example; // String | 
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.updateInventoryStatus(inventoryId, status, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryAPIApi#updateInventoryStatus");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *status = status_example; //  (default to DRAFT)
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryAPIApi *apiInstance = [[InventoryAPIApi alloc] init];

// inventory status
[apiInstance updateInventoryStatusWith:inventoryId
    status:status
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryAPIApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var status = status_example; // {String} 

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateInventoryStatus(inventoryId, status, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateInventoryStatusExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryAPIApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var status = status_example;  // String |  (default to DRAFT)
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // inventory status
                apiInstance.updateInventoryStatus(inventoryId, status, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryAPIApi.updateInventoryStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryAPIApi();
$inventoryId = 56; // Integer | ID of the Inventory
$status = status_example; // String | 
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->updateInventoryStatus($inventoryId, $status, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling InventoryAPIApi->updateInventoryStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryAPIApi;

my $api_instance = WWW::SwaggerClient::InventoryAPIApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $status = status_example; # String | 
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->updateInventoryStatus(inventoryId => $inventoryId, status => $status, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling InventoryAPIApi->updateInventoryStatus: $@\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.InventoryAPIApi()
inventoryId = 56 # Integer | ID of the Inventory
status = status_example # String |  (default to DRAFT)
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # inventory status
    api_instance.update_inventory_status(inventoryId, status, authorization)
except ApiException as e:
    print("Exception when calling InventoryAPIApi->updateInventoryStatus: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
status*
String
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


InventoryWorkflow

createWorkflow

workflows

Create or update workflow for an inventory


/inventories/{inventoryId}/workflows

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//inventories/{inventoryId}/workflows"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryWorkflowApi;

import java.io.File;
import java.util.*;

public class InventoryWorkflowApiExample {

    public static void main(String[] args) {
        
        InventoryWorkflowApi apiInstance = new InventoryWorkflowApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        array[InventoryWorkflow] body = ; // array[InventoryWorkflow] | 
        String authorization = authorization_example; // String | 
        try {
            apiInstance.createWorkflow(inventoryId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryWorkflowApi#createWorkflow");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryWorkflowApi;

public class InventoryWorkflowApiExample {

    public static void main(String[] args) {
        InventoryWorkflowApi apiInstance = new InventoryWorkflowApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        array[InventoryWorkflow] body = ; // array[InventoryWorkflow] | 
        String authorization = authorization_example; // String | 
        try {
            apiInstance.createWorkflow(inventoryId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryWorkflowApi#createWorkflow");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
array[InventoryWorkflow] *body = ; // 
String *authorization = authorization_example; //  (default to )

InventoryWorkflowApi *apiInstance = [[InventoryWorkflowApi alloc] init];

// workflows
[apiInstance createWorkflowWith:inventoryId
    body:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryWorkflowApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var body = ; // {array[InventoryWorkflow]} 

var authorization = authorization_example; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createWorkflow(inventoryId, body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createWorkflowExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryWorkflowApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var body = new array[InventoryWorkflow](); // array[InventoryWorkflow] | 
            var authorization = authorization_example;  // String |  (default to )

            try
            {
                // workflows
                apiInstance.createWorkflow(inventoryId, body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryWorkflowApi.createWorkflow: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryWorkflowApi();
$inventoryId = 56; // Integer | ID of the Inventory
$body = ; // array[InventoryWorkflow] | 
$authorization = authorization_example; // String | 

try {
    $api_instance->createWorkflow($inventoryId, $body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling InventoryWorkflowApi->createWorkflow: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryWorkflowApi;

my $api_instance = WWW::SwaggerClient::InventoryWorkflowApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $body = [WWW::SwaggerClient::Object::array[InventoryWorkflow]->new()]; # array[InventoryWorkflow] | 
my $authorization = authorization_example; # String | 

eval { 
    $api_instance->createWorkflow(inventoryId => $inventoryId, body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling InventoryWorkflowApi->createWorkflow: $@\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.InventoryWorkflowApi()
inventoryId = 56 # Integer | ID of the Inventory
body =  # array[InventoryWorkflow] | 
authorization = authorization_example # String |  (default to )

try: 
    # workflows
    api_instance.create_workflow(inventoryId, body, authorization)
except ApiException as e:
    print("Exception when calling InventoryWorkflowApi->createWorkflow: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 500 - Internal Server Error


getWorkflowByInventoryId

Get workflow details for an inventory

Get workflow details for an inventory


/inventories/{inventoryId}/workflows

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//inventories/{inventoryId}/workflows"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryWorkflowApi;

import java.io.File;
import java.util.*;

public class InventoryWorkflowApiExample {

    public static void main(String[] args) {
        
        InventoryWorkflowApi apiInstance = new InventoryWorkflowApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.getWorkflowByInventoryId(inventoryId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryWorkflowApi#getWorkflowByInventoryId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InventoryWorkflowApi;

public class InventoryWorkflowApiExample {

    public static void main(String[] args) {
        InventoryWorkflowApi apiInstance = new InventoryWorkflowApi();
        Integer inventoryId = 56; // Integer | ID of the Inventory
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.getWorkflowByInventoryId(inventoryId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryWorkflowApi#getWorkflowByInventoryId");
            e.printStackTrace();
        }
    }
}
Integer *inventoryId = 56; // ID of the Inventory
String *authorization = authorization_example; // Bearer JWT Token (default to )

InventoryWorkflowApi *apiInstance = [[InventoryWorkflowApi alloc] init];

// Get workflow details for an inventory
[apiInstance getWorkflowByInventoryIdWith:inventoryId
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.InventoryWorkflowApi()

var inventoryId = 56; // {Integer} ID of the Inventory

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getWorkflowByInventoryId(inventoryId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getWorkflowByInventoryIdExample
    {
        public void main()
        {
            
            var apiInstance = new InventoryWorkflowApi();
            var inventoryId = 56;  // Integer | ID of the Inventory
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Get workflow details for an inventory
                apiInstance.getWorkflowByInventoryId(inventoryId, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryWorkflowApi.getWorkflowByInventoryId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InventoryWorkflowApi();
$inventoryId = 56; // Integer | ID of the Inventory
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->getWorkflowByInventoryId($inventoryId, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling InventoryWorkflowApi->getWorkflowByInventoryId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryWorkflowApi;

my $api_instance = WWW::SwaggerClient::InventoryWorkflowApi->new();
my $inventoryId = 56; # Integer | ID of the Inventory
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->getWorkflowByInventoryId(inventoryId => $inventoryId, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling InventoryWorkflowApi->getWorkflowByInventoryId: $@\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.InventoryWorkflowApi()
inventoryId = 56 # Integer | ID of the Inventory
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Get workflow details for an inventory
    api_instance.get_workflow_by_inventory_id(inventoryId, authorization)
except ApiException as e:
    print("Exception when calling InventoryWorkflowApi->getWorkflowByInventoryId: %s\n" % e)

Parameters

Path parameters
Name Description
inventoryId*
Integer (int32)
ID of the Inventory
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


License

createLicenses

Create a custom license

Creates a custom license


/licenses

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//licenses"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseApi;

import java.io.File;
import java.util.*;

public class LicenseApiExample {

    public static void main(String[] args) {
        
        LicenseApi apiInstance = new LicenseApi();
        LicenseModel body = ; // LicenseModel | To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createLicenses(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#createLicenses");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseApi;

public class LicenseApiExample {

    public static void main(String[] args) {
        LicenseApi apiInstance = new LicenseApi();
        LicenseModel body = ; // LicenseModel | To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createLicenses(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#createLicenses");
            e.printStackTrace();
        }
    }
}
LicenseModel *body = ; // To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
String *authorization = authorization_example; // Bearer JWT Token (default to )

LicenseApi *apiInstance = [[LicenseApi alloc] init];

// Create a custom license
[apiInstance createLicensesWith:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.LicenseApi()

var body = ; // {LicenseModel} To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createLicenses(body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createLicensesExample
    {
        public void main()
        {
            
            var apiInstance = new LicenseApi();
            var body = new LicenseModel(); // LicenseModel | To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Create a custom license
                apiInstance.createLicenses(body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.createLicenses: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LicenseApi();
$body = ; // LicenseModel | To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->createLicenses($body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling LicenseApi->createLicenses: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseApi;

my $api_instance = WWW::SwaggerClient::LicenseApi->new();
my $body = WWW::SwaggerClient::Object::LicenseModel->new(); # LicenseModel | To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->createLicenses(body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling LicenseApi->createLicenses: $@\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.LicenseApi()
body =  # LicenseModel | To create a custom license the name, shortName and licenseText is required. 
Allowable values for familyName(Optional) are: 
 GNU LGPL 2.1 Style | Artistic License 1.0 Style | Proprietary Style | BSD 3-Clause Style |Apache 1.1 Style | CPL 1.0 Style | MIT Style | Public Domain Style | MPL 1.1 Style | MPL 1.0 Style | Academic Free License Style | Apache 2.0 Style | Sleepycat Style | EPL 1.0 Style | CDDL 1.0 Style | Commercial Style | GNU GPL 3 Style |GNU LGPL 2.0 Style | GNU LGPL 3.0 Style | GNU AGPL 3.0 Style | Ambiguous License Style | GNU GPL 2 Style | Artistic License 2.0 Style | BSD 2-Clause Style | GNU GPL 2 w/CPE Style | CDDL 1.1 Style | Apache 1.0 Style | BSD 4-Clause Style | GNU GPL 2+ Style | GNU GPL 3+ Style | GNU LGPL 2.1+ Style | GNU LGPL 3.0+ Style | GNU LGPL 2.0+ Style | MirOS Style | zlib Style | GNU GPL Style | GNU LGPL Style | GNU AGPL 3.0+ Style
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Create a custom license
    api_instance.create_licenses(body, authorization)
except ApiException as e:
    print("Exception when calling LicenseApi->createLicenses: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 500 - Internal Server Error


licenseLookup

License Lookup

Returns id, name, priority, url, description, text, shortName and spdxIdentifier for a given license ID.


/license/lookup

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//license/lookup?licenseId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LicenseApi;

import java.io.File;
import java.util.*;

public class LicenseApiExample {

    public static void main(String[] args) {
        
        LicenseApi apiInstance = new LicenseApi();
        Long licenseId = 789; // Long | ID of the license
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            LicenseRestFormat result = apiInstance.licenseLookup(licenseId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#licenseLookup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseApi;

public class LicenseApiExample {

    public static void main(String[] args) {
        LicenseApi apiInstance = new LicenseApi();
        Long licenseId = 789; // Long | ID of the license
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            LicenseRestFormat result = apiInstance.licenseLookup(licenseId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#licenseLookup");
            e.printStackTrace();
        }
    }
}
Long *licenseId = 789; // ID of the license
String *authorization = authorization_example; // Bearer JWT Token (default to )

LicenseApi *apiInstance = [[LicenseApi alloc] init];

// License Lookup
[apiInstance licenseLookupWith:licenseId
    authorization:authorization
              completionHandler: ^(LicenseRestFormat output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.LicenseApi()

var licenseId = 789; // {Long} ID of the license

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.licenseLookup(licenseId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class licenseLookupExample
    {
        public void main()
        {
            
            var apiInstance = new LicenseApi();
            var licenseId = 789;  // Long | ID of the license
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // License Lookup
                LicenseRestFormat result = apiInstance.licenseLookup(licenseId, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.licenseLookup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LicenseApi();
$licenseId = 789; // Long | ID of the license
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->licenseLookup($licenseId, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LicenseApi->licenseLookup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LicenseApi;

my $api_instance = WWW::SwaggerClient::LicenseApi->new();
my $licenseId = 789; # Long | ID of the license
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->licenseLookup(licenseId => $licenseId, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LicenseApi->licenseLookup: $@\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.LicenseApi()
licenseId = 789 # Long | ID of the license
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # License Lookup
    api_response = api_instance.license_lookup(licenseId, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LicenseApi->licenseLookup: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
licenseId*
Long (int64)
ID of the license
Required

Responses

Status: 200 - OK

Status: 400 - Bad request

Status: 500 - Internal Server Error


ProjectAPI

addChildProjects

Add child projects to parent project

Add child projects to parent project.


/projects/{projectId}/children

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//projects/{projectId}/children?childProjectIds="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | Id of Parent Project
        array[Integer] childProjectIds = ; // array[Integer] | Id of Child Projects
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.addChildProjects(projectId, childProjectIds, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#addChildProjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | Id of Parent Project
        array[Integer] childProjectIds = ; // array[Integer] | Id of Child Projects
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.addChildProjects(projectId, childProjectIds, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#addChildProjects");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // Id of Parent Project
array[Integer] *childProjectIds = ; // Id of Child Projects
String *authorization = authorization_example; // Bearer JWT Token (default to )

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Add child projects to parent project
[apiInstance addChildProjectsWith:projectId
    childProjectIds:childProjectIds
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} Id of Parent Project

var childProjectIds = ; // {array[Integer]} Id of Child Projects

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addChildProjects(projectId, childProjectIds, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addChildProjectsExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | Id of Parent Project
            var childProjectIds = new array[Integer](); // array[Integer] | Id of Child Projects
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Add child projects to parent project
                apiInstance.addChildProjects(projectId, childProjectIds, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.addChildProjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | Id of Parent Project
$childProjectIds = ; // array[Integer] | Id of Child Projects
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->addChildProjects($projectId, $childProjectIds, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->addChildProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | Id of Parent Project
my $childProjectIds = []; # array[Integer] | Id of Child Projects
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->addChildProjects(projectId => $projectId, childProjectIds => $childProjectIds, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->addChildProjects: $@\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.ProjectAPIApi()
projectId = 56 # Integer | Id of Parent Project
childProjectIds =  # array[Integer] | Id of Child Projects
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Add child projects to parent project
    api_instance.add_child_projects(projectId, childProjectIds, authorization)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->addChildProjects: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
Id of Parent Project
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
childProjectIds*
array[Integer] (int32)
Id of Child Projects
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


assignProjectRole

Assign Role

Assign a Users to a specific Project Role. Here "ownerId refers to the "contactId of the project.


/projects/{projectId}/users

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//projects/{projectId}/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        ProjectRoleModel body = ; // ProjectRoleModel | Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.assignProjectRole(projectId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#assignProjectRole");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        ProjectRoleModel body = ; // ProjectRoleModel | Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.assignProjectRole(projectId, body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#assignProjectRole");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
ProjectRoleModel *body = ; // Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
String *authorization = authorization_example; // Bearer JWT Token (default to )

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Assign Role
[apiInstance assignProjectRoleWith:projectId
    body:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var body = ; // {ProjectRoleModel} Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.assignProjectRole(projectId, body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class assignProjectRoleExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var body = new ProjectRoleModel(); // ProjectRoleModel | Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Assign Role
                apiInstance.assignProjectRole(projectId, body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.assignProjectRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$body = ; // ProjectRoleModel | Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->assignProjectRole($projectId, $body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->assignProjectRole: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $body = WWW::SwaggerClient::Object::ProjectRoleModel->new(); # ProjectRoleModel | Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->assignProjectRole(projectId => $projectId, body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->assignProjectRole: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
body =  # ProjectRoleModel | Add a Users to a specific Project Role. Accepted RoleId: PROJECT_ADMIN, ANALYST, REVIEWER, OBSERVER
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Assign Role
    api_instance.assign_project_role(projectId, body, authorization)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->assignProjectRole: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


createProject

Create Project

Creates a project for the given input and returns projectId with success message.


/projects

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//projects"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        ProjectModel body = ; // ProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createProject(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#createProject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        ProjectModel body = ; // ProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.createProject(body, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#createProject");
            e.printStackTrace();
        }
    }
}
ProjectModel *body = ; // To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
String *authorization = authorization_example; // Bearer JWT Token (default to )

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Create Project
[apiInstance createProjectWith:body
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var body = ; // {ProjectModel} To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createProject(body, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createProjectExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var body = new ProjectModel(); // ProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Create Project
                apiInstance.createProject(body, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.createProject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$body = ; // ProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->createProject($body, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->createProject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $body = WWW::SwaggerClient::Object::ProjectModel->new(); # ProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->createProject(body => $body, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->createProject: $@\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.ProjectAPIApi()
body =  # ProjectModel | To create a project the projectName field is required and other fields are optional. If the optional fields are left blank, the 'Project Default' values are applied for them.
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Create Project
    api_instance.create_project(body, authorization)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->createProject: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteProject

Delete a project

Deleting a project will delete all project inventory, corresponding notes and all code base files permanently from the server.


/projects/{projectId}

Usage and SDK Samples

curl -X DELETE "http://localhost/codeinsight/api//projects/{projectId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.deleteProject(projectId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#deleteProject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            apiInstance.deleteProject(projectId, authorization);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#deleteProject");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *authorization = authorization_example; // Bearer JWT Token (default to )

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Delete a project
[apiInstance deleteProjectWith:projectId
    authorization:authorization
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteProject(projectId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteProjectExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Delete a project
                apiInstance.deleteProject(projectId, authorization);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.deleteProject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $api_instance->deleteProject($projectId, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->deleteProject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    $api_instance->deleteProject(projectId => $projectId, authorization => $authorization);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->deleteProject: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Delete a project
    api_instance.delete_project(projectId, authorization)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->deleteProject: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


downloadReport

Download Report

Download Reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For ALL Reports we need to provide the id of the report. All project users including Observer, Reviewer and Analyst can download reports for private projects. If a task is in progress the response will be 202 and the status will be provided in the header for e.g(ACTIVE, SCHEDULED). Try it out is not available for this API. This API can be tested using conventional REST API clients such as postman or cURL. When calling this API from a REST client, you need to redirect output to a zip file as follows curl -X POST "http://HOST:PORT/codeinsight/api/projects/{projectId}/reports/{reportId}/download?taskId={taskId}" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" > report.zip


/projects/{projectId}/reports/{reportId}/download

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//projects/{projectId}/reports/{reportId}/download?taskId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        Integer reportId = 56; // Integer | ID of the Report that is to be generated or downloaded
        Integer taskId = 56; // Integer | ID of the Report Task that is to be downloaded
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            InputStream result = apiInstance.downloadReport(projectId, reportId, taskId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#downloadReport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        Integer reportId = 56; // Integer | ID of the Report that is to be generated or downloaded
        Integer taskId = 56; // Integer | ID of the Report Task that is to be downloaded
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            InputStream result = apiInstance.downloadReport(projectId, reportId, taskId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#downloadReport");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
Integer *reportId = 56; // ID of the Report that is to be generated or downloaded
Integer *taskId = 56; // ID of the Report Task that is to be downloaded
String *authorization = authorization_example; // Bearer JWT Token (default to )

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Download Report
[apiInstance downloadReportWith:projectId
    reportId:reportId
    taskId:taskId
    authorization:authorization
              completionHandler: ^(InputStream output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var reportId = 56; // {Integer} ID of the Report that is to be generated or downloaded

var taskId = 56; // {Integer} ID of the Report Task that is to be downloaded

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.downloadReport(projectId, reportId, taskId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class downloadReportExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var reportId = 56;  // Integer | ID of the Report that is to be generated or downloaded
            var taskId = 56;  // Integer | ID of the Report Task that is to be downloaded
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Download Report
                InputStream result = apiInstance.downloadReport(projectId, reportId, taskId, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.downloadReport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$reportId = 56; // Integer | ID of the Report that is to be generated or downloaded
$taskId = 56; // Integer | ID of the Report Task that is to be downloaded
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->downloadReport($projectId, $reportId, $taskId, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->downloadReport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $reportId = 56; # Integer | ID of the Report that is to be generated or downloaded
my $taskId = 56; # Integer | ID of the Report Task that is to be downloaded
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->downloadReport(projectId => $projectId, reportId => $reportId, taskId => $taskId, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->downloadReport: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
reportId = 56 # Integer | ID of the Report that is to be generated or downloaded
taskId = 56 # Integer | ID of the Report Task that is to be downloaded
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Download Report
    api_response = api_instance.download_report(projectId, reportId, taskId, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->downloadReport: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
reportId*
Integer (int32)
ID of the Report that is to be generated or downloaded
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
taskId*
Integer (int32)
ID of the Report Task that is to be downloaded
Required

Responses

Status: 200 - OK

Status: 202 - Accepted

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


exportProjectData

Export Project Data

Exports project data for a given projectId. Only Project Admin and Analyst can Export Project Data from a project. Try it out is not available for this API. This API can be tested using conventional REST API clients such as postman or cURL. When calling this API from a REST client, you need to redirect output to a zip file as follows curl -X GET "http://HOST:PORT/codeinsight/api/project/exportProjectData?projectId=PROJECT_ID" -H "accept: application/json" -H "Authorization: Bearer JWT_TOKEN" > export.zip


/project/exportProjectData

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//project/exportProjectData?projectId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            InputStream result = apiInstance.exportProjectData(projectId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#exportProjectData");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        try {
            InputStream result = apiInstance.exportProjectData(projectId, authorization);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#exportProjectData");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *authorization = authorization_example; // Bearer JWT Token (default to )

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Export Project Data
[apiInstance exportProjectDataWith:projectId
    authorization:authorization
              completionHandler: ^(InputStream output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var authorization = authorization_example; // {String} Bearer JWT Token


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.exportProjectData(projectId, authorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class exportProjectDataExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )

            try
            {
                // Export Project Data
                InputStream result = apiInstance.exportProjectData(projectId, authorization);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.exportProjectData: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$authorization = authorization_example; // String | Bearer JWT Token

try {
    $result = $api_instance->exportProjectData($projectId, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->exportProjectData: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $authorization = authorization_example; # String | Bearer JWT Token

eval { 
    my $result = $api_instance->exportProjectData(projectId => $projectId, authorization => $authorization);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->exportProjectData: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
authorization = authorization_example # String | Bearer JWT Token (default to )

try: 
    # Export Project Data
    api_response = api_instance.export_project_data(projectId, authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->exportProjectData: %s\n" % e)

Parameters

Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required

Responses

Status: 200 - OK

Status: 400 - Bad request: No project named x


generateReport

Generate Report

Generates Reports (PROJECT, AUDIT, NOTICES, CUSTOM_REPORT) for a given projectId. For ALL Reports we need to provide the id of the report. All project users including Observer, Reviewer and Analyst can generate reports for private projects.


/projects/{projectId}/reports/{reportId}/generate

Usage and SDK Samples

curl -X POST "http://localhost/codeinsight/api//projects/{projectId}/reports/{reportId}/generate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        Integer reportId = 56; // Integer | ID of the Report that is to be generated
        String authorization = authorization_example; // String | Bearer JWT Token
        ReportsModel body = ; // ReportsModel | The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required.
        try {
            apiInstance.generateReport(projectId, reportId, authorization, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#generateReport");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        Integer reportId = 56; // Integer | ID of the Report that is to be generated
        String authorization = authorization_example; // String | Bearer JWT Token
        ReportsModel body = ; // ReportsModel | The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required.
        try {
            apiInstance.generateReport(projectId, reportId, authorization, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#generateReport");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
Integer *reportId = 56; // ID of the Report that is to be generated
String *authorization = authorization_example; // Bearer JWT Token (default to )
ReportsModel *body = ; // The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required. (optional)

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Generate Report
[apiInstance generateReportWith:projectId
    reportId:reportId
    authorization:authorization
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var reportId = 56; // {Integer} ID of the Report that is to be generated

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'body':  // {ReportsModel} The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.generateReport(projectId, reportId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class generateReportExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var reportId = 56;  // Integer | ID of the Report that is to be generated
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var body = new ReportsModel(); // ReportsModel | The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required. (optional) 

            try
            {
                // Generate Report
                apiInstance.generateReport(projectId, reportId, authorization, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.generateReport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$reportId = 56; // Integer | ID of the Report that is to be generated
$authorization = authorization_example; // String | Bearer JWT Token
$body = ; // ReportsModel | The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required.

try {
    $api_instance->generateReport($projectId, $reportId, $authorization, $body);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->generateReport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $reportId = 56; # Integer | ID of the Report that is to be generated
my $authorization = authorization_example; # String | Bearer JWT Token
my $body = WWW::SwaggerClient::Object::ReportsModel->new(); # ReportsModel | The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required.

eval { 
    $api_instance->generateReport(projectId => $projectId, reportId => $reportId, authorization => $authorization, body => $body);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->generateReport: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
reportId = 56 # Integer | ID of the Report that is to be generated
authorization = authorization_example # String | Bearer JWT Token (default to )
body =  # ReportsModel | The success response of the generate is a taskId which should be used during download. If the report type is custom report and enableProjectPicker is true otherProjectId is required. (optional)

try: 
    # Generate Report
    api_instance.generate_report(projectId, reportId, authorization, body=body)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->generateReport: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
reportId*
Integer (int32)
ID of the Report that is to be generated
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Body parameters
Name Description
body

Responses

Status: 200 - OK

Status: 400 - Bad request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getAllChildProjects

get all child projects

Get all child projects. parentProject property will not be shown in the response.


/projects/{projectId}/childProjects

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//projects/{projectId}/childProjects?recursive="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean recursive = true; // Boolean | 
        try {
            LinkedProjectModel result = apiInstance.getAllChildProjects(projectId, authorization, recursive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#getAllChildProjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean recursive = true; // Boolean | 
        try {
            LinkedProjectModel result = apiInstance.getAllChildProjects(projectId, authorization, recursive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#getAllChildProjects");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *authorization = authorization_example; // Bearer JWT Token (default to )
Boolean *recursive = true; //  (optional) (default to false)

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// get all child projects
[apiInstance getAllChildProjectsWith:projectId
    authorization:authorization
    recursive:recursive
              completionHandler: ^(LinkedProjectModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'recursive': true // {Boolean} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllChildProjects(projectId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAllChildProjectsExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var recursive = true;  // Boolean |  (optional)  (default to false)

            try
            {
                // get all child projects
                LinkedProjectModel result = apiInstance.getAllChildProjects(projectId, authorization, recursive);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.getAllChildProjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$authorization = authorization_example; // String | Bearer JWT Token
$recursive = true; // Boolean | 

try {
    $result = $api_instance->getAllChildProjects($projectId, $authorization, $recursive);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->getAllChildProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $authorization = authorization_example; # String | Bearer JWT Token
my $recursive = true; # Boolean | 

eval { 
    my $result = $api_instance->getAllChildProjects(projectId => $projectId, authorization => $authorization, recursive => $recursive);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->getAllChildProjects: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
authorization = authorization_example # String | Bearer JWT Token (default to )
recursive = true # Boolean |  (optional) (default to false)

try: 
    # get all child projects
    api_response = api_instance.get_all_child_projects(projectId, authorization, recursive=recursive)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->getAllChildProjects: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
recursive
Boolean

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 500 - Internal Server Error


getAllParentProjects

get all parent projects

Get all parent projects. childProject property will not be shown in the response.


/projects/{projectId}/parentProjects

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//projects/{projectId}/parentProjects?recursive="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean recursive = true; // Boolean | 
        try {
            LinkedProjectModel result = apiInstance.getAllParentProjects(projectId, authorization, recursive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#getAllParentProjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean recursive = true; // Boolean | 
        try {
            LinkedProjectModel result = apiInstance.getAllParentProjects(projectId, authorization, recursive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#getAllParentProjects");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *authorization = authorization_example; // Bearer JWT Token (default to )
Boolean *recursive = true; //  (optional) (default to false)

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// get all parent projects
[apiInstance getAllParentProjectsWith:projectId
    authorization:authorization
    recursive:recursive
              completionHandler: ^(LinkedProjectModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'recursive': true // {Boolean} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllParentProjects(projectId, authorization, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAllParentProjectsExample
    {
        public void main()
        {
            
            var apiInstance = new ProjectAPIApi();
            var projectId = 56;  // Integer | ID of the Project
            var authorization = authorization_example;  // String | Bearer JWT Token (default to )
            var recursive = true;  // Boolean |  (optional)  (default to false)

            try
            {
                // get all parent projects
                LinkedProjectModel result = apiInstance.getAllParentProjects(projectId, authorization, recursive);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProjectAPIApi.getAllParentProjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ProjectAPIApi();
$projectId = 56; // Integer | ID of the Project
$authorization = authorization_example; // String | Bearer JWT Token
$recursive = true; // Boolean | 

try {
    $result = $api_instance->getAllParentProjects($projectId, $authorization, $recursive);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectAPIApi->getAllParentProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectAPIApi;

my $api_instance = WWW::SwaggerClient::ProjectAPIApi->new();
my $projectId = 56; # Integer | ID of the Project
my $authorization = authorization_example; # String | Bearer JWT Token
my $recursive = true; # Boolean | 

eval { 
    my $result = $api_instance->getAllParentProjects(projectId => $projectId, authorization => $authorization, recursive => $recursive);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProjectAPIApi->getAllParentProjects: $@\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.ProjectAPIApi()
projectId = 56 # Integer | ID of the Project
authorization = authorization_example # String | Bearer JWT Token (default to )
recursive = true # Boolean |  (optional) (default to false)

try: 
    # get all parent projects
    api_response = api_instance.get_all_parent_projects(projectId, authorization, recursive=recursive)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProjectAPIApi->getAllParentProjects: %s\n" % e)

Parameters

Path parameters
Name Description
projectId*
Integer (int32)
ID of the Project
Required
Header parameters
Name Description
Authorization*
String
Bearer JWT Token
Required
Query parameters
Name Description
recursive
Boolean

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 500 - Internal Server Error


getAllScannedFiles

Fetch all scanned files for a project


/projects/{projectId}/allscannedfiles

Usage and SDK Samples

curl -X GET "http://localhost/codeinsight/api//projects/{projectId}/allscannedfiles?includeMD5Hash=&offset=&limit="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectAPIApi;

import java.io.File;
import java.util.*;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean includeMD5Hash = true; // Boolean | if true, display MD5 of the files
        Integer offset = 56; // Integer | Index of the page to start with
        Integer limit = 56; // Integer | Number Of Records to fetch
        try {
            apiInstance.getAllScannedFiles(projectId, authorization, includeMD5Hash, offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#getAllScannedFiles");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProjectAPIApi;

public class ProjectAPIApiExample {

    public static void main(String[] args) {
        ProjectAPIApi apiInstance = new ProjectAPIApi();
        Integer projectId = 56; // Integer | ID of the Project
        String authorization = authorization_example; // String | Bearer JWT Token
        Boolean includeMD5Hash = true; // Boolean | if true, display MD5 of the files
        Integer offset = 56; // Integer | Index of the page to start with
        Integer limit = 56; // Integer | Number Of Records to fetch
        try {
            apiInstance.getAllScannedFiles(projectId, authorization, includeMD5Hash, offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProjectAPIApi#getAllScannedFiles");
            e.printStackTrace();
        }
    }
}
Integer *projectId = 56; // ID of the Project
String *authorization = authorization_example; // Bearer JWT Token (default to )
Boolean *includeMD5Hash = true; // if true, display MD5 of the files (optional) (default to false)
Integer *offset = 56; // Index of the page to start with (optional) (default to 1)
Integer *limit = 56; // Number Of Records to fetch (optional) (default to 25)

ProjectAPIApi *apiInstance = [[ProjectAPIApi alloc] init];

// Fetch all scanned files for a project
[apiInstance getAllScannedFilesWith:projectId
    authorization:authorization
    includeMD5Hash:includeMD5Hash
    offset:offset
    limit:limit
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CodeInsightRestApiDocumentation = require('code_insight_rest_api_documentation');

var api = new CodeInsightRestApiDocumentation.ProjectAPIApi()

var projectId = 56; // {Integer} ID of the Project

var authorization = authorization_example; // {String} Bearer JWT Token

var opts = { 
  'includeMD5Hash': true, // {Boolean} if true, display MD5 of the files
  'offset': 56, // {Integer} Index of the page to start with
  'limit': 56 // {Integer} Number Of Records to fetch
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getAllScannedFiles(projectId, authorization, opts, callback);