New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@segment/public-api-sdk-typescript

Package Overview
Dependencies
Maintainers
0
Versions
907
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/public-api-sdk-typescript

NodeJS client for @segment/public-api-sdk-typescript

  • 57.3.0-b10902
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by34.3%
Maintainers
0
Weekly downloads
 
Created
Source

Segment Public API TypeScript SDK

:warning: This SDK is currently released as Public Beta. Its use in critical systems is discouraged, but feedback is welcome.

Overview

The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. The full documentation is available at https://docs.segmentapis.com.

All endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace.

See the next sections for more information on how to use the Segment Public API TypeScript SDK.

Latest API and SDK version: 57.3.0

Installation

This SDK is published as an NPM package. To install it, use:

npm i @segment/public-api-sdk-typescript

Or, if you're using yarn:

yarn add @segment/public-api-sdk-typescript

To build and compile the SDK from source, clone this repository and use:

yarn install
yarn build

This will output the compiled JavaScript files in the dist/ directory.

You are now ready to start making calls to Public API!

Example

import * as PublicAPI from '@segment/public-api-sdk-typescript';

const TOKEN = '...'; // fetch your token from a secure location

const { workspaces } = PublicAPI.configureApis(TOKEN);
// To access the EU endpoint, use `const { workspaces } = PublicAPI.configureEuApis(TOKEN)`

PublicAPI.unwrap(workspaces.getWorkspace())
    .then((result) => {
        console.log(JSON.stringify(result));
    })
    .catch(console.error);

Contributing

The contents of this repository are automatically generated, so we can't take contributions from external developers. If you have any issues with this SDK, please raise an issue or reach out to friends@segment.com instead of opening a pull request. Pull requests will not be reviewed.

FAQs

Package last updated on 05 Mar 2025

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