Update Shared Capacity Groups

Description

Updates a Shared Capacity Group.

Request

HTTP Method: PATCH

URI Path: /v3/shared_capacity_groups/

URI Query Parameters:

Name

Type

Is Required?

Description

include

string

Optional

Inclusion

Request Body Object Attributes:

Name

Type

Nullable

Is Required?

Description

name

string

False

Yes

Unique name of Shared Capacity Group.

shared_channels_count

integer

False

Yes

Unassigned channels quantity to assign to the Shared Capacity Group from the Capacity Pool.

metered_channels_count

integer

False

Yes

Metered channels quantity to assign to the Shared Capacity Group.

Request Body Object Relationships:

Titile

Type

Description

dids

To Many | Linkage for included dids.

capacity_pool

To one | Linkage for included capacity_pool.

Examples

http

PATCH /v3/shared_capacity_groups/71afa2e2-8d46-4ea3-988d-aa112ed98b5e HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

{
  "data": {
    "id": "71afa2e2-8d46-4ea3-988d-aa112ed98b5e",
    "type": "shared_capacity_groups",
    "attributes": {
      "name": "Renamed group"
    }
  }
}

curl

curl -i -X PATCH https://api.didww.com/v3/shared_capacity_groups/71afa2e2-8d46-4ea3-988d-aa112ed98b5e -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"name": "Renamed group"}, "id": "71afa2e2-8d46-4ea3-988d-aa112ed98b5e", "type": "shared_capacity_groups"}}'

response

HTTP/1.1 201 OK
Content-Type: application/vnd.api+json

{
    "data": {
        "id": "71afa2e2-8d46-4ea3-988d-aa112ed98b5e",
        "type": "shared_capacity_groups",
        "attributes": {
            "name": "Renamed group",
            "shared_channels_count": 3,
            "created_at": "2018-07-06T16:11:32.981Z",
            "metered_channels_count": 5
        },
        "relationships": {
            "capacity_pool": {
                "links": {
                    "self": "https://api.didww.com/v3/shared_capacity_groups/71afa2e2-8d46-4ea3-988d-aa112ed98b5e/relationships/capacity_pool",
                    "related": "https://api.didww.com/v3/shared_capacity_groups/71afa2e2-8d46-4ea3-988d-aa112ed98b5e/capacity_pool"
                }
            },
            "dids": {
                "links": {
                    "self": "https://api.didww.com/v3/shared_capacity_groups/71afa2e2-8d46-4ea3-988d-aa112ed98b5e/relationships/dids",
                    "related": "https://api.didww.com/v3/shared_capacity_groups/71afa2e2-8d46-4ea3-988d-aa112ed98b5e/dids"
                }
            }
        }
    },
  "meta": {
    "api_version": "2017-09-18"
  }
}

Other Responses

Code

Success

Description

422

No

Unprocessable Entity

401

No

Unauthorized