Skip to content

Commit bbf3744

Browse files
committed
fixed ids
1 parent d508c5a commit bbf3744

22 files changed

+65
-65
lines changed

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_activate_integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
# get the token to access OIC REST API# get the token to access OIC REST API
34-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
34+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3535

3636
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3737

@@ -43,7 +43,7 @@ if [ -z "$access_token" ]; then
4343
exit 1
4444
fi
4545

46-
activate_integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "X-HTTP-Method-Override: PATCH" -H "Content-Type: application/json" -d "{\"status\": \"ACTIVATED\"}" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/POB_USER_LOCAL_RAB%7C01.00.0000?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
46+
activate_integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "X-HTTP-Method-Override: PATCH" -H "Content-Type: application/json" -d "{\"status\": \"ACTIVATED\"}" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/<<my_integration_ID>>%7C<<Version>>?integrationInstance=<<your_oic_instance_name>>)
4747
4848
4949

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_create-iCalSchedule_project_integration.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#
3030
# ****************************************************************************************
3131
# get the token to access OIC REST API
32-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
32+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3333

3434
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3535

@@ -39,10 +39,10 @@ if [ -z "$access_token" ]; then
3939
exit 1
4040
fi
4141

42-
echo '{"icalExpression":"FREQ=MONTHLY;BYDAY=MO,TUE;BYHOUR=12,14;BYMINUTE=20;","name":"Schedule2SCHEDULED_RATES_CBUAE_01_00_0000","startDate":null,"endDate":null,"scheduleTZ":"GMT"}' > ./schedule.json
42+
echo '{"icalExpression":"FREQ=MONTHLY;BYDAY=MO,TUE;BYHOUR=12,14;BYMINUTE=20;","name":"my_schedule_name_01_00_0000","startDate":null,"endDate":null,"scheduleTZ":"GMT"}' > ./schedule.json
4343
cat ./schedule.json
4444

45-
CreateSchedule_Integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @schedule.json https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/POB_SIMPLERPA_SITETOLIST/integrations/SCHEDULED_RATES_CBUAE%7C01.00.0000/schedule?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
45+
CreateSchedule_Integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @schedule.json https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/<<my_project_id>>/integrations/<<my_integration_id>>%7C<<01.00.0000>>/schedule?integrationInstance=<<your_oic_instance_name>>)
4646
4747
4848

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_createSchedule_project_integration.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#
3030
# ****************************************************************************************
3131
# get the token to access OIC REST API
32-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
32+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3333

3434
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3535

@@ -39,10 +39,10 @@ if [ -z "$access_token" ]; then
3939
exit 1
4040
fi
4141

42-
echo '{"frequency":{"frequencyType":"DAILY","interval":1},"name":"Schedule2SCHEDULED_RATES_CBUAE_01_00_0000","startDate":"2/14/2025|0:0:0","endDate":null,"scheduleTZ":"UTC"}' > ./schedule.json
42+
echo '{"frequency":{"frequencyType":"DAILY","interval":1},"name":"my_schedule_name_01_00_0000","startDate":"2/14/2025|0:0:0","endDate":null,"scheduleTZ":"UTC"}' > ./schedule.json
4343
cat ./schedule.json
4444

45-
CreateSchedule_Integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @schedule.json https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/POB_SIMPLERPA_SITETOLIST/integrations/SCHEDULED_RATES_CBUAE%7C01.00.0000/schedule?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
45+
CreateSchedule_Integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @schedule.json https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/<<my_integrationproject_id>>/integrations/<<my_integration_id>>%7C01.00.0000/schedule?integrationInstance=<<your_oic_instance_name>>)
4646
4747
4848

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_deactivate_integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
# get the token to access OIC REST API
34-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
34+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3535

3636
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3737

@@ -41,7 +41,7 @@ if [ -z "$access_token" ]; then
4141
exit 1
4242
fi
4343

