# SPDX-FileCopyrightText: © 2017-2023 Siemens AG # SPDX-FileCopyrightText: © 2021 Orange by Piotr Pszczola # SPDX-License-Identifier: GPL-2.0-only openapi: 3.1.0 info: title: FOSSology API description: Automate your fossology instance using REST API version: 1.6.2 contact: email: fossology@fossology.org license: name: GPL-2.0-only url: https://github.com/fossology/fossology/blob/master/LICENSE servers: - url: http://localhost/repo/api/v1 description: Localhost instance - url: http://localhost/repo/api/v2 description: Localhost instance (Version 2) security: - bearerAuth: [] - oauth: [] externalDocs: description: Basic guide url: https://github.com/fossology/fossology/wiki/FOSSology-REST-API tags: - name: auth description: Authentication endpoints - name: info description: Basic info about API - name: Upload description: Endpoints related to uploads - name: Copyrights description: Copyright information - name: Organize description: Endpoints for organization of data - name: Search description: Searching data on FOSSology - name: User description: User management - name: Admin description: Administrator tasks - name: Job description: FOSSology jobs - name: Folders description: Folder management - name: Groups description: User group management - name: Report description: Upload's report - name: License description: License and obligation management - name: Maintenance description: Maintenance operations - name: Overview description: Overview of FOSSology operations x-reuse: - &cxGetParams - name: id required: true description: Upload Id in: path schema: type: integer - name: itemId required: true description: UploadTree ID (available via /uploads/{id}/topitem & /uploads/{id}/item/{itemId}/tree/view) in: path schema: type: integer - name: status required: true in: query description: Status of the CX schema: type: string enum: - active - inactive - name: limit description: Limits of responses per request required: false in: header schema: type: integer default: 100 minimum: 1 maximum: 1000 - name: page description: Page number for responses required: false in: header schema: type: integer default: 1 minimum: 1 - &cxUpdateParams - name: id required: true description: Upload ID in: path schema: type: integer - name: itemId required: true description: Upload tree ID in: path schema: type: integer - name: hash required: true description: CX hash in: path schema: type: string - &cxGetResponses '200': description: OK headers: X-Total-Pages: description: Total number of pages which can be generated based on limit schema: type: integer content: application/json: schema: type: array items: $ref: '#/components/schemas/GetFileCopyrights' '400': description: "Bad Request. 'upload' is a required query param" content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' - &cxUpdateResponses '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' - &cxUpdateBody description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' paths: /tokens: post: operationId: createToken tags: - auth security: [] summary: Generate a new token description: > Generate a new token to access REST API requestBody: description: Required details for generating new token required: true content: application/x-www-form-urlencoded: schema: allOf: - $ref: '#/components/schemas/TokenRequest' - type: object properties: username: type: string description: Username of the login user. password: type: string format: password description: Password of the user trying to login. required: - username - password responses: '201': description: Token generated content: application/json: schema: type: object properties: header: type: string example: {"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsb2NhbGhvc3QiLCJhdWQiOiJsb2NhbGhvc3QiLCJleHAiOjE1NTEyOTIyMDAsIm5iZiI6MTU1MTIwNTgwMCwianRpIjoiTmk0eiIsInNjb3BlIjoicmVhZCJ9.71D6xTD2QE45t9AVCwbrQwSSae5lC4yzKCMpZWXoC2Q"} '404': description: UserName or password incorrect content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /info: get: operationId: getInfo tags: - info security: [] summary: Get the current API information description: > Get the current API version, supported authentication methods and description responses: '200': description: The API information content: application/json: schema: $ref: '#/components/schemas/ApiInfo' default: $ref: '#/components/responses/defaultResponse' /openapi: get: operationId: getOpenApi tags: - info security: [] summary: Get the current openapi.yaml file description: > Get the current API documentation as a response with content negotiation. responses: '200': description: The API documentation content: application/vnd.oai.openapi: schema: $ref: '#/components/schemas/APIinfo' application/yaml: schema: $ref: '#/components/schemas/APIinfo' application/vnd.oai.openapi+json: schema: $ref: '#/components/schemas/APIinfo' application/json: schema: $ref: '#/components/schemas/APIinfo' default: $ref: '#/components/responses/defaultResponse' /maintenance: post: operationId: initiateMaintenance tags: - Maintenance summary: Initiate maintenance operations description: > Perform maintenance operations corresponding to the user options. requestBody: description: Maintenance options required: true content: application/json: schema: $ref: '#/components/schemas/CreateMaintenance' responses: '201': description: Maintenance Initiated Successfully. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Key Not Found Error. content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Validation Error. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal Server Error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /health: get: operationId: getHealth tags: - info security: [] summary: Get the status of API service description: > Check if API is ready to accept requests or not responses: '200': description: The API information content: application/json: schema: $ref: '#/components/schemas/HealthInfo' '503': description: The API is not unavailable content: application/json: schema: $ref: '#/components/schemas/HealthInfo' default: $ref: '#/components/responses/defaultResponse' /obligations/list: get: operationId: getObligationsList tags: - Admin summary: Get the list of obligations description: > Get the list of obligations in the server. responses: '200': description: The API information content: application/json: schema: $ref: '#/components/schemas/ObligationsList' default: $ref: '#/components/responses/defaultResponse' /obligations/{id}: parameters: - name: id required: true description: Id of the obligation in: path schema: type: integer get: operationId: getObligationsData tags: - Admin summary: Get details of a particular obligation description: > Get the details of a particular obligation from the server. responses: '200': description: The API information content: application/json: schema: $ref: '#/components/schemas/ObligationExtended' default: $ref: '#/components/responses/defaultResponse' delete: operationId: deleteObligationsData tags: - Admin summary: Delete a particular obligation description: > Delete a particular obligation from the server. responses: '200': description: Obligation deleted. content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /obligations/import-csv: post: operationId: importObligationCsv tags: - License summary: Import an obligation csv file description: > Import an obligation csv file requestBody: description: Information about delimiters, inclosure and csv file. required: true content: multipart/form-data: schema: type: object properties: enclosure: type: string description: Enclosure for string in CSV default: '"' delimiter: type: string description: Delimiters for fields in CSV default: ',' file_input: type: string format: binary description: CSV to be imported required: - file_input responses: '400': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/Info' '200': description: Successfully imported content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /obligations/export-csv: get: operationId: exportLicenseObligations parameters: - name: id description: Obligation id to export, 0 for all in: query required: false schema: type: integer tags: - License summary: Export a csv obligation list description: > Export a csv license obligation list responses: '200': description: Successfully exported content: text/plain: schema: type: string format: binary '403': description: Route is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /obligations/import-json: post: operationId: importObligationsFromJSON tags: - License summary: Import an obligation json file description: > Import an obligation json file requestBody: description: Include the JSON file required: true content: multipart/form-data: schema: type: object properties: fileInput: type: string format: binary description: JSON to be imported required: - fileInput responses: '400': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/Info' '200': description: Successfully imported content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /obligations/export-json: get: operationId: exportObligationsToJSON parameters: - name: id description: Obligation id to export, 0 for all in: query required: false schema: type: integer tags: - License summary: Export a json obligation list description: > Export a json license obligation list responses: '200': description: Successfully exported content: text/json: schema: type: string format: binary '403': description: Route is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /obligations: get: operationId: getAllObligationsData tags: - Admin summary: Get details of a all obligations description: > Get the details of all obligations from the server. responses: '200': description: The API information content: application/json: schema: type: array items: $ref: '#/components/schemas/ObligationExtended' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: groupName description: The group name to chose while accessing the package in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getUploadById tags: - Upload summary: Get single upload by id description: Returns a single upload responses: '200': description: Get upload content: application/json: schema: $ref: '#/components/schemas/Upload' '503': description: > The ununpack agent has not started yet. Please check the 'Look-at' header for more information headers: 'Look-at': description: Contains the URL to get jobs for the given upload schema: type: string content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' delete: operationId: deleteUploadById tags: - Upload - Organize summary: Delete upload by id description: > Delete a single upload by id responses: '202': description: Upload will be deleted content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' patch: operationId: updateUploadById tags: - Upload - Organize description: Update an upload information parameters: - name: status description: New status of the upload in: query required: false schema: type: string enum: - Open - InProgress - Closed - Rejected example: Closed - name: assignee description: New assignee for the project in: query required: false schema: type: integer requestBody: description: > Comment on the status, required for Closed and Rejected states. Ignored for others. content: text/plain: schema: description: The comment for new status type: string example: "The upload cleared for use." responses: '202': description: Upload will be updated content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' put: operationId: moveUploadById tags: - Upload - Organize description: Copy or move an upload by id parameters: - name: folderId description: Folder Id, where upload should be copied to in: header required: true schema: type: integer - name: action in: header required: true description: Action to be performed schema: type: string enum: - copy - move summary: Copy/Move an upload responses: '202': description: Upload will be copied/moved content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads: parameters: - name: groupName description: The group name to chose while accessing the package in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getUploads tags: - Upload summary: Uploads parameters: - name: folderId description: Folder ID to limit the uploads to in: query required: false schema: type: integer - name: recursive description: Load uploads from child folders as well in: query required: false schema: type: boolean default: true - name: name description: Filter pattern for name and description in: query required: false schema: type: string - name: status description: Status of uploads in: query required: false schema: type: string enum: - Open - InProgress - Closed - Rejected - name: assignee description: > User name to which uploads are assigned to or -me- or -unassigned- in: query required: false schema: type: string - name: since description: Uploads since given date in YYYY-MM-DD format in: query required: false schema: type: string pattern: \d{4}\-\d{2}\-\d{2} - name: page description: Page number to fetch in: header required: false schema: type: integer default: 1 - name: limit description: Limits of responses per request in: header required: false schema: type: integer minimum: 1 default: 100 description: > The uploads endpoint returns all uploads responses: '200': description: An array of uploads headers: X-Total-Pages: description: Total number of pages which can be fetched schema: type: integer content: application/json: schema: type: array items: $ref: '#/components/schemas/Upload' default: $ref: '#/components/responses/defaultResponse' post: operationId: createUpload tags: - Upload summary: Post new upload to FOSSology description: > Endpoint to create a new upload in FOSSology requestBody: required: true content: application/json: schema: type: object properties: location: oneOf: - $ref: '#/components/schemas/VcsUpload' - $ref: '#/components/schemas/UrlUpload' - $ref: '#/components/schemas/ServerUpload' scanOptions: $ref: '#/components/schemas/ScanOptions' mainLicense: type: string description: Main license shortname for the upload. example: MIT multipart/form-data: schema: type: object properties: fileInput: type: string format: binary scanOptions: $ref: '#/components/schemas/ScanOptions' mainLicense: type: string description: Main license shortname for the upload. example: MIT required: - fileInput parameters: - name: folderId description: Folder Id, where upload should be created in: header required: true schema: type: integer - name: uploadDescription description: Visible description of the file in: header required: false schema: type: string - name: public description: The access level to the upload in: header required: false schema: type: string enum: - private - protected - public default: protected - name: applyGlobal description: > Apply global decisions for current upload in: header required: false schema: type: boolean default: false - name: ignoreScm description: > Ignore SCM files (Git, SVN, TFS) and files with particular Mimetype in: header required: false schema: type: boolean default: false - name: uploadType description: Type of upload done. Choose `file` if uploading a file. in: header required: true schema: type: string enum: - file - vcs - url - server default: vcs responses: '201': description: Upload is created content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/download: parameters: - name: id in: path required: true description: Download file using Upload ID schema: type: integer get: operationId: getUploadFileById tags: - Upload summary: Download the file description: > Get a file by upload id responses: '200': description: Required report content: text/plain: schema: type: string format: binary '403': description: Upload is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/summary: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: groupName description: The group name to chose while accessing the package in: header required: false schema: type: string description: Group name, from last login if not provided - name: agentId required: false description: Id of the agent in: query schema: type: integer get: operationId: getSummaryByUploadId tags: - Upload summary: Get single upload summary description: Returns summary for single upload responses: '200': description: Get summary content: application/json: schema: $ref: '#/components/schemas/UploadSummary' '503': description: > The ununpack agent has not started yet. Please check the 'Look-at' header for more information headers: 'Look-at': description: Contains the URL to get jobs for the given upload schema: type: string content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/info: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId description: Upload tree Id of the file in: path required: true schema: type: integer get: operationId: getItemInfo tags: - Upload summary: Get single file info description: Returns info for single file responses: '200': description: Get info content: application/json: schema: $ref: '#/components/schemas/Fileinfo' '404': description: > Item does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: agent required: true description: Name of the agent in: query schema: type: array items: type: string enum: - nomos - monk - ninka - ojo - reportImport - reso - scancode uniqueItems: true style: form explode: false - name: containers required: false description: Show directories and containers in: query schema: type: boolean default: true - name: license required: false description: Show license in response in: query schema: type: boolean default: true - name: copyright required: false description: Show copyrights in response in: query schema: type: boolean default: false - name: page description: Page number (starts from 1) required: false in: header schema: type: integer default: 1 minimum: 1 - name: limit description: Limits of responses per request required: false in: header schema: type: integer default: 50 minimum: 1 maximum: 1000 - name: groupName description: The group name to chose while accessing the package in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getLicensesByUploadId tags: - Upload summary: Get licenses found by agent description: Returns the list of licenses found by requested agent responses: '200': description: Get licenses headers: X-Total-Pages: description: Total number of pages which can be generated based on limit schema: type: integer content: application/json: schema: $ref: '#/components/schemas/UploadLicenses' '400': description: Bad Request content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '503': description: > The ununpack agent or queried agents have not started yet. Please check the 'Look-at' header for more information. headers: 'Look-at': description: Contains the URL to get jobs for the given upload schema: type: string content: application/json: schema: $ref: '#/components/schemas/Info' '412': description: > The agent has not been scheduled for the upload. Please check the response message. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/copyrights: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getCopyrightsByUploadId tags: - Upload summary: Get copyrights found on the upload description: Returns the list of copyrights found on the requested upload. responses: '200': description: Get copyrights content: application/json: schema: $ref: '#/components/schemas/UploadCopyrights' '503': description: > The ununpack agent or copyright agents have not started yet. Please check the 'Look-at' header for more information. headers: 'Look-at': description: Contains the URL to get jobs for the given upload schema: type: string content: application/json: schema: $ref: '#/components/schemas/Info' '412': description: > The agent has not been scheduled for the upload. Please check the response message. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/permissions: parameters: - name: id required: true description: Enter any upload id in: path schema: type: integer put: operationId: setUploadPermissions tags: - Upload summary: Set permissions for a upload in a folder for different groups description: > Set permissions for a upload in a folder for different groups requestBody: content: application/json: schema: type: object properties: folderId: type: integer description: Enter a folder id allUploadsPermission: type: boolean enum: - true - false description: Apply same permissions to all uploads in this folder groupId: type: integer description: Enter the id of the group you want to add or edit permission for this upload newPermission: type: string enum: - none - read_only - read_write - clearing_admin - admin description: Select the permission for selected group publicPermission: type: string enum: - none - read_only - read_write - clearing_admin - admin description: Select the public permission for this upload required: - allUploadsPermission responses: '202': description: Permissions updated successfully content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '400': description: Bad Request content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '404': description: Upload does not exist content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '503': description: Scheduler is not running content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/perm-groups: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getGroupsWithPermissions tags: - Upload summary: Get all the groups with their respective permissions for a upload description: Returns the list of all the groups with their respective permissions for a upload responses: '200': description: Get Groups with permissions content: application/json: schema: $ref: '#/components/schemas/UploadPermGroups' '404': description: Upload does not exist content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/highlight: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the item in: path schema: type: integer - name: clearingId required: false description: Id of the clearing event in: query schema: type: integer - name: licenseId required: false description: Id of the license in: query schema: type: integer - name: highlightId required: false description: Id of the highlight in: query schema: type: integer - name: agentId required: false description: Id of the agent in: query schema: type: integer get: operationId: getHighlightEntries tags: - Upload summary: Get highlight entries of the content. description: > Get highlight entries of the content for the given upload and item id. responses: '200': description: List of the data about highlight entries content: application/json: schema: type: array items: $ref: '#/components/schemas/HighlightInfo' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/view: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the item in: path schema: type: integer get: operationId: viewTheContentOfTheFile tags: - Upload - License summary: Get the contents of the file description: Returns the contents of a specific file responses: '200': description: Get contents content: text/plain: schema: type: string '404': description: Upload or Item does not exist content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '500': description: Internal Server Error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/clearing-decision: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer put: operationId: setClearingDecision tags: - Upload summary: Set the clearing decision for a particular upload tree item. description: > Set the clearing decision for a particular upload tree item. requestBody: description: ClearingDecision payload required: true content: application/json: schema: $ref: '#/components/schemas/ClearingDecision' responses: '200': description: Clearing decision set successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Invalid clearingDecision type or invalid set globalDecision value content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/bulk-scan: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer post: operationId: scheduleBulkScan tags: - Upload summary: Schedule the bulk scan for the item description: > Schedule the bulk scan for the item requestBody: description: ClearingInfo payload required: true content: application/json: schema: $ref: '#/components/schemas/ScheduleBulkScan' responses: '200': description: Bulk scan scheduled successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/bulk-history: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer get: operationId: getBulkHistory tags: - Upload summary: Get the bulk history description: > Get the bulk history for a specific upload item responses: '200': description: List of the data about the bulk history content: application/json: schema: type: array items: $ref: '#/components/schemas/GetBulkHistory' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/licenses: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer get: operationId: getLicenseDecisions tags: - Upload summary: Get the license decisions list description: > Get the license decisions list for the given upload and item id responses: '200': description: List of the license decisions for the upload-tree id content: application/json: schema: type: array items: $ref: '#/components/schemas/LicenseDecision' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' put: operationId: addEditDeleteLicenseDecision tags: - Upload summary: Add, update or delete a license decision. description: > Add, update or delete a license decision for a particular upload tree item. requestBody: description: Add, update or delete required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/AddEditDeleteLicenseDecision' responses: '200': description: Request processed successfully content: application/json: schema: type: object properties: success: type: array description: List of the items' responses whose requests processed successfully. items: $ref: '#/components/schemas/Info' errors: type: array description: List of the errors found. items: $ref: '#/components/schemas/Info' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses/main: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getMainLicenses tags: - Upload summary: Get main licenses on the upload description: > Get main licenses assigned on a particular upload responses: '200': description: All main licenses from an upload content: application/json: schema: type: array items: $ref: '#/components/schemas/License' '404': description: Upload not found. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' post: operationId: setMainLicense tags: - Upload summary: Set the main license for the upload description: > Set the main license for a particular upload. requestBody: description: MainLicense payload required: true content: application/json: schema: $ref: '#/components/schemas/SetMainLicense' responses: '200': description: Main license set successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Short name missing from request. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses/{shortName}/main: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: shortName required: true description: shortName of the main license to be deleted in: path schema: type: string delete: operationId: deleteMainLicense tags: - Upload summary: Delete a main license from an upload description: > Delete a main license from an upload. responses: '200': description: License is removed successfully. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/prev-next: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer - name: selection required: false schema: type: string enum: - withLicenses - noClearing in: query description: Return jobs for the given upload id only get: operationId: getPreviousAndNextItem tags: - Upload summary: Get previous and next item for an upload description: > Get the index of the previous and the next time for an upload responses: '200': description: List of the data about clearing history content: application/json: schema: $ref: '#/components/schemas/GetPrevNextItem' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/clearing-history: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer get: operationId: getClearingHistory tags: - Upload summary: Get the clearing history description: > Get the clearing history for a specific upload item responses: '200': description: List of the data about clearing history content: application/json: schema: $ref: '#/components/schemas/GetClearingHistory' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/clearing-progress: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getClearingProgressInfo tags: - Upload summary: Get the clearing progress info description: > Get the clearing progress information for an upload responses: '200': description: Get clearing progress info content: application/json: schema: $ref: '#/components/schemas/ClearingProgressInfo' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses/histogram: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: agentId required: false description: Id of the agent in: query schema: type: integer get: operationId: getLicensesHistogram tags: - Upload summary: Get the licenses histogram description: > Get the licenses histogram for a specific upload responses: '200': description: Get the licenses histogram for the upload content: application/json: schema: type: array items: $ref: '#/components/schemas/LicenseHistogram' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/agents: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getAgentsByUploadId tags: - Upload summary: Get agents for a upload description: > Returns the list of agents for a upload. responses: '200': description: Get agents content: application/json: schema: type: array items: $ref: '#/components/schemas/AgentOfUpload' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses/edited: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getAllEditedLicenses tags: - Upload summary: Get the edited licenses list description: > Get the edited licenses list for a specific upload responses: '200': description: List of the edited licenses in the upload content: application/json: schema: type: array items: $ref: '#/components/schemas/EditedLicense' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses/scanned: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: agentId required: false description: Id of the agent in: query schema: type: integer get: operationId: getAllScannedLicenses tags: - Upload summary: Get the scanned licenses list description: > Get the scanned licenses list for a specific upload responses: '200': description: List of the scanned licenses in the upload content: application/json: schema: type: array items: $ref: '#/components/schemas/ScannedLicense' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/tree/view: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer - name: itemId required: true description: Id of the itemId in: path schema: type: integer - name: agentId required: false description: Id of the agent in: query schema: type: integer - name: tagId required: false description: Id of the tag in: query schema: type: integer - name: scanLicenseFilter required: false description: ShortName of the selected scan license filter in: query schema: type: integer - name: editedLicenseFilter required: false description: ShortName of the selected edited license filter in: query schema: type: integer - name: flatten required: false description: Flatten the tree in: query schema: type: boolean - name: sort required: false description: Sort the tree in: query schema: type: string enum: - asc - desc - name: search required: false description: Filter the list according to the search string in: query schema: type: string - name: showQuick required: false description: Show all the items of the current container in: query schema: type: boolean - name: filterOpen required: false description: openCBox Filter is checked in: query schema: type: boolean - name: page description: Page number (starts from 1) required: false in: header schema: type: integer default: 1 minimum: 1 - name: limit description: Limits of responses per request required: false in: header schema: type: integer default: 50 minimum: 1 get: operationId: getItemTreeView tags: - Upload summary: Get the tree view for the given upload and item id description: > Get the tree view for the given upload and item id responses: '200': description: Tree view for the given upload and item id content: application/json: schema: type: array items: $ref: '#/components/schemas/TreeViewModel' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/topitem: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getTopItemId tags: - Upload summary: Get the top level item id for a given upload description: > Get the item id for the top level item in a given upload. responses: '200': description: Top item id content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/licenses/reuse: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getLicensesReuseSummary tags: - Upload summary: Get the overall licenses reuse summary description: > Get the overall licenses reuse summary for an upload responses: '200': description: Get licenses reuse summary content: application/json: schema: $ref: '#/components/schemas/GetReuseReportSummary' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/agents/revision: parameters: - name: id required: true description: Id of the upload in: path schema: type: integer get: operationId: getRevisionsForAgents tags: - Upload summary: Get revisions for successful agents description: > Returns the list of revisions for the successful agents for the upload responses: '200': description: Get successful agents with revisions content: application/json: schema: type: array items: $ref: '#/components/schemas/AgentsRevision' '404': description: Resource Not Found content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/oneshot/nomos: post: operationId: runOneShotNomos tags: - Upload summary: Run one-shot nomos analysis description: > Run one-shot nomos analysis on the upload without storing the results. requestBody: required: true content: multipart/form-data: schema: type: object properties: fileInput: type: string format: binary required: - fileInput responses: '200': description: Scanner result content: application/json: schema: $ref: '#/components/schemas/OneShotInfo' default: $ref: '#/components/responses/defaultResponse' /uploads/oneshot/monk: post: operationId: runOneShotMonk tags: - Upload summary: Run one-shot monk analysis description: > Run one-shot monk analysis on the upload without storing the results. requestBody: required: true content: multipart/form-data: schema: type: object properties: fileInput: type: string format: binary required: - fileInput responses: '200': description: Scanner result content: application/json: schema: $ref: '#/components/schemas/OneShotInfo' default: $ref: '#/components/responses/defaultResponse' /uploads/oneshot/ceu: post: operationId: runOneShotCEU tags: - Upload summary: Run one-shot Copyright/Email/URL analysis description: > Run one-shot Copyright/Email/URL analysis on the upload without storing the results. requestBody: required: true content: multipart/form-data: schema: type: object properties: fileInput: type: string format: binary required: - fileInput responses: '200': description: Scanner result content: application/json: schema: $ref: '#/components/schemas/OneShotInfo' default: $ref: '#/components/responses/defaultResponse' /search: get: operationId: searchFile tags: - Search description: Search the FOSSology for a specific file parameters: - name: groupName description: The group name to chose while performing search in: header required: false schema: type: string description: Group name, from last login if not provided - name: searchType # use 'allfiles', if not given required: false description: Limit search to in: header schema: type: string enum: - directory - containers - allfiles default: allfiles - name: uploadId in: header required: false description: Id of the upload to search files into schema: type: integer - name: filename description: Filename to find, can contain % as wild-card required: false in: header schema: type: string - name: tag description: Tag to find required: false in: header schema: type: string - name: page description: Page number (starts from 1) required: false in: header schema: type: integer default: 1 minimum: 1 - name: limit description: Limits of responses per request required: false in: header schema: type: integer default: 50 minimum: 1 maximum: 100 - name: filesizemin description: Min filesize in bytes required: false in: header schema: type: integer minimum: 0 - name: filesizemax description: Max filesize in bytes required: false in: header schema: type: integer minimum: 0 - name: license description: License search filter required: false in: header schema: type: string - name: copyright description: Copyright search filter required: false in: header schema: type: string responses: '200': description: OK headers: X-Total-Pages: description: Total number of pages which can be generated based on limit schema: type: integer content: application/json: schema: type: array items: $ref: '#/components/schemas/SearchResults' default: $ref: '#/components/responses/defaultResponse' /users: post: operationId: createUser tags: - User - Admin summary: Create a new user description: > Create a new user requestBody: required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/User' - type: object properties: user_pass: type: string defaultVisibility: type: string enum: - public - protected - private required: - name application/x-www-form-urlencoded: schema: allOf: - $ref: '#/components/schemas/User' - type: object properties: user_pass: type: string defaultVisibility: type: string enum: - public - protected - private required: - name responses: '201': description: User created successfully content: application/json: schema: $ref: '#/components/schemas/Info' '409': description: User with the same email or username already exists content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' get: operationId: getUsers tags: - User - Admin description: Get the registered users responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/User' default: $ref: '#/components/responses/defaultResponse' /users/{id}: parameters: - name: id required: true in: path schema: type: integer get: operationId: getUserById tags: - User - Admin summary: Get user by id description: > Get one single user by id responses: '200': description: User with the given id content: application/json: schema: $ref: '#/components/schemas/User' default: $ref: '#/components/responses/defaultResponse' put: operationId: modifyUserById tags: - User - Admin summary: Edit user details by id description: > Edit user details by id requestBody: required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/User' - type: object properties: user_pass: type: string defaultFolderId: type: integer defaultVisibility: type: string enum: - public - protected - private application/x-www-form-urlencoded: schema: allOf: - $ref: '#/components/schemas/User' - type: object properties: user_pass: type: string defaultFolderId: type: integer defaultVisibility: type: string enum: - public - protected - private responses: '200': description: User updated successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Missing or wrong parameters in request body content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: The session owner is not an admin content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: UserId doesn't exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' delete: operationId: deleteUserById tags: - User - Admin summary: Delete user by id description: > Delete a single user by id responses: '202': description: User will be deleted content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /users/self: get: operationId: getSelf tags: - User description: Get the information about logged in user responses: '200': description: OK content: application/json: schema: allOf: - $ref: '#/components/schemas/User' - type: object properties: default_group: type: string description: Default group of the user example: "fossy" default: $ref: '#/components/responses/defaultResponse' /users/tokens: post: operationId: createRestApiToken tags: - User - Admin summary: Create a new REST API Token description: > Create a new REST API Token requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TokenRequest' responses: '201': description: Token created successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/Info' - type: object properties: token: type: string example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTgwODI1OTksIm5iZiI6MTY1NzkwOTgwMCwianRpIjoiTXk0eiIsInNjb3BlIjoid3JpdGUifQ.Sl1acvN0GlCe7VUZJQX00u_vpfWrtfJlVYQ63FBkzP4 '400': description: Following parameters are required in the request body -- token_name,token_scope,token_expire content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /users/tokens/{type}: parameters: - name: type required: true in: path schema: type: string enum: - active - expired get: operationId: getTokensByType tags: - User - Admin summary: Get all the REST API tokens (active | expired) description: > Get all the REST API tokens (active | expired) responses: '200': description: Success content: application/json: schema: allOf: - $ref: '#/components/schemas/Info' - type: object properties: active_tokens: $ref: '#/components/schemas/Token' '400': description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{itemId}/copyrights: parameters: *cxGetParams get: operationId: getFileCopyrights tags: - Copyrights summary: Get the copyrights of the mentioned upload tree ID description: Returns the list of copyrights associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/copyrights/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileCopyrights tags: - Copyrights summary: Deletes a copyright for a file description: Deletes a copyright statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileCopyrights tags: - Copyrights summary: Restores a copyright for a file description: Restores a copyright statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileCopyrights tags: - Copyrights summary: Updates a copyright for a file description: Updates a copyright statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/user-copyrights: parameters: *cxGetParams get: operationId: getFileUserCopyrights tags: - Copyrights summary: Get the user copyright findings of the mentioned upload tree ID description: Returns the list of user copyright findings associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/user-copyrights/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileUserCopyright tags: - Copyrights summary: Deletes user copyright for a file description: Deletes user copyright statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileUserCopyright tags: - Copyrights summary: Restores user copyright for a file description: Restores user copyright statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileUserCopyright tags: - Copyrights summary: Updates user copyright for a file description: Updates user copyright statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/scancode-copyrights: parameters: *cxGetParams get: operationId: getFileScanCodeCopyrights tags: - Copyrights summary: Get the scancode copyright findings of the mentioned upload tree ID description: Returns the list of scancode copyright findings associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/scancode-copyrights/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileScanCodeCopyright tags: - Copyrights summary: Deletes scancode copyright for a file description: Deletes scancode copyright statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileScanCodeCopyright tags: - Copyrights summary: Restores scancode copyright for a file description: Restores scancode copyright statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileScanCodeCopyright tags: - Copyrights summary: Updates scancode copyright for a file description: Updates scancode copyright statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/emails: parameters: *cxGetParams get: operationId: getFileEmails tags: - Copyrights summary: Get the emails of the mentioned upload tree ID description: Returns the list of emails associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/emails/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileEmails tags: - Copyrights summary: Deletes an email for a file description: Deletes an email statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileEmail tags: - Copyrights summary: Restores an email for a file description: Restores an email statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileEmail tags: - Copyrights summary: Updates an email for a file description: Updates an email statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/scancode-emails: parameters: *cxGetParams get: operationId: getFileScanCodeEmail tags: - Copyrights summary: Get the scancode email findings of the mentioned upload tree ID description: Returns the list of scancode email findings associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/scancode-emails/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileScanCodeEmail tags: - Copyrights summary: Deletes scancode email finding for a file description: Deletes scancode email finding for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileScanCodeEmail tags: - Copyrights summary: Restores scancode email finding for a file description: Restores scancode email finding for a particular file responses: *cxUpdateResponses put: operationId: updateFileScanCodeEmail tags: - Copyrights summary: Updates scancode email finding for a file description: Updates scancode email finding for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/urls: parameters: *cxGetParams get: operationId: getFileUrls tags: - Copyrights summary: Get the URLs of the mentioned upload tree ID description: Returns the list of URLs associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/urls/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileUrl tags: - Copyrights summary: Deletes an URL for a file description: Deletes an URL statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileUrl tags: - Copyrights summary: Restores an URL for a file description: Restores an URL statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileUrl tags: - Copyrights summary: Updates an URL for a file description: Updates an URL statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/scancode-urls: parameters: *cxGetParams get: operationId: getFileScanCodeUrl tags: - Copyrights summary: Get the scancode url findings of the mentioned upload tree ID description: Returns the list of scancode url findings associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/scancode-urls/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileScanCodeUrl tags: - Copyrights summary: Deletes scancode url finding for a file description: Deletes scancode url finding for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileScanCodeUrl tags: - Copyrights summary: Restores scancode url finding for a file description: Restores scancode url finding for a particular file responses: *cxUpdateResponses put: operationId: updateFileScanCodeUrl tags: - Copyrights summary: Updates scancode url finding for a file description: Updates scancode url finding for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/authors: parameters: *cxGetParams get: operationId: getFileAuthors tags: - Copyrights summary: Get the authors of the mentioned upload tree ID description: Returns the list of authors associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/authors/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileAuthor tags: - Copyrights summary: Deletes an author for a file description: Deletes an author statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileAuthor tags: - Copyrights summary: Restores an author for a file description: Restores an author statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileAuthor tags: - Copyrights summary: Updates an author for a file description: Updates an author statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/scancode-authors: parameters: *cxGetParams get: operationId: getFileScanCodeAuthor tags: - Copyrights summary: Get the scancode author findings of the mentioned upload tree ID description: Returns the list of scancode author findings associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/scancode-authors/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileScanCodeAuthor tags: - Copyrights summary: Deletes scancode author finding for a file description: Deletes scancode author finding for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileScanCodeAuthor tags: - Copyrights summary: Restores scancode author finding for a file description: Restores scancode author finding for a particular file responses: *cxUpdateResponses put: operationId: updateFileScanCodeAuthor tags: - Copyrights summary: Updates scancode author finding for a file description: Updates scancode author finding for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/eccs: parameters: *cxGetParams get: operationId: getFileEccs tags: - Copyrights summary: Get the ECCs of the mentioned upload tree ID description: Returns the list of ECCs associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/eccs/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileEcc tags: - Copyrights summary: Deletes an ECC for a file description: Deletes an ECC statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileEcc tags: - Copyrights summary: Restores an ECC for a file description: Restores an ECC statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileEcc tags: - Copyrights summary: Updates an ECC for a file description: Updates an ECC statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/keywords: parameters: *cxGetParams get: operationId: getFileKeywords tags: - Copyrights summary: Get the keywords of the mentioned upload tree ID description: Returns the list of keywords associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/keywords/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileKeyword tags: - Copyrights summary: Deletes a keyword for a file description: Deletes a keyword statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileKeyword tags: - Copyrights summary: Restores a keyword for a file description: Restores a keyword statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileKeyword tags: - Copyrights summary: Updates a keyword for a file description: Updates a keyword statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /uploads/{id}/item/{itemId}/ipras: parameters: *cxGetParams get: operationId: getFileIpras tags: - Copyrights summary: Get the IPRAs of the mentioned upload tree ID description: Returns the list of IPRAs associated with the file responses: *cxGetResponses /uploads/{id}/item/{itemId}/ipras/{hash}: parameters: *cxUpdateParams delete: operationId: deleteFileIpra tags: - Copyrights summary: Deletes an IPRA for a file description: Deletes an IPRA statement for a particular file responses: *cxUpdateResponses patch: operationId: restoreFileIpra tags: - Copyrights summary: Restores an IPRA for a file description: Restores an IPRA statement for a particular file responses: *cxUpdateResponses put: operationId: updateFileIpra tags: - Copyrights summary: Updates an IPRA for a file description: Updates an IPRA statement for a particular file requestBody: *cxUpdateBody responses: *cxUpdateResponses /jobs: parameters: - name: groupName description: The group name to chose while accessing jobs in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getJobs tags: - Job summary: Gets all jobs created by the logged in user description: Returns all jobs with their status created by the logged in user parameters: - name: limit required: false schema: type: integer minimum: 1 in: header - name: page required: false schema: type: integer minimum: 1 in: header - name: upload required: false schema: type: integer in: query description: Return jobs for the given upload id only responses: '200': description: OK headers: X-Total-Pages: description: Total number of pages which can be generated based on limit schema: type: integer content: application/json: schema: type: array items: $ref: '#/components/schemas/Job' default: $ref: '#/components/responses/defaultResponse' post: operationId: startJobs tags: - Job summary: Schedule an Analysis description: Schedule an Analysis of an existing upload parameters: # This could also be omitted, because there are no real folders - name: folderId in: header required: true schema: type: integer - name: uploadId in: header required: true schema: type: integer requestBody: description: Agents to be scheduled with the job required: true content: application/json: schema: $ref: '#/components/schemas/ScanOptions' responses: '201': description: Job Scheduled with job id in message content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/all: get: operationId: getAllJobs tags: - Job summary: Gets all jobs created by all users description: Returns all jobs with their status created by every user. This API returns a response only if the requesting user is an Admin. parameters: - name: limit required: false schema: type: integer minimum: 1 in: header - name: page required: false schema: type: integer minimum: 1 in: header responses: '200': description: OK headers: X-Total-Pages: description: Total number of pages which can be generated based on limit schema: type: integer content: application/json: schema: type: array items: $ref: '#/components/schemas/Job' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/scheduler/operation/{operationName}: parameters: - name: operationName required: true description: Name of the operation in: path schema: type: string enum: - status - database - reload - agents - verbose - stop - restart - pause - priority get: operationId: getSchedulerOptionsByOperation tags: - Job - Admin summary: get scheduler options by operation description: Returns the scheduler options for a specific operation responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetSchedulerOption' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/scheduler/operation/run: parameters: - name: job required: false description: Name of the selected job in: query schema: type: string - name: level required: false description: Level of the selected verbose in: query schema: type: string - name: priority required: false description: Priority option selected in: query schema: type: string post: operationId: handleSchedulerRun tags: - Job - Admin summary: Run the scheduler description: Run the scheduler with the selected options from a specific operation requestBody: description: Scheduler operation required: true content: application/json: schema: type: object properties: operation: type: string description: Operation to be run by the scheduler enum: - status - database - reload - agents - verbose - stop - restart - pause - priority responses: '200': description: Scheduler run successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/{id}: parameters: - name: id required: true description: Id of the job in: path schema: type: integer get: operationId: getJobById tags: - Job summary: Gets single job by id description: Returns job with the status responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Job' default: $ref: '#/components/responses/defaultResponse' /jobs/history: parameters: - name: upload required: true in: query description: Return jobs for the given upload id schema: type: integer get: operationId: getJobsHistoryPerUpload tags: - Job summary: Get the history of all the jobs queued based on an upload description: Returns the history of all the jobs queued based on an upload responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/ShowJob' '400': description: "Bad Request. 'upload' is a required query param" content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Upload is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Upload does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/dashboard/statistics: get: operationId: getJobStatistics tags: - Job summary: Get the statistics of all the jobs description: Returns the statistics of all the jobs for the Admin Dashboard responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/GetJobStatistics' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/dashboard: get: operationId: getAllServerJobs tags: - Job summary: Gets all jobs server jobs with scheduler status description: Returns all jobs with the scheduler status for the Admin Dashboard. This API returns a response only if the requesting user is an Admin. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AllServerJobs' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /jobs/{id}/{queue}: parameters: - name: id required: true description: Id of the Job in: path schema: type: integer - name: queue required: true description: Id of the job queue to be deleted in: path schema: type: integer delete: operationId: deleteJob tags: - Job summary: Deletes a job using its Id and Queue description: Deletes a job queue and all the other job queues depending on it responses: '200': description: Job deleted successfully. content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: You don't have permission to delete this job. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Job/JobQueue not found. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Failed to kill job. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /folders: parameters: - name: groupName description: The group name to chose while accessing folders in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getFolders tags: - Folders summary: Get the list of accessible folders description: > Get all folders or from a specific group responses: '200': description: List of folders content: application/json: schema: type: array items: $ref: '#/components/schemas/Folder' default: $ref: '#/components/responses/defaultResponse' post: operationId: createFolder tags: - Organize - Admin - Folders summary: Create a new folder description: > Create a new child folder with optional description parameters: - name: parentFolder in: header required: true description: Parent folder for the new folder schema: type: integer - name: folderName in: header required: true description: Name of the new folder schema: type: string - name: folderDescription in: header required: false description: Description of the new folder schema: type: string responses: '200': description: Folder with the same name already exists under the same parent content: application/json: schema: $ref: '#/components/schemas/Info' '201': description: Folder is created with new folder id in message content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /folders/{id}: parameters: - name: id in: path required: true description: ID of the folder schema: type: integer - name: groupName description: The group name to chose while accessing the folder in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getFolderById tags: - Folders summary: Get a single folder details description: Get a single folder by id responses: '200': description: Details of the required folder content: application/json: schema: $ref: '#/components/schemas/Folder' default: $ref: '#/components/responses/defaultResponse' delete: operationId: deleteFolderById tags: - Organize - Folders - Admin summary: Delete a folder description: > Schedule a folder deletion responses: '202': description: Folder scheduled to be deleted content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' patch: operationId: patchFolderById tags: - Organize - Folders parameters: - name: name in: header required: false description: New name of the folder schema: type: string - name: description in: header required: false description: New description of the folder schema: type: string summary: Edit a folder's description description: > Change a folder's name and/or description responses: '200': description: Folder is updated content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' put: operationId: moveFolderById tags: - Organize - Folders parameters: - name: parent in: header required: true description: New parent folder id schema: type: integer - name: action in: header required: true description: Action to be performed schema: type: string enum: - copy - move summary: Copy/Move a folder description: > Copy or move a folder by id responses: '202': description: Folder will be copied/moved content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /folders/contents/{contentId}/unlink: parameters: - name: contentId in: path required: true description: ID of the content schema: type: integer put: operationId: unlinkContent tags: - Folders summary: Unlink a content from a folder description: Unlink a content from a folder responses: '200': description: Content is unlinked from the folder content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Folder content does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /folders/{id}/contents: parameters: - name: id in: path required: true description: ID of the folder schema: type: integer get: operationId: getAllFolderContents tags: - Folders summary: Get all contents of a folder description: Get all contents of a folder by id responses: '200': description: Contents of the given folder content: application/json: schema: type: array items: $ref: '#/components/schemas/GetFolderContent' '403': description: Folder is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Folder does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{ItemId}/totalcopyrights: parameters: - name: id required: true description: Upload Id in: path schema: type: integer - name: ItemId required: true description: Upload Tree ID in: path schema: type: integer - name: status required: true in: query description: status of the copyright schema: type: string enum: - active - inactive get: operationId: getTotalFileCopyrights tags: - Copyrights summary: Get the total copyrights of the mentioned upload tree ID description: Returns the total number of copyrights associated with the file responses: '200': description: OK content: application/json: schema: type: array items: allOf: - type: object properties: total_copyrights: type: integer description: Total Number of copyrights for the uploadtree example: 125 '400': description: "Bad Request. 'upload' is a required query param" content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Upload is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Upload does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/item/{ItemId}/totalusercopyrights: parameters: - name: id required: true description: Upload Id in: path schema: type: integer - name: ItemId required: true description: Upload Tree ID in: path schema: type: integer - name: status required: true in: query description: status of the copyright schema: type: string enum: - active - inactive get: operationId: getTotalFileUserCopyrights tags: - Copyrights summary: Get the total user copyright findings of the mentioned upload tree ID description: Returns the total number of user copyright findings associated with the file responses: '200': description: OK content: application/json: schema: type: array items: allOf: - type: object properties: total_copyrights: type: integer description: Total Number of user copyright findings for the uploadtree example: 125 '400': description: "Bad Request. 'upload' is a required query param" content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Upload is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Upload does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /customise: get: operationId: getCustomiseData tags: - Admin summary: Get the Admin configuration data description: > Returns the admin configuration data from the server responses: '200': description: Config data content: application/json: schema: type: array items: $ref: '#/components/schemas/Customise' '403': description: The session owner is not an admin content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' put: operationId: updateCustomiseData tags: - Admin summary: Update the Admin configuration data description: > Updates the admin configuration data. requestBody: description: Key and value to update. required: true content: application/json: schema: $ref: '#/components/schemas/SetCustomiseInfo' responses: '200': description: Config data content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '403': description: The session owner is not an admin content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /customise/banner: get: operationId: getBannerMessage tags: - info summary: Get the Banner message description: > Returns the Banner message from the server responses: '200': description: Banner message content: application/json: schema: type: string example: "This is a banner message" default: $ref: '#/components/responses/defaultResponse' /folders/{id}/contents/unlinkable: parameters: - name: id in: path required: true description: ID of the folder schema: type: integer get: operationId: getUnlinkableContents tags: - Folders summary: Get contents of a folder which can be unlinked description: Get unlinkable contents of a folder by id. These contents are copied. responses: '200': description: Unlinkable contents of the given folder content: application/json: schema: $ref: '#/components/schemas/GetFolderContent' '403': description: Folder is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Folder does not exist content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /groups: get: operationId: getGroups tags: - Groups summary: Get the list of groups description: > Returns accessible groups for a user, all groups for an admin responses: '200': description: List of groups content: application/json: schema: type: array items: $ref: '#/components/schemas/Group' default: $ref: '#/components/responses/defaultResponse' post: operationId: createGroup tags: - Organize - Groups - Admin summary: Create a new group description: > Create a new user group parameters: - name: name in: header required: true description: Name of the new group schema: type: string responses: '200': description: Group has been added content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Group already exists, failed to create group or no group name provided content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /groups/{id}: parameters: - name: id required: true description: Id of the group in: path schema: type: integer delete: operationId: deleteGroupById tags: - Groups summary: Delete group by id description: > Deletes a single group by id. responses: '202': description: User group will be deleted content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /groups/{id}/user/{userId}: parameters: - name: id required: true description: Id of the group in: path schema: type: integer - name: userId required: true description: user id of the member in: path schema: type: integer delete: operationId: deleteGroupMemberByGroupIdAndUserId tags: - Groups summary: Delete group member by groupId and userId description: > Deletes a single group member by groupId and userId responses: '200': description: User will be removed from group. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Not found Error. content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Validation based error. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' post: operationId: addMember tags: - Groups - Admin summary: Add user to a group description: > add a new user to group requestBody: description: Request options required: true content: application/json: schema: $ref: '#/components/schemas/AddMember' responses: '200': description: User has been added to group content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' put: operationId: updatePermissionByGroupIdAndUserId tags: - User - Groups summary: Update Permission description: > Update User's permission in group. requestBody: description: Value of the new permission required: true content: application/json: schema: $ref: '#/components/schemas/NewGroupPermission' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/NewGroupPermission' responses: '202': description: User's permission will be updated. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Group or user doesn't exist. content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Validation Error. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /groups/deletable: get: operationId: deletableGroups tags: - Groups summary: Give a list of deletable groups description: > Return a list of the groups which it is possible to delete. responses: '200': description: List of groups content: application/json: schema: type: array items: $ref: '#/components/schemas/Group' default: $ref: '#/components/responses/defaultResponse' /groups/{id}/members: parameters: - name: id in: path required: true description: ID of the group schema: type: integer get: operationId: getGroupUsersWithRoles tags: - Groups summary: Get the users with their roles from a group description: > Returns accessible objects of users with roles from the group responses: '200': description: List of group-user-member content: application/json: schema: type: array items: $ref: '#/components/schemas/UserGroupMember' default: $ref: '#/components/responses/defaultResponse' /report: get: operationId: getReportsByUpload tags: - Job - Report summary: Get the reports for a given upload description: > List all reports available for a given upload parameters: - name: uploadId in: header required: true description: Id of the upload to generate the report for schema: type: integer - name: reportFormat in: header required: true description: Which report to be genereated schema: type: string enum: - dep5 - spdx2 - spdx2tv - readmeoss - unifiedreport - clixml - cyclonedx - name: groupName description: The group name to chose while generating a report in: header required: false schema: type: string description: Group name, from last login if not provided responses: '201': description: Report generation is scheduled. Link to download report will be in message content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /report/{id}: parameters: - name: id in: path required: true description: Id the report to download schema: type: integer - name: groupName description: The group name to chose while downloading specific report in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getReportById tags: - Job - Report summary: Download the report description: > Get a report by id responses: '200': description: Required report content: text/plain: schema: type: string format: binary application/vnd.openxmlformats-officedocument.wordprocessingml.document: schema: type: string format: binary application/xml: schema: type: string format: binary '503': description: Report is not ready yet. Check 'Retry-After' header. headers: Retry-After: description: Retry the request after this many seconds schema: type: integer example: 10 content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /report/import: parameters: - name: groupName description: The group name to chose while uploading report in: header required: false schema: type: string description: Group name, from last login if not provided - name: upload in: query required: true description: Upload ID schema: type: integer - name: reportFormat in: query required: true description: Type of report being uploaded schema: enum: - decisionimporter - spdxrdf post: operationId: uploadReport tags: - Report summary: Import a report to an existing upload description: > Import a report to an existing upload requestBody: required: true content: multipart/form-data: schema: type: object properties: report: description: Report file to be imported type: string format: binary oneOf: - $ref: '#/components/schemas/DecisionImporter' - $ref: '#/components/schemas/SpdxRdfImport' required: ["report"] responses: '201': description: ReportImport job is scheduled successfully for the given upload. content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Bad Request, missing parameters in request. content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Upload is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Upload does not exist content: application/json: schema: $ref: '#/components/schemas/Info' '503': description: Scheduler is not running! content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /filesearch: parameters: - name: groupName description: The group name to chose while downloading specific report in: header required: false schema: type: string description: Group name, from last login if not provided post: operationId: getFiles tags: - Upload - Search summary: Get the information of files matching the provided hashes description: > Get a list of files by hashes requestBody: description: List of file hashes to fetch required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/Hash' responses: '200': description: List of matching files content: application/json: schema: type: array items: $ref: '#/components/schemas/File' default: $ref: '#/components/responses/defaultResponse' /uploads/{id}/conf: parameters: - name: id in: path required: true description: Upload Id schema: type: integer get: operationId: getConfInfo tags: - Upload summary: Get the conf information of a particular upload description: > Get conf information responses: '200': description: current conf information content: application/json: schema: type: array items: $ref: '#/components/schemas/ConfResponse' default: $ref: '#/components/responses/defaultResponse' put: operationId: updateConfData tags: - Upload summary: Update the Conf page data description: > Updates the conf page data from the server requestBody: description: updateConfData Payload required: true content: application/json: schema: $ref: '#/components/schemas/SetConfInfo' responses: '200': description: Config data content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '403': description: The session owner is not an admin content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license: parameters: - name: groupName description: The group name to chose in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getLicenses tags: - License parameters: - name: page description: Page number to fetch in: header required: false schema: type: integer default: 1 - name: limit description: Limits of responses per request in: header required: false schema: type: integer minimum: 1 default: 100 - name: active description: Get only active licenses in: header required: false schema: type: boolean default: false - name: kind description: Which kind of licenses to get. in: query required: false schema: type: string enum: - candidate - main - all default: all summary: Get all license from the database description: > Get a list of available licenses (filtered by kind or status) responses: '200': description: All licenses from database headers: X-Total-Pages: description: Total number of pages which can be fetched schema: type: integer content: application/json: schema: type: array items: allOf: - type: object properties: id: type: integer description: Id key example: 125 - $ref: '#/components/schemas/License' default: $ref: '#/components/responses/defaultResponse' post: operationId: createLicense tags: - License summary: Create a new license description: > Add a new license to the database requestBody: description: Information about new license required: true content: application/json: schema: allOf: - $ref: '#/components/schemas/License' - type: object properties: mergeRequest: description: Open a merge request for candidate license? type: boolean default: false required: - shortName responses: '201': description: License added successfully content: application/json: schema: $ref: '#/components/schemas/Info' '409': description: License with same name or text already exists content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/import-csv: post: operationId: importLicense tags: - License summary: Import a csv license description: > Import a csv license to the database requestBody: description: Information about delimiters, inclosure and csv file. required: true content: multipart/form-data: schema: type: object properties: enclosure: type: string description: Enclosure for string in CSV default: '"' delimiter: type: string description: Delimiters for fields in CSV default: ',' file_input: type: string format: binary description: CSV to be imported required: - file_input responses: '400': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/Info' '200': description: Successfully imported content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/export-csv: get: operationId: exportLicense parameters: - name: id description: License id to export, 0 for all in: query required: false schema: type: integer tags: - License summary: Export a csv license description: > Export a csv license responses: '200': description: Successfully exported content: text/csv: schema: type: string format: binary '403': description: Route is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/import-json: post: operationId: handleImportLicense tags: - License summary: Import a json license description: > Import a json license to the database requestBody: description: Include the JSON file required: true content: multipart/form-data: schema: type: object properties: fileInput: type: string format: binary description: JSON to be imported required: - fileInput responses: '400': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/Info' '200': description: Successfully imported content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/export-json: get: operationId: exportAdminLicenseToJSON parameters: - name: id description: License id to export, 0 for all in: query required: false schema: type: integer tags: - License summary: Export a json license description: > Export a json license responses: '200': description: Successfully exported content: text/csv: schema: type: string format: binary '403': description: Route is not accessible content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/{shortname}: parameters: - name: shortname in: path required: true description: Shortname of the license schema: type: string - name: groupName description: The group name to chose in: header required: false schema: type: string description: Group name, from last login if not provided get: operationId: getLicenseByShortname tags: - License summary: Get a specific license description: > Get information about a specific license responses: '200': description: License content: application/json: schema: allOf: - type: object properties: id: type: integer description: Id key example: 125 - $ref: "#/components/schemas/License" - type: object properties: obligations: description: Obligations associated with the license type: array items: $ref: '#/components/schemas/Obligation' '404': description: License not found content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' patch: operationId: updateLicenseByShortname tags: - License summary: Update a license description: > Update information about a given license requestBody: description: Information to be updated required: true content: application/json: schema: type: object description: Set the properties to be updated properties: fullName: description: New fullname type: string nullable: true example: "Updated license name" text: description: New license text type: string nullable: true example: "Updated and corrected license text" url: description: New URL for license type: string nullable: true example: "https://opensource.org/licenses/MIT" risk: description: New risk value type: integer nullable: true example: 2 responses: '200': description: License added successfully content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/admincandidates: get: operationId: getAdminLicenseCandidates tags: - License summary: Get license Candidates for admin view description: > Get a list of license candidates from the database. responses: '200': description: Request is successful content: application/json: schema: type: array items: $ref: '#/components/schemas/LicenseCandidate' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/admincandidates/{id}: parameters: - name: id required: true description: Id of the license-candidate in: path schema: type: integer delete: operationId: deleteByLicenseCandidateId tags: - License - Admin summary: Delete license candidate by id. description: > Delete a single admin-license-candidate by the given id. responses: '202': description: License candidate will be deleted. content: application/json: schema: $ref: '#/components/schemas/Info' '403': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/adminacknowledgements: get: operationId: getAdminLicenseAcknowledgements tags: - License summary: Get all admin license acknowledgements description: > Get a list of the admin license acknowledgements responses: '200': description: Request is successful content: application/json: schema: type: array items: $ref: '#/components/schemas/AdminLicenseAcknowledgement' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' put: operationId: mutateAdminLicenseAcknowledgement tags: - License summary: Add, Edit, Enable & Disable description: > Add, edit and toggle admin-license acknowledgement requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/MutateAdminAcknowledgement' responses: '200': description: Request is successful content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/stdcomments: get: operationId: getAllStandardLicenseComments tags: - License summary: Get all standard license comments description: > Get a list of all standard license comments. responses: '200': description: Request is successful content: application/json: schema: type: array items: $ref: '#/components/schemas/StandardComment' default: $ref: '#/components/responses/defaultResponse' put: operationId: mutateStdComments tags: - License summary: Add, Edit, Enable & Disable description: > Add, edit and toggle standard comments requestBody: required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/MutateStdComment' responses: '200': description: Request is successful content: application/json: schema: type: array items: $ref: '#/components/schemas/Info' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error with details content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/verify/{shortname}: parameters: - name: shortname in: path required: true description: Shortname of the license to be verified schema: type: string put: operationId: verifyLicense tags: - License - Admin summary: Verify a license as new or variant description: > Verify a license as new or variant of another license requestBody: description: The shortname of the parent license | Same name if it's to be verified as a new license required: true content: application/json: schema: type: object properties: parentShortname: description: Shortname of the parent license type: string example: "MIT" responses: '200': description: License verified successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Given License not found. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/merge/{shortname}: parameters: - name: shortname in: path required: true description: Shortname of the license to be merged schema: type: string put: operationId: mergeLicense tags: - License - Admin summary: Merge a license with another description: > Merge a license to another existing license requestBody: description: The shortname of the parent license to be merged into required: true content: application/json: schema: type: object properties: parentShortname: description: Shortname of the parent license type: string example: "MIT" responses: '200': description: License merged successfully content: application/json: schema: $ref: '#/components/schemas/Info' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Info' '404': description: Given License not found. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /overview/database/contents: get: operationId: getDatabaseContents tags: - Overview - Admin summary: Get database contents description: > Get database contents for the dashboard display. responses: '200': description: List of the database contents content: application/json: schema: type: array items: $ref: '#/components/schemas/GetDatabaseContent' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /overview/info/php: get: operationId: getPhpInfo tags: - Overview - Admin summary: Get PHP info description: > Get PHP info responses: '200': description: PHP info content: application/json: schema: $ref: '#/components/schemas/GetPHPInfo' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /overview/disk/usage: get: operationId: getDiskUsage tags: - Overview - Admin summary: Get disk usage description: > Get disk usage responses: '200': description: Disk usage response content: application/json: schema: type: array items: $ref: '#/components/schemas/DiskUsage' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /license/suggest: post: operationId: getSuggestedLicense tags: - License - Admin summary: Get suggested license by reference text. description: > Get a single suggested license by the given reference text. requestBody: description: Reference text to get suggested license required: true content: application/json: schema: type: object properties: referenceText: description: Reference text to get suggested license type: string example: "According to MIT license, add some modifications" responses: '200': description: Request is successful content: application/json: schema: $ref: '#/components/schemas/GetSuggestedLicense' '403': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /overview/database/metrics: get: operationId: getDatabaseMetrics tags: - Overview - Admin summary: Get database metrics description: > Get database metrics for the dashboard display. responses: '200': description: List of the database metrics content: application/json: schema: type: array items: $ref: '#/components/schemas/GetDatabaseMetric' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' /overview/queries/active: get: operationId: getActiveQueries tags: - Overview - Admin summary: Get active queries description: > Get a list of active queries from the database. responses: '200': description: List of active queries content: application/json: schema: type: array items: $ref: '#/components/schemas/GetActiveQuery' '403': description: Access denied content: application/json: schema: $ref: '#/components/schemas/Info' '500': description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Info' default: $ref: '#/components/responses/defaultResponse' components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: "Token from FOSSology" oauth: description: "Machine-2-Machine communication from oauth" type: oauth2 flows: clientCredentials: tokenUrl: "https://api.example.com/oauth2/authorize" scopes: {} schemas: SearchResults: type: object properties: upload: $ref: '#/components/schemas/Upload' uploadTreeId: type: integer description: Upload tree ID filename: type: string description: Filename of the treeItem LicenseDecider: type: object properties: nomos_monk: type: boolean description: Scanners matches if all Nomos findings are within the Monk findings. bulk_reused: type: boolean description: Bulk phrases from reused packages. new_scanner: type: boolean description: New scanner results, i.e., decisions were marked as work in progress if new scanner finds additional licenses. ojo_decider: type: boolean description: Scanners matches if Ojo or REUSE.Software findings are no contradiction with other findings. conclude_license_type: type: string description: | Auto conclude license if they are of provided type. Omit the field or keep as empty string to not use this option. example: Permissive ScanOptions: type: object properties: analysis: $ref: '#/components/schemas/Analysis' decider: $ref: '#/components/schemas/LicenseDecider' reuse: $ref: '#/components/schemas/Reuser' scancode: $ref: '#/components/schemas/Scancode' Upload: type: object properties: folderid: type: integer description: The folder id, where the upload is located foldername: type: string description: The name of the folder where the upload is located id: type: integer description: Upload id of the upload. description: type: string description: Description of the upload. uploadname: type: string description: Display name of the upload. uploaddate: type: string description: Date, when the file was uploaded. assignee: type: integer description: assignee id of the upload. nullable: true assigneeDate: type: string format: date-time description: Date, when a user was assigned to the upload. nullable: true closingDate: type: string format: date-time description: Date, when the upload was closed or rejected. nullable: true hash: $ref: '#/components/schemas/Hash' GetFolderContent: type: object properties: id: type: integer description: Id of the folder content. content: type: string description: Content of the folder. removable: type: boolean description: Is the folder removable. UploadSummary: type: object properties: id: type: integer description: Upload id of the upload. uploadName: type: string description: Display name of the upload. assignee: type: integer description: assignee id of the upload. nullable: true mainLicense: type: string description: Main license selected on the upload. uniqueLicenses: type: integer description: No. of unique licenses found. totalLicenses: type: integer description: Total no. of licenses found. uniqueConcludedLicenses: type: integer description: Unique licenses concluded. totalConcludedLicenses: type: integer description: Total concluded licenses. filesToBeCleared: type: integer description: Files without clearing decisions. filesCleared: type: integer description: Files with clearing decisions. clearingStatus: type: string enum: - Open - InProgress - Closed - Rejected description: Upload is clearing status. copyrightCount: type: integer description: No. of copyrights found in the upload. SetCopyrightInfo: type: object properties: content: type: string description: Copyright text Fileinfo: type: object properties: view_info: type: object description: viewinfo of the file meta_info: type: object description: Display display meta info of the file package_info: type: object description: Shows package info of the file tag_info: type: object description: Provides tag related information reuse_info: type: object description: Reuse info of the file. SetCustomiseInfo: type: object properties: key: type: string description: Key of the field to be updated value: type: string description: Value of the field to be updated Job: type: object properties: id: type: integer description: ID of the job name: type: string description: Name of the job queueDate: type: string description: When the job was queued uploadId: type: integer description: Upload for which the job was scheduled userId: type: integer description: User who scheduled the job groupId: type: integer description: Group under which the job was scheduled eta: type: integer description: ETA of job to finish in seconds status: type: string enum: - Completed - Failed - Queued - Processing description: Denotes the current status of the job in the queue Info: type: object properties: code: type: integer description: HTTP status code example: 200 message: type: string description: Message in the info type: type: string enum: - INFO - ERROR description: Denotes if info was created on error Token: type: object properties: id: type: string description: Token Id token_name: type: string description: Name of the Token created: type: string format: date description: Denotes when the token was created example: 2022-07-11 token_expire: type: string format: date description: Denotes when the token was created example: 2022-07-11 scope: type: string enum: - read - write description: Scope of the token token: type: string description: Scope of the token example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTg5NDY1OTksIm5iZiI6MTY1NzkwOTgwMCwianRpIjoiTnk0eiIsInNjb3BlIjoid3JpdGUifQ.Yqwdt7Fzx-Qw3megYix_OYu1mqBOoz4Rrc1cgJasmJA LicenseCandidate: type: object properties: id: type: integer description: ID of the license-candidate. shortname: type: string description: shortname of the license-candidate. spdxid: type: string description: SPDX ID of the license-candiate. fullname: type: string description: fullname of the license-candidate. text: type: string description: text of the license-candidate. group_name: type: string description: group_name of the license-candidate. group_id: type: integer description: group_id of the license-candidate. User: type: object properties: id: type: integer description: ID of the user name: type: string description: Unique username description: type: string description: Description of the user email: type: string description: Email of the user, needs to be unique and is required accessLevel: type: string enum: - none - read_only - read_write - clearing_admin - admin rootFolderId: type: number format: int description: root folder id of the user emailNotification: type: boolean description: enable email notification when upload scan completes defaultGroup: type: integer description: Default group id of the user agents: $ref: '#/components/schemas/Analysis' defaultBucketpool: description: Default bucket pool id type: integer nullable: true required: - id Analysis: type: object properties: bucket: type: boolean description: Should bucket analysis be run on this upload copyright_email_author: type: boolean description: Should Copyright/Email/URL/Author Analysis be run on this upload. ecc: type: boolean description: Should ECC Analysis be run on this upload. keyword: type: boolean description: Should keyword Analysis be run on this upload. mime: type: boolean description: Should MIME Analysis be run on this upload. monk: type: boolean description: Should Monk Analysis be run on this upload. nomos: type: boolean description: Should Nomos Analysis be run on this upload. ojo: type: boolean description: Should OJO Analysis be run on this upload. package: type: boolean description: Should Package Analysis be run on this upload. reso: type: boolean description: Should REUSE.Software Analysis be run on this upload. heritage: type: boolean description: Should Software Heritage Analysis be run on this upload. compatibility: type: boolean description: Should Compatibility Analysis be run on this upload. Reuser: type: object properties: reuse_upload: type: integer description: The UploadID to reuse. reuse_group: type: string description: The group of the reused upload reuse_main: type: boolean description: Copy the main license from reused package? reuse_enhanced: type: boolean description: Run enhanced reuser with diff tool (slow) reuse_report: type: boolean description: Copy all report configuration from conf page. reuse_copyright: type: boolean description: Copy the copyright deactivation and edits. required: - reuse_upload - reuse_group Scancode: type: object properties: license: type: boolean description: A full comparison between the database of licenses present in ScanCode and the code uploaded by users based approach. copyright: type: boolean description: Copyright along with copyright holder/author information. email: type: boolean description: Email(s) present in the scan code file. url: type: boolean description: URL(s) present in the scan code file. SetConfInfo: type: object properties: key: type: string description: Key of the field to be updated value: type: string description: | Value of the field to be updated. If value is a JSON, it should be sent as an encoded string. Folder: type: object properties: id: type: integer description: Id of the folder. name: type: string description: Name of the folder. description: type: string description: Description of the folder. parent: type: integer description: Id of the parent folder (if any, null otherwise). TokenRequest: type: object properties: token_name: type: string maxLength: 40 description: Friendly name of the token token_scope: type: string enum: - read - write description: The scope of the token. token_expire: type: string format: date description: Date when the token must expire (default max 30 days). required: - username - password - token_name - token_scope - token_expire VcsUpload: description: To create an upload from a version control system type: object properties: vcsType: description: VCS type type: string enum: - svn - git vcsUrl: description: URL of the repository type: string vcsBranch: description: Branch to checkout for analysis (for Git only) type: string vcsName: description: Display name of the upload type: string vcsUsername: description: Username for the VCS type: string vcsPassword: description: Password for the VCS type: string required: - vcsType - vcsUrl UploadLicenses: type: array items: type: object properties: filePath: description: Relative file path type: string example: "path/to/LICENSE" findings: $ref: '#/components/schemas/Findings' clearing_status: type: string example: "Do not use" UploadCopyrights: type: array items: type: object properties: copyright: description: Copyright Information type: string example: "Copyright (C) 2017-2020 Free Software Foundation, Inc." filePath: description: Path of the files for which the copyright information is provided type: array items: type: string example: - "path/to/file1" - "path/to/file2" UploadPermGroups: description: Groups with their respective permissions for a upload type: object properties: publicPerm: type: string description: Public permission for the upload permGroups: type: array description: Indexed Object of GroupIds with their respective permissions for a upload items: type: object properties: perm: type: string group_pk: type: string group_name: type: string JobQueue: description: Structure of jobs queue type: object properties: jobQueueId: description: Job queue id type: integer jobQueueType: description: Job queue type (generally agent name) type: string startTime: description: Job queue start time type: string endTime: description: Job queue end time type: string status: description: Job queue completion status type: string itemsProcessed: description: Number of items processed type: integer log: description: Location of log file if exists type: string nullable: true dependencies: description: List of dependent job queue ids type: array items: type: integer itemsPerSec: description: Number of items processed per second type: number format: float canDoActions: description: Job can accept new actions like pause and cancel type: boolean isInProgress: description: Checks if the job queue is still in progress type: boolean isReady: description: Is the job ready type: boolean download: description: Report download information type: object nullable: true properties: text: description: Text for download link type: string link: description: Link to download the report type: string GetFileCopyrights: description: CX details of a file type: object properties: content: type: string description: CX content hash: type: string description: CX hash count: type: integer description: Count of the CXs ShowJob: description: History of all the jobs and the job queue info type: object properties: jobId: type: integer description: Job ID jobName: type: string description: Job name (generally upload name) jobQueue: type: array items: $ref: '#/components/schemas/JobQueue' description: Jobs queued for the current job uploadId: type: integer description: Upload ID to which the job belongs to. UrlUpload: description: To create an upload from a URL type: object properties: url: description: URL for file/folder to be uploaded type: string name: description: Viewable name for this file or directory type: string accept: description: > Comma-separated lists of file name suffixes or patterns to accpet type: string reject: description: > Comma-separated lists of file name suffixes or patterns to reject type: string maxRecursionDepth: description: Maximum recursion depth for folders (0 for infinite) type: integer required: - url ServerUpload: description: To create an upload from a server type: object properties: path: description: File path to be uploaded (reccursive, support *) type: string name: description: Viewable name for this file or directory type: string required: - path Hash: description: Hash information of a file type: object properties: sha1: description: SHA1 checksum of the file type: string example: "81fe8bfe87576c3ecb22426f8e57847382917acf" md5: description: MD5 checksum of the file type: string example: "e2fc714c4727ee9395f324cd2e7f331f" sha256: description: SHA256 checksum of the file type: string example: "88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589" size: description: Size of the file in bytes type: integer File: description: Meta information about file in FOSSology type: object properties: hash: $ref: '#/components/schemas/Hash' findings: $ref: '#/components/schemas/Findings' uploads: description: Upload ID if the file was uploaded as a package type: array items: type: integer description: Upload IDs where the given file was found nullable: true message: description: Message in case provided hash not found or error type: string enum: - "Not found" - "Invalid keys" example: "Not found" nullable: true required: - hash Findings: description: License findings and conclusions of file type: object properties: scanner: description: Licenses finding by scanner type: array items: type: string description: Name of license found nullable: true example: - "MIT" - "BSD-3-Clause" conclusion: description: > Licenses concluded by user or main license in case of package type: array items: type: string description: Name of license concluded nullable: true example: - "MIT" - "GPL-2.0" copyright: description: > Copyright findings for the file type: array items: type: string description: Copyright finding nullable: true example: - "Copyright (C) 2017-2020 Free Software Foundation, Inc." - "Copyright (C) 1991-2020 Free Software Foundation, Inc." LicenseDecision: description: Extended License model with additional fields allOf: - $ref: '#/components/schemas/License' properties: sources: description: Array of sources type: array items: type: object properties: name: type: string description: The name of the agent. example: nomos clearingId: type: integer description: The clearing ID. example: 200 agentId: type: integer description: The agent ID. example: 61 highlightId: type: integer description: The highlight ID. example: 2297 page: type: integer description: The page number. example: 0 percentage: type: integer description: The percentage value. example: 78 comment: description: Comment for the license decision type: string example: "This is a comment" acknowledgement: description: License acknowledgement type: string isMainLicense: description: Is the license the main license? type: boolean example: true isRemoved: description: Is the license removed? type: boolean example: false License: description: License from the database type: object properties: shortName: description: Short name type: string example: "MIT" fullName: description: Full name type: string example: "MIT License" text: description: License text type: string example: "MIT License Copyright (c) ..." url: description: URL of the license text type: string example: "https://opensource.org/licenses/MIT" risk: description: Risk level type: integer nullable: true example: 3 isCandidate: description: Is the license a candidate? type: boolean Customise: description: Admin customise data object type: object properties: key: description: field key type: string value: description: field value type: string type: description: field type type: string enum: - int - text - textarea - password - dropdown - boolean label: description: field label type: string group_name: description: group name for the field type: string group_order: description: group order of the field type: integer option_value: description: If type is 'dropdown', provide options in format op1{val1}|op2{val2}|... type: string Group: description: Group object type: object properties: id: description: Id key type: integer example: 126 name: description: Name of a group type: string example: "Main group" GetPrevNextItem: type: object properties: prevItemId: description: Previous item Id type: integer example: 1 nextItemId: description: Next item Id type: integer example: 3 GetBulkHistory: type: object properties: bulkId: type: integer description: The bulk id example: 1 clearingEventId: type: integer description: The event id associated with the bulk example: 1 text: type: string description: Scan reference text example: "Licensed under MIT" matched: type: boolean description: Whether matched or not example: false tried: type: boolean description: Whether tried or not example: true addedLicenses: type: array description: List of license shortnames added to the scan items: type: string example: "MIT" removedLicenses: type: array description: List of license shortnames removed from the scan items: type: string example: "GPL-2.0" GetClearingHistory: type: object properties: date: type: string format: date description: Date of the clearing history example: "2023-06-15" username: type: string description: Username of the user who created the decision. example: "fossy" scope: type: string description: Scope of the clearing enum: - local - package - global type: type: string description: Type of the clearing enum: - TO_BE_DISCUSSED - IRRELEVANT - IDENTIFIED - DO_NOT_USE - NON_FUNCTIONAL addedLicenses: type: array description: List of license shortnames added to the decision items: type: string example: "MIT" removedLicenses: type: array description: List of license shortnames removed from the decision items: type: string example: "GPL-2.0" HighlightInfo: type: object properties: start: type: integer description: Start position of the highlight in file example: 68 end: type: integer description: End position of the highlight in file example: 70 type: type: string description: Type of highlight enum: - M # Match - MC # Changed - MA # Added - MD # Deleted - S # Signature - K # Keyword - B # Bulk - C # Copyright - U # Url - E # Email - A # Author - I # IPRA - X # ECC - KW # Keyword others - any # Undefined shortName: type: string description: License shortname example: MIT refStart: type: integer description: Start of monk diff highlight (relative) example: 0 refEnd: type: integer description: End of monk diff highlight (relative) example: 53 infoText: type: string description: Tooltip text example: "MIT: 'MIT License\n\nCopyright (c) '" htmlElement: type: string OneShotInfo: type: object properties: data: description: Data found during scan, e.g. Licenses, Copyrights type: array highlights: type: array items: $ref: '#/components/schemas/HighlightInfo' ClearingProgressInfo: type: object properties: totalFilesOfInterest: description: Total number of targeted files to be cleared type: integer example: 234 totalFilesCleared: description: Total number of files cleared type: integer example: 200 LicenseHistogram: type: object properties: id: type: integer example: 357 name: type: string example: "ACE" scannerCount: type: integer example: 0 concludedCount: type: integer example: 1 AgentOfUpload: type: object properties: successfulAgents: type: array items: properties: agent_id: type: integer example: 20 agent_rev: type: string example: "4.1.0.282-rc1.ffb851" agent_name: type: string example: "reso" uploadId: type: integer example: 10 agentName: type: string example: "reso" currentAgentId: type: integer example: 20 currentAgentRev: type: string example: "4.1.0.282-rc1.ffb851" isAgentRunning: type: boolean example: false TreeViewModel: type: object properties: fileDetails: type: object description: Details about the file. properties: fileName: type: string description: The name of the file. example: "scss" id: type: integer description: The ID of the item. example: 113 uploadId: type: integer description: The ID of the upload. example: 10 agentId: type: string description: The ID of the agent. example: "" isContainer: type: boolean description: Indicates if the item is a folder or file. example: true licenseList: type: array description: List of licenses. items: type: object properties: id: type: integer description: The ID of the license. example: 126 name: type: string description: The name of the license. example: "MIT" agents: type: array description: List of agents associated with the license. items: type: object properties: id: type: integer description: The ID of the agent. example: 1 name: type: string description: The name of the agent. example: "agent1" matchPercentage: type: integer description: The match percentage of the agent. example: 95 editedLicenseList: type: array description: List of edited licenses. items: type: object properties: id: type: integer description: The ID of the edited license. example: 126 name: type: string description: The name of the edited license. example: "MIT" clearingStatus: type: string description: The clearing status. enum: - green - red - grey - yellow - redGreen clearingProgress: type: object description: The progress of clearing. properties: filesCleared: type: integer description: The number of files cleared. example: 1 filesToBeCleared: type: integer description: The number of files to be cleared. example: 4 totalFilesCount: type: integer description: The total count of files. example: 99 ScannedLicense: type: object properties: id: type: integer description: Id of the license example: 29 shortname: type: string description: Short name of the license example: Apache-2.0 occurrence: type: integer description: Number of occurrences of the license example: 1 unique: type: integer description: Number of unique occurrences of the license example: 1 spdxName: type: string description: SPDX name associated with the license example: Apache-2.0 AgentsRevision: type: object properties: id: type: integer example: 68 name: type: string example: "monk" revision: type: string example: "\"4.1.0.283-rc1\".705d4b" UserGroupMember: type: object properties: user: $ref: '#/components/schemas/User' group_perm: type: integer description: Permission of the user in the group. example: 1 Obligation: description: Obligation information type: object properties: id: description: Id key type: integer example: 126 topic: description: Obligation topic type: string example: "Should preserve notice" type: description: Type of obligation type: string example: "Obligation" text: description: Obligation text type: string example: "All notices from the package should be preserved." classification: description: > Level of attention this obligation should raise in the clearing process type: string enum: - green - white - yellow - red comment: description: Comments for the obligation type: string nullable: true example: "Please respect the obligation" ApiInfo: description: Info about the API type: object properties: name: type: string description: Name of the API service description: type: string description: Additional information version: type: string description: Current API version as per documentation security: type: array description: Security methods allowed items: type: string contact: type: string description: Contact email from API docs license: type: object properties: name: type: string description: Name of license url: type: string description: Link to license description: Licensing of API fossology: type: object description: Information about FOSSology server. Values can be null. properties: version: type: string description: Version of the FOSSology server nullable: true example: "4.0.0" branchName: type: string description: Branch deployed on the FOSSology server nullable: true example: master commitHash: type: string description: Hash of commit deployed on the FOSSology server nullable: true example: "306260" commitDate: type: string description: | Date of commit deployed on the FOSSology server in ISO8601 format nullable: true example: "2022-01-05T22:03:00+05:30" buildDate: type: string description: Date on which packages were built in ISO8601 format nullable: true example: "2022-01-07T11:13:00+05:30" CreateMaintenance: description: Maintenance options type: object properties: options: type: array description: options list nullable: false items: type: string enum: - a - A - F - g - E - L - N - R - t - T - D - Z - I - v - o - l logsDate: type: string description: Date from which to remove older gold files from repository. nullable: true example: "2021-08-19" goldDate: type: string description: Date from which to remove older log files from repository. nullable: true example: "2022-07-16" ScheduleBulkScan: type: object properties: bulkActions: type: array items: type: object properties: licenseShortName: type: string example: MIT licenseText: type: string example: "License text" acknowledgement: type: string example: "Acknowledgement text" comment: type: string example: "Comment text" licenseAction: type: string enum: - ADD - REMOVE refText: type: string example: "reference text" bulkScope: type: string enum: - folder - upload forceDecision: type: boolean example: false ignoreIrre: type: boolean example: false delimiters: type: string example: "DEFAULT" scanOnlyFindings: type: boolean example: false ScannedEditedLicense: type: object properties: id: type: integer example: 29 name: type: string example: Apache-2.0 details: type: object properties: count: type: integer example: 1 unique: type: integer example: 1 rf_pk: type: integer example: 29 spdx_id: type: string example: Apache-2.0 NewGroupPermission: description: User Group permission update type: object properties: perm: type: integer description: | New user permission in the group. 0: User 1: Admin 2: Advisor minimum: 0 maximum: 2 ClearingDecision: description: Clearing decision information type: object properties: decisionType: type: integer description: | Type of decision. 0: WIP 3: To be discussed 4: Irrelevant 5: Identified 6: Do not use 7: Non functional example: 3 enum: [0, 3, 4, 5, 6, 7] globalDecision: type: boolean description: | Is the decision global? If true, the decision is applied to all occurrence of the file on the server! SetMainLicense: description: Set Main License information type: object properties: shortName: type: string description: short name of the license example: MIT EditedLicense: type: object properties: id: type: integer example: 29 shortName: type: string example: Apache-2.0 count: type: integer example: 1 spdx_id: type: string example: LicenseRef-fossology-ACE ObligationsList: type: array items: properties: id: type: integer example: 29 obligation_topic: type: string example: Obligation text ObligationExtended: type: object allOf: - $ref: '#/components/schemas/Obligation' properties: modification: type: boolean description: Applies on modified text? active: type: boolean description: Obligation is active/inactive textUpdatable: type: boolean description: Obligation text can be updated? licenses: type: array description: List of associated licenses with obligation items: type: string description: Shortname of license candidateLicenses: type: array description: List of associated candidate licenses with obligation items: type: string description: Shortname of candidate license hash: type: string description: MD5 hash of obligation text AddMember: description: UserMember options type: object properties: perm: type: integer description: Default permission of the new member. nullable: false minimum: 0 maximum: 2 example: 0 HealthInfo: description: Health status of server type: object properties: status: type: string enum: - OK - WARN - ERROR description: Status of service scheduler: type: object description: Scheduler information properties: status: type: string description: Health status of scheduler enum: - OK - ERROR db: type: object description: DB connection status properties: status: type: string description: Health status of DB connection enum: - OK - ERROR ConfResponse: type: object properties: reviewed: type: string description: shows reviewed by name footer: type: string description: footer value reportRel: type: string description: release date community: type: string description: shows community name component: type: string description: shows component name version: type: string description: shows version releaseDate: type: string description: shows version sw360Link: type: string description: shows sw360Link componentType: type: string enum: - purl - maven - nuget - npm - pypi - package-url description: shows component type componentId: type: string description: shows component id generalAssesment: type: string description: shows assesment test gaAdditional: type: string description: shows additional info gaRisk: type: string description: shows risk info gaCheckbox: type: string description: shows checkbox status spdxSelection: type: string description: shows checkbox status for spdx excludedObligations: type: string description: shows excluded obligations department: type: string description: shows department depNotes: type: string description: shows department notes exportNotes: type: string description: shows export notes copyrightNotes: type: string description: shows copyright notes unifiedColumns: type: object properties: report conf section id: type: string enum: - on - off example: on description: unified columns value globalDecision: type: boolean description: shows copyright notes type: type: string enum: - INFO - ERROR description: Denotes if info was created on error APIinfo: description: Api Documentation type: object properties: openapi: type: string description: version info: type: string description: version info servers: type: string description: server info security: type: string description: security info tags: type: string description: API tags paths: type: string description: API endpoints AddEditDeleteLicenseDecision: type: object properties: shortName: type: string description: Short name of the license example: "MIT" add: type: boolean description: | If true, add the license if not on the list, otherwise update it's properties. If false, remove the license from the list. example: true text: type: string description: Clearing info text example: "This is a license decision text" ack: type: string description: Acknowledgement of license decision example: "This is a license decision acknowledgement text" comment: type: string description: Comment for the license decision example: "This is a license decision comment" DecisionImporter: description: Information required by Decision Importer agent type: object properties: importerUser: type: integer description: User ID on which to tag imported decisions. Use '0' for self. default: 0 example: 3 required: ["importerUser"] GetReuseReportSummary: description: Information required by Reuse Report Summary for an upload type: object properties: declearedLicense: type: string description: Decleared license example: "MIT" clearedLicense: type: string description: Cleared license example: "MIT, BSD-3-Clause" unusedLicense: type: string description: Unused license example: "AAL" missingLicense: type: string description: Missing license example: "MIT, BSD-3-Clause" SpdxRdfImport: description: Information required by SPDX RDF report import agent. type: object properties: addNewLicensesAs: type: string description: Create new licenses as enum: - candidate - license default: candidate addLicenseInfoFromInfoInFile: type: boolean description: > Add the License Info as findings from SPDX tag of type licenseInfoInFile default: true addLicenseInfoFromConcluded: type: boolean description: > Add the License Info as findings from SPDX tag of type licenseConcluded default: false addConcludedAsDecisions: type: boolean description: Add concluded licenses as decisions default: true addConcludedAsDecisionsTBD: type: boolean description: Add concluded licenses imported as "to be discussed" default: true addCopyrights: type: boolean description: Add the copyright information as text findings default: false AdminLicenseAcknowledgement: type: object properties: id: type: integer description: The primary key of the AdminAcknowledgement example: 2 name: type: string description: The name of the AdminAcknowledgement example: ackupdated acknowledgement: type: string description: The acknowledgement text of the AdminAcknowledgement example: updated Ack text is_enabled: type: boolean description: Indicates if the AdminAcknowledgement is enabled example: true MutateAdminAcknowledgement: type: object properties: id: type: integer description: | The ID of the acknowledgement. Required if update is TRUE. example: 2 name: type: string description: | The name of the acknowledgement. Not required if update is TRUE and toggle is set. example: ackName ack: type: string description: | The acknowledgement text. Not required if update is TRUE and toggle is set. example: acknowledgement text toggle: type: boolean description: A boolean indicating the toggle state. example: true update: type: boolean description: | A boolean indicating if an update is needed. If true, update the given admin acknowledgement. if false, add new admin acknowledgement. example: true StandardComment: type: object properties: id: type: integer example: 2 description: The primary key of the comment. name: type: string example: firstComment description: The name of the comment. comment: type: string example: The comment's text description: The text content of the comment. is_enabled: type: boolean example: true description: Indicates whether the comment is enabled or not. GetJobStatistics: type: object properties: agentName: type: string description: "Name of the agent" example: "monkbulk" agentDesc: type: string description: "Description of the agent" example: "monkbulk agent" firedJobs: type: integer description: "Number of fired jobs" example: 23 MutateStdComment: type: object properties: id: type: integer description: | The ID of the standard comment. Required if update is TRUE. example: 2 name: type: string description: | The name of the standard comment. Required if update is FALSE. example: commentName comment: type: string description: | The standard comment text. Required if update is FALSE. example: comment text toggle: type: boolean description: A boolean indicating the toggle state. example: true update: type: boolean description: | A boolean indicating if an update is needed. If TRUE, update the given standard comment. if FALSE, add new standard comment. example: true GetDatabaseContent: type: object properties: metric: type: string description: The metric associated with the object. example: Users total: type: integer description: The total count associated with the metric. example: 2 lastVacuum: type: string description: The date and time of the last vacuum operation. If null, no vacuum operation has been performed. example: "null" lastAnalyze: type: string description: The date and time of the last analyze operation. If null, no analyze operation has been performed. example: "null" DiskUsage: type: object properties: data: type: array description: "List of filesystem information" items: type: object properties: filesystem: type: string description: "Filesystem path" example: "/dev/nvme0n1p6" capacity: type: string description: "Total capacity of the filesystem" example: "192G" used: type: string description: "Used space in the filesystem" example: "173G" available: type: string description: "Available space in the filesystem" example: "8.8G" percentFull: type: string description: "Percentage of the filesystem used" example: "96%" mountPoint: type: string description: "Mount point of the filesystem" example: "/" notes: type: object description: "Additional notes" properties: database: type: string description: "Database location" example: "/var/lib/postgresql/12/main" repository: type: string description: "Repository location" example: "/srv/fossology/repository" fossologyConfig: type: string description: "Fossology configuration location" example: "/usr/local/etc/fossology" GetPHPInfo: type: object properties: phpVersion: type: string description: "Version of PHP" example: "7.4.3-4ubuntu2.18" loadedExtensions: type: array description: "List of loaded extensions in PHP" items: type: object properties: name: type: string description: "Name of the loaded extension" example: "Core" version: type: string description: "Version of the loaded extension" example: "7.4.3-4ubuntu2.18" AllServerJobs: type: object properties: data: type: array description: "List of agents" items: type: object properties: name: type: string description: "Name of the agent" example: "decider" running: type: integer description: "Number of running instances" example: 0 pending: type: integer description: "Number of pending instances" example: 1 eta: type: string description: "Estimated time of arrival" example: "N/A" scheduler: type: string description: "Current scheduler status" enum: - "Running" - "Stopped" GetSuggestedLicense: type: object properties: id: type: integer description: The primary key of the suggested license. example: 1329 spdxName: type: string description: The SPDX identifier of the suggested license. example: "LicenseRef-fossology-testmerge" shortname: type: string description: The short name of the suggested license. example: "MIT" fullname: type: string description: The full name of the suggested license. example: "MIT license" text: type: string description: The text content of the suggested license. example: "Copyright (c) 2002 by AUTHOR PROFESSIONAL IDENTIFICATION * URL \"PROMOTIONAL SLOGAN FOR AUTHOR'S PROFESSIONAL PRACTICE\"\r\n" url: type: string description: The URL associated with the suggested license. example: "https://www.google.com/" notes: type: string description: Additional notes or comments about the suggested license. example: "public notes" risk: type: integer description: The risk level associated with the suggested license. example: 2 highlights: type: array items: $ref: '#/components/schemas/HighlightInfo' GetDatabaseMetric: type: object properties: metric: type: string description: The metric associated with the object. example: FOSSology database size total: type: string description: The total count associated with the metric. example: "36" GetActiveQuery: properties: pid: type: integer example: 1831 query: type: string enum: - idle - active startTime: type: string format: date-time example: "2023-09-28T05:15:05.227Z" elapsed: type: string example: "00:01:06.961334" GetSchedulerOption: type: object properties: jobList: type: array description: "List of jobs" items: type: string example: [ "scheduler" ] priorityList: type: array description: "List of priorities" items: type: integer example: [ -20, -19, -18 ] verboseList: type: array description: "List of verbose levels" items: type: integer example: [ 1, 3 ] agentList: type: array description: "List of agents" items: type: string example: [ "clixml", "pkgagent", "maintagent", "deciderjob" ] responses: defaultResponse: description: Some error occurred. Check the "message" content: application/json: schema: $ref: '#/components/schemas/Info'