Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Latest commit

 

History

History
148 lines (112 loc) · 5.93 KB

File metadata and controls

148 lines (112 loc) · 5.93 KB

LaunchDarkly.Api.Api.AuditLogApi

All URIs are relative to https://app.launchdarkly.com/api/v2

Method HTTP request Description
GetAuditLogEntries GET /auditlog Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
GetAuditLogEntry GET /auditlog/{resourceId} Use this endpoint to fetch a single audit log entry by its resouce ID.

GetAuditLogEntries

AuditLogEntries GetAuditLogEntries (long? before, long? after, string q, decimal? limit, string spec)

Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.

Example

using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;

namespace Example
{
    public class GetAuditLogEntriesExample
    {
        public void main()
        {
            
            // Configure API key authorization: Token
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AuditLogApi();
            var before = 789;  // long? | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp. (optional) 
            var after = 789;  // long? | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occurred after this timestamp. (optional) 
            var q = q_example;  // string | Text to search for. You can search for the full or partial name of the resource involved or full or partial email address of the member who made the change. (optional) 
            var limit = 8.14;  // decimal? | A limit on the number of audit log entries to be returned, between 1 and 20. (optional) 
            var spec = spec_example;  // string | A resource specifier, allowing you to filter audit log listings by resource. (optional) 

            try
            {
                // Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
                AuditLogEntries result = apiInstance.GetAuditLogEntries(before, after, q, limit, spec);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuditLogApi.GetAuditLogEntries: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
before long? A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp. [optional]
after long? A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occurred after this timestamp. [optional]
q string Text to search for. You can search for the full or partial name of the resource involved or full or partial email address of the member who made the change. [optional]
limit decimal? A limit on the number of audit log entries to be returned, between 1 and 20. [optional]
spec string A resource specifier, allowing you to filter audit log listings by resource. [optional]

Return type

AuditLogEntries

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAuditLogEntry

AuditLogEntry GetAuditLogEntry (string resourceId)

Use this endpoint to fetch a single audit log entry by its resouce ID.

Example

using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;

namespace Example
{
    public class GetAuditLogEntryExample
    {
        public void main()
        {
            
            // Configure API key authorization: Token
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AuditLogApi();
            var resourceId = resourceId_example;  // string | The resource ID.

            try
            {
                // Use this endpoint to fetch a single audit log entry by its resouce ID.
                AuditLogEntry result = apiInstance.GetAuditLogEntry(resourceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuditLogApi.GetAuditLogEntry: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
resourceId string The resource ID.

Return type

AuditLogEntry

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]