Add GET /api/system/info and return SAP version from login
- capture Version + SessionTimeout from the Service Layer login
response (SessionManager.loginInfo, survives logout) and return
them from POST /api/session/login
- new GET /api/system/info: entity sets (service document),
UserFieldsMD/UserTablesMD/UserObjectsMD customizations and
CompanyService_GetAdminInfo; unreadable sections come back as
{ error } instead of failing the whole request
- OpenAPI: new System tag, examples for both endpoints
- tests for getSystemInfo section isolation and loginInfo retention
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,14 @@ HTTP API hlavičky:
|
||||
takže funguje i při `SAP_B1_RETRY_COUNT=0`.
|
||||
- **Logout** – `POST /b1s/v1/Logout` se posílá **s aktivní session cookie**, jinak by
|
||||
Service Layer nevěděl, kterou session ukončit, a nechal by ji běžet až do timeoutu.
|
||||
- **Verze a system info** – login response obsahuje `Version` (např. `1000230` = SAP B1
|
||||
10.0 PL 23) a `SessionTimeout`; connector si je ukládá (`client.loginInfo`, přežije
|
||||
logout) a HTTP endpoint `POST /api/session/login` je vrací v odpovědi.
|
||||
`GET /api/system/info` navíc vrátí přehled instalace: service document (`GET /b1s/v1/`
|
||||
→ dostupné entity sety), `UserFieldsMD` (UDF), `UserTablesMD` (UDT), `UserObjectsMD`
|
||||
(UDO) a `CompanyService_GetAdminInfo`. Sekce, na kterou SAP uživatel nemá práva, se
|
||||
vrátí jako `{ "error": "…" }`, aby jedno chybějící oprávnění neshodilo celý přehled
|
||||
(chyba je v odpovědi vidět, nejde o tiché selhání).
|
||||
- **Stránkování** – následuje `odata.nextLink` i `@odata.nextLink`. U absolutních
|
||||
nextLinků se zachová i query string (`$skip` apod.), takže `listAll` nezacyklí.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user