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
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: