See all operations
GET: projects/{project_id}/artifact-types/{artifact_type_id}/artifacts/{artifact_id}/documents
Description
Retrieves the list of documents/attachments in a project attached to a specific artifact
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/v5_0/RestService.svc/projects/{project_id}/artifact-types/{artifact_type_id}/artifacts/{artifact_id}/documents
Request Parameters
Name
|
Description
|
project_id
|
The id of the relevant project
|
artifact_type_id
|
The id of the type of artifact we want to retrieve the documents for:
(Requirement = 1,
TestCase = 2,
Incident = 3,
Release = 4,
TestRun = 5,
Task = 6,
TestStep = 7,
TestSet = 8,
AutomationHost = 9,
AutomationEngine = 10,
RequirementStep = 12)
|
artifact_id
|
The id of the artifact we want the attachments for
|
Request Body
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.
<ArrayOfRemoteDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v5_0.DataObjects">
<RemoteDocument>
<ArtifactTypeId>0</ArtifactTypeId>
<ConcurrencyDate>0001-01-01T00:00:00</ConcurrencyDate>
<CustomProperties i:nil="true" />
<IsAttachments>false</IsAttachments>
<ProjectId i:nil="true" />
<AttachedArtifacts i:nil="true" />
<AttachmentId i:nil="true" />
<AttachmentTypeId>0</AttachmentTypeId>
<AttachmentTypeName i:nil="true" />
<AuthorId i:nil="true" />
<AuthorName i:nil="true" />
<CurrentVersion i:nil="true" />
<Description i:nil="true" />
<EditedDate>0001-01-01T00:00:00</EditedDate>
<EditorId i:nil="true" />
<EditorName i:nil="true" />
<FilenameOrUrl i:nil="true" />
<ProjectAttachmentFolderId i:nil="true" />
<ProjectAttachmentTypeId i:nil="true" />
<ProjectAttachmentTypeName i:nil="true" />
<Size>0</Size>
<Tags i:nil="true" />
<UploadDate>0001-01-01T00:00:00</UploadDate>
<Versions i:nil="true" />
</RemoteDocument>
</ArrayOfRemoteDocument>
[{"ArtifactTypeId":0,
"ConcurrencyDate":"\/Date(-62135578800000-0500)\/",
"CustomProperties":null,
"IsAttachments":false,
"ProjectId":null,
"AttachedArtifacts":null,
"AttachmentId":null,
"AttachmentTypeId":0,
"AttachmentTypeName":null,
"AuthorId":null,
"AuthorName":null,
"CurrentVersion":null,
"Description":null,
"EditedDate":"\/Date(-62135578800000-0500)\/",
"EditorId":null,
"EditorName":null,
"FilenameOrUrl":null,
"ProjectAttachmentFolderId":null,
"ProjectAttachmentTypeId":null,
"ProjectAttachmentTypeName":null,
"Size":0,
"Tags":null,
"UploadDate":"\/Date(-62135578800000-0500)\/",
"Versions":null}]