See all operations
POST: projects/{project_id}/associations
Description
Adds a new association 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}/associations
Request Parameters
Name
|
Description
|
project_id
|
The ID of the current project
|
Request Body
Property
|
Description
|
ArtifactLinkId
|
The id of the association/link
|
SourceArtifactId
|
The artifact id being linked FROM
|
SourceArtifactTypeId
|
The type of artifact being linked FROM
|
SourceArtifactGuid
|
GUID of the artifact being linked FROM
|
DestArtifactId
|
The artifact id being linked TO
|
DestArtifactTypeId
|
The type of artifact being linked TO
|
DestArtifactGuid
|
GUID of the artifact being linked TO
|
ArtifactLinkTypeId
|
The type of artifact link (related to, depends-upon, etc.)
|
CreatorId
|
The user creating the association/link
If not specified, the authenticated user is used
|
Comment
|
A comment that describes the association in more detail
|
CreationDate
|
The date/time the association was created
|
Guid
|
The unique identifier for the artifact
|
ConcurrencyGuid
|
GUID for representing the concurrency state of a given artifact
|
LastUpdateDate
|
Last time the artifact was updated
|
<RemoteAssociation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<ConcurrencyGuid i:nil="true" />
<Guid i:nil="true" />
<LastUpdateDate i:nil="true" />
<ArtifactLinkId i:nil="true" />
<ArtifactLinkTypeId>0</ArtifactLinkTypeId>
<ArtifactLinkTypeName i:nil="true" />
<Comment i:nil="true" />
<CreationDate i:nil="true" />
<CreatorId i:nil="true" />
<CreatorName i:nil="true" />
<DestArtifactGuid i:nil="true" />
<DestArtifactId>0</DestArtifactId>
<DestArtifactName i:nil="true" />
<DestArtifactTypeId>0</DestArtifactTypeId>
<DestArtifactTypeName i:nil="true" />
<SourceArtifactGuid i:nil="true" />
<SourceArtifactId>0</SourceArtifactId>
<SourceArtifactTypeId>0</SourceArtifactTypeId>
</RemoteAssociation>
{"ArtifactLinkId":null,
"SourceArtifactId":0,
"SourceArtifactTypeId":0,
"SourceArtifactGuid":null,
"DestArtifactId":0,
"DestArtifactTypeId":0,
"DestArtifactGuid":null,
"ArtifactLinkTypeId":0,
"CreatorId":null,
"Comment":null,
"CreationDate":null,
"DestArtifactName":null,
"DestArtifactTypeName":null,
"CreatorName":null,
"ArtifactLinkTypeName":null,
"Guid":null,
"ConcurrencyGuid":null,
"LastUpdateDate":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
|
ArtifactLinkId
|
The id of the association/link
|
SourceArtifactId
|
The artifact id being linked FROM
|
SourceArtifactTypeId
|
The type of artifact being linked FROM
|
SourceArtifactGuid
|
GUID of the artifact being linked FROM
|
DestArtifactId
|
The artifact id being linked TO
|
DestArtifactTypeId
|
The type of artifact being linked TO
|
DestArtifactGuid
|
GUID of the artifact being linked TO
|
ArtifactLinkTypeId
|
The type of artifact link (related to, depends-upon, etc.)
|
CreatorId
|
The user creating the association/link
If not specified, the authenticated user is used
|
Comment
|
A comment that describes the association in more detail
|
CreationDate
|
The date/time the association was created
|
DestArtifactName
|
The display name of the artifact being linked to
|
DestArtifactTypeName
|
The display name of the type of artifact being linked to
|
CreatorName
|
The display name of the user that created the association/link
|
ArtifactLinkTypeName
|
The display name of the type of association/link
|
Guid
|
The unique identifier for the artifact
|
ConcurrencyGuid
|
GUID for representing the concurrency state of a given artifact
|
LastUpdateDate
|
Last time the artifact was updated
|
<RemoteAssociation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v7_0.DataObjects">
<ConcurrencyGuid i:nil="true" />
<Guid i:nil="true" />
<LastUpdateDate i:nil="true" />
<ArtifactLinkId i:nil="true" />
<ArtifactLinkTypeId>0</ArtifactLinkTypeId>
<ArtifactLinkTypeName i:nil="true" />
<Comment i:nil="true" />
<CreationDate i:nil="true" />
<CreatorId i:nil="true" />
<CreatorName i:nil="true" />
<DestArtifactGuid i:nil="true" />
<DestArtifactId>0</DestArtifactId>
<DestArtifactName i:nil="true" />
<DestArtifactTypeId>0</DestArtifactTypeId>
<DestArtifactTypeName i:nil="true" />
<SourceArtifactGuid i:nil="true" />
<SourceArtifactId>0</SourceArtifactId>
<SourceArtifactTypeId>0</SourceArtifactTypeId>
</RemoteAssociation>
{"ArtifactLinkId":null,
"SourceArtifactId":0,
"SourceArtifactTypeId":0,
"SourceArtifactGuid":null,
"DestArtifactId":0,
"DestArtifactTypeId":0,
"DestArtifactGuid":null,
"ArtifactLinkTypeId":0,
"CreatorId":null,
"Comment":null,
"CreationDate":null,
"DestArtifactName":null,
"DestArtifactTypeName":null,
"CreatorName":null,
"ArtifactLinkTypeName":null,
"Guid":null,
"ConcurrencyGuid":null,
"LastUpdateDate":null}