Add or Delete Services for Members

put

/bcws/webresources/v1.0/sharing/group/{id}/members

Updates the shared service members for a sharing group. The following operations are available:

Add member services: Add member services by including the following information:

  • accountRef: Set this to the member account that owns the service.
  • members.index: Set this to -1, indicating that the next available unassigned index should be assigned.
  • members.markAsDelete: Set this to false.
  • members.serviceRef: Set this to the ID of the service to add. If omitted, the non-service resources will be added to the sharing group.

Delete member services: Delete member services by including the following information:

  • members.index: Set this to the index of the member (service/account) to delete.
  • members.markAsDelete: Set this to true.

You can add as many operations to the request as needed.

Request

Path Parameters
Query Parameters
  • The type of sharing group to which the member belongs: charge, discount or product.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: array
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : members
Type: array
The list of members in the sharing group.
Show Source
Nested Schema : Members
Type: object
The list of members in the sharing group.
Show Source
Request Body - application/xml ()
Root Schema : schema
Type: array
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : members
Type: array
The list of members in the sharing group.
Show Source
Nested Schema : Members
Type: object
The list of members in the sharing group.
Show Source
Back to Top

Response

200 Response

The shared services were updated successfully.

500 Response

An internal server error occurred.
Back to Top

Examples

This example shows how to delete the group member services with indexes 7 and 8, and add IP services for the first account, along with non-service charges and IP-service charges for the second account to the sharing group, by submitting a PUT request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X PUT http://hostname:port/bcws/webresources/version/sharing/group/0.0.0.1+-group-sharing-charges+456789/members?type=charge -H 'content-type: application/json' -d@updateServices.json

where:

  • hostname is the URL for the Billing Care REST server.
  • port is the port for the Billing Care REST server.
  • version is the version of the API you're using, such as v1.0.
  • updateServices.json is the JSON file that specifies the update to make.

Example of Request Body

This example shows the contents of the updateServices.json file sent as the request body.

[
    {
        "members":[{"index":7, "markAsDelete":true},{"index":8, "markAsDelete":true}]
    },
    {
        "accountRef":{"id":"0.0.0.1+-account+876543", "uri":null},
        "members":[{"index":-1, "markAsDelete":false, "serviceRef":{"id":"0.0.0.1+-service-ip+234567", "uri":null}},
                   {"index":-1, "markAsDelete":false}]
    },
    {
        "accountRef":{"id":"0.0.0.1+-account+765432", "uri":null},
        "members":[{"index":-1, "markAsDelete":false, "serviceRef":{"id":"0.0.0.1+-service-ip+345678", "uri":null}}]
    }
]

Example of Response Body

If successful, the response returns code 200 with no response body.

Back to Top