Segment.PublicApi 57.0.0

dotnet add package Segment.PublicApi --version 57.0.0                
NuGet\Install-Package Segment.PublicApi -Version 57.0.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.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Segment.PublicApi --version 57.0.0                
#r "nuget: Segment.PublicApi, 57.0.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.
// Install Segment.PublicApi as a Cake Addin
#addin nuget:?package=Segment.PublicApi&version=57.0.0

// Install Segment.PublicApi as a Cake Tool
#tool nuget:?package=Segment.PublicApi&version=57.0.0                

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.0.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. 
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
57.0.0 81 11/7/2024
56.0.0 78 10/31/2024
55.2.0 72 10/31/2024
55.1.0 89 10/25/2024