Polarion REST API

Collections

closeCollection

Closes the specified Collection.

/projects/{projectId}/collections/{collectionId}/actions/close

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/close" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/close"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/close', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/close");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


deleteCollection

Deletes the specified Collection.

/projects/{projectId}/collections/{collectionId}

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


deleteCollections

Deletes a list of Collections.

/projects/{projectId}/collections

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/projects/{projectId}/collections" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


deleteCollectionsRelationship

Removes the specific Relationship from the Collection.

/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required
relationshipId*
String
The Relationship ID.
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 405 - Not Allowed

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getCollection

Returns the specified Collection.

/projects/{projectId}/collections/{collectionId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getCollections

Returns a list of Collections.

/projects/{projectId}/collections

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/collections?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&query={query}&sort={sort}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&query={query}&sort={sort}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&query={query}&sort={sort}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&query={query}&sort={sort}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
query
String
The query string.
sort
String
The sort string.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getCollectionsRelationship

Returns a list of Collection Relationships.

/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required
relationshipId*
String
The Relationship ID.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchCollections

Updates the specified Collection.

/projects/{projectId}/collections/{collectionId}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchCollectionsRelationships

Updates a list of Collection Relationships.

/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required
relationshipId*
String
The Relationship ID.
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postCollections

Creates a list of Collections.

/projects/{projectId}/collections

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/collections" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postCollectionsRelationships

Creates the specific Relationships for the Collections.

/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/relationships/{relationshipId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required
relationshipId*
String
The Relationship ID.
Required
Body parameters
Name Description
body *

Responses

Status: default - default response


reopenCollection

Reopens the specified Collection.

/projects/{projectId}/collections/{collectionId}/actions/reopen

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/reopen" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class CollectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/reopen"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/reopen', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/collections/{collectionId}/actions/reopen");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
collectionId*
String
The Collection ID.
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


DocumentAttachments

getDocumentAttachment

Returns the specified Document Attachment.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentAttachmentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
attachmentId*
String
The Attachment ID.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getDocumentAttachmentContent

Downloads the file content for a specified Document Attachment.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}/content

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}/content?revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/octet-stream, application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentAttachmentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}/content?revision={revision}"))
                .header("Accept", "application/octet-stream, application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/octet-stream, application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}/content?revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}/content?revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/octet-stream, application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
attachmentId*
String
The Attachment ID.
Required
Query parameters
Name Description
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getDocumentAttachments

Returns a list of Document Attachments.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentAttachmentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchDocumentAttachment

Updates the specified Document Attachment.

See more in the REST API User Guide.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: multipart/form-data"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentAttachmentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}"))
                .header("Content-Type", "multipart/form-data")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'multipart/form-data',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments/{attachmentId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "multipart/form-data");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
attachmentId*
String
The Attachment ID.
Required
Form parameters
Name Description
content
byte[] (binary)
resource
document_attachmentsSinglePatchRequest

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postDocumentItemAttachments

Creates a list of Document Attachments.

Files are identified by order or optionally by the 'lid' attribute. See more in the REST API User Guide.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: multipart/form-data"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentAttachmentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments"))
                .header("Content-Type", "multipart/form-data")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'multipart/form-data',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/attachments");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "multipart/form-data");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Form parameters
Name Description
files *
array[byte[]] (binary)
Required
resource *
document_attachmentsListPostRequest
Required

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


DocumentComments

getDocumentComment

Returns the specified Document Comment.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentCommentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
commentId*
String
The Comment ID.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getDocumentComments

Returns a list of Document Comments.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentCommentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchDocumentComment

