See all operations
POST: projects/{project_id}/risks
Description
Creates a new risk 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/v7_0/RestService.svc/projects/{project_id}/risks
Request Parameters
Name
|
Description
|
project_id
|
The id of the current project
|
Request Body
Property
|
Description
|
RiskId
|
The id of the risk
|
ClosedDate
|
The date the risk was closed (optional) (in UTC)
|
ComponentId
|
The id of the component the risk is associated with (optional)
|
CreationDate
|
The date the risk was created (in UTC)
|
CreatorId
|
The id of the user that created the risk
|
Description
|
The description of the risk
|
IsDeleted
|
Is the risk deleted
|
LastUpdateDate
|
The date/time the risk was last updated (in UTC)
|
Name
|
The name of the risk
|
OwnerId
|
The id of the user that the risk is assigned to currently (optional)
|
ReleaseId
|
The id of the release that the risk is currently assigned to (optional)
|
ReviewDate
|
The date/time the risk needs to be reviewed (in UTC)
|
RiskImpactId
|
The id of the risk impact (optional)
|
RiskProbabilityId
|
The id of the risk probability (optional)
|
RiskStatusId
|
The id of the risk status (default if not populated)
|
RiskTypeId
|
The id of the risk type (default if not populated)
|
ProjectGroupId
|
The id of the project group (not used)
|
RiskDetectabilityId
|
The id of the risk detectability (not used)
|
GoalId
|
The id of the project goal (not used)
|
ProjectId
|
The id of the project that the artifact belongs to
|
ProjectGuid
|
The guid 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
|
Guid
|
The unique identifier for the artifact
|
<RemoteRisk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<ArtifactTypeId>0</ArtifactTypeId>
<ConcurrencyDate>0001-01-01T00:00:00</ConcurrencyDate>
<CustomProperties i:nil="true" />
<Guid i:nil="true" />
<IsAttachments>false</IsAttachments>
<ProjectGuid i:nil="true" />
<ProjectId>0</ProjectId>
<Tags i:nil="true" />
<ClosedDate i:nil="true" />
<ComponentId i:nil="true" />
<ComponentName i:nil="true" />
<CreationDate i:nil="true" />
<CreatorGuid i:nil="true" />
<CreatorId i:nil="true" />
<CreatorName i:nil="true" />
<Description i:nil="true" />
<GoalId i:nil="true" />
<IsDeleted>false</IsDeleted>
<LastUpdateDate>0001-01-01T00:00:00</LastUpdateDate>
<Name i:nil="true" />
<OwnerGuid i:nil="true" />
<OwnerId i:nil="true" />
<OwnerName i:nil="true" />
<ProjectGroupId i:nil="true" />
<ReleaseGuid i:nil="true" />
<ReleaseId i:nil="true" />
<ReleaseName i:nil="true" />
<ReleaseVersionNumber i:nil="true" />
<ReviewDate i:nil="true" />
<RiskDetectabilityId i:nil="true" />
<RiskDetectabilityName i:nil="true" />
<RiskExposure i:nil="true" />
<RiskId i:nil="true" />
<RiskImpactId i:nil="true" />
<RiskImpactName i:nil="true" />
<RiskProbabilityId i:nil="true" />
<RiskProbabilityName i:nil="true" />
<RiskStatusId i:nil="true" />
<RiskStatusName i:nil="true" />
<RiskTypeId i:nil="true" />
<RiskTypeName i:nil="true" />
</RemoteRisk>
{"RiskId":null,
"ClosedDate":null,
"ComponentId":null,
"ComponentName":null,
"CreationDate":null,
"CreatorId":null,
"CreatorGuid":null,
"CreatorName":null,
"Description":null,
"IsDeleted":false,
"LastUpdateDate":"0001-01-01T00:00:00",
"Name":null,
"OwnerId":null,
"OwnerGuid":null,
"OwnerName":null,
"ReleaseId":null,
"ReleaseName":null,
"ReleaseVersionNumber":null,
"ReleaseGuid":null,
"ReviewDate":null,
"RiskImpactId":null,
"RiskImpactName":null,
"RiskProbabilityId":null,
"RiskProbabilityName":null,
"RiskStatusId":null,
"RiskStatusName":null,
"RiskTypeId":null,
"RiskTypeName":null,
"RiskExposure":null,
"ProjectGroupId":null,
"RiskDetectabilityId":null,
"RiskDetectabilityName":null,
"GoalId":null,
"ProjectId":0,
"ProjectGuid":null,
"ArtifactTypeId":0,
"ConcurrencyDate":"0001-01-01T00:00:00",
"CustomProperties":null,
"IsAttachments":false,
"Tags":null,
"Guid":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
|
RiskId
|
The id of the risk
|
ClosedDate
|
The date the risk was closed (optional) (in UTC)
|
ComponentId
|
The id of the component the risk is associated with (optional)
|
ComponentName
|
The name of the component (read-only)
|
CreationDate
|
The date the risk was created (in UTC)
|
CreatorId
|
The id of the user that created the risk
|
CreatorGuid
|
The guid of the creator.
|
CreatorName
|
The name of the user that created the risk (read-only)
|
Description
|
The description of the risk
|
IsDeleted
|
Is the risk deleted
|
LastUpdateDate
|
The date/time the risk was last updated (in UTC)
|
Name
|
The name of the risk
|
OwnerId
|
The id of the user that the risk is assigned to currently (optional)
|
OwnerGuid
|
The guid of the owner.
|
OwnerName
|
The name of the user that the risk is assigned to currently (read-only)
|
ReleaseId
|
The id of the release that the risk is currently assigned to (optional)
|
ReleaseName
|
The name of the release that the risk is currently assigned to (read-only)
|
ReleaseVersionNumber
|
The version number of the release that the risk is currently assigned to (read-only)
|
ReleaseGuid
|
The guid of the release
|
ReviewDate
|
The date/time the risk needs to be reviewed (in UTC)
|
RiskImpactId
|
The id of the risk impact (optional)
|
RiskImpactName
|
The name of the risk impact (read-only)
|
RiskProbabilityId
|
The id of the risk probability (optional)
|
RiskProbabilityName
|
The name of the risk probability (read-only)
|
RiskStatusId
|
The id of the risk status (default if not populated)
|
RiskStatusName
|
The name of the risk status (read-only)
|
RiskTypeId
|
The id of the risk type (default if not populated)
|
RiskTypeName
|
The name of the risk type (read-only)
|
RiskExposure
|
The calculated risk exposure score (read-only)
|
ProjectGroupId
|
The id of the project group (not used)
|
RiskDetectabilityId
|
The id of the risk detectability (not used)
|
RiskDetectabilityName
|
The name of the risk detectability (not used)
|
GoalId
|
The id of the project goal (not used)
|
ProjectId
|
The id of the project that the artifact belongs to
|
ProjectGuid
|
The guid 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
|
Guid
|
The unique identifier for the artifact
|
<RemoteRisk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<ArtifactTypeId>0</ArtifactTypeId>
<ConcurrencyDate>0001-01-01T00:00:00</ConcurrencyDate>
<CustomProperties i:nil="true" />
<Guid i:nil="true" />
<IsAttachments>false</IsAttachments>
<ProjectGuid i:nil="true" />
<ProjectId>0</ProjectId>
<Tags i:nil="true" />
<ClosedDate i:nil="true" />
<ComponentId i:nil="true" />
<ComponentName i:nil="true" />
<CreationDate i:nil="true" />
<CreatorGuid i:nil="true" />
<CreatorId i:nil="true" />
<CreatorName i:nil="true" />
<Description i:nil="true" />
<GoalId i:nil="true" />
<IsDeleted>false</IsDeleted>
<LastUpdateDate>0001-01-01T00:00:00</LastUpdateDate>
<Name i:nil="true" />
<OwnerGuid i:nil="true" />
<OwnerId i:nil="true" />
<OwnerName i:nil="true" />
<ProjectGroupId i:nil="true" />
<ReleaseGuid i:nil="true" />
<ReleaseId i:nil="true" />
<ReleaseName i:nil="true" />
<ReleaseVersionNumber i:nil="true" />
<ReviewDate i:nil="true" />
<RiskDetectabilityId i:nil="true" />
<RiskDetectabilityName i:nil="true" />
<RiskExposure i:nil="true" />
<RiskId i:nil="true" />
<RiskImpactId i:nil="true" />
<RiskImpactName i:nil="true" />
<RiskProbabilityId i:nil="true" />
<RiskProbabilityName i:nil="true" />
<RiskStatusId i:nil="true" />
<RiskStatusName i:nil="true" />
<RiskTypeId i:nil="true" />
<RiskTypeName i:nil="true" />
</RemoteRisk>
{"RiskId":null,
"ClosedDate":null,
"ComponentId":null,
"ComponentName":null,
"CreationDate":null,
"CreatorId":null,
"CreatorGuid":null,
"CreatorName":null,
"Description":null,
"IsDeleted":false,
"LastUpdateDate":"0001-01-01T00:00:00",
"Name":null,
"OwnerId":null,
"OwnerGuid":null,
"OwnerName":null,
"ReleaseId":null,
"ReleaseName":null,
"ReleaseVersionNumber":null,
"ReleaseGuid":null,
"ReviewDate":null,
"RiskImpactId":null,
"RiskImpactName":null,
"RiskProbabilityId":null,
"RiskProbabilityName":null,
"RiskStatusId":null,
"RiskStatusName":null,
"RiskTypeId":null,
"RiskTypeName":null,
"RiskExposure":null,
"ProjectGroupId":null,
"RiskDetectabilityId":null,
"RiskDetectabilityName":null,
"GoalId":null,
"ProjectId":0,
"ProjectGuid":null,
"ArtifactTypeId":0,
"ConcurrencyDate":"0001-01-01T00:00:00",
"CustomProperties":null,
"IsAttachments":false,
"Tags":null,
"Guid":null}