Import(Add) a Project from Git Repository
/ic/api/integration/v1/gitprojects/{projectId}/importfromrepository
Request
-
projectId(required): string
Project identifier
- application/json
Response
- application/vnd.oracle.model+json;type=collection
- application/json;charset=utf-8
200 Response
object
400 Response
401 Response
500 Response
Examples
The following example shows how to start an asynchronous import of the selected project or deployment from the given URL by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.
Example: Asynchronous import of the selected project or deployment from the given URL
In this example, the downloadUrl
is taken from the
download_url
field of Git projects list API.
curl -X POST \
-H 'Authorization: Bearer access_token' \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"downloadUrl": "https://raw.githubusercontent.com/AnandBabuS/oiccheck/main/projects/AUTOMATE_GIT_EXPORT.car?token=AECODEF23VDV3VP5GAQXLW3IVW2EQ"
}' \
"https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/gitprojects/AUTOMATE_GIT_EXPORT/importfromrepository?integrationInstance=service-instance"
This request generates a 202 Accepted status code since the operation is asynchronous. You can monitor the status of the asynchronous job.