# US 11,310,328 B2 · Generic command line interface to an extensible list of cloud platform services

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,310,328 B2
- Document ID: US11310328B2
- Status: Granted
- Kind: B2
- Application number: 16/402,453
- Filed: 2019-05-03
- Published: 2020-11-05
- Granted: 2022-04-19
- Earliest claimed: 2019-05-03
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Peter Eberlein
- Web page: https://patentgrep.com/patent/US11310328B2

## CPC

- G06F 9/45512: {Command shells}
- H04L 67/567: Integrating service provisioning from a plurality of service providers
- G06F 9/451: Execution arrangements for user interfaces
- G06F 9/54: Interprogram communication
- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F 40/211: Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
- H04L 67/565: Conversion or adaptation of application format or content (adding application control or application functional data H04L67/561)
- H04L 67/63: Routing a service request depending on the request content or context
- G06F 2209/541: Client-server
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Methods and systems are used for providing a generic command line interface to an extensible list of cloud platform services. As an example, a generic command request including a command and command input data is received from a client. A platform service for the command is determined based on command metadata associated with the command. The command input data is mapped to a platform service application programming interface (API) associated with the platform service based on the command metadata associated with the command. The platform service API is called based on the mapping. Response data from the platform service API is mapped to command output data in a generic command response based on the command metadata associated with the command. The generic command response is transmitted to the client.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving, by a command line interface (CLI) backend, a generic command request comprising a command and command input data from a client;
determining, by the CLI backend, a platform service for the command based on command metadata associated with the command, wherein the command metadata associated with the command comprises a syntax definition of a command, wherein the syntax definition defines mapping of the command to the platform service using mapping rules between user input and a platform service application programming interface (API) associated with the platform service, the mapping rules indicating a name and a content of command output data;
mapping, by the CLI backend, the command input data to the platform service API based on the command metadata associated with the command;
calling, by the CLI backend, the platform service API based on the mapping;
mapping, by the CLI backend, response data from the platform service API to the command output data in a generic command response based on the command metadata associated with the command; and
transmitting, by the CLI backend, the generic command response to the client.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the command metadata associated with the command further comprises at least one of:
a uniform resource locator (URL) endpoint of a platform service;
an open authorization (OAuth) client to call the platform service; or
a platform service API associated with the platform service, and wherein the syntax definition further defines at least one of:
which parameters are optional or mandatory;
if a particular parameter represents an option or a parameter;
if parameters are literals or reference a file or directory;
mapping rules between response data from the platform service API and user output; or
command syntax and help text.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising:
retrieving, by a generic CLI on the client, the command metadata associated with the command from the CLI backend;
validating, by the generic CLI, user input comprising the command provided by a user based on a syntax definition of the command in the command metadata associated with the command;
mapping, by the generic CLI, the user input to the generic command request based on the syntax definition of the command; and
transmitting, by the generic CLI, the generic command request to the CLI backend.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein mapping the user input to the generic command request further comprises:
determining, by the generic CLI on the client, how each parameter in the user input for the command is to be provided in the generic command request.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, further comprising:
based on the determination of how each parameter in the user input for the command is to be provided in the generic command request, providing, by the generic CLI, each parameter in the user input in the generic command request, wherein:
when a parameter is determined to be a literal, providing the parameter in the generic command request as a literal;
when a parameter is determined to be a reference to a file:
reading data content of the file; and
providing the parameter in the generic command request as the data content of the file; and
when a parameter is determined to be a reference to a directory:
reading data content of the directory; and
providing the parameter in the generic command request as the data content of the directory.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, by a generic CLI on the client, the generic command response from the CLI backend;
displaying, by the generic CLI, a response message in the generic command response to a user; and
processing, by the generic CLI on the client, the command output data in the generic command response.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein processing the command output data further comprises:
when the command output data comprises one or more sets of an environmental variable name and environmental variable data, updating one or more environmental variables corresponding to one or more environmental variable names with corresponding one or more environmental variable data;
when the command output data comprises one or more sets of a file name and file data content, updating one or more files corresponding to one or more file names with corresponding file data content; and
when the command output data comprises one or more sets of a directory name and directory data content, updating one or more directories corresponding to one or more directory names with corresponding directory content data.

### Claim 8

A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
receiving, by a command line interface (CLI) backend, a generic command request comprising a command and command input data from a client;
determining, by the CLI backend, a platform service for the command based on command metadata associated with the command, wherein the command metadata associated with the command comprises a syntax definition of a command, wherein the syntax definition defines mapping of the command to the platform service using mapping rules between user input and a platform service application programming interface (API) associated with the platform service, the mapping rules indicating a name and a content of command output data;
mapping, by the CLI backend, the command input data to the platform service API based on the command metadata associated with the command;
calling, by the CLI backend, the platform service API based on the mapping;
mapping, by the CLI backend, response data from the platform service API to the command output data in a generic command response based on the command metadata associated with the command; and
transmitting, by the CLI backend, the generic command response to the client.

### Claim 9 (depends on 8)

The non-transitory, computer-readable medium of claim 8, wherein the command metadata associated with the command further comprises at least one of:
a uniform resource locator (URL) endpoint of a platform service;
an open authorization (OAuth) client to call the platform service; or
a platform service API associated with the platform service, and wherein the syntax definition further defines at least one of:
which parameters are optional or mandatory;
if a particular parameter represents an option or a parameter;
if parameters are literals or reference a file or directory;
mapping rules between response data from the platform service API and user output; or
command syntax and help text.

