Okta.Sdk.Api.LogStreamApi
October 22, 2025 ยท View on GitHub
All URIs are relative to https://subdomain.okta.com
| Method | HTTP request | Description |
|---|---|---|
| ActivateLogStream | POST /api/v1/logStreams/{logStreamId}/lifecycle/activate | Activate a log stream |
| CreateLogStream | POST /api/v1/logStreams | Create a log stream |
| DeactivateLogStream | POST /api/v1/logStreams/{logStreamId}/lifecycle/deactivate | Deactivate a log stream |
| DeleteLogStream | DELETE /api/v1/logStreams/{logStreamId} | Delete a log stream |
| GetLogStream | GET /api/v1/logStreams/{logStreamId} | Retrieve a log stream |
| ListLogStreams | GET /api/v1/logStreams | List all log streams |
| ReplaceLogStream | PUT /api/v1/logStreams/{logStreamId} | Replace a log stream |
ActivateLogStream
LogStream ActivateLogStream (string logStreamId)
Activate a log stream
Activates a log stream by logStreamId
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ActivateLogStreamExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var logStreamId = 0oa1orzg0CHSgPcjZ0g4; // string | Unique identifier for the log stream
try
{
// Activate a log stream
LogStream result = apiInstance.ActivateLogStream(logStreamId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.ActivateLogStream: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| logStreamId | string | Unique identifier for the log stream |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateLogStream
LogStream CreateLogStream (LogStream instance)
Create a log stream
Creates a new log stream object
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateLogStreamExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var instance = new LogStream(); // LogStream |
try
{
// Create a log stream
LogStream result = apiInstance.CreateLogStream(instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.CreateLogStream: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| instance | LogStream |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeactivateLogStream
LogStream DeactivateLogStream (string logStreamId)
Deactivate a log stream
Deactivates a log stream by logStreamId
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeactivateLogStreamExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var logStreamId = 0oa1orzg0CHSgPcjZ0g4; // string | Unique identifier for the log stream
try
{
// Deactivate a log stream
LogStream result = apiInstance.DeactivateLogStream(logStreamId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.DeactivateLogStream: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| logStreamId | string | Unique identifier for the log stream |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteLogStream
void DeleteLogStream (string logStreamId)
Delete a log stream
Deletes a log stream object from your org by ID
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteLogStreamExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var logStreamId = 0oa1orzg0CHSgPcjZ0g4; // string | Unique identifier for the log stream
try
{
// Delete a log stream
apiInstance.DeleteLogStream(logStreamId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.DeleteLogStream: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| logStreamId | string | Unique identifier for the log stream |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLogStream
LogStream GetLogStream (string logStreamId)
Retrieve a log stream
Retrieves a log stream object by ID
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetLogStreamExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var logStreamId = 0oa1orzg0CHSgPcjZ0g4; // string | Unique identifier for the log stream
try
{
// Retrieve a log stream
LogStream result = apiInstance.GetLogStream(logStreamId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.GetLogStream: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| logStreamId | string | Unique identifier for the log stream |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListLogStreams
List<LogStream> ListLogStreams (string after = null, int? limit = null, string filter = null)
List all log streams
Lists all log stream objects in your org. You can request a paginated list or a subset of log streams that match a supported filter expression.
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListLogStreamsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var after = "after_example"; // string | The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)
var limit = 20; // int? | A limit on the number of objects to return (optional) (default to 20)
var filter = type eq "aws_eventbridge"; // string | An expression that [filters](/#filter) the returned objects. You can only use the `eq` operator on either the `status` or `type` properties in the filter expression. (optional)
try
{
// List all log streams
List<LogStream> result = apiInstance.ListLogStreams(after, limit, filter).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.ListLogStreams: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| after | string | The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See Pagination. | [optional] |
| limit | int? | A limit on the number of objects to return | [optional] [default to 20] |
| filter | string | An expression that filters the returned objects. You can only use the `eq` operator on either the `status` or `type` properties in the filter expression. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 403 | Forbidden | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReplaceLogStream
LogStream ReplaceLogStream (string logStreamId, LogStreamPutSchema instance)
Replace a log stream
Replaces the log stream object properties for a given ID. This operation is typically used to update the configuration of a log stream. Depending on the type of log stream you want to update, certain properties can't be modified after the log stream is initially created. Use the Retrieve the log stream schema for the schema type request to determine which properties you can update for the specific log stream type. Log stream properties with the \"writeOnce\" : true attribute can't be updated after creation. You must still specify these writeOnce properties in the request body with the original values in the PUT request. > Note: You don't have to specify properties that have both the \"writeOnce\": true and the \"writeOnly\": true attributes in the PUT request body. These property values are ignored even if you add them in the PUT request body.
Example
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceLogStreamExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new LogStreamApi(config);
var logStreamId = 0oa1orzg0CHSgPcjZ0g4; // string | Unique identifier for the log stream
var instance = new LogStreamPutSchema(); // LogStreamPutSchema |
try
{
// Replace a log stream
LogStream result = apiInstance.ReplaceLogStream(logStreamId, instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling LogStreamApi.ReplaceLogStream: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| logStreamId | string | Unique identifier for the log stream | |
| instance | LogStreamPutSchema |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]