Skip to content

User Agreements

Operations Summary

Method Endpoint Description
GET /api/user-agreements/ List User Agreements
GET /api/user-agreements/{uuid}/ Retrieve
POST /api/user-agreements/ Create
PUT /api/user-agreements/{uuid}/ Update
PATCH /api/user-agreements/{uuid}/ Partial Update
DELETE /api/user-agreements/{uuid}/ Delete

List User Agreements

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-agreements/ \
  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.user_agreements import user_agreements_list # (1)

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

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

try {
  const response = await userAgreementsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
agreement_type string Enum: PP, TOS
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
url string (uri)
uuid string (uuid)
content string
agreement_type string
created string (date-time)
modified string (date-time)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-agreements/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.user_agreements import user_agreements_retrieve # (1)

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

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

try {
  const response = await userAgreementsRetrieve({
  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
url string (uri)
uuid string (uuid)
content string
agreement_type string
created string (date-time)
modified string (date-time)

Create

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/user-agreements/ \
  Authorization:"Token YOUR_API_TOKEN" \
  content="string-value" \
  agreement_type="TOS"
 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.user_agreement_request import UserAgreementRequest # (1)
from waldur_api_client.api.user_agreements import user_agreements_create # (2)

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

body_data = UserAgreementRequest(
    content="string-value",
    agreement_type="TOS"
)
response = user_agreements_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await userAgreementsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "content": "string-value",
    "agreement_type": "TOS"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
content string
agreement_type string

201 -

Field Type
url string (uri)
uuid string (uuid)
content string
agreement_type string
created string (date-time)
modified string (date-time)

Update

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/user-agreements/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  content="string-value" \
  agreement_type="TOS"
 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.user_agreement_request import UserAgreementRequest # (1)
from waldur_api_client.api.user_agreements import user_agreements_update # (2)

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

body_data = UserAgreementRequest(
    content="string-value",
    agreement_type="TOS"
)
response = user_agreements_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

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

200 -

Field Type
url string (uri)
uuid string (uuid)
content string
agreement_type string
created string (date-time)
modified string (date-time)

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/user-agreements/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_user_agreement_request import PatchedUserAgreementRequest # (1)
from waldur_api_client.api.user_agreements import user_agreements_partial_update # (2)

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

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

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

try {
  const response = await userAgreementsPartialUpdate({
  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
content string
agreement_type string

200 -

Field Type
url string (uri)
uuid string (uuid)
content string
agreement_type string
created string (date-time)
modified string (date-time)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/user-agreements/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.user_agreements import user_agreements_destroy # (1)

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

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

try {
  const response = await userAgreementsDestroy({
  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