|
| 1 | +[id="understanding-bulk-import-audit-logs"] |
| 2 | += Understanding the Bulk Import audit Logs |
| 3 | + |
| 4 | +The Bulk Import backend plugin adds the following events to the {product-short} audit logs. |
| 5 | +See link:{linkgettingstartedguide}#assembly-audit-log[Audit Logs in {product}] for more information on how to configure and view audit logs. |
| 6 | + |
| 7 | +*Bulk Import Events*: |
| 8 | + |
| 9 | +`BulkImportUnknownEndpoint`:: |
| 10 | +Tracks requests to unknown endpoints. |
| 11 | + |
| 12 | +`BulkImportPing`:: |
| 13 | +Tracks `GET` requests to the `/ping` endpoint, which allows us to make sure the bulk import backend is up and running. |
| 14 | + |
| 15 | +`BulkImportFindAllOrganizations`:: |
| 16 | +Tracks `GET` requests to the `/organizations` endpoint, which returns the list of organizations accessible from all configured GitHub Integrations. |
| 17 | + |
| 18 | +`BulkImportFindRepositoriesByOrganization`:: |
| 19 | +Tracks `GET` requests to the `/organizations/:orgName/repositories` endpoint, which returns the list of repositories for the specified organization (accessible from any of the configured GitHub Integrations). |
| 20 | + |
| 21 | +`BulkImportFindAllRepositories`:: |
| 22 | +Tracks GET requests to the `/repositories` endpoint, which returns the list of repositories accessible from all configured GitHub Integrations. |
| 23 | + |
| 24 | +`BulkImportFindAllImports`:: |
| 25 | +Tracks `GET` requests to the `/imports` endpoint, which returns the list of existing import jobs along with their statuses. |
| 26 | + |
| 27 | +`BulkImportCreateImportJobs`:: |
| 28 | +Tracks `POST` requests to the `/imports` endpoint, which allows to submit requests to bulk-import one or many repositories into the {product-short} catalog, by eventually creating import pull requests in the target repositories. |
| 29 | + |
| 30 | +`BulkImportFindImportStatusByRepo`:: |
| 31 | +Tracks `GET` requests to the `/import/by-repo` endpoint, which fetches details about the import job for the specified repository. |
| 32 | + |
| 33 | +`BulkImportDeleteImportByRepo`:: |
| 34 | +Tracks `DELETE` requests to the `/import/by-repo` endpoint, which deletes any existing import job for the specified repository, by closing any open import pull request that could have been created. |
| 35 | + |
| 36 | +.Example bulk import audit logs |
| 37 | +[source,json] |
| 38 | +---- |
| 39 | +{ |
| 40 | + "actor": { |
| 41 | + "actorId": "user:default/myuser", |
| 42 | + "hostname": "localhost", |
| 43 | + "ip": "::1", |
| 44 | + "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" |
| 45 | + }, |
| 46 | + "eventName": "BulkImportFindAllOrganizations", |
| 47 | + "isAuditLog": true, |
| 48 | + "level": "info", |
| 49 | + "message": "'get /organizations' endpoint hit by user:default/myuser", |
| 50 | + "meta": {}, |
| 51 | + "plugin": "bulk-import", |
| 52 | + "request": { |
| 53 | + "body": {}, |
| 54 | + "method": "GET", |
| 55 | + "params": {}, |
| 56 | + "query": { |
| 57 | + "pagePerIntegration": "1", |
| 58 | + "sizePerIntegration": "5" |
| 59 | + }, |
| 60 | + "url": "/api/bulk-import/organizations?pagePerIntegration=1&sizePerIntegration=5" |
| 61 | + }, |
| 62 | + "response": { |
| 63 | + "status": 200 |
| 64 | + }, |
| 65 | + "service": "backstage", |
| 66 | + "stage": "completion", |
| 67 | + "status": "succeeded", |
| 68 | + "timestamp": "2024-08-26 16:41:02" |
| 69 | +} |
| 70 | +---- |
0 commit comments