Delete Relationship Operation - web_services - 23.1

Spectrum Web Services Guide

Product type
Software
Portfolio
Integrate
Product family
Spectrum
Product
Spectrum > Web Services
Version
23.1
Language
English
Product name
Spectrum Technology Platform
Title
Spectrum Web Services Guide
First publish date
2007
Last updated
2024-10-17
Published on
2024-10-17T00:33:46.811413

The delete relationship operation removes an existing relationship between two entities.

HTTP DEL URL Format

The request is specified as follows. The Spectrum server supports both HTTP and HTTPS.

DEL http://server_name:port/rest/ContextGraph/operations/modelName/relationships/relationshipLabel?​​query_parameters

URL Path Elements

modelName
The name of the Context Graph model.
relationshipLabel
The name of the relationship label connecting two entities in a model.

Query Parameters

Parameter Type Required Description
sourceID string yes The source ID of the entity that connects a relationship. This parameter specifies an entityType:entityLabel value pair.
targetID string yes The target ID of the entity that connects a relationship. This parameter specifies an entityType:entityLabel value pair.
uniqueID string no The value that distinguishes a relationship when there are multiple relationships with the same label connecting two entities in a model.

Response

The operation returns the status code "200 OK" when it is successful. The operation returns the status code 500 (Error) when it fails.

Delete relationship label with JSON response

The following request deletes the "Roomate" relationship label in the "911" model between two person entities.

DEL http://localhost:8080/rest/ContextGraph/operations/911/relationships/Roomate?​sourceID=Person:Ahmed%20al-Haznawi&​targetID=Person:Ziad%20Jarrah

Response:

{
  "success":"200 OK"
}

Delete relationship with same label

The following deletes a Roomate relationship label in the "911" model where the relationship ID between two person entities is equal to "4".

DEL http://localhost:8080/rest/ContextGraph/operations/911/relationships/Roomate?​sourceID=Person:Ahmed%20al-Haznawi&​targetID=Person:Ziad%20Jarrah&​uniqueID=4