Skip to content

apiProxyList

Get the List of an API Proxy from the API Portal

Description

With this step you can get list of all API Proxy from the API Portal using the OData API. Learn more about the API Management API for getting list of an API proxy artifact here.

Usage

We recommend to define values of step parameters via .pipeline/config.yml file.
In this case, calling the step is essentially reduced to defining the step name.
Calling the step can be done either in an orchestrator specific way (e.g. via a Jenkins library step) or on the command line.

library('piper-lib-os')

apiProxyList script: this
piper apiProxyList

Outputs

Output type Details
commonPipelineEnvironment
  • custom/apiProxyList

With this step, you can retrieve all the API proxies from the API portal. An API Proxy is a concept in API Management, capability of SAP Integration Suite, which anonymizes any HTTP endpoints like REST, OData, or SOAP and enhance it with policies and routes.

An API proxy is a discrete representation of an API. It is implemented as a set of configuration files, policies, and code snippets that rely on the resource information provided by API Management. For more information, see the document API Proxy

To consume the ApiProxyList step, proceed as follows:

  • Copy the SAP API management service key from the SAP BTP cockpit. Go to instance and subscriptions → service API Management, API portal, which was created under apiportal-apiaccess plan.
  • Store your service key created for API Management in the Jenkins server as a secret text.
  • Create a new Jenkins pipeline designated for the ApiProxyList step.
  • Execute the pipeline and validate the step exection results as explained in the blog Integration Suite Piper commands
  • Use the ApiProxyList step to get the api proxy list from the API portal.
  • ApiProxyList only supports GET operation.

Prerequisites

Parameters

Overview - Step

Name Mandatory Additional information
apiServiceKey (yes) Secret pass via ENV or Jenkins credentials (apimApiServiceKeyCredentialsId)
script (yes) Jenkins only reference to Jenkins main pipeline script
count no
expand no
filter no
orderby no
search no
select no
skip no
top no
verbose no activates debug output

Overview - Execution Environment

Orchestrator-specific only

These parameters are relevant for orchestrator usage and not considered when using the command line option.

Name Mandatory Additional information

Details

apiServiceKey

Service key JSON string to access the API Management Runtime service instance of plan 'api'

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_apiServiceKey (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☐ steps
  • ☐ stages
Resource references Jenkins credential id:
  id: apimApiServiceKeyCredentialsId
  reference to: apiServiceKey

count

Include count of items.

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

expand

Expand related entities.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_expand (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

filter

Filter items by property values.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_filter (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

orderby

Order by property values.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_orderby (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

script

Jenkins-specific: Used for proper environment setup.

The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the this parameter, as in script: this. This allows the function to access the commonPipelineEnvironment for retrieving, e.g. configuration parameters.

back to overview

Scope Details
Aliases -
Type Jenkins Script
Mandatory yes
Default
Secret no
Configuration scope
  • ☐ parameter
  • ☐ general
  • ☐ steps
  • ☐ stages
Resource references none

Search items by search phrases.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_search (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

select

Select properties to be returned.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_select (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

skip

Skip the first n items.

back to overview

Scope Details
Aliases -
Type int
Mandatory no
Default 0
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

top

Show only the first n items.

back to overview

Scope Details
Aliases -
Type int
Mandatory no
Default 0
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

verbose

verbose output

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

apimApiServiceKeyCredentialsId

Jenkins-specific: Used for proper environment setup. See using credentials for details.

Jenkins secret text credential ID containing the service key to the API Management Runtime service instance of plan 'api'

back to overview

Scope Details
Aliases -
Type string
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages

Example

Configuration example for a Jenkinsfile:

apiProxyList script: this

Configuration example for a YAML file(for example .pipeline/config.yaml):

steps:
  <...>
  apiProxyList:
    apimApiServiceKeyCredentialsId: 'MY_API_SERVICE_KEY'
    Top: MY_API_PROXY_GET_N_ENTITIES
    Skip: MY_API_PROXY_SKIP_N_ENTITIES
    Filter: MY_API_PROXY_FILTER_BY_ENTITY_FIELD
    Orderby: MY_API_PROXY_ORDER_BY_ENTITY_FIELD
    Count: MY_API_PROXY_ORDER_ENTITY_COUNT
    Search: MY_API_PROXY_SEARCH_BY_ENTITY_FIELD
    Select: MY_API_PROXY_SELECT_BY_ENTITY_FIELD
    Expand: MY_API_PROXY_EXPAND_BY_ENTITY_FIELD