- Notifications
You must be signed in to change notification settings - Fork0
segmentio/public-api-sdk-csharp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 theOpenAPI Generator project:
- API version: 58.13.0
- Generator version: 7.0.1
- Build package: org.openapitools.codegen.languages.CSharpClientCodegenFor more information, please visithttps://docs.segmentapis.com
- RestSharp - 112.0.0 or later
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
usingSystem.Collections.Generic;usingSystem.Diagnostics;usingSegment.PublicApi.Api;usingSegment.PublicApi.Client;usingSegment.PublicApi.Model;publicclassExample{publicstaticvoidMain(){Configurationconfig=newConfiguration();config.BasePath="https://api.segmentapis.com";// Configure Bearer token for authorization: tokenconfig.AccessToken="YOUR_BEARER_TOKEN";WorkspacesApiworkspacesApi=newWorkspacesApi(config);try{GetWorkspace200Responseworkspace200Response=workspacesApi.GetWorkspace();Console.WriteLine(workspace200Response.Data.Workspace.Slug);}catch(ApiExceptione){Debug.Print("Exception when calling APICallsApi.GetDailyPerSourceAPICallsUsage: "+e.Message);Debug.Print("Status Code: "+e.ErrorCode);Debug.Print(e.StackTrace);}SourcesApisourcesApi=newSourcesApi(config);PaginationInputpaginationInput=newPaginationInput(count:100,cursor:"");try{do{ListSources200Responsesources200Response=sourcesApi.ListSources(paginationInput);foreach(SourceV1sourceinsources200Response.Data.Sources){// iterate over the sources}paginationInput.Cursor=sources200Response.Data.Pagination.Next;}while(paginationInput.Cursor!=null);}catch(ApiExceptione){Debug.Print("Exception when calling APICallsApi.GetDailyPerSourceAPICallsUsage: "+e.Message);Debug.Print("Status Code: "+e.ErrorCode);Debug.Print(e.StackTrace);}}}
About
C# SDK for Public API
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.