API

CdnSpace

A CDN storage space and its objects.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/cdn_spaces create Success
POST /api/v1/cdn_spaces/{id}/archive create Success
POST /api/v1/cdn_spaces/{id}/provision create Success
GET /api/v1/cdn_spaces/{id} load Success
GET /api/v1/organizations/{org_slug}/cdn_spaces load Success
PATCH /api/v1/cdn_spaces/{id} patch Success
DELETE /api/v1/cdn_spaces/{id} remove Success
PUT /api/v1/cdn_spaces/{id} update Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

cdn_space, err := client.CdnSpace(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(cdn_space)
created, err := client.CdnSpace(nil).Create(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.CdnSpace(nil).Update(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.CdnSpace(nil).Patch(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.CdnSpace(nil).Remove(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local cdn_space, err = client:CdnSpace():load({ id = "example_id" })
local created, err = client:CdnSpace():create({ organization_id = "example" })
local updated, err = client:CdnSpace():update({ id = "example_id" })
local patched, err = client:CdnSpace():patch({ id = "example_id" })
local removed, err = client:CdnSpace():remove({ id = "example_id" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$cdn_space = $client->CdnSpace()->load(["id" => "example_id"]);
$created = $client->CdnSpace()->create(["organization_id" => "example"]);
$updated = $client->CdnSpace()->update(["id" => "example_id"]);
$patched = $client->CdnSpace()->patch(["id" => "example_id"]);
$client->CdnSpace()->remove(["id" => "example_id"]);

Python

Construct client as shown in the Python setup, then call the operations:

cdn_space = client.CdnSpace().load({"id": "example_id"})
created = client.CdnSpace().create({ "organization_id": "example" })
updated = client.CdnSpace().update({"id": "example_id"})
patched = client.CdnSpace().patch({"id": "example_id"})
client.CdnSpace().remove({"id": "example_id"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

cdn_space = client.CdnSpace.load({ "id" => "example_id" })
created = client.CdnSpace.create({ "organization_id" => "example" })
updated = client.CdnSpace.update({ "id" => "example_id" })
patched = client.CdnSpace.patch({ "id" => "example_id" })
client.CdnSpace.remove({ "id" => "example_id" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const cdn_space = await client.CdnSpace().load({ id: "example_id" })
const created = await client.CdnSpace().create({ organization_id: "example" })
const updated = await client.CdnSpace().update({ id: "example_id" })
const patched = await client.CdnSpace().patch({ id: "example_id" })
await client.CdnSpace().remove({ id: "example_id" })

Fields

Field Type Required Description
id string No Id

create

POST /api/v1/organizations/{org_slug}/cdn_spaces

Operation ID: post_api_v1_organizations_org_slug_cdn_spaces.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/cdn_spaces/{id}/archive

Operation ID: archive_api_v1_cdn_space.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/cdn_spaces/{id}/provision

Operation ID: provision_api_v1_cdn_space.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/cdn_spaces/{id}

Operation ID: api_v1_cdn_space.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/organizations/{org_slug}/cdn_spaces

Operation ID: api_v1_cdn_spaces.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/cdn_spaces/{id}

Operation ID: patch_api_v1_cdn_spaces_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/cdn_spaces/{id}

Operation ID: delete_api_v1_cdn_spaces_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/cdn_spaces/{id}

Operation ID: put_api_v1_cdn_spaces_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway