openapi: 3.1.0 info: title: FOSSology Admin Copyrights 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: Copyrights description: Copyright information paths: /uploads/{id}/item/{itemId}/copyrights: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/copyrights/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileCopyrights tags: - Copyrights summary: Deletes a copyright for a file description: Deletes a copyright statement for a particular file responses: '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' patch: operationId: restoreFileCopyrights tags: - Copyrights summary: Restores a copyright for a file description: Restores a copyright statement for a particular file responses: '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' put: operationId: updateFileCopyrights tags: - Copyrights summary: Updates a copyright for a file description: Updates a copyright statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/user-copyrights: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/user-copyrights/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileUserCopyright tags: - Copyrights summary: Deletes user copyright for a file description: Deletes user copyright statement for a particular file responses: '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' patch: operationId: restoreFileUserCopyright tags: - Copyrights summary: Restores user copyright for a file description: Restores user copyright statement for a particular file responses: '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' put: operationId: updateFileUserCopyright tags: - Copyrights summary: Updates user copyright for a file description: Updates user copyright statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/scancode-copyrights: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/scancode-copyrights/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileScanCodeCopyright tags: - Copyrights summary: Deletes scancode copyright for a file description: Deletes scancode copyright statement for a particular file responses: '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' patch: operationId: restoreFileScanCodeCopyright tags: - Copyrights summary: Restores scancode copyright for a file description: Restores scancode copyright statement for a particular file responses: '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' put: operationId: updateFileScanCodeCopyright tags: - Copyrights summary: Updates scancode copyright for a file description: Updates scancode copyright statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/emails: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/emails/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileEmails tags: - Copyrights summary: Deletes an email for a file description: Deletes an email statement for a particular file responses: '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' patch: operationId: restoreFileEmail tags: - Copyrights summary: Restores an email for a file description: Restores an email statement for a particular file responses: '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' put: operationId: updateFileEmail tags: - Copyrights summary: Updates an email for a file description: Updates an email statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/scancode-emails: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/scancode-emails/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileScanCodeEmail tags: - Copyrights summary: Deletes scancode email finding for a file description: Deletes scancode email finding for a particular file responses: '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' patch: operationId: restoreFileScanCodeEmail tags: - Copyrights summary: Restores scancode email finding for a file description: Restores scancode email finding for a particular file responses: '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' put: operationId: updateFileScanCodeEmail tags: - Copyrights summary: Updates scancode email finding for a file description: Updates scancode email finding for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/urls: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/urls/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileUrl tags: - Copyrights summary: Deletes an URL for a file description: Deletes an URL statement for a particular file responses: '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' patch: operationId: restoreFileUrl tags: - Copyrights summary: Restores an URL for a file description: Restores an URL statement for a particular file responses: '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' put: operationId: updateFileUrl tags: - Copyrights summary: Updates an URL for a file description: Updates an URL statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/scancode-urls: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/scancode-urls/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileScanCodeUrl tags: - Copyrights summary: Deletes scancode url finding for a file description: Deletes scancode url finding for a particular file responses: '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' patch: operationId: restoreFileScanCodeUrl tags: - Copyrights summary: Restores scancode url finding for a file description: Restores scancode url finding for a particular file responses: '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' put: operationId: updateFileScanCodeUrl tags: - Copyrights summary: Updates scancode url finding for a file description: Updates scancode url finding for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/authors: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/authors/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileAuthor tags: - Copyrights summary: Deletes an author for a file description: Deletes an author statement for a particular file responses: '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' patch: operationId: restoreFileAuthor tags: - Copyrights summary: Restores an author for a file description: Restores an author statement for a particular file responses: '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' put: operationId: updateFileAuthor tags: - Copyrights summary: Updates an author for a file description: Updates an author statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/scancode-authors: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/scancode-authors/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileScanCodeAuthor tags: - Copyrights summary: Deletes scancode author finding for a file description: Deletes scancode author finding for a particular file responses: '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' patch: operationId: restoreFileScanCodeAuthor tags: - Copyrights summary: Restores scancode author finding for a file description: Restores scancode author finding for a particular file responses: '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' put: operationId: updateFileScanCodeAuthor tags: - Copyrights summary: Updates scancode author finding for a file description: Updates scancode author finding for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/eccs: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/eccs/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileEcc tags: - Copyrights summary: Deletes an ECC for a file description: Deletes an ECC statement for a particular file responses: '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' patch: operationId: restoreFileEcc tags: - Copyrights summary: Restores an ECC for a file description: Restores an ECC statement for a particular file responses: '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' put: operationId: updateFileEcc tags: - Copyrights summary: Updates an ECC for a file description: Updates an ECC statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/keywords: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/keywords/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileKeyword tags: - Copyrights summary: Deletes a keyword for a file description: Deletes a keyword statement for a particular file responses: '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' patch: operationId: restoreFileKeyword tags: - Copyrights summary: Restores a keyword for a file description: Restores a keyword statement for a particular file responses: '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' put: operationId: updateFileKeyword tags: - Copyrights summary: Updates a keyword for a file description: Updates a keyword statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /uploads/{id}/item/{itemId}/ipras: parameters: - 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 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: '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' /uploads/{id}/item/{itemId}/ipras/{hash}: 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: hash required: true description: CX hash in: path schema: type: string delete: operationId: deleteFileIpra tags: - Copyrights summary: Deletes an IPRA for a file description: Deletes an IPRA statement for a particular file responses: '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' patch: operationId: restoreFileIpra tags: - Copyrights summary: Restores an IPRA for a file description: Restores an IPRA statement for a particular file responses: '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' put: operationId: updateFileIpra tags: - Copyrights summary: Updates an IPRA for a file description: Updates an IPRA statement for a particular file requestBody: description: Updated text required: true content: application/json: schema: $ref: '#/components/schemas/SetCopyrightInfo' responses: '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' /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' components: schemas: SetCopyrightInfo: type: object properties: content: type: string description: Copyright text 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 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 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'