Main Content

remove

Remove resource from OSLC service provider

Since R2021a

    Description

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

    example

    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 client myClient as described in Create 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 an oslc.Client object.

    Output Arguments

    collapse all

    Removal success status, returned as a matlab.net.http.StatusCode object.

    Version History

    Introduced in R2021a