See all operations
POST: projects/{project_id}/incidents
Description
Creates a new incident in the specified project in the system
How to Execute
To access this REST web service, you need to use the following URL (make sure to replace any parameters (eg {project_id}) with the relevant value (eg 1):
https://api.inflectra.com/Spira/Services/v6_0/RestService.svc/projects/{project_id}/incidents
Request Parameters
Name
|
Description
|
project_id
|
The id of the project
|
Request Body
Property
|
Description
|
IncidentId
|
The id of the incident (integer)
|
PriorityId
|
The id of the priority of the incident (integer)
|
SeverityId
|
The id of the severity of the incident (integer)
|
IncidentStatusId
|
The id of the status of the incident (integer)
If no value is provided, the default status for the workflow is used
|
IncidentTypeId
|
The id of the type of the incident (integer)
If no value is provided, the default type for the project is used
|
OpenerId
|
The id of the user who detected the incident (integer)
If a value is not provided, the authenticated user is used
|
OwnerId
|
The id of the user to the incident is assigned-to (integer)
|
TestRunStepIds
|
The id of the test run steps that the incident relates to (integer)
|
DetectedReleaseId
|
The id of the release/iteration that the incident was detected in (integer)
|
ResolvedReleaseId
|
The id of the release/iteration that the incident will be fixed in (integer)
|
VerifiedReleaseId
|
The id of the release/iteration that the incident was retested in (integer)
|
ComponentIds
|
The list of components that this incident belongs to (array of integers)
|
Name
|
The name of the incident (string)
|
Description
|
The description of the incident (string)
|
CreationDate
|
The date/time that the incident was originally created
If no value is provided, the current date/time on the server is used (date-time)
|
StartDate
|
The date that work started on the incident (date-time)
|
EndDate
|
The date that work is scheduled to finish on the incident (date-time)
|
ClosedDate
|
The date that the incident was closed (date-time)
|
EstimatedEffort
|
The estimated effort (in minutes) to resolve the incident (integer)
|
ActualEffort
|
The actual effort (in minutes) it took to resolve the incident (integer)
|
RemainingEffort
|
The effort remaining as reported by the developer
|
LastUpdateDate
|
The date/time that the incident was last modified (date-time)
|
FixedBuildId
|
The id of the build that the incident was fixed in (integer)
|
DetectedBuildId
|
The id of the build that the incident was detected in (integer)
|
ProjectId
|
The id of the project that the artifact belongs to
|
ConcurrencyDate
|
The datetime used to track optimistic concurrency to prevent edit conflicts
|
CustomProperties
|
The list of associated custom properties/fields for this artifact
|
Tags
|
The list of meta-tags that should be associated with the artifact
|
<RemoteIncident xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v6_0.DataObjects">
<ArtifactTypeId>0</ArtifactTypeId>
<ConcurrencyDate>0001-01-01T00:00:00</ConcurrencyDate>
<CustomProperties i:nil="true" />
<IsAttachments>false</IsAttachments>
<ProjectId>0</ProjectId>
<Tags i:nil="true" />
<ActualEffort i:nil="true" />
<ClosedDate i:nil="true" />
<CompletionPercent>0</CompletionPercent>
<ComponentIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<CreationDate i:nil="true" />
<Description i:nil="true" />
<DetectedBuildId i:nil="true" />
<DetectedBuildName i:nil="true" />
<DetectedReleaseId i:nil="true" />
<DetectedReleaseVersionNumber i:nil="true" />
<EndDate i:nil="true" />
<EstimatedEffort i:nil="true" />
<FixedBuildId i:nil="true" />
<FixedBuildName i:nil="true" />
<IncidentId i:nil="true" />
<IncidentStatusId i:nil="true" />
<IncidentStatusName i:nil="true" />
<IncidentStatusOpenStatus i:nil="true" />
<IncidentTypeId i:nil="true" />
<IncidentTypeName i:nil="true" />
<LastUpdateDate>0001-01-01T00:00:00</LastUpdateDate>
<Name i:nil="true" />
<OpenerId i:nil="true" />
<OpenerName i:nil="true" />
<OwnerId i:nil="true" />
<OwnerName i:nil="true" />
<PriorityId i:nil="true" />
<PriorityName i:nil="true" />
<ProjectName i:nil="true" />
<ProjectedEffort i:nil="true" />
<RemainingEffort i:nil="true" />
<ResolvedReleaseId i:nil="true" />
<ResolvedReleaseVersionNumber i:nil="true" />
<SeverityId i:nil="true" />
<SeverityName i:nil="true" />
<StartDate i:nil="true" />
<TestRunStepIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<VerifiedReleaseId i:nil="true" />
<VerifiedReleaseVersionNumber i:nil="true" />
</RemoteIncident>
{"IncidentId":null,
"PriorityId":null,
"SeverityId":null,
"IncidentStatusId":null,
"IncidentTypeId":null,
"OpenerId":null,
"OwnerId":null,
"TestRunStepIds":null,
"DetectedReleaseId":null,
"ResolvedReleaseId":null,
"VerifiedReleaseId":null,
"ComponentIds":null,
"Name":null,
"Description":null,
"CreationDate":null,
"StartDate":null,
"EndDate":null,
"ClosedDate":null,
"CompletionPercent":0,
"EstimatedEffort":null,
"ActualEffort":null,
"RemainingEffort":null,
"ProjectedEffort":null,
"LastUpdateDate":"0001-01-01T00:00:00",
"PriorityName":null,
"SeverityName":null,
"IncidentStatusName":null,
"IncidentTypeName":null,
"OpenerName":null,
"OwnerName":null,
"ProjectName":null,
"DetectedReleaseVersionNumber":null,
"ResolvedReleaseVersionNumber":null,
"VerifiedReleaseVersionNumber":null,
"IncidentStatusOpenStatus":null,
"FixedBuildId":null,
"FixedBuildName":null,
"DetectedBuildId":null,
"DetectedBuildName":null,
"ProjectId":0,
"ArtifactTypeId":0,
"ConcurrencyDate":"0001-01-01T00:00:00",
"CustomProperties":null,
"IsAttachments":false,
"Tags":null}
Return Data
The JSON and XML examples below show the shape of one entry that will be returned. It does not show an example of how that entry will be populated.
Property
|
Description
|
IncidentId
|
The id of the incident (integer)
|
PriorityId
|
The id of the priority of the incident (integer)
|
SeverityId
|
The id of the severity of the incident (integer)
|
IncidentStatusId
|
The id of the status of the incident (integer)
If no value is provided, the default status for the workflow is used
|
IncidentTypeId
|
The id of the type of the incident (integer)
If no value is provided, the default type for the project is used
|
OpenerId
|
The id of the user who detected the incident (integer)
If a value is not provided, the authenticated user is used
|
OwnerId
|
The id of the user to the incident is assigned-to (integer)
|
TestRunStepIds
|
The id of the test run steps that the incident relates to (integer)
|
DetectedReleaseId
|
The id of the release/iteration that the incident was detected in (integer)
|
ResolvedReleaseId
|
The id of the release/iteration that the incident will be fixed in (integer)
|
VerifiedReleaseId
|
The id of the release/iteration that the incident was retested in (integer)
|
ComponentIds
|
The list of components that this incident belongs to (array of integers)
|
Name
|
The name of the incident (string)
|
Description
|
The description of the incident (string)
|
CreationDate
|
The date/time that the incident was originally created
If no value is provided, the current date/time on the server is used (date-time)
|
StartDate
|
The date that work started on the incident (date-time)
|
EndDate
|
The date that work is scheduled to finish on the incident (date-time)
|
ClosedDate
|
The date that the incident was closed (date-time)
|
CompletionPercent
|
The completion percentage (value = 0-100) of the incident as calculated in the system from the remaining effort
vs. the original estimated effort. (integer)
Read-Only
|
EstimatedEffort
|
The estimated effort (in minutes) to resolve the incident (integer)
|
ActualEffort
|
The actual effort (in minutes) it took to resolve the incident (integer)
|
RemainingEffort
|
The effort remaining as reported by the developer
|
ProjectedEffort
|
The projected actual effort of the incident when it is completed (integer)
Read-Only
|
LastUpdateDate
|
The date/time that the incident was last modified (date-time)
|
PriorityName
|
The display name of the priority of the incident (string)
|
SeverityName
|
The display name of the severity of the incident (string)
|
IncidentStatusName
|
The display name of the status of the incident (string)
|
IncidentTypeName
|
The display name of the type of the incident (string)
|
OpenerName
|
The display name of the user that detected the incident (string)
|
OwnerName
|
The display name of the user that the incident is assigned to (string)
|
ProjectName
|
The display name of the project the incident belongs to (string)
|
DetectedReleaseVersionNumber
|
The version number of the release/iteration that the incident was detected in (string)
|
ResolvedReleaseVersionNumber
|
The version number of the release/iteration that the incident will be resolved in (string)
|
VerifiedReleaseVersionNumber
|
The version number of the release/iteration that the incident was retested in (string)
|
IncidentStatusOpenStatus
|
Is the incident in an 'open' status or not?
|
FixedBuildId
|
The id of the build that the incident was fixed in (integer)
|
FixedBuildName
|
The name of the build that the incident was fixed in (string)
|
DetectedBuildId
|
The id of the build that the incident was detected in (integer)
|
DetectedBuildName
|
The name of the build that the incident was detected in (string)
|
ProjectId
|
The id of the project that the artifact belongs to
|
ArtifactTypeId
|
The type of artifact that we have
|
ConcurrencyDate
|
The datetime used to track optimistic concurrency to prevent edit conflicts
|
CustomProperties
|
The list of associated custom properties/fields for this artifact
|
IsAttachments
|
Does this artifact have any attachments?
|
Tags
|
The list of meta-tags that should be associated with the artifact
|
<RemoteIncident xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v6_0.DataObjects">
<ArtifactTypeId>0</ArtifactTypeId>
<ConcurrencyDate>0001-01-01T00:00:00</ConcurrencyDate>
<CustomProperties i:nil="true" />
<IsAttachments>false</IsAttachments>
<ProjectId>0</ProjectId>
<Tags i:nil="true" />
<ActualEffort i:nil="true" />
<ClosedDate i:nil="true" />
<CompletionPercent>0</CompletionPercent>
<ComponentIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<CreationDate i:nil="true" />
<Description i:nil="true" />
<DetectedBuildId i:nil="true" />
<DetectedBuildName i:nil="true" />
<DetectedReleaseId i:nil="true" />
<DetectedReleaseVersionNumber i:nil="true" />
<EndDate i:nil="true" />
<EstimatedEffort i:nil="true" />
<FixedBuildId i:nil="true" />
<FixedBuildName i:nil="true" />
<IncidentId i:nil="true" />
<IncidentStatusId i:nil="true" />
<IncidentStatusName i:nil="true" />
<IncidentStatusOpenStatus i:nil="true" />
<IncidentTypeId i:nil="true" />
<IncidentTypeName i:nil="true" />
<LastUpdateDate>0001-01-01T00:00:00</LastUpdateDate>
<Name i:nil="true" />
<OpenerId i:nil="true" />
<OpenerName i:nil="true" />
<OwnerId i:nil="true" />
<OwnerName i:nil="true" />
<PriorityId i:nil="true" />
<PriorityName i:nil="true" />
<ProjectName i:nil="true" />
<ProjectedEffort i:nil="true" />
<RemainingEffort i:nil="true" />
<ResolvedReleaseId i:nil="true" />
<ResolvedReleaseVersionNumber i:nil="true" />
<SeverityId i:nil="true" />
<SeverityName i:nil="true" />
<StartDate i:nil="true" />
<TestRunStepIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<VerifiedReleaseId i:nil="true" />
<VerifiedReleaseVersionNumber i:nil="true" />
</RemoteIncident>
{"IncidentId":null,
"PriorityId":null,
"SeverityId":null,
"IncidentStatusId":null,
"IncidentTypeId":null,
"OpenerId":null,
"OwnerId":null,
"TestRunStepIds":null,
"DetectedReleaseId":null,
"ResolvedReleaseId":null,
"VerifiedReleaseId":null,
"ComponentIds":null,
"Name":null,
"Description":null,
"CreationDate":null,
"StartDate":null,
"EndDate":null,
"ClosedDate":null,
"CompletionPercent":0,
"EstimatedEffort":null,
"ActualEffort":null,
"RemainingEffort":null,
"ProjectedEffort":null,
"LastUpdateDate":"0001-01-01T00:00:00",
"PriorityName":null,
"SeverityName":null,
"IncidentStatusName":null,
"IncidentTypeName":null,
"OpenerName":null,
"OwnerName":null,
"ProjectName":null,
"DetectedReleaseVersionNumber":null,
"ResolvedReleaseVersionNumber":null,
"VerifiedReleaseVersionNumber":null,
"IncidentStatusOpenStatus":null,
"FixedBuildId":null,
"FixedBuildName":null,
"DetectedBuildId":null,
"DetectedBuildName":null,
"ProjectId":0,
"ArtifactTypeId":0,
"ConcurrencyDate":"0001-01-01T00:00:00",
"CustomProperties":null,
"IsAttachments":false,
"Tags":null}