Segment.PublicApi 57.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Segment.PublicApi --version 57.1.0
                    
NuGet\Install-Package Segment.PublicApi -Version 57.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Segment.PublicApi" Version="57.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Segment.PublicApi" Version="57.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Segment.PublicApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Segment.PublicApi --version 57.1.0
                    
#r "nuget: Segment.PublicApi, 57.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Segment.PublicApi@57.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Segment.PublicApi&version=57.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Segment.PublicApi&version=57.1.0
                    
Install as a Cake Tool

Segment Public API C# SDK

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

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.

All CRUD 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.

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 57.1.0
  • Generator version: 7.0.1
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://docs.segmentapis.com

Dependencies

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using Segment.PublicApi.Api;
using Segment.PublicApi.Client;
using Segment.PublicApi.Model;


public class Example
{
    public static void Main()
    {

        Configuration config = new Configuration();
        config.BasePath = "https://api.segmentapis.com";
        // Configure Bearer token for authorization: token
        config.AccessToken = "YOUR_BEARER_TOKEN";

        WorkspacesApi workspacesApi = new WorkspacesApi(config);

        try
        {
            GetWorkspace200Response workspace200Response = workspacesApi.GetWorkspace();
            Console.WriteLine(workspace200Response.Data.Workspace.Slug);

        }
        catch (ApiException e)
        {
            Debug.Print("Exception when calling APICallsApi.GetDailyPerSourceAPICallsUsage: " + e.Message );
            Debug.Print("Status Code: "+ e.ErrorCode);
            Debug.Print(e.StackTrace);
        }

        SourcesApi sourcesApi = new SourcesApi(config);
        PaginationInput paginationInput = new PaginationInput(count: 100, cursor: "");
        try
        {
            do
            {
                ListSources200Response sources200Response = sourcesApi.ListSources(paginationInput);
                foreach (SourceV1 source in sources200Response.Data.Sources)
                {
                    // iterate over the sources
                }
                paginationInput.Cursor = sources200Response.Data.Pagination.Next;
            } while (paginationInput.Cursor != null);
        }
        catch (ApiException e)
        {
            Debug.Print("Exception when calling APICallsApi.GetDailyPerSourceAPICallsUsage: " + e.Message);
            Debug.Print("Status Code: " + e.ErrorCode);
            Debug.Print(e.StackTrace);
        }

    }
}

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
58.13.0 29 7/15/2025
58.12.0 28 7/15/2025
58.11.0 151 7/10/2025
58.10.0 127 7/9/2025
58.9.0 130 7/8/2025
58.8.0 130 7/2/2025
58.7.0 126 6/30/2025
58.6.0 286 6/11/2025
58.5.0 145 5/23/2025
58.4.0 143 5/22/2025
58.3.0 143 5/5/2025
58.2.0 157 4/21/2025
58.1.1 183 4/10/2025
58.0.1 140 3/15/2025
58.0.0 148 3/13/2025
57.3.0 98 1/13/2025
57.2.0 114 12/9/2024
57.1.0 113 12/6/2024
57.0.0 121 11/7/2024
56.0.0 120 10/31/2024
55.2.0 107 10/31/2024
55.1.0 121 10/25/2024