44-
deactivate_integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "X-HTTP-Method-Override: PATCH" -H "Content-Type: application/json" -d "{\"status\": \"CONFIGURED\"}" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/POB_USER_LOCAL_RAB%7C01.00.0000?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
44+
deactivate_integration_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "X-HTTP-Method-Override: PATCH" -H "Content-Type: application/json" -d "{\"status\": \"CONFIGURED\"}" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/<<my_integration_id>>%7C01.00.0000?integrationInstance=<<your_oic_instance_name>>)
4545
4646
4747

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_deleteSchedule_project_integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#
3030
# ****************************************************************************************
3131
# get the token to access OIC REST API
32-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
32+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3333

3434
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3535

@@ -40,7 +40,7 @@ if [ -z "$access_token" ]; then
4040
fi
4141

4242

43-
DeleteSchedule_Integration_api=$(curl -X DELETE -H "Authorization: Bearer $access_token" -H "X-HTTP-Method-Override: PATCH" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/POB_SIMPLERPA_SITETOLIST/integrations/SCHEDULED_RATES_CBUAE%7C01.00.0000/schedule?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
43+
DeleteSchedule_Integration_api=$(curl -X DELETE -H "Authorization: Bearer $access_token" -H "X-HTTP-Method-Override: PATCH" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/<<my_integrationproject_id>>/integrations/<<my_integration_id>>%7C01.00.0000/schedule?integrationInstance=<<your_oic_instance_name>>)
4444
4545
4646

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_delete_project.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
# get the token to access OIC REST API
34-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
34+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3535

3636
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3737

@@ -45,9 +45,9 @@ if [ -z "$access_token" ]; then
4545
fi
4646

4747

48-
#delete_project_api=$(curl -X DELETE -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/ORCL-R-ERP_MSEMAIL_ORDERFULFILL/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr )
48+
#delete_project_api=$(curl -X DELETE -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/ORCL-R-ERP_MSEMAIL_ORDERFULFILL/archive?integrationInstance=<<your_oic_instance_name>> )
4949

50-
delete_project_api=$(curl -s -w "%{http_code}" -X DELETE -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/ORCL-R-ERP_MSEMAIL_ORDERFULFILL?integrationInstance=teamoic3-frrnyzlwrqhn-fr )
50+
delete_project_api=$(curl -s -w "%{http_code}" -X DELETE -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/<<my_integrationproject_id>>?integrationInstance=<<your_oic_instance_name>> )
5151
5252
5353
http_code=$(tail -n1 <<< "$delete_project_api") # get the last line

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_export_integration.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
# get the token to access OIC REST API
34-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
34+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3535

3636
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3737

@@ -41,12 +41,12 @@ if [ -z "$access_token" ]; then
4141
exit 1
4242
fi
4343

44-
export_integration_api=$(curl -X GET -H "Authorization: Bearer $access_token" -o 'POB_USER_LOCAL_RAB.iar' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/POB_USER_LOCAL_RAB%7C01.00.0000/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
44+
export_integration_api=$(curl -X GET -H "Authorization: Bearer $access_token" -o '<<my_integration_id>>.iar' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/<<my_integration_id>>%7C01.00.0000/archive?integrationInstance=<<your_oic_instance_name>>)
4545
4646
4747
# Send the GET request and capture the response headers in a separate file
4848
response_headers=$(mktemp)
49-
curl -X GET -H "Authorization: Bearer $access_token" -D "$response_headers" -o 'POB_USER_LOCAL_RAB.iar' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/POB_USER_LOCAL_RAB%7C01.00.0000/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr
49+
curl -X GET -H "Authorization: Bearer $access_token" -D "$response_headers" -o '<<my_integration_id>>.iar' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/<<my_integration_id>>%7C<<version>>/archive?integrationInstance=<<your_oic_instance_name>>
5050
5151
# Extract the HTTP status code from the response headers
5252
http_status=$(awk 'NR==1{print $2}' "$response_headers")

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_export_lookup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
# get the token to access OIC REST API
34-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
34+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3535

3636
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3737

@@ -42,12 +42,12 @@ if [ -z "$access_token" ]; then
4242
exit 1
4343
fi
4444

45-
export_lookup_api=$(curl -X GET -H "Authorization: Bearer $access_token" -o 'PoC_SVC_IER_IPAS_OtlookToEBSSR_Param.csv' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/lookups/pob-PoC_SVC_IER_IPAS_OtlookToEBSSR_Param/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr)
45+
export_lookup_api=$(curl -X GET -H "Authorization: Bearer $access_token" -o 'lookup_file.csv' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/lookups/<<my_lookup_id>>/archive?integrationInstance=<<your_oic_instance_name>>)
4646
4747
4848
# Send the GET request and capture the response headers in a separate file
4949
response_headers=$(mktemp)
50-
curl -X GET -H "Authorization: Bearer $access_token" -D "$response_headers" -o 'PoC_SVC_IER_IPAS_OtlookToEBSSR_Param.csv' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/lookups/pob-PoC_SVC_IER_IPAS_OtlookToEBSSR_Param/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr
50+
curl -X GET -H "Authorization: Bearer $access_token" -D "$response_headers" -o 'lookup_file.csv' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/lookups/<<my_lookup_id>>/archive?integrationInstance=<<your_oic_instance_name>>
5151
5252
# Extract the HTTP status code from the response headers
5353
http_status=$(awk 'NR==1{print $2}' "$response_headers")

app-dev/app-integration-and-automation/oracle-integration-cloud/08-oic-cicd-vbs-shellsteps/files/scripts/oic3_export_project.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
# get the token to access OIC REST API
34-
response=$(curl -i -H 'Authorization: Basic MzQ5M2QwOTAyNjg2NDc0M2E3MGRlYTVkZjMwZTljNDU6aWRjc2NzLTExMGNhNGI5LWZkZjAtNGJkNC04ZTQyLTZlNTNjODQ0NDIxMg==' --request POST 'https://idcs-5ba32fa3496f48289532f8fc10f47032.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://BA3849F019F9468B9470A19274B91010.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
34+
response=$(curl -i -H 'Authorization: Basic <<client_id_client_secret_basictoken>>' --request POST 'https://<<your_IDom_service>>.identity.oraclecloud.com:443/oauth2/v1/token' -H 'Content-Type:application/x-www-form-urlencoded' -d 'grant_type=client_credentials&scope=https://<<your_oic_mgmt_scope>>.integration.eu-frankfurt-1.ocp.oraclecloud.com:443/ic/api/')
3535

3636
access_token=$(echo "$response" | grep -o '"access_token":[^,}]*' | awk -F '"' '{print $4}')
3737

@@ -43,14 +43,14 @@ if [ -z "$access_token" ]; then
4343
exit 1
4444
fi
4545

46-
echo '{"name":"pob-Oracle ERP MSEmail OrderFulfill Notification","code":"ORCL-R-ERP_MSEMAIL_ORDERFULFILL","type":"DEVELOPED","builtBy":"","label":"01.00.0002"}' > Request_payload.json
46+
echo '{"name":"my_project_name","code":"my_project_code","type":"DEVELOPED","builtBy":"","label":"01.00.0002"}' > Request_payload.json
4747

48-
export_project_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @Request_payload.json -o 'ORCL-R-ERP_MSEMAIL_ORDERFULFILL-01.00.0002.car' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/ORCL-R-ERP_MSEMAIL_ORDERFULFILL/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr )
48+
export_project_api=$(curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @Request_payload.json -o 'my_project_export_filename-01.00.0002.car' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/<<my_integrationproject_id>>/archive?integrationInstance=<<your_oic_instance_name>> )
4949
5050
5151
# Send the GET request and capture the response headers in a separate file
5252
response_headers=$(mktemp)
53-
curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @Request_payload.json -D "$response_headers" -o 'POB_USER_LOCAL_RAB.iar' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/ORCL-R-ERP_MSEMAIL_ORDERFULFILL/archive?integrationInstance=teamoic3-frrnyzlwrqhn-fr
53+
curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d @Request_payload.json -o 'my_project_export_filename-01.00.0002.car' https://design.integration.eu-frankfurt-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/<<my_integrationproject_id>>/archive?integrationInstance=<<your_oic_instance_name>>
5454
5555
# Extract the HTTP status code from the response headers
5656
http_status=$(awk 'NR==1{print $2}' "$response_headers")

0 commit comments

Comments
 (0)