SAP-samples / cloud-btp-cli-api-codejam

Material for the CodeJam on the CLI and APIs for the SAP Business Technology Platform.
Apache License 2.0
24 stars 8 forks source link

Exercise 7 Checking the access token and API base URL #28

Closed jung-thomas closed 1 year ago

jung-thomas commented 1 year ago

https://github.com/SAP-samples/cloud-btp-cli-api-codejam/blob/main/exercises/07-core-services-api-call/README.md With your new jq filtering skills, tease out these two values to have a look at them.

👉 First, have a look at the base URL:

jq --raw-output .credentials.endpoints.entitlements_service_url cis-central-sk.json

This doesn't work for me - I get null. There is no credentials level in my cis-central-sk.json. endpoints is the at the root. I had to change the command.

image

image

image

jung-thomas commented 1 year ago

Same issue later in Exercise 9. I had to remove the credentials level of the json path for it to work.

qmacro commented 1 year ago

The cause of this is the same as for #27 - a difference in JSON output depending on whether cf version 7 or version 8 is used. BAS now uses version 8, so I've modified the Dockerfile to update the container image so that it matches this new version in BAS, and so that the exercise text and instructions can be the same (i.e. using credentials as the top level property).