SpiraPlan: REST Web Service (v6.0)

See all operations

PUT: projects/{project_id}/documents

Description

Updates information about a document (version information is not updated)

Only fields like status, owner, description, and custom properties are updated. This update method does not update version information (no versions are added, removed, or changed). Modify all or bulk edit document permissions required.

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}/documents

Request Parameters

Name Description
project_id The id of the current project

Request Body

Property Description
AttachmentId The id of the attachment
AttachmentTypeId The id of the attachment type File = 1, URL = 2
DocumentTypeId The id of the document type relative to the current project template
DocumentStatusId The id of the document status relative to the current project template
ProjectAttachmentFolderId The id of the attachment folder id for the current project
AttachedArtifacts The list of artifacts the document is attached to
AuthorId The id of the user that uploaded the attachment If no value is provided, the authenticated user is used
EditorId The id of the user that edited the document
FilenameOrUrl The filename of the file (if a file attachment) or the full URL if a URL attachment
Description The description of the attachment
UploadDate The date/time the attachment was uploaded
EditedDate The date/time the attachment was last edited
Size The size of the attachment in bytes Pass 0 for a URL attachment
CurrentVersion The version name of the current attachment
Versions The list of document versions
DocumentTypeName The display name of the attachment type relative to the current project template This is not whether it's a file or url, but the project-template specific classification
DocumentStatusName The display name of the document status relative to the current project template
AttachmentTypeName The display name of the attachment type (i.e. whether it's a file or url)
AuthorName The display name of the user that uploaded the attachment
EditorName The display name of the user that edited the document
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

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.