Retrieve a paginated list of tickets.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
TicketingListTicketsRequest req = new TicketingListTicketsRequest() {
XAccountId = "<id>",
Fields = "id,remote_id,type,ticket_number,title,creator_id,remote_creator_id,reporters,assignees,content,parent_id,remote_parent_id,closed_at,ticket_url,status,priority,tags,projects,components,organization,created_at,updated_at,unified_custom_fields",
Filter = new TicketingListTicketsFilter() {
UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
},
Prefer = "heartbeat",
};
TicketingListTicketsResponse? res = await sdk.Ticketing.Tickets.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}
TicketingListTicketsResponse
| 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 |
*/* |
Create a new ticket record.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using System.Collections.Generic;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Ticketing.Tickets.CreateAsync(
xAccountId: "<id>",
ticketingTicketCreateRequestDto: new TicketingTicketCreateRequestDto() {
UnifiedCustomFields = new Dictionary<string, object>() {
{ "my_project_custom_field_1", "REF-1236" },
{ "my_project_custom_field_2", "some other value" },
},
Title = "System outage in production environment",
CreatorId = "user-001",
Reporters = new List<string>() {
"user-001",
"user-002",
},
Assignees = new List<string>() {
"user-001",
"user-002",
},
Content = new List<TicketingContent>() {
new TicketingContent() {
Plain = "This is some content",
Html = "<p>This is some content</p>",
},
},
ParentId = "ticket-002",
Priority = new TicketingTicketCreateRequestDtoPriority() {
Id = "001",
Value = TicketingTicketCreateRequestDtoValue.Medium,
SourceValue = TicketingTicketCreateRequestDtoSourceValueUnion.CreateStr(
"Normal"
),
},
Tags = new List<string>() {
"tag-001",
"tag-002",
},
OrganizationId = "organization-001",
ProjectId = "project-001",
ComponentIds = "[\"component-001\",\"component-002\"]",
Type = "ticket-type-001",
},
prefer: "heartbeat"
);
// handle response
| Parameter |
Type |
Required |
Description |
Example |
XAccountId |
string |
✔️ |
The account identifier |
|
TicketingTicketCreateRequestDto |
TicketingTicketCreateRequestDto |
✔️ |
N/A |
|
Prefer |
string |
➖ |
Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) |
heartbeat |
TicketingCreateTicketResponse
| 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 |
*/* |
Retrieve a single ticket by its identifier.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
TicketingGetTicketRequest req = new TicketingGetTicketRequest() {
XAccountId = "<id>",
Id = "<id>",
Fields = "id,remote_id,type,ticket_number,title,creator_id,remote_creator_id,reporters,assignees,content,parent_id,remote_parent_id,closed_at,ticket_url,status,priority,tags,projects,components,organization,created_at,updated_at,unified_custom_fields",
Prefer = "heartbeat",
};
var res = await sdk.Ticketing.Tickets.GetAsync(req);
// handle response
TicketingGetTicketResponse
| 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 |
*/* |
Update an existing ticket record by its identifier.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using System.Collections.Generic;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Ticketing.Tickets.UpdateAsync(
xAccountId: "<id>",
id: "<id>",
ticketingTicketUpdateRequestDto: new TicketingTicketUpdateRequestDto() {
UnifiedCustomFields = new Dictionary<string, object>() {
{ "my_project_custom_field_1", "REF-1236" },
{ "my_project_custom_field_2", "some other value" },
},
Title = "System outage in production environment",
Reporters = new List<string>() {
"user-001",
"user-002",
},
Assignees = new List<string>() {
"user-001",
"user-002",
},
Content = new List<TicketingContent>() {
new TicketingContent() {
Plain = "This is some content",
Html = "<p>This is some content</p>",
},
},
ParentId = "ticket-002",
Priority = new TicketingTicketUpdateRequestDtoPriority() {
Id = "001",
Value = TicketingTicketUpdateRequestDtoPriorityValue.Medium,
SourceValue = TicketingTicketUpdateRequestDtoPrioritySourceValueUnion.CreateStr(
"Normal"
),
},
Tags = new List<string>() {
"tag-001",
"tag-002",
},
ProjectId = "project-001",
ComponentIds = "[\"component-001\",\"component-002\"]",
Status = new TicketingTicketUpdateRequestDtoStatus() {
Id = "001",
Type = new TicketingTicketUpdateRequestDtoType() {
Value = TicketingTicketUpdateRequestDtoStatusValue.ToDo,
SourceValue = TicketingTicketUpdateRequestDtoStatusSourceValueUnion.CreateStr(
"New"
),
},
Name = "Backlog",
},
},
prefer: "heartbeat"
);
// handle response
| Parameter |
Type |
Required |
Description |
Example |
XAccountId |
string |
✔️ |
The account identifier |
|
Id |
string |
✔️ |
N/A |
|
TicketingTicketUpdateRequestDto |
TicketingTicketUpdateRequestDto |
✔️ |
N/A |
|
Prefer |
string |
➖ |
Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) |
heartbeat |
TicketingUpdateTicketResponse
| 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 |
*/* |
Retrieve a paginated list of attachment details for a ticket.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
TicketingListAttachmentsRequest req = new TicketingListAttachmentsRequest() {
XAccountId = "<id>",
Id = "<id>",
Fields = "id,remote_id,ticket_id,remote_ticket_id,user_id,remote_user_id,file_name,file_format,file_url,size,created_at,updated_at,unified_custom_fields",
Filter = new TicketingListAttachmentsFilter() {
UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
},
Prefer = "heartbeat",
};
TicketingListAttachmentsResponse? res = await sdk.Ticketing.Tickets.ListAttachmentsAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}
TicketingListAttachmentsResponse
| 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 |
*/* |
Retrieve a paginated list of statuses for a ticket.
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
TicketingListTicketStatusesRequest req = new TicketingListTicketStatusesRequest() {
XAccountId = "<id>",
Id = "<id>",
Filter = new TicketingListTicketStatusesFilter() {
UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
},
Prefer = "heartbeat",
};
TicketingListTicketStatusesResponse? res = await sdk.Ticketing.Tickets.ListStatusesAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}
TicketingListTicketStatusesResponse
| 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 |
*/* |