Drop Relationship

You can drop a business object relationship along with its relationship metadata and physical referential integrity constraint from the system by sending the following request. Drop relationship will be equivalent to delete a business object relationship definition. Either you want to drop a simple relationship or a composite relationship the request will be same. Once you drop a relationship then you cannot recover it again.

Following are the conditions which should be met by the request to drop the relationship.

  1. Main request will be for `BUS OBJ RELATIONSHIP' business object.

  2. You can drop the relationship either by relationship name or by constraint name.

  3. If you provide both then the relationship name will take precedence over constraint name.

  4. If you provide relationship name then this relationship name must exist in the database.

  5. If you provide constraint name then this constraint name must exist in the database.

  6. For composite relationship you only need to specify the relationship name and all the relationship metadata records for this composite relationship will be deleted together using a single request.

  7. If the given relationship name or constraint name does not exist then the response will be an error.

1. Request URL

/{PDM Server domain}/metadata/write/dropRelationships

Method: POST

2. Request headers

Name Value

Content-Type

application/json

3. Response Type

Name Value

responseType

blob

4. Request body

Drop Business Object Relationship Using Relationship Name Request

{
    "BUS OBJ RELATIONSHIP": {
        "language": "en",
        "readBack": true,
        "timezone": "GMT+08:00",
        "showSQLStats": true,
        "data": [
            {
                "BUS_OBJ_RELATIONSHIP_NAME": "FK_{{boName2}}_{{boName1}}_NAME"
            }
        ]
    }
}
Try it myself
Drop Business Object Relationship Using Constraint Name Request

{
    "BUS OBJ RELATIONSHIP": {
        "language": "en",
        "readBack": true,
        "timezone": "GMT+08:00",
        "showSQLStats": true,
        "data": [
            {
                "CONSTRAINT_NAME": "FK_{{boName2}}_{{boName1}}_NAME"
            }
        ]
    }
}
Try it myself

5. Responses

When response.status = 200, It will response a `application/octet-stream' excel file.

Otherwise, it will response json file, Please see Responses