DetachWorkstreamResourceAPI mirrors erdo_attach_workstream_resource's
curl --request DELETE \
--url https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"relationship_type": "<string>",
"removed": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship_type": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"title": "<string>",
"workstream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"removed_count": 123,
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"workstream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
DetachWorkstreamResourceAPI mirrors erdo_attach_workstream_resource's
detach=true mode: it takes a link back off a workstream, addressed by the resource’s type and id. Omit relationship_type to remove every link the workstream holds to that resource. The response reports removed_count, so a caller can tell “unlinked it” from “there was nothing to unlink”.
DELETE
/
v1
/
workstreams
/
{workstreamSlug}
/
resources
DetachWorkstreamResourceAPI mirrors erdo_attach_workstream_resource's
curl --request DELETE \
--url https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/workstreams/{workstreamSlug}/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"relationship_type": "<string>",
"removed": [
{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phase_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship_type": "<string>",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"title": "<string>",
"workstream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"removed_count": 123,
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_type": "<string>",
"workstream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

