Delete A Portfolio Link
Deletes an existing link permanently. This action cannot be undone.
HTTP Request
DELETE/api/portfolios/:portfolio_id/links/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff with PorfolioLinkPermission or Admin
- Permission Code: 4244
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| portfolio_id | Integer | Yes | Unique ID of the related portfolio |
| id | Integer | Yes | Unique ID of the link to delete |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Delete a link
4response = requests.delete('http://www.example.com/api/portfolios/3/links/123',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.status_code) # Should be 204 for successful deletion
8
9# Check if deletion was successful
10if response.status_code == 204:
11 print("link deleted successfully")
12else:
13 print(f"Deletion failed with status code: {response.status_code}")1# Delete a link
2curl -X DELETE "http://www.example.com/api/portfolios/3/links/123" \
3-H "Authorization: Token <your_api_key>"
4
5# The response will have status 204 with no body if successfulResponse Fields
| Field | Type | Description |
|---|---|---|
| None | None | No response body returned for successful deletion |