Updates the specified Document Comment.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentCommentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments/{commentId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
commentId*
String
The Comment ID.
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postDocumentComments

Creates a list of Document Comments.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentCommentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/comments");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


DocumentParts

getDocumentPart

Returns the specified Document Part.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts/{partId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts/{partId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentPartsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts/{partId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts/{partId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts/{partId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
partId*
String
The Document Part ID.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getDocumentParts

Returns a list of Document Parts.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentPartsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postDocumentParts

Creates a list of Document Parts.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentPartsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/parts");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


Documents

branchDocument

Creates a Branch of the Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/branch

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/branch?revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/branch?revision={revision}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/branch?revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/branch?revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Body parameters
Name Description
body *
Query parameters
Name Description
revision
String
The revision ID.

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


branchDocuments

Creates Branches of Documents.

/all/documents/actions/branch

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/all/documents/actions/branch" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/all/documents/actions/branch"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/all/documents/actions/branch', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/all/documents/actions/branch");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Body parameters
Name Description
body *

Responses

Status: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 406 - Not Acceptable

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


copyDocument

Creates a copy of the Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/copy

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/copy?revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/copy?revision={revision}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/copy?revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/copy?revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Body parameters
Name Description
body *
Query parameters
Name Description
revision
String
The revision ID.

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getAvailableEnumOptionsForDocument

Returns a list of available options for the requested field in the specified Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getAvailableOptions

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
fieldId*
String
The Field ID.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getAvailableEnumOptionsForDocumentType

Returns a list of available options for the requested field for the specified Document type.

/projects/{projectId}/documents/fields/{fieldId}/actions/getAvailableOptions

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/documents/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}&type={type}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/documents/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}&type={type}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/documents/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}&type={type}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/documents/fields/{fieldId}/actions/getAvailableOptions?page[size]={page[size]}&page[number]={page[number]}&type={type}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
fieldId*
String
The Field ID.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
type
String
The Type of the object.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getCurrentEnumerationOptionsForDocument

Returns a list of selected options for the requested field in the specified Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getCurrentOptions

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getCurrentOptions?page[size]={page[size]}&page[number]={page[number]}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getCurrentOptions?page[size]={page[size]}&page[number]={page[number]}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getCurrentOptions?page[size]={page[size]}&page[number]={page[number]}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/fields/{fieldId}/actions/getCurrentOptions?page[size]={page[size]}&page[number]={page[number]}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
fieldId*
String
The Field ID.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getDocument

Returns the specified Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


mergeDocumentFromMaster

Merges Master Work Item changes to the specified Branched Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeFromMaster

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeFromMaster" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeFromMaster"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeFromMaster', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeFromMaster");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Branch Document Name.
Required
Body parameters
Name Description
body

Responses

Status: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


mergeDocumentToMaster

Merges Work Item changes from specified Branched Document to Master.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeToMaster

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeToMaster" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeToMaster"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeToMaster', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}/actions/mergeToMaster");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Branch Document Name.
Required
Body parameters
Name Description
body

Responses

Status: 202 - Accepted

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchDocument

Updates the specified Document.

/projects/{projectId}/spaces/{spaceId}/documents/{documentName}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?workflowAction={workflowAction}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?workflowAction={workflowAction}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?workflowAction={workflowAction}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents/{documentName}?workflowAction={workflowAction}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
documentName*
String
The Document name.
Required
Body parameters
Name Description
body *
Query parameters
Name Description
workflowAction
String
The Workflow Action.

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postDocuments

Creates a list of Documents.

/projects/{projectId}/spaces/{spaceId}/documents

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class DocumentsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/spaces/{spaceId}/documents");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
spaceId*
String
The Space ID. (Use '_default' without quotes to address the default Space.)
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


Enumerations

deleteGlobalEnumeration

Deletes the specified Enumeration from the Global context.

/enumerations/{enumContext}/{enumName}/{targetType}

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
enumContext*
String
The Enumeration context. (Allowed values are '~', 'plans', 'testing' and 'documents'. Use '~' for Work Item or general enumerations.)
Required
enumName*
String
The Enumeration Name.
Required
targetType*
String
The Enumeration target type. (Use '~' when there is no specific type for the enumeration.)
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


deleteProjectEnumeration

Deletes the specified Enumeration from the Project context.

/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
enumContext*
String
The Enumeration context. (Allowed values are '~', 'plans', 'testing' and 'documents'. Use '~' for Work Item or general enumerations.)
Required
enumName*
String
The Enumeration Name.
Required
targetType*
String
The Enumeration target type. (Use '~' when there is no specific type for the enumeration.)
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getGlobalEnumeration

Returns the specified Enumeration from the Global context.

/enumerations/{enumContext}/{enumName}/{targetType}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
enumContext*
String
The Enumeration context. (Allowed values are '~', 'plans', 'testing' and 'documents'. Use '~' for Work Item or general enumerations.)
Required
enumName*
String
The Enumeration Name.
Required
targetType*
String
The Enumeration target type. (Use '~' when there is no specific type for the enumeration.)
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getProjectEnumeration

Returns the specified Enumeration from the Project context.

/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
enumContext*
String
The Enumeration context. (Allowed values are '~', 'plans', 'testing' and 'documents'. Use '~' for Work Item or general enumerations.)
Required
enumName*
String
The Enumeration Name.
Required
targetType*
String
The Enumeration target type. (Use '~' when there is no specific type for the enumeration.)
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchGlobalEnumeration

Updates the specified Enumeration in the Global context.

/enumerations/{enumContext}/{enumName}/{targetType}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/enumerations/{enumContext}/{enumName}/{targetType}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
enumContext*
String
The Enumeration context. (Allowed values are '~', 'plans', 'testing' and 'documents'. Use '~' for Work Item or general enumerations.)
Required
enumName*
String
The Enumeration Name.
Required
targetType*
String
The Enumeration target type. (Use '~' when there is no specific type for the enumeration.)
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


patchProjectEnumeration

Updates the specified Enumeration in the Project context.

/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}

Usage and Code Samples

curl -X PATCH "https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .PATCH()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'PATCH',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations/{enumContext}/{enumName}/{targetType}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.PATCH;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
enumContext*
String
The Enumeration context. (Allowed values are '~', 'plans', 'testing' and 'documents'. Use '~' for Work Item or general enumerations.)
Required
enumName*
String
The Enumeration Name.
Required
targetType*
String
The Enumeration target type. (Use '~' when there is no specific type for the enumeration.)
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postGlobalEnumeration

Creates a list of Enumerations in the Global context.

/enumerations

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/enumerations" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/enumerations"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/enumerations', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/enumerations");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postProjectEnumeration

Creates a list of Enumerations in the Project context.

/projects/{projectId}/enumerations

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/enumerations" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class EnumerationsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/enumerations', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/enumerations");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


ExternallyLinkedWorkItems

deleteExternallyLinkedWorkItem

Deletes the specified Externally Linked Work Item.

/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ExternallyLinkedWorkItemsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
workItemId*
String
The Work Item ID.
Required
roleId*
String
The Role ID.
Required
hostname*
String
The Target Hostname.
Required
targetProjectId*
String
The Target Project ID.
Required
linkedWorkItemId*
String
The Linked Work Item ID.
Required

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


deleteExternallyLinkedWorkItems

Deletes a list of Externally Linked Work Items.

/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems

Usage and Code Samples

curl -X DELETE "https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ExternallyLinkedWorkItemsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .DELETE()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'DELETE',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.DELETE;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
workItemId*
String
The Work Item ID.
Required
Body parameters
Name Description
body *

Responses

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getExternallyLinkedWorkItem

Returns the specified Externally Linked Work Item.

Returns the external links to other Work Items. (The same as the corresponding Java API method.)

/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ExternallyLinkedWorkItemsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems/{roleId}/{hostname}/{targetProjectId}/{linkedWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
workItemId*
String
The Work Item ID.
Required
roleId*
String
The Role ID.
Required
hostname*
String
The Target Hostname.
Required
targetProjectId*
String
The Target Project ID.
Required
linkedWorkItemId*
String
The Linked Work Item ID.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


getExternallyLinkedWorkItems

Returns a list of Externally Linked Work Items.

Returns the external links to other Work Items. (The same as the corresponding Java API method.)

/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ExternallyLinkedWorkItemsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems?page[size]={page[size]}&page[number]={page[number]}&fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
workItemId*
String
The Work Item ID.
Required
Query parameters
Name Description
page[size]
Integer (int32)
Limit the number of entities returned in a single response. See REST API User Guide for details.
page[number]
Integer (int32)
Specify the page number to be returned. Counting starts from 1. See REST API User Guide for details.
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]
String
fields[teststepresult_attachments]
String
fields[teststeps]
String
fields[usergroups]
String
fields[users]
String
fields[workitem_approvals]
String
fields[workitem_attachments]
String
fields[workitem_comments]
String
fields[workitems]
String
fields[workrecords]
String
include
String
Include related entities. See REST API User Guide for details.
revision
String
The revision ID.

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


postExternallyLinkedWorkItems

Creates a list of Externally Linked Work Items.

/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems

Usage and Code Samples

curl -X POST "https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json" -H  "Content-Type: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ExternallyLinkedWorkItemsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems"))
                .header("Content-Type", "application/json")
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .POST()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'POST',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/externallylinkedworkitems");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
workItemId*
String
The Work Item ID.
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Created

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 409 - Conflict

