Main Content

remove

Remove resource from OSLC service provider

    Description

    example

    status= remove(resource,myClient)removes the resourceresourcefrom the Open Services for Lifecycle Collaboration (OSLC) service provider associated withmyClientand returns the remove success status.

    Examples

    collapse all

    This example shows how to submit a query request for requirement resources with a configured OSLC client and remove a requirement resource.

    After you have created and configured the OSLC clientmyClientas described inCreate and Configure an OSLC Client for the Requirements Management Domain, create a query capability for the requirement resource type.

    myQueryCapability = getQueryService(myClient,'Requirement');

    Submit a query request to the service provider for the available requirement resources.

    reqs = queryRequirements(myQueryCapability)
    reqs = 1×30 Requirement array with properties: ResourceUrl Dirty IsFetched Title Identifier

    Retrieve the full resource data from the service provider for a requirement resource. Inspect the requirement resource.

    myReq = reqs(1); status = fetch(myReq,myClient)
    status = StatusCode enumeration OK
    myReq
    myReq = Requirement with properties: ResourceUrl: 'https://localhost:9443/rm/resources/_72lxMWJREeup0...' Dirty: 0 IsFetched: 1 Title: 'My New Requirement' Identifier: '1806'

    Remove the requirement from the service provider.

    status = remove(myReq,myClient)
    status = StatusCode enumeration OK

    Input Arguments

    collapse all

    OSLC client, specified as anoslc.Clientobject.

    Output Arguments

    collapse all

    Removal success status, returned as amatlab.net.http.StatusCodeobject.

    Version History

    Introduced in R2021a