KronoDesk: REST Web Service (v4.0)
Click here for a complete list of operations.
GET: documents/{attachment_id}
Description
Retrieves a single attachment by its ID
How to Execute
To access this REST web service, you need to use the following URL:
https://api.inflectra.com/KronoDesk/Services/v2_0/RestService.svc/documents/{attachment_id}
Request Parameters
Name
|
Description
|
attachment_id
|
The id of the attachment
|
Request Body
Return Data
Property
|
Description
|
AttachmentId
|
The id of the attachment
|
AttachmentTypeId
|
The id of the attachment typeFile = 1,
URL = 2
|
ArtifactTypeId
|
The id of the type of artifact it's attached toNone = -1,
Forum = 1,
Thread = 2,
Message = 3,
User = 4,
Article = 5,
Ticket = 6,
Placeholder = 7
|
ArtifactId
|
The id of the artifact it's being attached to
|
AuthorId
|
The id of the user that uploaded the attachmentIf no value is provided, the authenticated user is used
|
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
|
Size
|
The size of the attachment in bytesPass 0 for a URL attachment
|
Hash
|
The MD5 hash of the file's contents.
|
AuthorName
|
The display name of the user that uploaded the attachment
|
DocumentURL
|
Returns the url to directly access the document.
|
<RemoteDocument xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Inflectra.KronoDesk.Web.Services.v2_0.DataObjects">
<ArtifactId i:nil="true" />
<ArtifactTypeId i:nil="true" />
<AttachmentId i:nil="true" />
<AttachmentTypeId>0</AttachmentTypeId>
<AuthorId i:nil="true" />
<AuthorName i:nil="true" />
<Description i:nil="true" />
<DocumentURL i:nil="true" />
<FilenameOrUrl i:nil="true" />
<Hash i:nil="true" />
<Size>0</Size>
<UploadDate>0001-01-01T00:00:00</UploadDate>
</RemoteDocument>
{"ArtifactId":null,
"ArtifactTypeId":null,
"AttachmentId":null,
"AttachmentTypeId":0,
"AuthorId":null,
"AuthorName":null,
"Description":null,
"DocumentURL":null,
"FilenameOrUrl":null,
"Hash":null,
"Size":0,
"UploadDate":"\/Date(-62135578800000-0500)\/"}