apiProviderList¶
Get a full List of all API providers from the API Portal
Description¶
With this step, you can get a list of all API providers from the API Portal using the OData API. Learn more about the API Management API for getting list of an API Providers 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')
apiProviderList script: this
piper apiProviderList
Outputs¶
Output type | Details |
---|---|
commonPipelineEnvironment |
|
With this step, you can retrieve all the API providers from the API portal. An API provider is a concept in API Management, capability of SAP Integration Suite, which defines the connection details for services running on specific hosts whose details you want to access.
You use an API provider to define not only the details of the host you want an application to reach, but also to define any further details that are necessary to establish the connection, for example, proxy settings. For more details, see the blog API Providers
To consume the ApiProviderList 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 ApiProviderList step.
- Execute the pipeline and validate the step exection results as explained in the blog Integration Suite Piper commands
- Use the ApiProviderList step to get the api providers list from the API Portal.
- ApiProviderList only supports GET operation.
Prerequisites¶
Parameters¶
Overview - Step¶
Name | Mandatory | Additional information |
---|---|---|
apiServiceKey | (yes) | apimApiServiceKeyCredentialsId ) |
script | (yes) | |
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'
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_apiServiceKey (if set) |
Secret | yes |
Configuration scope |
|
Resource references | Jenkins credential id: id: apimApiServiceKeyCredentialsId reference to: apiServiceKey |
count¶
Include count of items.
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
expand¶
Expand related entities.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_expand (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
filter¶
Filter items by property values.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_filter (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
orderby¶
Order by property values.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_orderby (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
script¶
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.
Scope | Details |
---|---|
Aliases | - |
Type | Jenkins Script |
Mandatory | yes |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
search¶
Search items by search phrases.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_search (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
select¶
Select properties to be returned.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_select (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
skip¶
Skip the first n items.
Scope | Details |
---|---|
Aliases | - |
Type | int |
Mandatory | no |
Default | 0 |
Secret | no |
Configuration scope |
|
Resource references | none |
top¶
Show only the first n items.
Scope | Details |
---|---|
Aliases | - |
Type | int |
Mandatory | no |
Default | 0 |
Secret | no |
Configuration scope |
|
Resource references | none |
verbose¶
verbose output
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
apimApiServiceKeyCredentialsId¶
Jenkins secret text credential ID containing the service key to the API Management Runtime service instance of plan 'api'
Scope | Details |
---|---|
Aliases | - |
Type | string |
Configuration scope |
|
Example¶
Configuration example for a Jenkinsfile
:
apiProviderList script: this
Configuration example for a YAML file(for example .pipeline/config.yaml
):
steps:
<...>
apiProviderList:
apimApiServiceKeyCredentialsId: 'MY_API_SERVICE_KEY'
Top: MY_API_PROVIDER_GET_N_ENTITIES
Skip: MY_API_PROVIDER_SKIP_N_ENTITIES
Filter: MY_API_PROVIDER_FILTER_BY_ENTITY_FIELD
Orderby: MY_API_PROVIDER_ORDER_BY_ENTITY_FIELD
Count: MY_API_PROVIDER_ORDER_ENTITY_COUNT
Search: MY_API_PROVIDER_SEARCH_BY_ENTITY_FIELD
Select: MY_API_PROVIDER_SELECT_BY_ENTITY_FIELD
Expand: MY_API_PROVIDER_EXPAND_BY_ENTITY_FIELD