Status: 413 - Request Entity Too Large

Status: 415 - Unsupported Media Type

Status: 4XX-5XX - Error responses have the following structure:

Status: 500 - Internal Server Error

Status: 503 - Service Unavailable


FeatureSelections

getFeatureSelection

Returns the specified Feature Selection.

/projects/{projectId}/workitems/{workItemId}/featureselections/{selectionTypeId}/{targetProjectId}/{targetWorkItemId}

Usage and Code Samples

curl -X GET "https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/featureselections/{selectionTypeId}/{targetProjectId}/{targetWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}" -H  "Authorization: Bearer {personal_access_token}" -H  "Accept: application/json"
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class FeatureSelectionsApiExample {

    public static void main(String[] args) throws IOException, InterruptedException { 
        String polarionToken = "{personal_access_token}";

        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/featureselections/{selectionTypeId}/{targetProjectId}/{targetWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}"))
                .header("Accept", "application/json")
                .header("Authorization", "Bearer " + polarionToken)
                .GET()
                .build();

        HttpClient client = HttpClient.newHttpClient();
        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response);
    }
}
const options = {
    method: 'GET',
    headers: { 
        'Authorization': 'Bearer {personal_access_token}',
        'Accept': 'application/json'
    }
}

fetch('https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/featureselections/{selectionTypeId}/{targetProjectId}/{targetWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}', options)
    .then(response => console.log(response))
    .catch(error => console.log('error', error));
