Skip to content

Latest commit

 

History

History
207 lines (137 loc) · 10.3 KB

README.md

File metadata and controls

207 lines (137 loc) · 10.3 KB

LogV1

(LogV1)

Overview

Operations to get logs by applications, processes, and deployments. We store 20GB of logs data.

Available Operations

DownloadLogForProcess

Download entire log file for a stopped process.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

DownloadLogForProcessRequest req = new DownloadLogForProcessRequest() {
    ProcessId = "cbfcddd2-0006-43ae-996c-995fff7bed2e",
};


using(var res = await sdk.LogV1.DownloadLogForProcessAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request DownloadLogForProcessRequest ✔️ The request object to use for the request.

Response

DownloadLogForProcessResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 400,401,404,410 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetLogsForApp

Returns a stream of logs for an application using appId.

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

GetLogsForAppRequest req = new GetLogsForAppRequest() {
    TailLines = 100,
};


using(var res = await sdk.LogV1.GetLogsForAppAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request GetLogsForAppRequest ✔️ The request object to use for the request.

Response

GetLogsForAppResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetLogsForDeployment

Returns a stream of logs for a deployment using appId and deploymentId.

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

GetLogsForDeploymentRequest req = new GetLogsForDeploymentRequest() {
    DeploymentId = 1,
    TailLines = 100,
};


using(var res = await sdk.LogV1.GetLogsForDeploymentAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request GetLogsForDeploymentRequest ✔️ The request object to use for the request.

Response

GetLogsForDeploymentResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 401,404 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /

GetLogsForProcess

Returns a stream of logs for a process using appId and processId.

Example Usage

using HathoraCloud;
using HathoraCloud.Models.Shared;
using HathoraCloud.Models.Operations;

var sdk = new HathoraCloudSDK(
    security: new Security() {
        HathoraDevToken = "<YOUR_BEARER_TOKEN_HERE>",
    },
    appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2");

GetLogsForProcessRequest req = new GetLogsForProcessRequest() {
    ProcessId = "cbfcddd2-0006-43ae-996c-995fff7bed2e",
    TailLines = 100,
};


using(var res = await sdk.LogV1.GetLogsForProcessAsync(req))
{
    // handle response
}

Parameters

Parameter Type Required Description
request GetLogsForProcessRequest ✔️ The request object to use for the request.

Response

GetLogsForProcessResponse

Errors

Error Object Status Code Content Type
HathoraCloud.Models.Errors.ApiError 400,401,404,410,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /