{"success":"","message":"Pull completed with errors","error_detail":"CLAS ZCL_MY_CLASS: Syntax error\nException: The statement...","transport_request":"DEVK900001","activated_count":9,"failed_count":2,"activated_objects":[...],"failed_objects":[{"type":"E","text":"The statement METHOD is unexpected","obj_type":"CLAS","obj_name":"ZCL_MY_CLASS","exception":"The statement METHOD is unexpected"}]}
POST /create
Create an abapGit online repository in the ABAP system.
Import objects from an ABAP package into git. This endpoint runs asynchronously as a background job to handle large packages without HTTP timeouts.
Workflow
1. POST /import → Returns HTTP 202 Accepted with jobNumber
2. GET /import?jobNumber=X → Poll every 2 seconds for status
3. Job completes → Final status with result
Request
# 1. Get CSRF token
curl -c cookies.txt -D headers.txt -X GET "https://your-system:44300/sap/bc/z_abapgit_agent/health"\-u USER:PASSWORD \-H"sap-client: 100"\-H"X-CSRF-Token: fetch"CSRF=$(grep-i"x-csrf-token" headers.txt | awk'{print $2}' | tr-d'\r')# 2. Start import job
curl -X POST "https://your-system:44300/sap/bc/z_abapgit_agent/import"\-H"Content-Type: application/json"\-H"sap-client: 100"\-H"X-CSRF-Token: $CSRF"\-b cookies.txt \-u USER:PASSWORD \-d'{
"url": "https://github.com/user/repo.git",
"branch": "main",
"package": "$MY_PACKAGE",
"message": "feat: initial import from ABAP",
"username": "git-username",
"password": "ghp_token"
}'# 3. Poll for status (repeat until status is "completed" or "error")JOB_NUMBER="12345678"
curl -X GET "https://your-system:44300/sap/bc/z_abapgit_agent/import?jobNumber=$JOB_NUMBER"\-H"sap-client: 100"\-b cookies.txt \-u USER:PASSWORD
Request Body
{"url":"https://github.com/user/repo.git","branch":"main","package":"$MY_PACKAGE","message":"feat: initial import from ABAP","username":"git-username","password":"ghp_token"}
Field
Type
Required
Description
url
String
Yes
Git repository URL
branch
String
No
Branch name (default: main)
package
String
No
ABAP package (auto-detected from repo if omitted)
message
String
No
Commit message (default: “feat: initial import from ABAP package <package>”)
username
String
No
Git username (can also use credentials from .abapGitAgent)
Job number for polling (8 digits with leading zeros)
ERROR
String
Error message when SUCCESS is not "X"
GET /import?jobNumber=X
Poll the status of a running import job.
Request
curl -X GET "https://your-system:44300/sap/bc/z_abapgit_agent/import?jobNumber=12345678"\-H"sap-client: 100"\-b cookies.txt \-u USER:PASSWORD
Response: Job Running
{"JOB_NAME":"IMPORT_20260305103045","JOB_NUMBER":"12345678","STATUS":"running","MESSAGE":"Staging files (1250 of 3701)","PROGRESS":65,"STARTED_AT":"20260305103045"}
Response: Job Completed (Success)
{"JOB_NAME":"IMPORT_20260305103045","JOB_NUMBER":"12345678","STATUS":"completed","MESSAGE":"Import completed successfully","PROGRESS":100,"RESULT":"{\"success\":\"X\",\"filesStaged\":\"3701\",\"commitMessage\":\"feat: initial import from ABAP package $MY_PACKAGE\"}","STARTED_AT":"20260305103045","COMPLETED_AT":"20260305103520"}
Response: Job Failed
{"JOB_NAME":"IMPORT_20260305103045","JOB_NUMBER":"12345678","STATUS":"error","MESSAGE":"Error during import","ERROR_MESSAGE":"Repository not found","PROGRESS":30,"STARTED_AT":"20260305103045","COMPLETED_AT":"20260305103112"}
Response Fields
Field
Type
Description
JOB_NAME
String
Background job name
JOB_NUMBER
String
Job number (8 digits)
STATUS
String
running, completed, or error
MESSAGE
String
Human-readable status message
PROGRESS
Integer
Progress percentage (0-100)
RESULT
String
JSON string with final result (when STATUS is "completed")
ERROR_MESSAGE
String
Error details (when STATUS is "error")
STARTED_AT
String
Timestamp when job started (YYYYMMDDHHmmss)
COMPLETED_AT
String
Timestamp when job finished (present when STATUS is "completed" or "error")
Polling Recommendations
Poll interval: 2 seconds
Timeout: 10 minutes (for very large packages)
Status check: Continue polling while STATUS is running
Completion: Stop polling when STATUS is completed or error
Pre-commit syntax check for ABAP source code without requiring pull/activation. Checks CLAS, INTF, PROG, and DDLS files directly from local filesystem.
Key Features:
Check syntax before committing to git
Auto-detection of companion files (locals_def, locals_imp, testclasses)
{"success":false,"command":"SYNTAX","message":"1 of 1 object(s) have syntax errors","results":[{"object_type":"CLAS","object_name":"ZCL_MY_CLASS","success":false,"error_count":2,"warning_count":0,"errors":[{"line":15,"text":"The statement METHOD is unexpected","include":"Main class"},{"line":42,"text":"Variable LV_TEST not declared","include":"Local implementation"}],"warnings":[],"message":"Syntax check failed with 2 error(s)"}]}
Response (unsupported type)
{"success":false,"command":"SYNTAX","message":"1 of 1 object(s) have syntax errors","results":[{"object_type":"FUGR","object_name":"Z_MY_FUGR","success":false,"error_count":1,"errors":[{"line":1,"text":"Unsupported object type: FUGR. Syntax command only supports CLAS, INTF, PROG, DDLS. Use 'pull' command for other object types."}],"message":"Unsupported object type: FUGR. Use 'pull' command instead."}]}
Line numbers are exact - they match the source code strings provided
FIXPT support - Reads from XML metadata, defaults to blank if not specified
Auto-detection - CLI automatically detects and includes companion files
INCLUDE programs - CLI auto-detects parent program for SUBC=I files; the include source is assembled into the parent and line numbers are remapped back to the include file for display
No activation required - Checks happen before git commit
POST /inspect
Inspect source files for issues (runs syntax check via Code Inspector, validates CDS views).
{"success":"","object_type":"CLAS","object_name":"ZCL_MY_CLASS","error_count":2,"errors":[{"line":"15","column":"12","text":"\"MESSAGE\" is not a declaration"},{"line":"20","column":"5","text":"Variable \"LV_TEST\" not found"}]}
{"success":"","test_count":5,"passed_count":3,"failed_count":2,"message":"2 of 5 tests failed","errors":[{"class_name":"ZCL_MY_TEST","method_name":"TEST_METHOD_1","error_kind":"ERROR","error_text":"Expected X but got Y"},{"class_name":"ZCL_MY_TEST","method_name":"TEST_METHOD_2","error_kind":"FAILURE","error_text":"Reference is initial"}]}
Object type (CLAS, INTF, TABL, STRU, DTEL, TTYP, DDLS, ENHO). Auto-detected if not specified
full
Boolean
Return all source sections instead of public section only. For CLAS: returns sections[] with CU/CO/CP/CM*/CCDEF/CCIMP/CCAU includes. For INTF/PROG/DDLS/ENHO: returns single-entry sections[]. Default: false
Supported Object Types
Type
Description
CLAS
Global ABAP class
INTF
Global interface
TABL
Database table
STRU
Structure type
DTEL
Data element
TTYP
Table type
DDLS
CDS View/Entity
ENHO
Enhancement object hook sections
Response (success - class/interface)
{"success":true,"command":"VIEW","message":"Retrieved object(s)","objects":[{"name":"ZCL_MY_CLASS","type":"CLAS","type_text":"Class","description":"Class ZCL_MY_CLASS in $PACKAGE","source":"CLASS zcl_my_class DEFINITION PUBLIC.\n PUBLIC SECTION.\n ...","not_found":false,"components":[]}],"summary":{"total":1,"by_type":["CLAS"]},"error":""}
Response (success - class with full: true)
When full: true is set, source is replaced by a sections array. Each entry represents one ABAP include. Line number rendering is done client-side by Node.js.
{"success":true,"command":"VIEW","message":"Retrieved object(s)","objects":[{"name":"ZCL_MY_CLASS","type":"CLAS","type_text":"Class","description":"Class ZCL_MY_CLASS in $PACKAGE","not_found":false,"components":[],"sections":[{"suffix":"CU","description":"Public Section","method_name":"","file":"","lines":["CLASS zcl_my_class DEFINITION PUBLIC FINAL CREATE PUBLIC."," PUBLIC SECTION."," ..."]},{"suffix":"CO","description":"Protected Section","method_name":"","file":"","lines":[" PROTECTED SECTION."]},{"suffix":"CP","description":"Private Section","method_name":"","file":"","lines":[" PRIVATE SECTION."," DATA mv_host TYPE string."]},{"suffix":"CM001","description":"Class Method","method_name":"CONSTRUCTOR","file":"","lines":["METHOD constructor."," mv_host = iv_host.","ENDMETHOD."]},{"suffix":"CCDEF","description":"Local Definitions","method_name":"","file":"locals_def","lines":["CLASS lcl_helper DEFINITION."," ..."]}]}],"summary":{"total":1,"by_type":["CLAS"]},"error":""}
Section field
Description
suffix
Include type: CU (public), CO (protected), CP (private), CM001…CMxxx (method implementations), CCDEF (local defs), CCIMP (local impl), CCAU (unit tests)
description
Human-readable label
method_name
Method name for CM* sections; empty for others
file
Non-empty for sections that come from a separate git file (locals_def, locals_imp, testclasses)
lines
Source lines of this include (no line numbers — rendering is client-side)
Response (success - table)
{"success":true,"command":"VIEW","message":"Retrieved object(s)","objects":[{"name":"SFLIGHT","type":"TABL","type_text":"Table","description":"Table SFLIGHT in SAPBC_DATAMODEL","source":"","not_found":false,"components":[{"field":"MANDT","key":true,"type":"CLNT","length":3,"dataelement":"MANDT","description":"Client"},{"field":"CARRID","key":true,"type":"CHAR","length":3,"dataelement":"S_CARR_ID","description":"Airline Code"}]}],"summary":{"total":1,"by_type":["TABL"]},"error":""}
{"success":true,"command":"PREVIEW","message":"Retrieved data","objects":[{"name":"Z_NONEXISTENT","type":"TABL","type_text":"Table","row_count":0,"total_rows":0,"rows":[],"fields":[],"columns_displayed":0,"columns_hidden":[],"error":"Table or view not found: Z_NONEXISTENT"}],"summary":{"total_objects":1,"total_rows":0},"error":""}
POST /where
Find where-used list for ABAP objects (classes, interfaces, programs).
Target customizing table name — uppercased automatically (required)
field_values
Array
List of {field, value} objects to write (required)
transport
String
Customizing transport request number (TRFUNCTION='W'). Optional
no_transport
String
"X" to bypass transport recording entirely. Optional
Supported Table Types
Only tables with delivery class C (Customer Customizing) or E (System Settings) are accepted. Tables with delivery class A, L, S, W, or G are rejected.
Response (success)
{"success":"X","command":"Customize","message":"Customizing entry MODIFIED in ZTABLE_CONFIG","error":"","table_name":"ZTABLE_CONFIG","action":"MODIFIED","transport":"DEVK900001","delivery_class":"C"}
Response (no transport needed — local package)
{"success":"X","command":"Customize","message":"Customizing entry MODIFIED in ZTABLE_CONFIG","error":"","table_name":"ZTABLE_CONFIG","action":"MODIFIED","transport":"","delivery_class":"C"}
Response (error)
{"success":"","error":"Table ZTABLE_CONFIG is not a customizing table (delivery class: A)"}
Response Fields
Field
Type
Description
success
String
"X" for success, "" for error
command
String
Always "Customize"
message
String
Human-readable result message
error
String
Error message (non-empty when success is "")
table_name
String
Target table name
action
String
"MODIFIED" (row updated) or "INSERTED" (new row created)
transport
String
Transport request number used (empty if none recorded)
delivery_class
String
Table delivery class (C or E)
POST /hana
Single REST resource for all hana subcommands (deploy / import / list / drop / preview HANA views, query the HANA catalog, preview raw HANA tables). The specific operation is selected by the action field in the request body.
Actions
action
What it does
CLI subcommand
check
Phase 1 of deploy: report whether the ABAP package is transportable
hana view deploy (internal)
deploy
Phase 2 of deploy: write HOT content + activate in HANA + assign transport
hana view deploy
import
Read HANA package contents and stream files back to the client
hana view import
list
List objects in a HANA package with deploy_state and hot_status
hana view list
drop
Set hot_status='D' and propagate the delete to HANA
hana view drop
preview
SELECT from "_SYS_BIC"."<pkg>/<view>" via ADBC
hana view preview
schema
Query SYS.SCHEMAS / SYS.TABLES / SYS.TABLE_COLUMNS (dispatched by subaction)
hana schema list/tables/fields
tablePreview
SELECT from "<schema>"."<table>" via ADBC; supports --logical-schema resolution
hana table preview
Request Body
Common envelope (action-specific fields documented per-action in the canonical spec):
All HANA communication runs server-side via the HTA API (CL_CTS_HTA_API_FACTORY) and ADBC; HANA ports are not directly exposed to clients.
Only .attributeview and .calculationview are in scope. .hdbview, .hdbprocedure, .hdbtablefunction are rejected.
Dynamic SQL fragments (schema names, table names, column lists, WHERE clauses) are routed through cl_abap_dyn_prg=>escape_quotes before being interpolated.