Create a Sharing Group

post

/bcws/webresources/v1.0/sharing

Creates a sharing group with the specified details.

Request

Query Parameters
  • The type of sharing group: charge, discount, product, or profile.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ownership
Type: array
The list of owners for the sharing group.
Show Source
Nested Schema : Ownership
Type: object
The list of owners for the sharing group.
Show Source
Request Body - application/xml ()
Root Schema : schema
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ownership
Type: array
The list of owners for the sharing group.
Show Source
Nested Schema : Ownership
Type: object
The list of owners for the sharing group.
Show Source
Back to Top

Response

201 Response

The sharing group was created successfully.

500 Response

An internal server error occurred.
Back to Top

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"
  }
}
Back to Top