Skip to content

Latest commit

 

History

History
313 lines (199 loc) · 3.31 KB

checkout-branches-069b979.md

File metadata and controls

313 lines (199 loc) · 3.31 KB

Checkout Branches

Checkout a branch.

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

Operation Type: CRUD

**HTTP Method:**POST

Request Headers


Header

Required

Values

Content-Type

no

application/json

application/xml

Accept

no

application/json

application/xml

x-csrf-token

yes

Value of x-csrf-token

Request Parameters


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

Request Example

Sample Code:

POST/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/checkout_branch?branch_name='newBranch'&sc_name="'/DMO/GIT_REPOSITORY' HTTP/1.1

Host: host.com
Authentication: basicAuthentication
X-csrf-token: xCsrfToken
Content-Type: application/json
Accept: application/json

Response Status and Error Codes


Code

Reason

Description

200

OK

Branch was checked out successfully

400

Bad Request

Could not check out a branch due to the values passed in the request body

Response Payload Example

Sample Code:

{

	"d": {
		"__metadata": {
			"id": "https://host.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Pull(guid’UUID’)", 
			"uri": "https://host.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Pull(guid’UUID’)", 
			"type": "cds_sd_a4c_a2g_gha_sc_web_api.PullType"
		},
		"uuid": "UUID ",
		"sc_name": "/DMO/GIT_REPOSITORY ",
		"namespace": "",
		"status": "R",
		"status_descr": "Running",
		"start_time": "/Date(1571227437000+0000)/",
		"change_time": "/Date(1571227472000+0000)/",
		"criticality": 2,
		"user_name": "CC0000000001",
		"to_Execution_log": {
			"__deferred": {
				"uri": "https://host.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Pull(guid’UUID’)/to_Execution_log"
			}
		},

		"to_Transport_log": {
			"__deferred": {
				"uri": "https://host.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Pull(guid’UUID’)/to_Transport_log"
			}
		}
	}
}