SAP-samples/cloud-btp-cli-api-codejam
The material for the "Hands-on with the btp CLI and APIs" SAP CodeJam, from installing the command line to creating and deleting account resources through the Core Services API.
The CodeJam is on the Core Service APIs for SAP BTP and on the command line interface tool for SAP BTP, otherwise known as the btp CLI, which it says are strongly related without saying how. Nine exercises run in the order shown: installing the btp CLI, authenticating and managing configuration, autocomplete and initial account exploration, retrieving and parsing JSON output, preparing to call a Core Services API, gathering the credentials the call requires, making the call and understanding the results, GUIDs and resource creation with the btp CLI, and deleting resources with the API. The session takes what the README calls the coordinated approach — the instructor sets you off on the first exercise and you do not proceed until told to — but the exercises are written in a conversational way so that they have enough context and information to be completed outside the hands-on session itself. Prerequisites are detailed in a separate file to work through before the day, and support for the content is available during the actual time of the CodeJam event it was designed for.
Facts
Where it sits
Who is behind it
In the atlas: maintains 222@SAP-samplesmaintainerAjinkya PatilContributes to this
In the atlas: contributes to 112@ajinkyapatil8190Antonio MaradiagaContributes to this
Developer Advocate
In the atlas: contributes to 10@ajmaradiagaBrian BernardContributes to this
In the atlas: contributes to 64@btbernardDJ AdamsContributes to this
Developer Advocate
In the atlas: contributes to 20, wrote 22@qmacroKevin RiedelsheimerContributes to this
In the atlas: contributes to 11@KevinRiedelsheimerNico SchoenteichContributes to this
In the atlas: maintains 3, contributes to 16, wrote 3@nicoschoenteichPieter JanssensContributes to this
In the atlas: contributes to 7@piejanssens7 contributors
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
- Use as
- A reference
As a sample
- Form
- Workshop or CodeJam material
Connections
Setting up cloud accounts, entitlements and access from code
Download
README
quoted from SAP-samples/cloud-btp-cli-api-codejam under Apache-2.0, readHands-on with the btp CLI and APIs
Description
This repository contains the material for the "Hands-on with the btp CLI and APIs" CodeJam, a CodeJam within the SAP CodeJam group.
Overview
This CodeJam is on the Core Service APIs for SAP BTP, which, according to the SAP Business Accelerator Hub, allows you to "manage, build, and extend the core capabilities of SAP BTP." It also covers the command line interface tool for SAP BTP, otherwise known as the btp CLI.
After completing this CodeJam, you will be familiar with how to use the btp CLI on the command line, and also in scripts. You'll have seen how to harness its power to view, administer and generally manage resources on SAP BTP. You'll also have a good understanding of what is possible with the APIs and how to use them.
Rather than skimming the surface of these two topics, you'll dive deep into how things work, and also understand how the two are strongly related. You'll get to understand how to get to the rich seam of data that the btp CLI and the core service APIs offer, taking your time with discovery, authentication, making calls and parsing the results.
Session prerequisites
In order to get the most from this CodeJam, and to be able to work through the exercises, there are certain prerequisites that you must have set up before the day of the CodeJam.
The prerequisites are detailed in a separate prerequisites file. Please ensure you work through these before attending the CodeJam.
Exercises
These are the exercises, each in their own directory, sometimes with supporting files and scripts. We will work through the exercises in the order shown here. From a session flow perspective, we are taking the "coordinated" approach:
The instructor will set you off on the first exercise, and that's the only one you should do; if you finish before others, there are some questions at the end of the exercise for you to ponder. Do not proceed to the next exercise until the instructor tells you to do so.
The exercises are written in a conversational way; this is so that they have enough context and information to be completed outside the hands-on session itself. To help you navigate and find what you have to actually do next, there are pointers like this 👉 throughout that indicate the things you have to actually do (as opposed to just read for background information).
- Installing the btp CLI
- Authenticating and managing configuration
- Setting up autocomplete and initial account exploration
- Retrieving and parsing JSON output
- Preparing to call a Core Services API
- Gathering required credentials for the API call
- Making the API call and understanding the results
- More on GUIDs, and resource creation with the btp CLI
- Deleting resources with the API
Scripts
There are a handful of scripts that are used and explored in this CodeJam, some of them are used in multiple exercises. To that end, they're collected together in a separate scripts/ directory and there are symbolic links pointing to them from the relevant exercise-specific directories where needed.
Feedback
If you can spare a couple of minutes at the end of the session, please help the author improve for next time by providing some feedback.
Simply use this Give Feedback link to create a special "feedback" issue, and follow the instructions in there.
Thank you!
How to obtain support
Support for the content in this repository is available during the actual time of the CodeJam event for which this content has been designed.
Further connections and information
Here are a few pointers to resources for further connections and information on the btp CLI:
- there's a wealth of information on the SAP Help Portal in the Account Administration Using the SAP BTP Command Line Interface (btp CLI) [Feature Set B] topic
- the playlist The SAP btp CLI on the SAP Developers YouTube channel contains recordings of past live streams on the topic
- there's a branch in the SAP Tech Bytes repo covering some basic aspects of the btp CLI
- The SAP Business Accelerator Hub is the central place for APIs in the SAP world, and there's a specific area for the Core Services for SAP BTP API package.
License
Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-samples-cloud-btp-cli-api-codejam- JSON
- /artifacts/sap-samples-cloud-btp-cli-api-codejam.json
- MCP
- Connecting an agent