The CPI trial comes with a time limit and gets deleted once the time limit is crossed. You'll have to perform all tasks again when you subscribe after deletion. One of the tasks is to create instances.
Let us say you want to create service instance for plan api and integration-flow. Usually we use btp cockpit to create it and it is easy to set up. What if you have to repeat the same, once trial tenant is deleted. Creating instances using commands can be easy and we can run the same command every time we set up the trial account.
Usually we need three instances creation for setting up the trial tenant to get started with development.
I am making use of CLI command for creating the instances.
Once installed check if it is available
or you can make use of SAP business application studio and it comes with installed cf
https://help.sap.com/docs/bas/sap-business-application-studio/terminal
Click on the link shown in the terminal.
login with your user
copy this key and paste it in your terminal
My space is dev and all the instances will be created under dev space.
When you create instance we need to provide some parameters and these parameters are kept in json format. Instead of complicating things, First we create a one instance using BTP cockpit ui. Let us call it test_blog and I have assigned one role once create this is how it looks like
Copy the json file and put it in the folder and file name is instance-api.json
Json
{
"grant-types": [
"client_credentials"
],
"redirect-uris": [],
"roles": [
"AuthGroup_IntegrationDeveloper"
],
"token-validity": 43200
}Now we will use json as parameter file for creating a new instance.
cf create-service it-rt api odata-api -c instance-api.json cf create-service-key odata-api key-01
Repeat the same step here as well to get the json file.
json file
{
"grant-types": [
"client_credentials"
],
"redirect-uris": [],
"roles": [
"ESBMessaging.send"
],
"token-validity": 3600
}
Iflow cf create-service it-rt integration-flow iflow_blog -c instance-integration-flow.json cf create-service-key iflow_blog key-01
You can view the instance and key.
Json
{
"role": "APIPortal.Administrator"
}
cf create-service apimanagement-apiportal-trial apiportal-apiaccess apim_odata -c instance-api-access.json cf create-service-key apim_odata key-01
https://help.sap.com/docs/integration-suite/sap-integration-suite/api-access-plan-for-api-portal
Please be aware sometimes btp trial is giving error when creating this instance be it from cockpit or from terminal. I had a issue and posted here and after sometime it starts working again.
https://community.sap.com/t5/technology-q-a/instance-creation-for-apiportal-apiaccess-plan-in-btp-tr...
Once you are done with creating keys you can run this command to view the keys.
cf service-key odata-api key-01Once you are done with settting up the commands, next time trial account is deleleted, you can make use of the commands instead of creating them from btp cockpit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 81 | |
| 38 | |
| 22 | |
| 20 | |
| 17 | |
| 14 | |
| 10 | |
| 10 | |
| 10 | |
| 9 |