Add or Delete Services for Members
/bcws/webresources/v1.0/sharing/group/{id}/members
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
-
id(required): string
The ID of the sharing group.
-
type: string
The type of sharing group to which the member belongs: charge, discount or product.
- application/xml
- application/json
object
-
accountRef: object
ResourceRef
-
extension: object
extension
The extended attributes.
-
members: array
members
The list of members in the sharing group.
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
object
array
-
Array of:
object Members
The list of members in the sharing group.
object
-
index: integer
(int32)
The position of the service in the index. For example, the first item in a list would have an index value of 1.
-
markAsDelete: boolean
Whether the service referenced is being deleted (true) or added (false) to the sharing group.
-
serviceRef: object
ResourceRef
object
-
accountRef: object
ResourceRef
-
extension: object
extension
The extended attributes.
-
members: array
members
The list of members in the sharing group.
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
object
array
-
Array of:
object Members
The list of members in the sharing group.
object
-
index: integer
(int32)
The position of the service in the index. For example, the first item in a list would have an index value of 1.
-
markAsDelete: boolean
Whether the service referenced is being deleted (true) or added (false) to the sharing group.
-
serviceRef: object
ResourceRef
Response
200 Response
500 Response
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.