Skip to content

Latest commit

 

History

History
342 lines (212 loc) · 3.77 KB

read-clones-3071eaf.md

File metadata and controls

342 lines (212 loc) · 3.77 KB

Read Clones

Read a clone job. The entity is only available after the job has finished. To track the status of the job, you can use the GET /Pull(guid’UUID’) request.

Request

URI: /sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Clones

Operation Type: CRUD

**HTTP Method:**GET

Request Headers


Header

Required

Values

Accept

no

application/json

application/xml

x-csrf-token

no

fetch

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

uuid

yes

string

ID of the job

query string

Request Example

Sample Code:

GET /sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Clones(uuid=02409ac8-dc6a-1edb-908e-31e4b44596d4’,branch_name=’main’,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

Response Status and Error Codes


Code

Reason

Description

200

OK

Read clone succesfully

400

Bad Request

Could not read the clone entity. Please check the parameters.

Request Payload Example

Sample Code:

{
    "d": {
        "__metadata": {
            "id": "https://4c7c0f11-da7c-43cf-b60c-e6e308144458.abap.stagingaws.hanavlab.ondemand.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Clones(uuid=guid'02409ac8-dc6a-1edb-908e-31e4b44596d4',sc_name='%2FDMO%2F GIT_REPOSITORY,branch_name='main')",
            "uri": "https://4c7c0f11-da7c-43cf-b60c-e6e308144458.abap.stagingaws.hanavlab.ondemand.com/sap/opu/odata/sap/MANAGE_GIT_REPOSITORY/Clones(uuid=guid'02409ac8-dc6a-1edb-908e-31e4b44596d4',sc_name='%2FDMO%2F GIT_REPOSITORY,branch_name='main')",
            "type": "cds_sd_a4c_a2g_gha_sc_web_api.ClonesType"
        },
        "uuid": "02409ac8-dc6a-1edb-908e-31e4b44596d4",
        "sc_name": "/DMO/GIT_REPOSITORY",
        "branch_name": "main",
        "commit_id": "",
        "import_type": "Clone",
        "namespace": "",
        "status": "S",
        "status_descr": "Success",
        "criticality": 3,
        "user_name": "CC0000000001",
        "start_time": "/Date(1608214205000+0000)/",
        "change_time": "/Date(1608214243000+0000)/"
    }
}