Create a Sharing Group
post
/bcws/webresources/v1.0/sharing
Creates a sharing group with the specified details.
Request
Query Parameters
-
type: string
The type of sharing group: charge, discount, product, or profile.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
extension: object
extension
The extended attributes.
-
groupName(required): string
The name of the sharing group.
-
groupOwnerBalGroupref: object
ResourceRef
-
ownership: array
ownership
The list of owners for the sharing group.
-
parentRef: object
ResourceRef
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ownership
Type:
array
The list of owners for the sharing group.
Show Source
-
Array of:
object Ownership
The list of owners for the sharing group.
Nested Schema : Ownership
Type:
object
The list of owners for the sharing group.
Show Source
-
index: integer
(int32)
The position of the entry in the index. For example, the first item in a list would have an index value of 1.
-
markAsDelete: boolean
Whether to delete the ownership (true) or not (false).
-
offeringRef: object
ResourceRef
-
sharingRef: object
ResourceRef
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
extension: object
extension
The extended attributes.
-
groupName(required): string
The name of the sharing group.
-
groupOwnerBalGroupref: object
ResourceRef
-
ownership: array
ownership
The list of owners for the sharing group.
-
parentRef: object
ResourceRef
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ownership
Type:
array
The list of owners for the sharing group.
Show Source
-
Array of:
object Ownership
The list of owners for the sharing group.
Nested Schema : Ownership
Type:
object
The list of owners for the sharing group.
Show Source
-
index: integer
(int32)
The position of the entry in the index. For example, the first item in a list would have an index value of 1.
-
markAsDelete: boolean
Whether to delete the ownership (true) or not (false).
-
offeringRef: object
ResourceRef
-
sharingRef: object
ResourceRef
Response
201 Response
The sharing group was created successfully.
500 Response
An internal server error occurred.
Examples
This example shows how to create a product sharing group by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X POST http://hostname:port/bcws/webresources/version/sharing?type=product -H 'content-type: application/json' -d @createSharingGroup.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.
- createSharingGroup.json is the JSON file that specifies the sharing group details.
Example of Request Body
This example shows the contents of the createSharingGroup.json file sent as the request body.
{
"groupName": "vpn-sharing-group-with-service",
"ownership": [
{
"sharingRef": {
"id": "0.0.0.2+-product+48642",
"uri": null
},
"offeringRef": {
"id": "0.0.0.2+-purchased_product+154299",
"uri": null
},
"index": -1
}
],
"groupOwnerBalGroupref": {
"id": "0.0.0.2+-balance_group+155451",
"uri": null
},
"parentRef": {
"id": "0.0.0.2+-service-ip+152251",
"uri": null
},
"accountRef": {
"id": "0.0.0.2+-account+151867"
}
}
Example of Response Body
If successful, the response returns code 201 set to true along with the following content in the response body.
{
"extension": null,
"reference": {
"id": "0.0.0.2+-group-sharing-products+593609",
"uri": "http://hostname:port/bc/webresources/v1.0/sharing/group/0.0.0.2+-group-sharing-products+593609"
}
}