Web Services Knowledge Attachment Methods
This article contains the following topics:
casm1401
This article contains the following topics:
This section describes the Web Services Knowledge attachment methods.
createAttmnt
The following parameters apply to the createAttmnt method:
Parameter
| Data Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
repositoryHandle | String | Identifies the object handle of a document repository. |
folderId | Integer | Identifies the folder handle ID. |
objectHandle | Int | Identifies the object handle of a Knowledge document to which this attachment is attached. |
description | String | Identifies the description for the attachment object. |
fileName | String | Identifies the name of the full path of the file to be uploaded. |
Description
Uploads a file to the back-end server. An uploaded file is stored in a document repository specified by the repositoryHandle. An attachment object is then created and attached to a document object specified by the objectHandle. The attachment object has all the information for accessing the newly uploaded file in the repository.
Returns
The following:
Parameter
| Type
| Description
|
<Handle> | String | Identifies the object handle of the newly created attachment object. |
attmntFolderLinkCount
The following parameters apply to the attmntFolderLinkCount method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
folderId | Integer | Identifies the unique ID of the folder |
Description
Describes the number of attachment links under a specific folder to be attached.
Returns
Returns the number of attachments found under the specific folder.
attachURLLink
The following parameters apply to the attachURLLink method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
docId | Integer | Identifies the unique ID of the Knowledge document. |
URL | String | Indicates the URL to attach to the Knowledge document. |
attmntName | String | Identifies the name of the attachment. |
Description | String | Indicates the description of the attachment. |
Description
Attaches a URL link to a Knowledge document.
Returns
Returns error codes only for
individual
errors. For additional information, see Error Codes.getKDListPerAttmnt
The following parameters apply to the getKDListPerAttmnt method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
attmntId | Integer | Identifies the unique ID of the attachment. |
Description
Returns a list of Knowledge documents with reference to a given attachment.
Returns
A <UDSObject> node with zero or more <UDSObject> nodes describing the Knowledge document with the following <Attributes> child nodes:
XML Element Value
| Type
| Description
|
id | Integer | Identifies the unique ID of the Knowledge document. |
getAttmntListPerKD
The following parameters apply to the getAttmntListPerKD method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
docId | Integer | Identifies the unique ID of the Knowledge document. |
Description
A list of attachments with reference to a given Knowledge document.
Returns
A <UDSObject> node with zero or more <UDSObject> nodes describing the attachment with the following <Attributes> child nodes:
XML Element Value
| Type
| Description
|
id | Integer | Identifies the unique ID of the attachment |
isAttmntLinkedKD
The following parameters apply to the AttmntLinkedKD method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
attmntId | Integer | Identifies the unique ID of the attachment. |
Description
Checks if an attachment is linked to any Knowledge document, and returns the number of links found.
Returns
Any number of links found.
createFolder
The following parameters apply to createFolder method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
parentFolderId | Integer | Identifies the unique ID of the parent folder (zero if no parent). |
repId | Integer | Identifies the unique ID of the repository. |
folderType | Integer | Identifies the type of folder to be created. |
description | String | Identifies the description of the folder. |
folderName | String | Identifies the name of the folder. |
Description
Creates a new folder in the Service Desk repository that is accessed through the Attachments Library.
Note:
Folder types other then 0 are hidden folders and can be viewed only by navigating to Attachments Library on the Administration tab. These folders are automatically created by the system during upload and should not be created by the user or Web Services, because their files are private and cannot be shared with other Knowledge Documents, QA or Knowledge Files.Returns
A <UDSObject> describing the folder created, with some of the following child <Attributes> nodes:
XML Element Value
| Type
| Description
|
repository | SREL | Identifies the repository name. |
parent_id | SREL | Identifies the unique ID of the parent folder. |
folder_type | Integer | Identifies the type of folder created. |
folder_name | String | Identifies the name of the folder. |
description | String | Identifies the description of the folder. |
getFolderList
The following parameters apply to getFolderList method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
parentFolderId | Integer | Identifies the unique ID of the parent folder (0 if no parent). |
repId | Integer | Identifies the unique ID of the repository. |
Description
Returns a list of folders under a given parent folder
Returns
A <UDSObjectList> with zero or more <UDSObject> describing the attachment folder, with some of the following child <Attributes> nodes:
XML Element Value
| Type
| Description
|
repository | SREL | Identifies the repository name. |
parent_id | SREL | Identifies the unique ID of the parent folder. |
folder_type | Integer | Identifies the type of folder created. |
folder_name | String | Identifies the name of the folder. |
description | String | Identifies the description of the folder. |
getFolderInfo
The following parameters apply to the getFolderInfo method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
folderId | Integer | Identifies the unique ID of the attachment folder. |
Description
Returns the attributes of a folder.
Returns
A <UDSObject> describing the attachment folder, with some of the following child <Attributes> nodes:
XML Element Value
| Type
| Description
|
repository | SREL | Identifies the repository name. |
parent_id | SREL | Identifies the unique ID of the parent attachment folder. |
folder_type | Integer | Identifies the type of attachment folder. |
folder_name | String | Identifies the name of the attachment folder. |
description | String | Identifies the description of the attachment folder. |
getAttmntList
The following parameters apply to the getAttmntList method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
folderId | Integer | Identifies the unique ID of the attachment folder. |
repId | Integer | Identifies the unique ID of the repository. This parameter is required only when the folder ID is zero, which indicates the root folder. |
Description
Returns a list of attachments under a given attachment folder.
Returns
A <UDSObjectList> with zero or more <UDSObject> describing the attachment, with some of the following child <Attributes> nodes:
XML Element Value
| Type
| Description
|
repository | SREL | Identifies the repository name. |
parent_id | SREL | Identifies the unique ID of the parent folder. |
folder_type | Integer | Identifies the type of folder created. |
folder_name | String | Identifies the name of the folder. |
description | String | Identifies the description of the folder. |
getAttmntInfo
The following parameters apply to the getAttmntInfo method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
attmntId | Integer | Identifies the unique ID of the attachment folder. |
Description
Returns the attributes of an attachment.
Returns
A <UDSObject> describing the attachment, with some of the following child <Attributes> nodes:
XML Element Value
| Type
| Description
|
id | Integer | Identifies the unique ID of the attachment. |
description | String | Identifies the description of the attachment. |
attmnt_name | String | Identifies the name of the attachment. |
file_name | String | Identifies the name of the file. |
folder_id | Integer | Identifies the unique ID of the attachment folder. |
repository | SREL | Identifies the unique ID of the repository. |
getRepositoryInfo
The following parameters apply to the getRepositoryInfo method:
Parameter
| Type
| Description
|
SID | Integer | Identifies the session retrieved from logging in. |
repositoryId | Integer | Identifies the unique ID of the repository. |
Description
Returns the attributes of a repository.
Returns
A <UDSObject> describing the repository, with some of the following child <Attributes> nodes:
XML Element Value
| Type
| Description
|
repository | SREL | Identifies the repository name. |
parent_id | SREL | Identifies the unique ID of the parent attachment folder. |
folder_type | Integer | Identifies the type of attachment folder. |
folder_name | String | Identifies the name of the attachment folder. |
description | String | Identifies the description of the attachment folder. |