Export a Project to Git Repository
/ic/api/integration/v1/gitprojects/{projectId}/exporttorepository
Request
-
projectId(required): string
Project identifier
- application/json
Response
- application/vnd.oracle.model+json;type=collection
- application/json;charset=utf-8
200 Response
400 Response
500 Response
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.