Gathering detailed insights and metrics for @kong/sdk-portal-js
Gathering detailed insights and metrics for @kong/sdk-portal-js
Gathering detailed insights and metrics for @kong/sdk-portal-js
Gathering detailed insights and metrics for @kong/sdk-portal-js
npm install @kong/sdk-portal-js
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Built with Next.js • Fully responsive • SEO optimized • Open source ready
Total Downloads
184,031
Last Day
23
Last Week
1,800
Last Month
14,314
Last Year
110,885
Apache-2.0 License
3 Stars
136 Commits
3 Forks
10 Watchers
13 Branches
57 Contributors
Updated on Apr 04, 2025
Latest Version
2.16.0
Package Id
@kong/sdk-portal-js@2.16.0
Unpacked Size
1.08 MB
Size
101.47 kB
File Count
26
NPM Version
10.8.2
Node Version
18.20.5
Published on
Nov 29, 2024
Cumulative downloads
Total Downloads
Last Day
-89.2%
23
Compared to previous day
Last Week
-54.1%
1,800
Compared to previous week
Last Month
-6.5%
14,314
Compared to previous month
Last Year
73.8%
110,885
Compared to previous year
1
3
1npm install @kong/sdk-portal-js@latest # for latest version
Below is some sample code, showing how to use the SDK to make a request to the Portal API. You can also look in the konnect-portal
repository for a more extensive example.
1import { 2 Configuration, 3 PortalApi, 4} from '@kong/sdk-portal-js' 5import axios, { AxiosInstance } from 'axios' 6 7export default class PortalV2ApiService { 8 private baseURL: string 9 private client: AxiosInstance 10 private portalAPI: PortalApi 11 12 constructor (baseURL) { 13 if (baseURL.endsWith('/')) { 14 baseURL = baseURL.slice(0, -1) 15 } 16 17 this.client = axios.create({ 18 baseURL: this.baseURL, 19 withCredentials: false, 20 headers: { 21 accept: 'application/json' 22 } 23 }) 24 25 const baseConfig = new Configuration({ 26 basePath: '', 27 accessToken: 'bearerToken' 28 }) 29 30 this.portalAPI = new PortalApi(baseConfig, this.baseURL, this.client) 31 } 32 33// ... 34 35// in your code 36const portalAPI = new PortalV2ApiService('https://custom-portal.api.your-site.com') 37 38// make a request to fetch details about the portal 39const { data } = await portalAPI.portalAPI.getPortalInfo() 40console.log(data) 41
Currently this repository is automatically updated by an upstream repository containing the Portal's OpenAPI Specification. The changes are automatically opened here, and are manually merged and generated.
Copyright 2016-2023 Kong Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
No vulnerabilities found.