Skip to content

Latest commit

 

History

History
208 lines (136 loc) · 9.98 KB

README.md

File metadata and controls

208 lines (136 loc) · 9.98 KB

LogsV1

(LogsV1)

Overview

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.LogsV1.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,429 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.LogsV1.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,429 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.LogsV1.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,429 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.LogsV1.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,429,500 application/json
HathoraCloud.Models.Errors.SDKException 4xx-5xx /