KronoDesk: REST Web Service (v4.0)
Click here for a complete list of operations.
POST: documents
Description
Adds a new document or URL link into the system and associates it with the provided artifact
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
Request Body
Property
|
Description
|
BinaryData
|
The contents of the file attachment
|
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.
|
<RemoteDocumentCreateInfo 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>
<BinaryData i:nil="true" />
</RemoteDocumentCreateInfo>
{"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)\/",
"BinaryData":null}
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)\/"}