Export a Project to Git Repository

post

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

Exports the project to 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 : GitProjectRs
Type: object
Show Source

400 Response

Malformed parameters

500 Response

Server error
Back to Top

Examples

The following examples show how to test whether the GIT repository settings are properly configured or not 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: Save the GIT repository settings

curl -X POST \
  -H 'Authorization: Bearer access_token' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "repoURL": "repowner/reponame",
    "apiKey": "apikeyvaluefromgithub",
    "branchName": "branchnamecreatedingit"
  }' \
  "https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/gitprojects/settings/create?integrationInstance=service-instance"

If saved successfully, the reponse is 200. This is a synchrounous call.

Example: Test whether the GIT repository settings are properly configured

curl -X POST \
  -H 'Authorization: Bearer access_token' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/gitprojects/settings/test?integrationInstance=service-instance"

Return a 200 response if successful. If the response body is true, it indicates that the configuration is valid. If the response body is false, it indicates incorrect configuration values.

Example: Export a project to repository

curl -X POST \
  -H 'Authorization: Bearer access_token' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/gitprojects/TEMPLATE_TEST/exporttorepository?integrationInstance=service-instance"

Example: Export a deployment to repository

curl -X POST \
  -H 'Authorization: Bearer access_token' \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "deploymentid"
  }' \
  "https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/gitprojects/TEMPLATE_TEST/exporttorepository?integrationInstance=service-instance"

In this example, the deployment ID is deploymentid.

The {} exports only the project. The {"label":"deploymentid"} exports the specified deployment.

Back to Top