{"id":23122631,"url":"https://github.com/folio-org/mod-audit","last_synced_at":"2026-01-16T11:22:38.123Z","repository":{"id":37740240,"uuid":"147712642","full_name":"folio-org/mod-audit","owner":"folio-org","description":"Module for managing audit data","archived":false,"fork":false,"pushed_at":"2026-01-12T14:12:51.000Z","size":974,"stargazers_count":1,"open_issues_count":1,"forks_count":8,"subscribers_count":23,"default_branch":"master","last_synced_at":"2026-01-12T20:13:18.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folio-org.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-09-06T17:57:41.000Z","updated_at":"2026-01-12T14:12:53.000Z","dependencies_parsed_at":"2025-12-17T22:02:12.339Z","dependency_job_id":null,"html_url":"https://github.com/folio-org/mod-audit","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/folio-org/mod-audit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fmod-audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fmod-audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fmod-audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fmod-audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folio-org","download_url":"https://codeload.github.com/folio-org/mod-audit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folio-org%2Fmod-audit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T07:29:01.611Z","updated_at":"2026-01-16T11:22:38.094Z","avatar_url":"https://github.com/folio-org.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mod-audit\n\nCopyright (C) 2017-2023 The Open Library Foundation\n\nThis software is distributed under the terms of the Apache License,\nVersion 2.0. See the file \"[LICENSE](LICENSE)\" for more information.\n\n## Table of contents\n\n- [Introduction](#introduction)\n- [API](#api)\n  - [Configuration API](#configuration-api)\n    - [Permissions for working with audit configurations](#permissions-for-working-with-audit-configurations)\n    - [Updating a configuration](#updating-a-configuration)\n- [Additional information](#additional-information)\n  - [Other documentation](#other-documentation)\n  - [Issue tracker](#issue-tracker)\n  - [Quick start](#quick-start)\n  - [API documentation](#api-documentation)\n  - [Code analysis](#code-analysis)\n  - [Download and configuration](#download-and-configuration)\n\n## Introduction\n\nThe mod-audit module provides API to access and modify audit data.\n\n## API\n\n### Configuration API\n\n| METHOD | URL                                                   | DESCRIPTION                                       |\n|:-------|:------------------------------------------------------|:--------------------------------------------------|\n| GET    | `/audit/config/groups`                                | Lists module's all available configuration groups |\n| GET    | `/audit/config/groups/{groupId}/settings`             | Retrieves configurations of specific group        |\n| PUT    | `/audit/config/groups/{groupId}/settings/{settingId}` | Updates a specific configuration of a group       |\n\n#### Permissions for working with audit configurations\nAudit configurations are grouped by certain identifiers and to view or update them the user must have the following special permissions:\n\n| Permission                                                    | DESCRIPTION                                                      |\n|:--------------------------------------------------------------|:-----------------------------------------------------------------|\n| `audit.config.groups.settings.{groupId}.collection.get`       | permission required for retrieving the configurations of a group |\n| `audit.config.groups.settings.{groupId}.{settingId}.item.put` | permission for updating a configuration of a group               |\n\nHere, `{groupId}` is the id of a configuration group that can have values like `audit.authority`, `audit.inventory` \nand `{settingId}` is the id of a configuration to be updated that can have values like `enabled`, `records.page.size`, `records.retention.period` etc.\n\nExample response for the configuration groups API call `GET /audit/config/groups`:\n\n```json\n{\n  \"settingGroups\": [\n    {\n      \"id\": \"audit.authority\",\n      \"name\": \"Authority Audit Configuration\",\n      \"description\": \"Group of configurations for audit of authority records\"\n    },\n    {\n      \"id\": \"audit.inventory\",\n      \"name\": \"Inventory Audit Configuration\",\n      \"description\": \"Group of configurations for audit of inventory records: instances, holdings, items, etc.\"\n    }\n  ],\n  \"totalRecords\": 2\n}\n```\n\nBy replacing the `groupId` in `GET /audit/config/groups/{groupId}/settings` taken from the above API call with an id of some configuration group, one can retrieve the settings for that group\nFor example, Inventory Audit configurations can be retrieved with the API call: `GET /audit/config/groups/audit.inventory/settings` and example response may look something like this:\n\n```json\n{\n  \"settings\": [\n    {\n      \"key\": \"enabled\",\n      \"value\": true,\n      \"type\": \"BOOLEAN\",\n      \"description\": \"Defines if the inventory audit is enabled\",\n      \"groupId\": \"audit.inventory\",\n      \"metadata\": {\n        \"createdDate\": \"2025-03-19T00:00:00.000+00:00\",\n        \"createdByUserId\": \"00000000-0000-0000-0000-000000000000\",\n        \"updatedDate\": \"2025-03-19T00:00:00.000+00:00\",\n        \"updatedByUserId\": \"00000000-0000-0000-0000-000000000000\"\n      }\n    }\n  ],\n  \"totalRecords\": 1\n}\n```\n\n#### Updating a configuration\nIn order to update a configuration, we can use the `PUT /audit/config/groups/{groupId}/settings/{settingId}` API call.\nHere, the `groupId` is the id of configuration group and `settingId` is the id of configuration to be updated which can be retrieved from the previous API call.\nThe information about `key` and `type` fields which are provided in the request body can also be retrieved from the previous API call.\n\nFor example, to update the `enabled` configuration of the `audit.inventory` group, we can use the following API call:\n\n```http\nPUT /audit/config/groups/audit.inventory/settings/enabled\n\nContent-Type: application/json\nx-okapi-tenant: [tenant]\nx-okapi-token: [JWT_TOKEN]\n\n{\n    \"key\": \"enabled\",\n    \"value\": true,\n    \"description\": \"Defines if the inventory audit is enabled\",\n    \"type\": \"BOOLEAN\",\n    \"groupId\": \"audit.inventory\"\n}\n```\n\nOnly the `value` and `description` fields of a configuration can be updated using the above API call and the other fields should have the same\nvalues as they have in the response from the `GET /audit/config/groups/{groupId}/settings`. Providing the different values for those other fields will\nbreak the logic of configuration's usage.\n\nHere is an example of request body for updating the `records.retention.period` configuration which is of `INTEGER` type\n\n```json\n{\n  \"key\": \"records.retention.period\",\n  \"value\": 30,\n  \"description\": \"Defines the retention period of audit records in days\",\n  \"type\": \"INTEGER\",\n  \"groupId\": \"audit.inventory\"\n}\n``` \nIn general, the value for a configuration to be updated should be the valid value for the type of that configuration.\n\n## Additional information\n\n### Other documentation\n\nOther [modules](https://dev.folio.org/source-code/#server-side) are described,\nwith further FOLIO Developer documentation at [dev.folio.org](https://dev.folio.org/)\n\n### Issue tracker\n\nSee project [MODAUDIT](https://issues.folio.org/browse/MODAUD)\nat the [FOLIO issue tracker](https://dev.folio.org/guidelines/issue-tracker).\n\n### Quick start\n\nCompile with `mvn clean install`\n\nRun the local stand-alone instance:\n\n```\njava -jar target/mod-audit-fat.jar -Dhttp.port=8085 embed_postgres=true\n```\n\n### API documentation\n\nThis module's [API documentation](https://dev.folio.org/reference/api/#mod-audit).\n\nThe local API docs are available, for example:\n```\nhttp://localhost:8081/apidocs/?raml=raml/audit-data.raml\netc.\n```\n\n### Code analysis\n\n[SonarQube analysis](https://sonarcloud.io/dashboard?id=org.folio%3Amod-audit).\n\n### Download and configuration\n\nThe built artifacts for this module are available.\nSee [configuration](https://dev.folio.org/download/artifacts) for repository access,\nand the [Docker image](https://hub.docker.com/r/folioorg/mod-audit/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolio-org%2Fmod-audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolio-org%2Fmod-audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolio-org%2Fmod-audit/lists"}