1.0.42 • Published 2 years ago

sap-apim v1.0.42

Weekly downloads
60
License
ISC
Repository
github
Last release
2 years ago

sap-apim

Commandline tool to use the management APIs of SAP API Management

Currently supports creating / updating providers and products and generating documentation

Installation

npm i -g sap-apim

Configuration

Create a yaml file with the following contents:

provider:
  name: example-provider
  description: This is an example provider
  isOnPremise: false # default false
  host: example.com
  port: 443 # default 443
  useSsl: true # default true
  path: /v1/test
  keyStore: example # optional, useSsl must be true
  keyAlias: example # optional, useSsl must be true
  managedByProxy: true # default false

Use

Use in combination with sapim

sap-apim provider ./manifest.yaml

To manage products

Create a yaml file with the following contents:

products:
  - name: Example-product-silver
    title: Example product silver
    description: |
      Silver version of the example product
    quota: 2
    interval: 1
    timeunit: minute
    proxies:
      - echoheaders
  - name: Example-product-gold
    title: Example product gold
    description: |
      Gold version of the example product
    quota: 3
    interval: 1
    timeunit: minute
    proxies:
      - echoheaders

Use

Use in combination with sapim

sap-apim products ./products.yaml

To create documentation for your api proxy

To be able to see the documentation of an API proxy correctly in the SAP developer portal, the APIProxy requires 2 folders with some documentation content. This command will generate those 2 folders from an openapi spec by creating, downloading, extracting the 2 folders and deleting a proxy in SAP. Both openapi 3.0 and swagger 2.0 are supported in json and yml format.

Use

Use in combination with sapim

sap-apim documentation <spec> <outputFolder>
sap-apim documentation ./openapi.yml ./APIProxy

To manage KVMs

This command will create / update / delete the key-values in your KVMs.

Create a yaml file with the following contents, or add this to your current yaml file:

kvms:
  test:
    key1: value1
    key2: value2

Use

Use in combination with sapim

sap-apim kvms <manifest>
sap-apim kvms manifest.yaml
sap-apim kvms manifest.yaml --purgeDeleted // Deletes entries from the KVM that are not in the Manifest

Cloud Foundry

Set up Cloud Foundry login

sap-apim documentation --access_token $(sap-apim cf-login --tokenUrl <tokenUrl> --clientid <clientid> --secret <secret>)
1.0.42

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.40

2 years ago

1.0.41

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.19

4 years ago

1.0.20

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.9

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.12

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago