The getMetadata method
Retrieves the metadata attributes of a file or folder in the repository, including any custom properties and topic information.
getMetadata(source,version,label,submittedHierarchy)
| Field | Use | Type | Description | Example Value |
|---|---|---|---|---|
| source | Required | String | The fully qualified path or object URI of the file or folder in the repository | "/Temp Folder/Temp.txt"
or
"0a58c3670016a78600
00010dcee0eaa28219" |
| version | Optional. Either version or label can be specified. | String | The specific version of the file or folder | "0:2006-08-25 21:15:49.453" |
| label | Optional. Either version or label can be specified. | String | The specific labeled version of the file or folder | "Version 1" |
| submittedHierarchy | Optional | Boolean | Indicates whether the file is in the Submitted Jobs folder | True or False |
| Type | Description |
|---|---|
Resource |
Container for information about a repository object.See the topic The Resource class for more information. |
| Type | Description |
|---|---|
ResourceNotFoundException |
The source file or folder does not exist. |
InsufficientParameterException |
Required parameters are not specified. |
Example
The following example accesses the resource identifier for the /Demo/Drafts folder.
from pes.api.PESImpl import PESImpl
pesImpl = PESImpl(user = "admin", password = "[{AES}KrY+KLlOYo4O6545tgGsYQ==]", host = "localhost", port = "8080", appserver_type = "websphere")
resource = pesImpl.getMetadata(source="/Demo/Drafts")
resourceid = resource[‘ResourceID’][‘value’]