Request

Response

    Relationship
    POST

    relationships:delete

    Deprecated

    Deletes one or more relationships in a project for assets and/or categories.

    We will be deprecating this endpoint.

    We recommend using the Delete Relationships endpoint in the Relationships API for deleting relationships. See the Relationships API Field Guide for more details. Note that you need to continue to use this endpoint for deleting relationships between assets (asset) and checklists (checklist).

    This endpoint accepts an object with an array of relationship IDs for relationships to delete and returns information about the deletions.

    Note that you must have project permissions that allow you to delete the corresponding asset or category defined in each deleted relationship.

    To understand the basics of relationships, and the Assets settings that define them, see the Assets Field Guide.

    This endpoint will continue to be available in BIM360 for backwards-compatibility.

    Note that this endpoint is compatible with both BIM 360 and Forma projects.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/bim360/assets/v1/projects/{projectId}/relationships:delete
    Authentication Context
    user context required
    Required OAuth Scopes
    data:write
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow.
    Content-Type*
    string
    Must be application/json
    * Required

    Request

    URI Parameters

    projectId
    string
    The BIM 360 project ID. Must be a UUID or a project ID of the form “b.{UUID}”.

    Request

    Body Structure

    relationshipIds
    array: string
    An array of the relationship IDs for relationships to delete.

    Response

    HTTP Status Code Summary

    200
    OK
    Successfully deleted relationships.
    400
    Bad Request
    The request could not be understood by the server due to malformed syntax or missing request header
    401
    Unauthorized
    The request was not accepted because it lacked valid authentication credentials
    403
    Forbidden
    The request was not accepted because the client is authenticated, but is not authorized to access the target resource
    404
    Not Found
    The resource cannot be found
    409
    Conflict
    The request could not be completed due to a conflict with the current state of the target resource
    429
    Too Many Requests
    The request was not accepted because the rate limit was exceeded due to too many requests being made.
    500
    Internal Server Error
    An unexpected error occurred on the server

    Response

    Body Structure (200)

    deleted
    array: string
    The list of relationship IDs for the relationships that have been deleted.

    Example

    Successfully deleted relationships.

    Request

    curl -v 'https://developer.api.autodesk.com/bim360/assets/v1/projects/:projectId/relationships:delete' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '{
            "relationshipIds": [
              "52d7cecf-9f88-4aa2-b725-a6e09a0bc549"
            ]
          }'
    
    Show More

    Response

    {
      "deleted": [
        "52d7cecf-9f88-4aa2-b725-a6e09a0bc549"
      ]
    }