Read one or multiple branches .
URI: /sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Branches
Operation Type: CRUD
**HTTP Method:**GET
Header |
Required |
Values |
---|---|---|
Accept |
no |
application/json application/xml |
x-csrf-token |
no |
fetch |
Parameter |
Required |
Data Type |
Description |
Parameter Type |
---|---|---|---|---|
sc_name |
yes |
string |
name of the software component |
query string |
branch_name |
yes |
string |
name of the branch |
query string |
GET /sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Branches(branch_name=’newBranch’,sc_name=’/DMO/GIT_REPOSITORY’ HTTP/1.1 Host: host.com Authentication: basicAuthentication Accept: application/json
Header |
Description |
---|---|
x-csrf-token |
Token, which can be used for POST requests |
Code |
Reason |
Description |
---|---|---|
200 |
OK |
Branch was read successfully |
404 |
Not foumd |
Could not read branch; software component or branch may not exist.. |
{ "d": { "__metadata": { "id": "https://host.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Branches(branch_name='newBranch',sc_name='/DMO/GIT_REPOSITORY')", "uri": "https://host.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Branches(branch_name='newBranch',sc_name='/DMO/GIT_REPOSITORY')", "type": "cds_sd_a4c_a2g_gha_sc_web_api.BranchesType" }, "branch_name": "newBranch", "sc_name": "/DMO/GIT_REPOSITORY", "is_active": false, "criticality": 0, "derived_from": "main", "created_by": "CC0000000001", "created_on": "/Date(1584967657000+0000)/", "last_commit_on": "/Date(1584634658000+0000)/" } }