Create an Incident or a Service request
Details
Universal operation for creating Ticket/-s or Incident/-s or Service Request/-s.
Request
URL
POST https://{server_name}/m42Services/api/ticket/create?activitytype={activitytype}
Headers
For a list of available HTTP request headers see Web Services: REST API integration.
POST body
Element | Description | Type | Required |
---|
Sample Request
POST https://{server_name}/m42Services/api/ticket/Create?activityType=0
Authorization: Bearer YWsamplezhZARaccessGDuctoken2sYW1
Content-Type: application/json;charset=UTF-8
{
JournalEntry: {
ObjectId: '00000000-0000-0000-0000-000000000000',
TypeId: '00000000-0000-0000-0000-000000000000',
Publish: true,
Comments: 'string1',
EntryType: 0,
Creator: '00000000-0000-0000-0000-000000000000',
VisibleInPortal: true,
Parameters: [ {
IsPortalMode: true,
IsExportMode: true,
Name: 'string1',
} ],
SkipRaiseCoRuEvent: true,
IsFromEditDialog: true,
},
Asset: '00000000-0000-0000-0000-000000000000',
AffectedAsset: '00000000-0000-0000-0000-000000000000',
AffectedService: '00000000-0000-0000-0000-000000000000',
UserReachableAt: 'string1',
EntryBy: 0,
QueueProfile: '00000000-0000-0000-0000-000000000000',
Template: '00000000-0000-0000-0000-000000000000',
Category: '00000000-0000-0000-0000-000000000000',
Subject: 'string1',
Description: 'string1',
DescriptionHTML: 'string1',
Solution: 'string1',
SolutionHTML: 'string1',
ActivityAction: 0,
TaskType: 0,
ErrorType: 0,
State: 0,
Priority: 0,
Impact: 0,
Urgency: 0,
User: '00000000-0000-0000-0000-000000000000',
Creator: '00000000-0000-0000-0000-000000000000',
ResponsibleUser: '00000000-0000-0000-0000-000000000000',
ResponsibleRole: '00000000-0000-0000-0000-000000000000',
Service: '00000000-0000-0000-0000-000000000000',
SLA: '00000000-0000-0000-0000-000000000000',
OLA: '00000000-0000-0000-0000-000000000000',
ObjectID: '00000000-0000-0000-0000-000000000000',
TicketNumber: 'string1',
Deadline: '2024-10-30T20:32:58.266+00:00',
NotifyResponsible: true,
NotificationMode: 0,
CloseOnTasksCompletion: true,
WorkflowId: '00000000-0000-0000-0000-000000000000',
RelatedUsers: [ '00000000-0000-0000-0000-000000000000' ],
RelatedServices: [ '00000000-0000-0000-0000-000000000000' ],
SimpleServiceForms: [ '00000000-0000-0000-0000-000000000000' ],
ConfigurationItems: [ '00000000-0000-0000-0000-000000000000' ],
RelatedTasks: [ '00000000-0000-0000-0000-000000000000' ],
RelatedAssets: [ '00000000-0000-0000-0000-000000000000' ],
RelatedIncidents: [ '00000000-0000-0000-0000-000000000000' ],
RelatedProblems: [ '00000000-0000-0000-0000-000000000000' ],
NewInformationReceived: true,
SkipSettingOwner: true,
RecalculateResponsibleRole: true,
ExtraProperties: [ {
Name: 'string1',
Value: { },
}
Response
The server does not return any response.
Status Codes and Errors
The following table lists the returned HTTP status codes.
Code | Message |
---|---|
204 No content | indicates that the server has successfully fulfilled the request and that there is no content to send in the response payload body. |
400 Bad Request | specifies missing required parameters and arguments of the body message. |
500 Internal server error |
|