### Claim 10 (depends on 8)

The non-transitory, computer-readable medium of claim 8, further comprising:
retrieving, by a generic CLI on the client, the command metadata associated with the command from the CLI backend;
validating, by the generic CLI, user input comprising the command provided by a user based on a syntax definition of the command in the command metadata associated with the command;
mapping, by the generic CLI, the user input to the generic command request based on the syntax definition of the command; and
transmitting, by the generic CLI, the generic command request to the CLI backend.

### Claim 11 (depends on 10)

The non-transitory, computer-readable medium of claim 10, wherein mapping the user input to the generic command request further comprises:
determining, by the generic CLI on the client, how each parameter in the user input for the command is to be provided in the generic command request.

### Claim 12 (depends on 11)

The non-transitory, computer-readable medium of claim 11, further comprising:
based on the determination of how each parameter in the user input for the command is to be provided in the generic command request, providing, by the generic CLI, each parameter in the user input in the generic command request, wherein:
when a parameter is determined to be a literal, providing the parameter in the generic command request as a literal;
when a parameter is determined to be a reference to a file:
reading data content of the file; and
providing the parameter in the generic command request as the data content of the file; and
when a parameter is determined to be a reference to a directory:
reading data content of the directory; and
providing the parameter in the generic command request as the data content of the directory.

### Claim 13 (depends on 8)

The non-transitory, computer-readable medium of claim 8, further comprising:
receiving, by a generic CLI on the client, the generic command response from the CLI backend;
displaying, by the generic CLI, a response message in the generic command response to a user; and
processing, by the generic CLI on the client, the command output data in the generic command response.

### Claim 14 (depends on 13)

The non-transitory, computer-readable medium of claim 13, wherein processing the command output data further comprises:
when the command output data comprises one or more sets of an environmental variable name and environmental variable data, updating one or more environmental variables corresponding to one or more environmental variable names with corresponding one or more environmental variable data;
when the command output data comprises one or more sets of a file name and file data content, updating one or more files corresponding to one or more file names with corresponding file data content; and
when the command output data comprises one or more sets of a directory name and directory data content, updating one or more directories corresponding to one or more directory names with corresponding directory content data.

### Claim 15

A computer-implemented system, comprising:
one or more computers; and
one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
receiving, by a command line interface (CLI) backend, a generic command request comprising a command and command input data from a client;
determining, by the CLI backend, a platform service for the command based on command metadata associated with the command, wherein the command metadata associated with the command comprises a syntax definition of a command, wherein the syntax definition defines mapping of the command to the platform service using mapping rules between user input and a platform service application programming interface (API) associated with the platform service, the mapping rules indicating a name and a content of command output data;
mapping, by the CLI backend, the command input data to the platform service API based on the command metadata associated with the command;
calling, by the CLI backend, the platform service API based on the mapping;
mapping, by the CLI backend, response data from the platform service API to the command output data in a generic command response based on the command metadata associated with the command; and
transmitting, by the CLI backend, the generic command response to the client.

### Claim 16 (depends on 15)

The computer-implemented system of claim 15, wherein the command metadata associated with the command further comprises at least one of:
a uniform resource locator (URL) endpoint of a platform service;
an open authorization (OAuth) client to call the platform service; or
a platform service API associated with the platform service, and wherein the syntax definition further defines at least one of:
which parameters are optional or mandatory;
if a particular parameter represents an option or a parameter;
if parameters are literals or reference a file or directory;
mapping rules between response data from the platform service API and user output; or
command syntax and help text.

### Claim 17 (depends on 15)

The computer-implemented system of claim 15, further comprising:
retrieving, by a generic CLI on the client, the command metadata associated with the command from the CLI backend;
validating, by the generic CLI, user input comprising the command provided by a user based on a syntax definition of the command in the command metadata associated with the command;
mapping, by the generic CLI, the user input to the generic command request based on the syntax definition of the command; and
transmitting, by the generic CLI, the generic command request to the CLI backend.

### Claim 18 (depends on 17)

The computer-implemented system of claim 17, wherein mapping the user input to the generic command request further comprises:
determining, by the generic CLI on the client, how each parameter in the user input for the command is to be provided in the generic command request.

### Claim 19 (depends on 18)

The computer-implemented system of claim 18, further comprising:
based on the determination of how each parameter in the user input for the command is to be provided in the generic command request, providing, by the generic CLI, each parameter in the user input in the generic command request, wherein:
when a parameter is determined to be a literal, providing the parameter in the generic command request as a literal;
when a parameter is determined to be a reference to a file:
reading data content of the file; and
providing the parameter in the generic command request as the data content of the file; and
when a parameter is determined to be a reference to a directory:
reading data content of the directory; and
providing the parameter in the generic command request as the data content of the directory.

### Claim 20 (depends on 15)

The computer-implemented system of claim 15, further comprising:
receiving, by a generic CLI on the client, the generic command response from the CLI backend;
displaying, by the generic CLI, a response message in the generic command response to a user; and
processing, by the generic CLI on the client, the command output data in the generic command response.
