{"id":21430158,"url":"https://github.com/cuba-platform/jpawebapi","last_synced_at":"2025-03-16T21:44:51.592Z","repository":{"id":150932257,"uuid":"175473641","full_name":"cuba-platform/jpawebapi","owner":"cuba-platform","description":"CUBA JPA Web API Addon","archived":false,"fork":false,"pushed_at":"2025-03-14T12:25:13.000Z","size":393,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T12:29:49.489Z","etag":null,"topics":["cuba-component","cuba-platform","enterprise","jpa"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"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/cuba-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-03-13T18:04:13.000Z","updated_at":"2025-03-14T12:07:46.000Z","dependencies_parsed_at":"2023-04-28T00:01:25.198Z","dependency_job_id":null,"html_url":"https://github.com/cuba-platform/jpawebapi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fjpawebapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fjpawebapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fjpawebapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuba-platform%2Fjpawebapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuba-platform","download_url":"https://codeload.github.com/cuba-platform/jpawebapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243940063,"owners_count":20372044,"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","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":["cuba-component","cuba-platform","enterprise","jpa"],"created_at":"2024-11-22T22:21:06.054Z","updated_at":"2025-03-16T21:44:51.572Z","avatar_url":"https://github.com/cuba-platform.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JPA Web API\n\n[![license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Build Status](https://travis-ci.org/cuba-platform/jpawebapi.svg?branch=master)](https://travis-ci.org/cuba-platform/jpawebapi)\n[![Documentation](https://img.shields.io/badge/documentation-online-03a9f4.svg)](https://github.com/cuba-platform/jpawebapi/wiki)\n\n## Overview\n\nThe universal JPA web API enables loading and saving any entities defined in the application data model by sending simple HTTP requests.\n\nThe add-on provides an easy way to integrate with a wide range of third-party applications – from the JavaScript code executed in the browser to arbitrary systems running on Java, .NET, PHP or any other platform.\n\nKey API features:\n\n- Loading entity instances from the database by identifier or by JPQL query with parameters.\n- Saving new and modified instances, deleting instances.\n- Obtaining a description of the data model in HTML format.\n- Data representation in JSON and XML formats.\n- Middleware service calls.\n- User authentication.\n\nRead add-on [Wiki](https://github.com/cuba-platform/jpawebapi/wiki) for additional information.\n\n## Installation\n\nYou can install the add-on by coordinates choosing the required version of the add-on from the table.\n\nIn case you want to install the add-on by manual editing or by building from sources see the complete add-ons installation guide in [CUBA Platform documentation](https://doc.cuba-platform.com/manual-latest/manual.html#app_components_usage).\n\n### By Coordinates\n\n1. Open your application in CUBA Studio. Check the latest version of CUBA Studio on the [CUBA Platform site](https://www.cuba-platform.com/download/previous-studio/).\n2. Go to *CUBA -\u003e Marketplace* in the main menu.\n\n ![marketplace](img/marketplace.png)\n\n3. Click the icon in the upper-right corner.\n\n ![by-coordinates](img/by-coordinates.png)\n\n4. Paste the add-on coordinates in the corresponding field as follows:\n\n `com.haulmont.addon.jpawebapi:jpawebapi-global:\u003cadd-on version\u003e`\n\n where `\u003cadd-on version\u003e` is compatible with the used version of the CUBA platform.\n\n | Platform Version | Add-on Version |\n|------------------|----------------|\n| 7.2.X            | 1.1.0          |\n| 7.1.X            | 1.0.0          |\n\n5. Click *Install* and apply the changes. The add-on will be installed to your project.\n\nAfter that the JPA Web API functionality will be available at:\n\n- `{host:port}/app/dispatch/api/*` - for Web module\n- `{host:port}/app-portal/api/*` - for Portal module\n\n## Customization\n\nJPA Web API URL can be customized via `jpawebapi.mapping.url` app property both for `web` and `portal` application modules.\n\n## Security\n\nSince CUBA Platform 7.2 you should create a new [role](https://doc.cuba-platform.com/manual-latest/roles.html) with included `permission-config.jpawebapi.api.enabled` permission and assign it to new users in order to grant them access to the add-on.\n\n## Demo\n\n1. Login as `admin / admin` with `GET` request:\n\n```\nhttp://localhost:8080/app/dispatch/api/login?u=admin\u0026p=admin\u0026l=ru\n```\n\n2. Load `Users` list using auth token:\n\n```\nhttp://localhost:8080/app/dispatch/api/query.json?e=sec$Role\u0026q=select+r+from+sec$Role+r\u0026s=b376f1d2-15d7-ea33-4048-2199de9721e7\n```\n\n![demo](./img/demo.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuba-platform%2Fjpawebapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuba-platform%2Fjpawebapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuba-platform%2Fjpawebapi/lists"}