KesselInventoryService_RemoveResourceRelationships
const url = 'https://example.com/api/kessel/v1beta2/resources/relationships';const options = { method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{"inventoryId":"example","type":"example","reporterType":"example","reporterInstanceId":"example","localResourceId":"example","reporter":{},"common":{},"transactionId":"example","writeVisibility":"WRITE_VISIBILITY_UNSPECIFIED"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/kessel/v1beta2/resources/relationships \ --header 'Content-Type: application/json' \ --data '{ "inventoryId": "example", "type": "example", "reporterType": "example", "reporterInstanceId": "example", "localResourceId": "example", "reporter": {}, "common": {}, "transactionId": "example", "writeVisibility": "WRITE_VISIBILITY_UNSPECIFIED" }'Removes one or more specific relationships from an existing Resource.
All other relationships for the Resource are unaffected. If the Resource
does not exist, this operation returns NOT_FOUND — matching the behaviour
of DeleteResource.
Unlike ReportResource, which asserts the complete state of a Resource,
this operation is a targeted mutation: it only removes the specific
relationship values named in the request. Attribute fields and other
relationship fields are left exactly as they were.
Only relationship-typed fields from the Resource’s schema are accepted; attribute fields are rejected.
The relationships removed through this API are used to determine relationship check outcomes via the Check and CheckForUpdate APIs.
This API does not guarantee immediate read-your-writes consistency by default.
If a reporter requires removed relationships to no longer be visible in subsequent
checks (e.g., Check), the request must explicitly set write_visibility = IMMEDIATE.
Request Bodyrequired
Section titled “Request Bodyrequired”Request to remove one or more specific relationships from a Resource without reporting the complete remaining set of relationships. Only relationship-typed fields are accepted; attribute fields are rejected.
object
Partial reporter representation naming the relationship values to remove
from existing reporter relationships.
At least one of reporter or common must be provided.
object
Partial common representation naming the relationship values to remove.
At least one of reporter or common must be provided.
object
Responses
Section titled “Responses”OK
object
Examplegenerated
{}default
Section titled “default”Default error response
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}