Skip to content

Latest commit

 

History

History
387 lines (192 loc) · 3.39 KB

read-branches-e8e40c2.md

File metadata and controls

387 lines (192 loc) · 3.39 KB

Read Branches

Read one or multiple branches .

URI: /sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Branches

Operation Type: CRUD

**HTTP Method:**GET

Request Headers

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

Sample Code:

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

Response Headers

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..

Sample Code:

{
	"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)/"
	}
}