var client = new RestClient("https://example.com/polarion/rest/v1/projects/{projectId}/workitems/{workItemId}/featureselections/{selectionTypeId}/{targetProjectId}/{targetWorkItemId}?fields[categories]={fields[categories]}&fields[collections]={fields[collections]}&fields[document_attachments]={fields[document_attachments]}&fields[document_comments]={fields[document_comments]}&fields[document_parts]={fields[document_parts]}&fields[documents]={fields[documents]}&fields[enumerations]={fields[enumerations]}&fields[externallylinkedworkitems]={fields[externallylinkedworkitems]}&fields[featureselections]={fields[featureselections]}&fields[globalroles]={fields[globalroles]}&fields[icons]={fields[icons]}&fields[jobs]={fields[jobs]}&fields[linkedoslcresources]={fields[linkedoslcresources]}&fields[linkedworkitems]={fields[linkedworkitems]}&fields[page_attachments]={fields[page_attachments]}&fields[pages]={fields[pages]}&fields[plans]={fields[plans]}&fields[projectroles]={fields[projectroles]}&fields[projects]={fields[projects]}&fields[projecttemplates]={fields[projecttemplates]}&fields[revisions]={fields[revisions]}&fields[testparameter_definitions]={fields[testparameter_definitions]}&fields[testparameters]={fields[testparameters]}&fields[testrecord_attachments]={fields[testrecord_attachments]}&fields[testrecords]={fields[testrecords]}&fields[testrun_attachments]={fields[testrun_attachments]}&fields[testrun_comments]={fields[testrun_comments]}&fields[testruns]={fields[testruns]}&fields[teststep_results]={fields[teststep_results]}&fields[teststepresult_attachments]={fields[teststepresult_attachments]}&fields[teststeps]={fields[teststeps]}&fields[usergroups]={fields[usergroups]}&fields[users]={fields[users]}&fields[workitem_approvals]={fields[workitem_approvals]}&fields[workitem_attachments]={fields[workitem_attachments]}&fields[workitem_comments]={fields[workitem_comments]}&fields[workitems]={fields[workitems]}&fields[workrecords]={fields[workrecords]}&include={include}&revision={revision}");
client.Timeout = -1;
var request = new RestRequest();
request.Method = Method.GET;
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {personal_access_token}");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Parameters

Path parameters
Name Description
projectId*
String
The Project ID.
Required
workItemId*
String
The Work Item ID.
Required
selectionTypeId*
String
The Selection Type ID.
Required
targetProjectId*
String
The Target Project ID.
Required
targetWorkItemId*
String
The Target Work Item ID.
Required
Query parameters
Name Description
fields[categories]
String
fields[collections]
String
fields[document_attachments]
String
fields[document_comments]
String
fields[document_parts]
String
fields[documents]
String
fields[enumerations]
String
fields[externallylinkedworkitems]
String
fields[featureselections]
String
fields[globalroles]
String
fields[icons]
String
fields[jobs]
String
fields[linkedoslcresources]
String
fields[linkedworkitems]
String
fields[page_attachments]
String
fields[pages]
String
fields[plans]
String
fields[projectroles]
String
fields[projects]
String
fields[projecttemplates]
String
fields[revisions]
String
fields[testparameter_definitions]
String
fields[testparameters]
String
fields[testrecord_attachments]
String
fields[testrecords]
String
fields[testrun_attachments]
String
fields[testrun_comments]
String
fields[testruns]
String
fields[teststep_results]