### Export and Import API Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/index-files/index-19 APIs for starting export and import processes. ```APIDOC ## POST /export/start ### Description Starts an export process. ### Method POST ### Endpoint `/export/start` ### Parameters #### Request Body - **exporterDescriptor** (IExporterDescriptor) - Required - Descriptor for the exporter. - **exportConfiguration** (IExportConfiguration) - Required - Configuration for the export. ### Response #### Success Response (200) - **status** (string) - "Export started" #### Response Example ```json { "status": "Export started" } ``` ``` ```APIDOC ## POST /import/start ### Description Starts an import process. ### Method POST ### Endpoint `/import/start` ### Parameters #### Request Body - **importerDescriptor** (IImporterDescriptor) - Required - Descriptor for the importer. - **importConfiguration** (IImportConfiguration) - Required - Configuration for the import. ### Response #### Success Response (200) - **status** (string) - "Import started" #### Response Example ```json { "status": "Import started" } ``` ``` -------------------------------- ### Get Job Start Time - Java Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/platform/jobs/IJob Returns the time when the job began execution, specifically when its state changed to JobState.STATE_RUNNING. The value is undefined before the job starts. ```java long getStartTime() ``` -------------------------------- ### Untitled No description -------------------------------- ### Get Start Date (Polarion SDK - Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/ITrackerProject Retrieves the start date for the project. The date is returned as a `DateOnly` object, representing just the date part without time. ```java DateOnly getStart() ``` -------------------------------- ### Initialize WebServiceFactory Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/WebServiceFactory Demonstrates how to create a new instance of the WebServiceFactory by providing the base URL of the Polarion instance. ```java WebServiceFactory factory = new WebServiceFactory("http://hostname:8888/polarion/ws/services/"); ``` -------------------------------- ### Start Import Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/importer/IImportManager Initiates a new import process with the specified importer and configuration. ```APIDOC ## POST /imports/start ### Description Starts the import process using the provided importer descriptor and configuration. ### Method POST ### Endpoint `/imports/start` ### Parameters #### Request Body - **importerDescriptor** (IImporterDescriptor) - Required - The descriptor of the importer to use for the import. - **config** (IImportConfiguration) - Required - The configuration settings for the import process. ### Request Example ```json { "importerDescriptor": { "id": "com.polarion.importer.excel", "label": "Excel Importer" }, "config": { "filePath": "/path/to/data.xlsx", "options": { "skipEmptyRows": true } } } ``` ### Response #### Success Response (200) - **importInfo** (IImportInfo) - Information about the started import process. #### Response Example ```json { "importId": "imp_12345", "status": "RUNNING", "startTime": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Get Arguments with Prefix Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/workflow/IArguments Retrieves arguments that start with a specified prefix. ```APIDOC ## GET /arguments/with-prefix ### Description Returns arguments that start with a specified prefix. The returned map will have keys stripped of the prefix. ### Method GET ### Endpoint /arguments/with-prefix ### Parameters #### Query Parameters - **prefix** (String) - Required - The prefix to filter arguments by. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **Map** (Map) - A map containing arguments that start with the specified prefix, with keys stripped of the prefix. #### Response Example ```json { "example": { "filteredArg1": "valueA", "filteredArg2": "valueB" } } ``` ### Metadata - **Since**: 3.10.2 ``` -------------------------------- ### Get Custom Field Type ID (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/platform/persistence/ICustomFieldType Gets the ID of the type used for the string representation of the custom field, for example 'text/html'. If this method returns null, the custom field type is considered an enum. ```Java String getTypeId() Gets the id of the type uses for the string (for example "text/html"). ``` -------------------------------- ### Untitled No description -------------------------------- ### Get Imports Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/importer/IImportManager Retrieves a list of all imports started by a specific user, ordered by recency, that have not been removed. If the user is null, all imports are returned. ```APIDOC ## GET /api/imports ### Description Returns all imports started by the user (newer imports first), that were not removed yet. If `user` is `null`, all imports are returned. ### Method GET ### Endpoint `/api/imports` ### Parameters #### Query Parameters - **userId** (String) - Optional - The ID of the user whose imports to retrieve. If omitted, all imports are returned. ### Response #### Success Response (200) - **imports** (List) - A list of import information objects. ### Response Example ```json { "imports": [ { "id": "import_123", "finished": true, "successful": true } ] } ``` ``` -------------------------------- ### Platform and Context Interfaces Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/overview-tree Documentation for core platform interfaces related to configuration services, context management, and object mapping. ```APIDOC ## Platform and Context Interfaces ### Description Provides information on core Polarion platform interfaces for configuration, context handling, and object mapping. ### Interfaces * **com.polarion.platform.config.IConfigService**: Service for accessing configuration. * **com.polarion.platform.context.IContext**: Represents the execution context. * **com.polarion.subterra.base.data.identification.IContextId**: Identifier for a context. * **com.polarion.platform.context.IContextListener**: Listener for context events. * **com.polarion.platform.context.IContextNatureProvider**: Provides context nature information. * **com.polarion.platform.persistence.spi.context.IContextObjectMapper**: Maps objects within a context. ``` -------------------------------- ### Untitled No description -------------------------------- ### IModule Usage: Get Module from Export Configuration Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/class-use/IModule Provides examples of methods across different export configuration classes (ExportConfiguration, IModuleExportConfiguration, ModuleExportConfiguration) that return an IModule, representing the module associated with the export context. ```Java IModule ExportConfiguration.getModule() ``` ```Java IModule IExportConfiguration.getModule() ``` ```Java IModule IModuleExportConfiguration.getModule() ``` ```Java IModule ModuleExportConfiguration.getModule() ``` -------------------------------- ### Get Plan's Ideal Progress Factor (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/IPlan Retrieves the ideal progress factor for a given plan at a specific date. The factor ranges from 0 at the plan's start to 1 at its end. This method is crucial for progress tracking and reporting. ```Java float getIdealProgressFactor(@NotNull Date date) ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Get Repository File Location (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/siemens/polarion/rt/collectors/api/model/RtFileProperties Retrieves the full location of a file within a repository, including its path, name, extension, and revision. The location is absolute, starting from the repository root and may include the branch path. ```java /** * Returns the full file's location in the repository including file name, extension and revision. * Location is absolute, starts from the repository root and includes branch path if it's defined and supported by underlying repository. * @return the full file's location in the repository. */ ILocation getLocation(); ``` -------------------------------- ### Untitled No description -------------------------------- ### Java: IBranchDocumentsCommand Execute Method Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/documents/IBranchDocumentsCommand The execute method for the IBranchDocumentsCommand interface. This method initiates the document branching process and returns an IBranchDocumentsResult object upon completion. It signifies the end of the command setup and the start of the operation. ```java IBranchDocumentsCommand.IBranchDocumentsResult execute() ``` -------------------------------- ### ProductLicense Constructors Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/types/security/ProductLicense Provides information on how to instantiate a ProductLicense object. ```APIDOC ## Constructor Summary Constructors Constructor Description `ProductLicense()` `ProductLicense(LicenseInfo[] concurrentLicenseData, String customerCompany, String customerEmail, String customerName, Calendar dateCreated, Calendar expirationDate, String generatedBy, String ipAddress, String licenseFormat, String licenseProfile, String macAddress, LicenseInfo[] namedLicenseData)` ``` -------------------------------- ### Get Arguments with Prefix Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/workflow/IArguments Retrieves arguments that start with a specified prefix and returns them as a Map. The keys in the returned Map are the argument names with the prefix stripped. This method is available since version 3.10.2. Dependencies: None. Input: prefix (String). Output: Map. ```Java /** * Returns arguments started with prefix as Map. * @param prefix the String object representing the prefix of the arguments to get the values for * @return a Map object containing all the arguments started with prefix where keys are stripped of prefixes. */ @NotNull Map getArgumentsWithPrefix(@NotNull String prefix) ``` -------------------------------- ### Define Working Time Interface (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/calendar/IWorkingTime Defines the IWorkingTime interface for representing the time worked on a working day. It includes methods to get and set the start and end times, and to create new working time elements. This interface is part of the Polarion SDK. ```Java public interface IWorkingTime { Element createElement(Element parent); long getFromTime(); long getToTime(); void setFromTime(long time); void setToTime(long time); } ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Get Context Name (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/platform/context/IContext Retrieves the local name of the context. While the context ID is globally unique, the name is intended for local identification and facilitates tasks like duplicating context structures, for example, in a file system. The name is returned as a String. ```java String getName() Returns: Name of the context. ``` -------------------------------- ### Retrieving Scope and Rendering Properties for Base Elements (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/qcentre/factbase/class-use/IBaseElement Provides examples of static methods for getting the scope of an IBaseElement and for retrieving various rendered properties like description, HTML content, header labels, icons, plain text labels, and URLs. These are used for display and data presentation. ```Java SimpleFactBaseAggregator.getScope(IBaseElement baseElement) BasicElementRenderer.getDescriptionProperty(IBaseElement baseElement) ElementRendererFactory.getElementRenderer(IBaseElement baseElement) BasicElementRenderer.getHTMLContentLabel(IBaseElement baseElement) IElementRenderer.getHTMLContentLabel(IBaseElement baseElement) BasicElementRenderer.getHTMLHeaderLabel(IBaseElement baseElement) ElementRendererFactory.getHTMLHeaderLabel(IBaseElement baseElement) IElementRenderer.getHTMLHeaderLabel(IBaseElement baseElement) ElementRendererFactory.getHTMLTextContentLabel(IBaseElement baseElement) BasicElementRenderer.getIconUrl(IBaseElement baseElement) IElementRenderer.getIconUrl(IBaseElement baseElement) BasicElementRenderer.getLabelProperty(IBaseElement baseElement) BasicElementRenderer.getPlainTextContentLabel(IBaseElement baseElement) ElementRendererFactory.getPlainTextContentLabel(IBaseElement baseElement) IElementRenderer.getPlainTextContentLabel(IBaseElement baseElement) BasicElementRenderer.getPlainTextHeaderLabel(IBaseElement baseElement) ElementRendererFactory.getPlainTextHeaderLabel(IBaseElement baseElement) IElementRenderer.getPlainTextHeaderLabel(IBaseElement baseElement) BasicElementRenderer.getURL(IBaseElement baseElement) ElementRendererFactory.getURL(IBaseElement baseElement) IElementRenderer.getURL(IBaseElement baseElement) ``` -------------------------------- ### Untitled No description -------------------------------- ### Was Plan Started Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/planning/PlanningWebService Checks if a plan has been started. ```APIDOC ## GET /plans/{uri}/started ### Description Checks if the plan was started. ### Method GET ### Endpoint /plans/{uri}/started ### Parameters #### Path Parameters - **uri** (string) - Required - The SubterraURI of the plan. ### Response #### Success Response (200) - **started** (boolean) - True if the plan exists and is started, false otherwise. #### Response Example ```json { "started": true } ``` ``` -------------------------------- ### Untitled No description -------------------------------- ### Check if Plan Was Started Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/planning/PlanningWebService Checks whether a plan has been started. ```APIDOC ## GET /api/planning/wasPlanStarted ### Description Checks whether a plan has been started. ### Method GET ### Endpoint /api/planning/wasPlanStarted ### Parameters #### Query Parameters - **uri** (String) - Required - The URI of the plan. ### Response #### Success Response (200) - **started** (Boolean) - True if the plan was started, false otherwise. #### Response Example ```json { "started": true } ``` ``` -------------------------------- ### GET /api/time/day-length Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/tracker/TrackerWebService Gets the length of one day in milliseconds. ```APIDOC ## GET /api/time/day-length ### Description Gets the length of one day. ### Method GET ### Endpoint /api/time/day-length ### Parameters None ### Response #### Success Response (200) - **long** - The length of one day in milliseconds. #### Response Example ```json 86400000 ``` #### Error Response - **RemoteException** ``` -------------------------------- ### Untitled No description -------------------------------- ### Project Constructors Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/types/projects/Project Provides details on how to instantiate a Project object. ```APIDOC ## Project Constructors ### Description Details on how to instantiate a Project object. ### Public Project() Default constructor for the Project class. ### Public Project(Boolean active, String color, Text description, Date finish, String icon, String id, User lead, String location, Date lockWorkRecordsDate, String name, String projectGroupURI, Date start, String trackerPrefix, String uri, boolean unresolvable) Constructor for the Project class with multiple parameters to initialize all project attributes. ``` -------------------------------- ### Plan Started On Management Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/types/planning/Plan Methods for managing the 'started on' timestamp of a Plan. ```APIDOC ## Plan Started On Management ### Description Allows setting and retrieving the specific date and time when the Plan was started. ### Methods #### `setStartedOn(Calendar startedOn)` Sets the startedOn value for this Plan. - **Parameters**: - `startedOn` (Calendar) - The Calendar object representing the start time. #### `getStartedOn()` Gets the startedOn value for this Plan. - **Returns**: - `startedOn` (Calendar) - The Calendar object representing the start time. ``` -------------------------------- ### Plan Start Date Management Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/types/planning/Plan Methods for managing the start date of a Plan. ```APIDOC ## Plan Start Date Management ### Description Methods to set and get the starting date for the Plan. ### Methods #### `setStartDate(Date startDate)` Sets the startDate value for this Plan. - **Parameters**: - `startDate` (Date) - The start date to set. #### `getStartDate()` Gets the startDate value for this Plan. - **Returns**: - `startDate` (Date) - The start date of the Plan. ``` -------------------------------- ### Configuration Management Methods Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/index-files/index-19 Documentation for methods related to setting configurations for jobs and export processes. ```APIDOC ## setConfiguration ### Description Sets the configuration for various Polarion components, including branch documents jobs, export commands, and repository providers. ### Method POST (example, actual method is Java) ### Endpoint /api/polarion/sdk ### Parameters #### Request Body - **configuration** (Object) - Required - The configuration object to set. The structure depends on the specific context (e.g., IBranchDocumentsConfiguration, IExportConfiguration, IExternalRepositoryConfiguration). ### Request Example ```json { "configuration": { "type": "ExportConfiguration", "format": "pdf" } } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## setConfigurationId ### Description Defines the ID of an LDAP configuration to be synchronized. If not set, the configuration with `syncUserGroups = true` will be synchronized. ### Method POST (example, actual method is Java) ### Endpoint /api/polarion/sdk ### Parameters #### Request Body - **configurationId** (String) - Required - The ID of the LDAP configuration. ### Request Example ```json { "configurationId": "myLdapConfig" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## setConfigurationIds ### Description Defines IDs of LDAP configurations to be synchronized. If not set or an empty array is provided, all enabled configurations will be synchronized. ### Method POST (example, actual method is Java) ### Endpoint /api/polarion/sdk ### Parameters #### Request Body - **configurationIds** (Array of Strings) - Optional - An array of LDAP configuration IDs to synchronize. ### Request Example ```json { "configurationIds": ["ldapConfig1", "ldapConfig2"] } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Get Work Item by Project and ID Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/index-files/index-7 A shortcut method to get a work item by its ID within a specified project. ```APIDOC ## GET /api/trackers/{projectId}/workitems/{workItemId} ### Description This is a shortcut method for `getTrackerProject(projectId).getWorkItem(workItemId)`. Retrieves a work item by its ID within a specified project. ### Method GET ### Endpoint `/api/trackers/{projectId}/workitems/{workItemId}` ### Parameters #### Path Parameters - **projectId** (String) - Required - The ID of the tracker project. - **workItemId** (String) - Required - The ID of the work item. ### Response #### Success Response (200) - **workItem** (Object) - The retrieved work item object. #### Response Example ```json { "workItem": {} } ``` ``` -------------------------------- ### Run Build Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/builder/IBuilderService Initiates a build process based on the provided artifact and build configuration. ```APIDOC ## POST /websites/testdrive_polarion_polarion_sdk_doc_javadoc/runBuild ### Description Runs a build process. This is a shortcut for invoking the `MASTER_BUILD_JOB_NAME` job. ### Method POST ### Endpoint /websites/testdrive_polarion_polarion_sdk_doc_javadoc/runBuild ### Parameters #### Request Body - **artifact** (IBuildArtifact) - Required - The build artifact to use. - **buildDescriptorName** (String) - Optional - The name of the build descriptor. Use `DEFAULT_BUILD_DESCRIPTOR_NAME` for default, `null` to skip build phase. - **calculationDescriptorName** (String) - Optional - The name of the calculation descriptor. Use `DEFAULT_CALCULATION_DESCRIPTOR_NAME` for default, `null` to skip calculation phase. - **buildTag** (String) - Optional - The build tag. If supplied, it is used instead of `IBuildDescriptor.getBuildTag()`. - **localDeploymentSpaceName** (String) - Optional - The name of the local deployment space. Use `DEFAULT_LOCAL_DEPLOYMENT_SPACE` for default integration build, `null` for standalone build. - **properties** (Properties) - Optional - Additional build/calculation properties. ### Request Example { "artifact": {"id": "artifact_to_build"}, "buildDescriptorName": "default_build", "calculationDescriptorName": null, "buildTag": "v1.0", "localDeploymentSpaceName": "default_space", "properties": {"key": "value"} } ### Response #### Success Response (200) - **IBuild** - Represents the running or scheduled build. #### Response Example { "buildId": "build_123", "status": "SCHEDULED" } ``` -------------------------------- ### Get URL Java Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/qcentre/factbase/tools/render/ElementRendererFactory Retrieves the URL associated with an IBaseElement. This method is used to get a link to the element. ```java public static String getURL(IBaseElement baseElement) ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Get Configured Defect to Test Case Link Role (Deprecated) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/ITestManagementService Deprecated method to get the configured link role from defect to test case. ```APIDOC ## GET /linkRoles/defectToTestCase ### Description Deprecated. Returns the configured link role from defect to test case. ### Method GET ### Endpoint /linkRoles/defectToTestCase ### Parameters #### Query Parameters - **projectId** (String) - Optional - The project ID, or `null` for the global configuration. ### Request Body This endpoint does not have a request body. ### Response #### Success Response (200) - **ILinkRoleOpt** - The configured link role, or `null`. ``` -------------------------------- ### Get Nearest Time Point (Deprecated) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/ITimePointsManager Gets the nearest time point for a project. This method is deprecated and a newer version should be used. ```APIDOC ## GET /api/projects/{projectId}/timepoints/nearest ### Description Gets the nearest time point for a project. ### Method GET ### Endpoint `/api/projects/{projectId}/timepoints/nearest` ### Parameters #### Path Parameters - **projectId** (String) - Required - The ID of the project to get the time point for. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **ITimePoint** - The nearest ITimePoint for the project. #### Response Example ```json { "example": "{ "id": "tp4", "name": "Nearest Timepoint", "date": "2023-10-27T10:00:00Z" }" } ``` ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Get Duration Instance with Time and Day Length - Java Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/core/util/types/duration/DurationTimeFactory Gets a DurationTime instance using long values for time and oneDayLength. This method is deprecated. ```java public static DurationTime getInstance(long time, long oneDayLength) ``` -------------------------------- ### Untitled No description -------------------------------- ### Get Revision Information Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/platform/persistence/IDataService Retrieves revision information from the repository. The repository name can be specified directly or inferred from the context. It is also possible to get a revision at a specific point in time. ```java IRevision getRevision(String repositoryName, String revisionId); IRevision getRevision(IContextId contextId, String revisionId); IRevision getStorageRevisionAt(Date timePoint); ``` -------------------------------- ### Get All Sections (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/platform/spi/security/IAuthenticationSource Retrieves a collection of all available sections within the system. This method can be used to get a list of all defined sections, potentially for configuration or reporting purposes. It does not require any parameters. ```java Collection getAllSections() ``` -------------------------------- ### PlanRecord Constructors Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/types/planning/PlanRecord Provides details on how to instantiate a PlanRecord object. ```APIDOC ## Constructors ### PlanRecord() Creates a new, empty PlanRecord. ### PlanRecord(WorkItem item) Creates a new PlanRecord initialized with the provided WorkItem. * **Parameters** * `item` (WorkItem) - The WorkItem to associate with this PlanRecord. ``` -------------------------------- ### Platform Context Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/index-files/index-9 Provides access to the Polarion platform context and initialization methods. ```APIDOC ## PlatformContext.initPlatform(IPlatform platform) ### Description Initializes the Polarion platform context. ### Method Static ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **platform** (IPlatform) - The platform instance to initialize with. ### Request Example None ### Response #### Success Response (200) - **Status** (string) - Confirmation of platform initialization. #### Response Example None ``` -------------------------------- ### Get Custom Field Type (Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/platform/persistence/ICustomFieldType Gets the type of the custom field. If this method returns null, it indicates that the custom field type is an enum. ```Java IType getType() Gets the `type` of the custom field. ``` -------------------------------- ### Retrieve Work Item Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/model/class-use/IWorkItem Demonstrates how to retrieve Work Items based on various criteria, such as ID, project ID, or by getting linked items from other structures. It also covers getting variants and attachments. ```java IModule.getWorkItem(String id) IModule.getWorkItem(String projectId, String id) ITrackerProject.getWorkItem(String workItemId) IModule.IStructureNode.getWorkItem() IWorkRecord.getWorkItem() IExternallyLinkedWorkItemStruct.getContainerWorkItem() ITestRecord.getDefect() IPlanRecord.getItem() IFeatureSelectionItem.getLinkedFeature() IBuildLinkedWorkItemStruct.getLinkedItem() ILinkedWorkItemStruct.getLinkedItem() IModuleComment.getReferredWorkItem() ITestRun.getSummaryDefect() ITestRecord.getTestCase() ITestRecord.getTestCaseWithRevision() IModule.getVariant() IAttachment.getWorkItem() IComment.getWorkItem() ``` -------------------------------- ### License and Constraint Management Methods Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/index-files/index-19 Documentation for methods related to setting license data and planning constraints. ```APIDOC ## setConcurrentLicenseData ### Description Sets the concurrent license data for a ProductLicense. ### Method POST (example, actual method is Java) ### Endpoint /api/polarion/sdk ### Parameters #### Request Body - **licenseData** (Array of objects) - Required - An array of LicenseInfo objects representing concurrent licenses. ### Request Example ```json { "licenseData": [ { "licenseId": "license1", "users": 5 }, { "licenseId": "license2", "users": 10 } ] } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` ```APIDOC ## setConstraint ### Description Sets the planning constraint for a planning constraint structure or a PlanningConstraint object. ### Method POST (example, actual method is Java) ### Endpoint /api/polarion/sdk ### Parameters #### Request Body - **constraint** (Object or String) - Required - The planning constraint to set. This can be a complex object (IPlanningConstraintOpt) or an EnumOptionId (String). ### Request Example ```json { "constraint": "urgent" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates success or failure of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Untitled No description -------------------------------- ### Java: Get PageWatermark ID Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/exporter/configuration/PageWatermark This snippet shows how to get the unique identifier (ID) of a PageWatermark. The ID is used to reference the watermark, potentially for searching in the repository. ```java String watermarkId = watermark.id(); ``` -------------------------------- ### Get Lightweight Test Run (Deprecated Java) Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/tracker/ITestManagementService Deprecated method to get a lightweight Test Run. It is now equivalent to `getTestRun(String, String)`. The system property `DO_NOT_USE_LIGHTWEIGHT_TESTRUN` no longer affects its behavior. ```java /** * Deprecated. Since 3.10.3, now equivalent to getTestRun(String, String). The system property DO_NOT_USE_LIGHTWEIGHT_TESTRUN no longer has an effect. * @param projectId The id of the project. * @param id The id of the Test Run. * @return a lightweight Test Run. */ @Deprecated ITestRun getLightweightTestRun(String projectId, String id); ``` -------------------------------- ### Project and Repository Creation Methods Source: https://testdrive.polarion.com/polarion/sdk/doc/javadoc/index-files/index-3 Methods for creating projects, repository templates, and source repositories. ```APIDOC ## createProject / createRepositoryTemplate / createSourceRepository ### Description Methods to create new projects, repository templates from existing locations, and new source repository instances. ### Method Various (refer to specific implementation) ### Endpoint N/A (SDK methods) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "Parameters depend on the specific creation method and its requirements." } ``` ### Response #### Success Response (Creation Confirmation/Object) - **Result** (Various) - Varies; could be a project object, a template object, or a source repository instance. #### Response Example ```json { "example": "Details of the created project, template, or repository" } ``` ```