{"id":19889556,"url":"https://github.com/tsmx/oracle-rest-get","last_synced_at":"2025-08-31T11:49:18.601Z","repository":{"id":116727527,"uuid":"164476033","full_name":"tsmx/oracle-rest-get","owner":"tsmx","description":"A configurable service creating a read-only REST-API (GET) for an Oracle Database scheme.","archived":false,"fork":false,"pushed_at":"2024-09-30T20:15:15.000Z","size":1039,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T04:44:14.831Z","etag":null,"topics":["api","oracle-db","rest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2019-01-07T18:48:13.000Z","updated_at":"2024-09-30T20:15:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"58d6d7ad-1a21-422d-9e40-047137a7bee7","html_url":"https://github.com/tsmx/oracle-rest-get","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tsmx/oracle-rest-get","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Foracle-rest-get","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Foracle-rest-get/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Foracle-rest-get/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Foracle-rest-get/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsmx","download_url":"https://codeload.github.com/tsmx/oracle-rest-get/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsmx%2Foracle-rest-get/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272976970,"owners_count":25025043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","oracle-db","rest"],"created_at":"2024-11-12T18:10:44.975Z","updated_at":"2025-08-31T11:49:13.560Z","avatar_url":"https://github.com/tsmx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oracle-rest-get\n\nA simple example for creating configurable readonly GET REST-endpoints for data in an Oracle DB tables or views using [oracledb](https://www.npmjs.com/package/oracledb).\n\n## Configuration setup\n\n```json\n{\n    \"dbconfig\": {\n        \"user\": \"test\",\n        \"password\": \"test\",\n        \"connectString\": \"localhost/xepdb1\"\n    },\n    \"entities\": [\n        {\n            \"url\": \"/storage\",\n            \"tablename\": \"STORAGE\",\n            \"id\": \"ID\"\n        },\n        {\n            \"url\": \"/contract\",\n            \"tablename\": \"CONTRACT\",\n            \"id\": \"ID\"\n        }\n    ]\n}\n```\n\n## Routes\n\nThe sample code/config dynamically registers the following routes under `localhost:3000` to have a basic REST API for data retrieval:\n```\nGET /storage\nGET /storage/:id \nGET /contract\nGET /contract/:id\n```\nQueries the respective tables and returns the result-set as an array of JSON objects. \n\n## Pre-requisites\n\n- A locally installed Oracle XE 18c with user `test` in the container `XEPDB1`.\n- Oracle libraries registered with `ldconfig`. To do so, as root:\n  - Add path to the libs to `/etc/ld.so.conf` directly or create a new conf file under `/etc/ld.so.conf.d`\n  - Run `ldconfig`\n  - E.g. assuming Oracle was installed in `/opt/oracle`:\n  ```bash\n  $ echo \"/opt/oracle/product/18c/dbhomeXE/lib\" \u003e /etc/ld.so.conf.d/oracle-xe-18c.conf\n  $ ldconfig\n  ```\n\n## Considerations before production use\n\nThe provided code is a first step to get a read-only REST interface up \u0026 running for an Oracle DB. Before using it in production you should at least consider the following points:\n\n- Securing the configuration where sensible data is currently stored as plain text. For that I recommend my project [secure-config](https://www.npmjs.com/package/@tsmx/secure-config).\n- Adding filter functionality to the list retrieval methods, e.g. as query strings. Also here have a closer look on security as passed values will have to make it to your queries.\n- Take care about compound keys if needed.\n- Be sure that the provided DB user only has read rights on the objects (tables/views) he really needs. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsmx%2Foracle-rest-get","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsmx%2Foracle-rest-get","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsmx%2Foracle-rest-get/lists"}