/CollaborationSet(‘{Id}’)
Deletes the collaboration for the specified collaboration ID.
/CollaborationSet(‘{Id}’)
Usage
curl -X delete "https://cpdc<account>.<host>/cpdc/odata/v1/CollaborationSet(‘{Id}’)"
DataOutputStream dataOut = null;
BufferedReader in =null;
try {
//API endpoint
String url = "https://cpdc<account>.<host>/cpdc/odata/v1/CollaborationSet(‘{Id}’)";
URL urlObj = new URL(url);
HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection();
connection.setRequestMethod("");
//adding headers
connection.setRequestProperty("Content-Type","application/json");
connection.setRequestProperty("X-CSRF-Token","string"); //for POST , PATCH , DELETE
//Basic Auth : provide username:password in Base64 encoded in Authorization header
connection.setRequestProperty("Authorization","Basic " + "Base64 encoded value");
connection.setDoInput(true);
//For passing a body with request
connection.setDoOutput(true);
dataOut = new DataOutputStream(connection.getOutputStream());
dataOut.writeBytes("{ \"string\": "string", \"string\": \"string\"}");
dataOut.flush();
int responseCode = connection.getResponseCode();
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
//printing response
System.out.println(response.toString());
} catch (Exception e) {
//do something with exception
e.printStackTrace();
} finally {
try {
if(dataOut != null) {
dataOut.close();
}
if(in != null) {
in.close();
}
} catch (IOException e) {
//do something with exception
e.printStackTrace();
}
}
import io.swagger.client.api.CollaborationApi;
public class CollaborationApiExample {
public static void main(String[] args) {
CollaborationApi apiInstance = new CollaborationApi();
String id = id_example; // String | ID of the collaboration to be deleted.
try {
apiInstance.collaborationSetIdDelete(id);
} catch (ApiException e) {
System.err.println("Exception when calling CollaborationApi#collaborationSetIdDelete");
e.printStackTrace();
}
}
}
String *id = id_example; // ID of the collaboration to be deleted.
CollaborationApi *apiInstance = [[CollaborationApi alloc] init];
// Deletes the collaboration for the specified collaboration ID.
[apiInstance collaborationSetIdDeleteWith:id
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
//For sending body with API calls
var data = JSON.stringify({
"context": {},
"definitionId": "string"
});
//When no body is to be passed
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = false;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
var res = this.responseText;
}
});
//setting request method
//API endpoint for API sandbox
xhr.open('set request method', "https://cpdc<account>.<host>/cpdc/odata/v1/CollaborationSet(‘{Id}’)");
xhr.withCredentials = true;
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Authorization', 'Basic ' + 'Base64 encoded value'));
//When X-CSRF-Token is required
xhr.setRequestHeader("X-CSRF-Token", "string");
xhr.send(data);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class collaborationSetIdDeleteExample
{
public void main()
{
var apiInstance = new CollaborationApi();
var id = id_example; // String | ID of the collaboration to be deleted.
try
{
// Deletes the collaboration for the specified collaboration ID.
apiInstance.collaborationSetIdDelete(id);
}
catch (Exception e)
{
Debug.Print("Exception when calling CollaborationApi.collaborationSetIdDelete: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\CollaborationApi();
$id = id_example; // String | ID of the collaboration to be deleted.
try {
$api_instance->collaborationSetIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling CollaborationApi->collaborationSetIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CollaborationApi;
my $api_instance = WWW::SwaggerClient::CollaborationApi->new();
my $id = id_example; # String | ID of the collaboration to be deleted.
eval {
$api_instance->collaborationSetIdDelete(id => $id);
};
if ($@) {
warn "Exception when calling CollaborationApi->collaborationSetIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.CollaborationApi()
id = id_example # String | ID of the collaboration to be deleted.
try:
# Deletes the collaboration for the specified collaboration ID.
api_instance.collaborationSetIdDelete(id)
except ApiException as e:
print("Exception when calling CollaborationApi->collaborationSetIdDelete: %s\n" % e)
DATA: lo_http_client TYPE REF TO if_http_client.
DATA: response TYPE string.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = 'https://cpdc<account>.<host>/cpdc/odata/v1/CollaborationSet(‘{Id}’)'
IMPORTING
client = lo_http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
//error handling.
ENDIF.
//setting request method.
lo_http_client->request->set_method('set request method');.
//adding headers.
lo_http_client->request->set_header_field( name = 'Content-Type' value = 'application/json' ).
//Basic Auth : provide username:password in Base64 encoded in Authorization header.
lo_http_client->request->set_header_field( name = 'Authorization' value = 'Basic Base64 encoded value' ).
//For passing body with the request.
lv_json_post_data = | \{ | &&
| "string":"string", | &&
| "string":"string" | &&
| \} |.
//For request where body is to be passed.
CALL METHOD lo_http_client1->request->set_data( lv_json_post_data ).
CALL METHOD lo_http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
http_invalid_timeout = 4
OTHERS = 5.
IF sy-subrc = 0.
CALL METHOD lo_http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 5.
ENDIF.
IF sy-subrc <> 0.
//error handling.
ENDIF.
response = lo_http_client->response->get_cdata( ).
WRITE: 'response: ', response.
Parameters
Name | Description |
---|---|
Id* |