Skip to content

Google Auth

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/google-auth/ List Google Auth
GET /api/google-auth/{uuid}/ Retrieve
Other Actions
GET /api/google-auth/{uuid}/authorize/ Authorize
GET /api/google-auth/callback/ Callback endpoint for Google authorization

Core CRUD

List Google Auth

1
2
3
4
http \
  GET \
  https://api.example.com/api/google-auth/ \
  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.google_auth import google_auth_list # (1)

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

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

try {
  const response = await googleAuthList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
field array
has_credentials boolean has_credentials
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)
created string (date-time)
description string
enable_notifications boolean
customer string (uri)
customer_name string
customer_uuid string (uuid)
customer_image string (uri)
customer_abbreviation string
customer_slug string
customer_native_name string
customer_country string
image string (uri)
organization_groups array of objects
organization_groups.uuid string (uuid)
organization_groups.url string (uri)
organization_groups.name string
organization_groups.parent_uuid string (uuid)
organization_groups.parent_name string
organization_groups.parent string (uri)
organization_groups.customers_count integer
offering_count integer
calendar_token string
calendar_refresh_token string
google_auth_url string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/google-auth/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.google_auth import google_auth_retrieve # (1)

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

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

try {
  const response = await googleAuthRetrieve({
  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)
Name Type
field array

200 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
description string
enable_notifications boolean
customer string (uri)
customer_name string
customer_uuid string (uuid)
customer_image string (uri)
customer_abbreviation string
customer_slug string
customer_native_name string
customer_country string
image string (uri)
organization_groups array of objects
organization_groups.uuid string (uuid)
organization_groups.url string (uri)
organization_groups.name string
organization_groups.parent_uuid string (uuid)
organization_groups.parent_name string
organization_groups.parent string (uri)
organization_groups.customers_count integer
offering_count integer
calendar_token string
calendar_refresh_token string
google_auth_url string

Other Actions

Authorize

1
2
3
4
http \
  GET \
  https://api.example.com/api/google-auth/a1b2c3d4-e5f6-7890-abcd-ef1234567890/authorize/ \
  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.google_auth import google_auth_authorize_retrieve # (1)

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

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

try {
  const response = await googleAuthAuthorizeRetrieve({
  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)
Name Type
field array

200 -

Field Type
url string (uri)
uuid string (uuid)
created string (date-time)
description string
enable_notifications boolean
customer string (uri)
customer_name string
customer_uuid string (uuid)
customer_image string (uri)
customer_abbreviation string
customer_slug string
customer_native_name string
customer_country string
image string (uri)
organization_groups array of objects
organization_groups.uuid string (uuid)
organization_groups.url string (uri)
organization_groups.name string
organization_groups.parent_uuid string (uuid)
organization_groups.parent_name string
organization_groups.parent string (uri)
organization_groups.customers_count integer
offering_count integer
calendar_token string
calendar_refresh_token string
google_auth_url string

Callback endpoint for Google authorization

Callback endpoint for Google authorization.

1
2
3
4
5
6
http \
  GET \
  https://api.example.com/api/google-auth/callback/ \
  Authorization:"Token YOUR_API_TOKEN" \
  code=="string-value" \
  state=="OK"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.google_auth import google_auth_callback_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = google_auth_callback_retrieve.sync(
    client=client,
    code="string-value",
    state="OK"
)

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

try {
  const response = await googleAuthCallbackRetrieve({
  auth: "Token YOUR_API_TOKEN",
  query: {
    "code": "string-value",
    "state": "OK"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required Description
code string Authorization code
state string Service provider UUID

200 - No response body