Internal API for fetching custom email templates and images from core server
Code Insight REST API Documentation (v1)
The Code Insight REST APIs provide a standardized interface for interacting with the application.
An authorization JWT token must be included in the HTTP Authorization header using the Bearer schema. The token can be obtained from the Code Insight Web UI under the Preferences menu. To set the token, click the Authorize button below on the right, enter the JWT token in the Value field, then click Authorize and close the dialog. Once authorized, the token will be automatically included in the HTTP Authorization header for all API requests made through the Swagger UI.
Note: If accessing the REST APIs through external tools such as curl or Postman, include the token manually in the HTTP header using the following format: Authorization: Bearer JWT_TOKEN. "Bearer" must precede the actual JWT token value.
Request
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
Search Type. default is NAME.
Search Filter. This is required for searchBy NAME, default is ALL_TERMS.
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.
Forge Name. is required for searchBy FORGE and optional for NAME/URL/CPE
Required param for forges: SourceForge|Apache|MySQL AB|Java.net|GNU|Free Software Directory|CodePlex|Savannah|Google Code|GitLab (Example: apache-batik)
Required param for forges: Hackage|NuGet Gallery|npm|PyPI|Packagist|CentOS Project (Example: newtonsoft.json)
Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (Example: com.google.firebase)
Required param for forges: Google's Maven Repository|Clojars|Ibiblio Maven2 (Example: firebase-abt)
Required param for forge: GitHub | GitLab (It accepts Author/Org value (Example: jquery)
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/search
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/components/search?searchBy=NAME&filter=ALL_TERMS&searchTerm=string&includeVersions=false&vendor=string&product=string&forgeName=SourceForge&projectName=string&packageName=string&groupId=string&artifactId=string&moduleOrDistributionName=string&packageOrDistributionName=string&author=string&repositoryName=string&vendorName=string&gemName=string&crate=string&limit=100&offset=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "id": 0, "name": "string", "description": "string", "title": "string", "url": "string", "forge": "string", "versionList": [ { … } ], "licenseList": [ { … } ], "cpeList": [ { … } ] }
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/{componentId}/versions
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/{componentId}/versions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://codeinsightapi.redocly.app/_mock/swagger/components/1/versions \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"vulnerabilitySummary": [
{
"property1": {
"property1": 0,
"property2": 0
},
"property2": {
"property1": 0,
"property2": 0
}
}
]
}'To create a custom component the name, title and url field is required.
Only users with the “library_manager” permission can create a custom component.
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
url
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://codeinsightapi.redocly.app/_mock/swagger/components \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Comp1",
"title": "Component1",
"url": "http://abc@xyz.com | NA",
"description": "This is a custom component.",
"encryption": "E.g. YES | default: NO",
"forgeId": 1,
"purl": "pkg:maven/org.apache/commons-lang3"
}'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/{componentId}/versions/{id}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/{componentId}/versions/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://codeinsightapi.redocly.app/_mock/swagger/components/1/versions/1 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/{id}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://codeinsightapi.redocly.app/_mock/swagger/components/1 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/{componentId}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/{componentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/components/1?includeVersions=true&vulnerabilitySummary=false&cvssVersion=V2' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "name": "Comp1", "title": "Component1", "url": "http://abc@xyz.com | NA", "description": "This is a custom component.", "encryption": "E.g. YES | default: NO", "forgeId": 1, "purl": "pkg:maven/org.apache/commons-lang3", "id": 0, "forge": "string", "versionList": [ { … } ], "licenseList": [ { … } ], "componentCPEList": [ { … } ], "createdBy": "string", "createdOn": "string", "updatedBy": "string", "updatedOn": "string" }
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/versions/{id}
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/versions/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://codeinsightapi.redocly.app/_mock/swagger/components/versions/1 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/components/{versionId}/vulnerabilities
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/components/{versionId}/vulnerabilities
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/components/1/vulnerabilities?limit=25&offset=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/component/lookup
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/component/lookup
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/component/lookup?keyword=string&size=100&page=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'