Skip to content

KesselInventoryService_RemoveResourceRelationships

DELETE
/api/kessel/v1beta2/resources/relationships
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.

Media typeapplication/json

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
inventoryId
string
type
string
reporterType
string
reporterInstanceId
string
localResourceId
string
reporter

Partial reporter representation naming the relationship values to remove from existing reporter relationships. At least one of reporter or common must be provided.

object
common

Partial common representation naming the relationship values to remove. At least one of reporter or common must be provided.

object
transactionId
string
writeVisibility
string format: enum
Allowed values: WRITE_VISIBILITY_UNSPECIFIED MINIMIZE_LATENCY IMMEDIATE

OK

Media typeapplication/json
object
Examplegenerated
{}

Default error response

Media typeapplication/json

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
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

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.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any
Examplegenerated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}