These are the most common methods for working with groups.
groups_essentials_api = client.groups_essentialsGroupsEssentialsApi
This method returns every available group.
def get_groups(self,
direction=None,
filter=None,
page=None,
per_page=None,
query=None,
sort=None)This endpoint requires oauth2_authorization_code OR oauth2_client_credentials
| Parameter | Type | Tags | Description |
|---|---|---|---|
direction |
Direction |
Query, Optional | The sort direction of the results. Option descriptions: * asc - Sort the results in ascending order.* desc - Sort the results in descending order. |
filter |
Filter1 |
Query, Optional | The attribute by which to filter the results. Option descriptions: * featured - Return featured groups. |
page |
float |
Query, Optional | The page number of the results to show. |
per_page |
float |
Query, Optional | The number of items to show on each page of results, up to a maximum of 100. |
query |
str |
Query, Optional | The search query to use to filter the results. |
sort |
Sort13 |
Query, Optional | The way to sort the results. Option descriptions: * alphabetical - Sort the results alphabetically.* date - Sort the results by creation date.* followers - Sort the results by number of followers.* relevant - Sort the results by relevance. This option is available for search queries only.* videos - Sort the results by number of videos. |
ai, create, delete, edit, email, interact, private, promo_codes, public, purchase, purchased, scim, stats, upload, video_files
ai, create, delete, edit, email, interact, private, promo_codes, public, purchase, purchased, scim, stats, upload, video_files
200: The groups were returned.
This method returns an ApiResponse instance. The body property of this instance returns the response data which is of type List[Group].
direction = Direction.ASC
page = 1
per_page = 10
query = 'Stop motion'
result = groups_essentials_api.get_groups(
direction=direction,
page=page,
per_page=per_page,
query=query
)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.errors)| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 404 | Error code 5451: This resource is restricted in your region. | ErrorException |
This method creates a new group.
def create_group(self,
body)This endpoint requires oauth2_authorization_code OR oauth2_client_credentials
| Parameter | Type | Tags | Description |
|---|---|---|---|
body |
GroupsRequest |
Body, Required | - |
create
create
200: The group was created.
This method returns an ApiResponse instance. The body property of this instance returns the response data which is of type Group.
body = GroupsRequest(
name='Vimeo Weekend Challenge',
description='Want to participate in our weekly challenges? Join the group to receive messages and new challenges!'
)
result = groups_essentials_api.create_group(body)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.errors)| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 400 | A parameter is invalid. | LegacyErrorException |
| 403 | The authenticated user can't create groups. | LegacyErrorException |
| 404 | Error code 5451: This resource is restricted in your region. | ErrorException |
This method deletes the specified group. The authenticated user must be the owner of the group.
def delete_group(self,
group_id)This endpoint requires oauth2_authorization_code OR oauth2_client_credentials
| Parameter | Type | Tags | Description |
|---|---|---|---|
group_id |
float |
Template, Required | The ID of the group. |
delete
delete
204: The group was deleted.
This method returns an ApiResponse instance.
group_id = 1108
result = groups_essentials_api.delete_group(group_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.errors)| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 403 | The authenticated user can't delete the group. | LegacyErrorException |
| 404 | Error code 5451: This resource is restricted in your region. | ErrorException |
This method returns the specified group.
def get_group(self,
group_id)This endpoint requires oauth2_authorization_code OR oauth2_client_credentials
| Parameter | Type | Tags | Description |
|---|---|---|---|
group_id |
float |
Template, Required | The ID of the group. |
ai, create, delete, edit, email, interact, private, promo_codes, public, purchase, purchased, scim, stats, upload, video_files
ai, create, delete, edit, email, interact, private, promo_codes, public, purchase, purchased, scim, stats, upload, video_files
200: The group was returned.
This method returns an ApiResponse instance. The body property of this instance returns the response data which is of type Group.
group_id = 1108
result = groups_essentials_api.get_group(group_id)
if result.is_success():
print(result.body)
elif result.is_error():
print(result.errors)| HTTP Status Code | Error Description | Exception Class |
|---|---|---|
| 404 | Error code 5451: This resource is restricted in your region. | ErrorException |