/deleteRelationship: Delete Relationship

URL:
https://[root]/content/users/[userName]/deleteRelationship
Methods:
POST

Example usage

The following is a sample ArcGIS Online POST request for the deleteRelationship operation:

URL for Delete Relationship

1
2
3
4
5
6
POST /sharing/rest/content/users/jsmith/deleteRelationships HTTP/1.1
Host: org.arcigs.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

originItemId=a40fddbcd3fc4fadbbb50485a50c3ed0&destinationItemId=b512083cd1b64e2da1d3f66dbb135956&relationshipTypes=Map2Service&f=pjson

The following is a sample ArcGIS Enterprise POST request for the deleteRelationship operation:

1
2
3
4
5
6
POST /webadaptor/sharing/rest/content/users/jsmith/deleteRelationships HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

originItemId=a40fddbcd3fc4fadbbb50485a50c3ed0&destinationItemId=b512083cd1b64e2da1d3f66dbb135956&relationshipTypes=Map2Service&f=pjson

Description

The deleteRelationship operation deletes a relationship of a certain type between two items. To delete the relationship, the current user must have created the relationship. If the relationship does not exist, an error is thrown.

Request parameters

ParameterDetails

[Common Parameters]

For a complete listing, see Common parameters.

originItemId

The item ID of the origin item of the relationship.

Example:

1
originItemId=a40fddbcd3fc4fadbbb50485a50c3ed0

destinationItemId

The item ID of the destination item of the relationship.

Example:

1
destinationItemId=b512083cd1b64e2da1d3f66dbb135956

relationshipTypes

The type of relationship between the two items.

Example:

1
relationshipTypes=Map2Service

f

The response format. The default format is html.

Values: html | json | pjson

JSON Response syntax

1
2
3
{
  "success": true | false
}

JSON Response example

1
2
3
{
  "success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close