openapi: 3.1.0 info: title: FOSSology Admin Upload 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: [] tags: - name: Upload description: Endpoints related to uploads paths: /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 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 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 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 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' /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 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' components: schemas: 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' 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 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 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 ScanOptions: type: object properties: analysis: $ref: '#/components/schemas/Analysis' decider: $ref: '#/components/schemas/LicenseDecider' reuse: $ref: '#/components/schemas/Reuser' scancode: $ref: '#/components/schemas/Scancode' 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 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 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. patent: type: boolean description: Should IPRA 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. 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 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 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 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. AgentsRevision: type: object properties: id: type: integer example: 68 name: type: string example: monk revision: type: string example: '"4.1.0.283-rc1".705d4b' 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 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 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 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 OneShotInfo: type: object properties: data: description: Data found during scan, e.g. Licenses, Copyrights type: array highlights: type: array items: $ref: '#/components/schemas/HighlightInfo' 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: - true - false example: true 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 LicenseHistogram: type: object properties: id: type: integer example: 357 name: type: string example: ACE scannerCount: type: integer example: 0 concludedCount: type: integer example: 1 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 SetMainLicense: description: Set Main License information type: object properties: shortName: type: string description: short name of the license example: MIT 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. 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 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 copyright_deactivation: type: boolean description: Deactivate false positive copyrights (experimental). copyright_clutter_removal: type: boolean description: Deactivate false positive copyrights and remove clutter from them (experimental). 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 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 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 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 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 - MC - MA - MD - S - K - B - C - U - E - A - I - X - KW - any 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 Copyright (c) ''' htmlElement: type: string 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. ' 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! ' 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 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. GetPrevNextItem: type: object properties: prevItemId: description: Previous item Id type: integer example: 1 nextItemId: description: Next item Id type: integer example: 3 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. 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 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 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 responses: defaultResponse: description: Some error occurred. Check the "message" content: application/json: schema: $ref: '#/components/schemas/Info' 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: {} externalDocs: description: Basic guide url: https://github.com/fossology/fossology/wiki/FOSSology-REST-API x-reuse: - - 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 - - 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 - '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' - '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' - description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo'