Import(Add) a Project from Git Repository

post

/ic/api/integration/v1/gitprojects/{projectId}/importfromrepository

Imports the project from an external github repository.

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : Object
Type: object

400 Response

Malformed parameters

401 Response

Unauthorized

500 Response

Server error
Back to Top

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.

Back to Top