EN
Español
English
Português
    Delete Relationships

    Petition Details

    • Base URL: {host}/ASMSAPI/
    • Uri: api/v9/item/{id}/{itemType}/{relatedItemId}/{relatedItemType}/relation/?relationTypeId={relationTypeId}&isReverse={isReverse}&isSolution={isSolution}&isClosed={isClosed}
    • Type: DELETE
    • Required headings:

    • content-type: application/json
    • X-Authorization: Bearer {token}

    URL Description

    • {host}: It represents the domain of the environment in which the API is located.
    • ASMSAPI/: Fixed API prefix.
    • URI: Specific endpoint for the request.


    EXAMPLE URL:

    https://{host}/ASMSAPI/v9/item/{id}/{itemType}/{relatedItemId}/{relatedItemType}/relation/?relationTypeId={relationTypeId}&isReverse={isReverse}&isSolution={isSolution}&isClosed={isClosed}
    


    Parameters:

    Name Data type Obligatory Description
    Id Number Yes Case ID
    itemType Text Yes Case Type
    relatedItemType Text Yes Type of case to be related
    relatedItemId Number Yes Identifier of the item to be related
    relationTypeId Number Yes Identifier of the type of relationship, for the only relationship that is not mandatory is for the relationship between Case and articles.
    isSolution Bool No For the only relationship that IS mandatory is the one that would be made between cases.
    IsReverse Bool No It is only required for when the case types are:- Incidents - Problem - Change - Release - ServiceCall - Task - Maintenance
    IsClosed Bool Yes Establishes whether the case to be related is in a closed or open state.

    Examples of uri

    Delete case relationships with:

    • Incidents

    • api/v9/item/104081/incidents/104082/incidents/relation/?relationTypeId=140&isReverse=true&isClosed=false
    • CI

    • api/v9/item/104081/incidents/146/ci/relation/?relationTypeId=40&isReverse=null&isSolution=false&isClosed=false

    Body of the petition

    N/A

    Answer

    The service returns a Json with the following information:

    { “result”: true }

    Response Parameters:

    Name Data type Description
    result Boolean Indicates whether the operation was successful

    Error messages

    Code HTTP status Error Message
    400 BadRequest \r\nParameter Name: Id
    400 BadRequest \r\nParameter Name: ItemType
    400 BadRequest \r\nParameter Name: RelatedItemId
    400 BadRequest \r\nParameter Name: RelatedItemtype
    400 BadRequest RequestNeedsSomeArguments
    403 Forbidden DoNotHavePermissionForThisAction
    500 InternalServerError FailureDeleteRelatedItem