Skip to content

Latest commit

 

History

History
562 lines (429 loc) · 48.3 KB

File metadata and controls

562 lines (429 loc) · 48.3 KB

Ticketing

Overview

Available Operations

GetUser

Retrieve a single user by their identifier.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingGetUserRequest req = new TicketingGetUserRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    Fields = "id,remote_id,type,name,primary_email,primary_phone,username,active,first_name,last_name,customer_account_reference,created_at,updated_at,unified_custom_fields",
    Prefer = "heartbeat",
};

var res = await sdk.Ticketing.GetUserAsync(req);

// handle response

Parameters

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

Response

TicketingGetUserResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

DownloadAttachment

Download the attachment file from a ticket.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingDownloadTicketingAttachmentRequest req = new TicketingDownloadTicketingAttachmentRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    SubResourceId = "<id>",
    Format = "base64",
    ExportFormat = "text/plain",
    Prefer = "heartbeat",
};

var res = await sdk.Ticketing.DownloadAttachmentAsync(req);

// handle response

Parameters

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

Response

TicketingDownloadTicketingAttachmentResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

ListTicketTypes

Retrieve a paginated list of all ticket types.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingListTicketTypesRequest req = new TicketingListTicketTypesRequest() {
    XAccountId = "<id>",
    Fields = "id,remote_id,name,project_id,remote_project_id,unified_custom_fields",
    Filter = new TicketingListTicketTypesFilter() {
        UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
    },
    Prefer = "heartbeat",
};

TicketingListTicketTypesResponse? res = await sdk.Ticketing.ListTicketTypesAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

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

Response

TicketingListTicketTypesResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

GetTicketType

Retrieve a single ticket type by its identifier.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingGetTicketTypeRequest req = new TicketingGetTicketTypeRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    Fields = "id,remote_id,name,project_id,remote_project_id,unified_custom_fields",
    Prefer = "heartbeat",
};

var res = await sdk.Ticketing.GetTicketTypeAsync(req);

// handle response

Parameters

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

Response

TicketingGetTicketTypeResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

ListProjects

Retrieve a paginated list of projects.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingListProjectsRequest req = new TicketingListProjectsRequest() {
    XAccountId = "<id>",
    Fields = "id,remote_id,organization_id,remote_organization_id,name,description,created_at,updated_at,unified_custom_fields",
    Filter = new TicketingListProjectsFilter() {
        UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
    },
    Prefer = "heartbeat",
};

TicketingListProjectsResponse? res = await sdk.Ticketing.ListProjectsAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

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

Response

TicketingListProjectsResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

GetProject

Retrieve a single project by its identifier.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingGetProjectRequest req = new TicketingGetProjectRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    Fields = "id,remote_id,organization_id,remote_organization_id,name,description,created_at,updated_at,unified_custom_fields",
    Prefer = "heartbeat",
};

var res = await sdk.Ticketing.GetProjectAsync(req);

// handle response

Parameters

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

Response

TicketingGetProjectResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

ListProjectComponents

Retrieve a paginated list of project components.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingListProjectComponentsRequest req = new TicketingListProjectComponentsRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    Fields = "id,remote_id,organization_id,remote_organization_id,project_id,remote_project_id,name,description,created_at,updated_at,unified_custom_fields",
    Filter = null,
    Prefer = "heartbeat",
};

TicketingListProjectComponentsResponse? res = await sdk.Ticketing.ListProjectComponentsAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

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

Response

TicketingListProjectComponentsResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

GetProjectComponent

Retrieve a single project component by its identifier.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingGetProjectComponentRequest req = new TicketingGetProjectComponentRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    SubResourceId = "<id>",
    Fields = "id,remote_id,organization_id,remote_organization_id,project_id,remote_project_id,name,description,created_at,updated_at,unified_custom_fields",
    Prefer = "heartbeat",
};

var res = await sdk.Ticketing.GetProjectComponentAsync(req);

// handle response

Parameters

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

Response

TicketingGetProjectComponentResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*

ListProjectTicketTypes

Retrieve a paginated list of ticket types for a project.

Example Usage

using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;

var sdk = new StackOneHQClient(security: new Security() {
    Username = "",
    Password = "",
});

TicketingListProjectTicketTypesRequest req = new TicketingListProjectTicketTypesRequest() {
    XAccountId = "<id>",
    Id = "<id>",
    Fields = "id,remote_id,name,project_id,remote_project_id,unified_custom_fields",
    Filter = new TicketingListProjectTicketTypesFilter() {
        UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
    },
    Prefer = "heartbeat",
};

TicketingListProjectTicketTypesResponse? res = await sdk.Ticketing.ListProjectTicketTypesAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

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

Response

TicketingListProjectTicketTypesResponse

Errors

Error Type Status Code Content Type
StackOneHQ.Client.Models.Errors.BadRequestResponseException 400 application/json
StackOneHQ.Client.Models.Errors.UnauthorizedResponseException 401 application/json
StackOneHQ.Client.Models.Errors.ForbiddenResponseException 403 application/json
StackOneHQ.Client.Models.Errors.NotFoundResponseException 404 application/json
StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException 408 application/json
StackOneHQ.Client.Models.Errors.ConflictResponseException 409 application/json
StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException 412 application/json
StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException 422 application/json
StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException 429 application/json
StackOneHQ.Client.Models.Errors.InternalServerErrorResponse 500 application/json
StackOneHQ.Client.Models.Errors.NotImplementedResponseException 501 application/json
StackOneHQ.Client.Models.Errors.BadGatewayResponseException 502 application/json
StackOneHQ.Client.Models.Errors.APIException 4XX, 5XX */*