Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

snyk-api-ts-client

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-api-ts-client

Snyk Api Client generated from API Blueprint

  • 1.11.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13K
increased by1.84%
Maintainers
1
Weekly downloads
 
Created
Source

Snyk logo


Known Vulnerabilities Inactively Maintained

This repository is in maintenance mode, no new features are being developed. Bug & security fixes will continue to be delivered. Open source contributions are welcome for small features & fixes (no breaking changes)

Documentation based generated Snyk API TypeScript client

Taking as input a swagger definition we convert from the api blueprint, it generates a client for all Snyk API v1 endpoints. APIv3 endpoints are currently not supported.

Generated from Snyk APIs

Requirements

Node 14 or above

Installation

npm i snyk-api-ts-client

Usage

Find which endpoint is of interest to you in the API Reference.
Then import and use.

import {Orgs} from 'snyk-api-ts-client'


const main = async () => {
    const result = await new Orgs().get()
    console.log(result)
}
main()

If POST|PUT based requests, the types are available and should be inferred automatically by your IDE Should look something like this

import {Org} from 'snyk-api-ts-client'
import { ProjectsPostBodyType } from 'snyk-api-ts-client/dist/client/generated/org'


const main = async () => {
    const body: ProjectsPostBodyType = {filters: {}}
    const result = await new Org({orgId: '12345678-1234-1234-1234-123456789012'}).projects.post(body)
    console.log(result)
}
main()

Pass a boolean true/false to see the full response or just the data. Default is false, showing you only the response body.

Endpoint deprecation notice

As of 1.7.3, the /issues endpoint is decommissioned. The aggregated-issues endpoint is the replacement to use. Vulnerable paths can be retrieved using the paths endpoint which also contain the fixVersion info to know how to fix that particular path. The supporting methods are available in the client generated.

FAQs

Package last updated on 05 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc