Skip to content

Access Subnets

Operations Summary

Method Endpoint Description
GET /api/access-subnets/ List access subnets
GET /api/access-subnets/{uuid}/ Retrieve access subnet
POST /api/access-subnets/ Create an access subnet
PUT /api/access-subnets/{uuid}/ Update an access subnet
PATCH /api/access-subnets/{uuid}/ Partially update an access subnet
DELETE /api/access-subnets/{uuid}/ Delete an access subnet

List access subnets

Retrieve a list of access subnets. Staff and support users can see all subnets, while other users can only see subnets associated with customers they have a role in.

1
2
3
4
http \
  GET \
  https://api.example.com/api/access-subnets/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.access_subnets import access_subnets_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = access_subnets_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: access_subnets_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { accessSubnetsList } from 'waldur-js-client';

try {
  const response = await accessSubnetsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
customer string
customer_uuid string (uuid)
description string
inet string
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
uuid string (uuid)
inet string
description string
customer string (uri)

Retrieve access subnet

Fetch the details of a specific access subnet by its UUID.

1
2
3
4
http \
  GET \
  https://api.example.com/api/access-subnets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.access_subnets import access_subnets_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = access_subnets_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: access_subnets_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { accessSubnetsRetrieve } from 'waldur-js-client';

try {
  const response = await accessSubnetsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type
uuid string (uuid)
inet string
description string
customer string (uri)

Create an access subnet

Create a new access subnet for a customer.

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/access-subnets/ \
  Authorization:"Token YOUR_API_TOKEN" \
  inet="string-value" \
  customer="https://api.example.com/api/customer/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.access_subnet_request import AccessSubnetRequest # (1)
from waldur_api_client.api.access_subnets import access_subnets_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = AccessSubnetRequest(
    inet="string-value",
    customer="https://api.example.com/api/customer/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = access_subnets_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: AccessSubnetRequest
  2. API Source: access_subnets_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import { accessSubnetsCreate } from 'waldur-js-client';

try {
  const response = await accessSubnetsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "inet": "string-value",
    "customer": "https://api.example.com/api/customer/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
inet string
description string
customer string (uri)

201 -

Field Type
uuid string (uuid)
inet string
description string
customer string (uri)

Update an access subnet

Update an existing access subnet.

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/access-subnets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  inet="string-value" \
  customer="https://api.example.com/api/customer/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.access_subnet_request import AccessSubnetRequest # (1)
from waldur_api_client.api.access_subnets import access_subnets_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = AccessSubnetRequest(
    inet="string-value",
    customer="https://api.example.com/api/customer/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = access_subnets_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: AccessSubnetRequest
  2. API Source: access_subnets_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import { accessSubnetsUpdate } from 'waldur-js-client';

try {
  const response = await accessSubnetsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "inet": "string-value",
    "customer": "https://api.example.com/api/customer/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
inet string
description string
customer string (uri)

200 -

Field Type
uuid string (uuid)
inet string
description string
customer string (uri)

Partially update an access subnet

Partially update an existing access subnet.

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/access-subnets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_access_subnet_request import PatchedAccessSubnetRequest # (1)
from waldur_api_client.api.access_subnets import access_subnets_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedAccessSubnetRequest()
response = access_subnets_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedAccessSubnetRequest
  2. API Source: access_subnets_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { accessSubnetsPartialUpdate } from 'waldur-js-client';

try {
  const response = await accessSubnetsPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
inet string
description string

200 -

Field Type
uuid string (uuid)
inet string
description string
customer string (uri)

Delete an access subnet

Delete an existing access subnet.

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/access-subnets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.access_subnets import access_subnets_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = access_subnets_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: access_subnets_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { accessSubnetsDestroy } from 'waldur-js-client';

try {
  const response = await accessSubnetsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body