All URIs are relative to https://localhost:8080/api/v9
Method | HTTP request | Description |
---|---|---|
delete_organization_group | DELETE /organizations/{organization_id}/groups/{group_id} | Deletes group |
delete_organization_users_leave | DELETE /organizations/{organization_id}/users/leave | Leaves organization |
get_organization | GET /organizations/{organization_id} | Organization data |
get_organization_groups | GET /organizations/{organization_id}/groups | List of groups in organization with user and workspace assignments |
get_organization_owner | GET /organizations/{organization_id}/owner | Get owner of the organization |
get_organization_segmentation | GET /organizations/{organization_id}/segmentation | Organization segmentation data |
get_organization_users | GET /organizations/{organization_id}/users | List of users in organization |
get_organization_users_detailed | GET /organizations/{organization_id}/users/detailed | List of users in organization with details |
get_organization_workspaces_groups | GET /organizations/{organization_id}/workspaces/{workspace_id}/groups | List of groups in a workspace within an organization with user assignments. |
get_organization_workspaces_statistics | GET /organizations/{organization_id}/workspaces/statistics | Statistics for all workspaces in the organization |
get_organizations_payments_records | GET /organizations/{organization_id}/payment_records | OrganizationsPaymentRecords |
get_organizations_plans | GET /organizations/{organization_id}/plans | OrganizationsPlans |
get_organizations_plans_0 | GET /organizations/{organization_id}/plans/{plan_id} | OrganizationsPlan |
patch_organization_group | PATCH /organizations/{organization_id}/groups/{group_id} | Patch group |
patch_organization_users | PATCH /organizations/{organization_id}/users | Apply changes in bulk to users in an organization |
post_organization | POST /organizations | Creates a new organization |
post_organization_accept_invitation | POST /organizations/invitations/{invitation_code}/accept | Accepts invitation |
post_organization_group | POST /organizations/{organization_id}/groups | Create group |
post_organization_invitation | POST /organizations/{organization_id}/invitations | Creates a new invitation for the user |
post_organization_workspaces | POST /organizations/{organization_id}/workspaces | Create a new workspace. |
put_organization | PUT /organizations/{organization_id} | Updates an existing organization |
put_organization_group | PUT /organizations/{organization_id}/groups/{group_id} | Edit group |
put_organization_segmentation | PUT /organizations/{organization_id}/segmentation | Organization segmentation data |
put_organization_users | PUT /organizations/{organization_id}/users/{organization_user_id} | Changes a single organization-user |
put_organization_workspaces_assignments | PUT /organizations/{organization_id}/workspaces/{workspace_id}/assignments | Change assignments of users within a workspace. |
str delete_organization_group(organization_id, group_id)
Deletes group
Deletes a group from the specified organization
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
group_id = 56 # int | Numeric ID of the group.
try:
# Deletes group
api_response = api_instance.delete_organization_group(organization_id, group_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->delete_organization_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
group_id | int | Numeric ID of the group. |
str
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_organization_users_leave(organization_id)
Leaves organization
Leaves organization, effectively delete user account in org and delete organization if it is last user
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
try:
# Leaves organization
api_response = api_instance.delete_organization_users_leave(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->delete_organization_users_leave: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization |
str
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsMeOrganization get_organization(organization_id)
Organization data
Returns organization name and current pricing plan
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
try:
# Organization data
api_response = api_instance.get_organization(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[GroupOrganizationGroupResponse] get_organization_groups(organization_id, name=name, workspace=workspace)
List of groups in organization with user and workspace assignments
Returns list of groups in organization based on set of url parameters. List is sorted by name.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
name = 'name_example' # str | Returns records where name contains this string (optional)
workspace = 'workspace_example' # str | ID of workspace. Returns groups assigned to this workspace (optional)
try:
# List of groups in organization with user and workspace assignments
api_response = api_instance.get_organization_groups(organization_id, name=name, workspace=workspace)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_groups: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
name | str | Returns records where name contains this string | [optional] |
workspace | str | ID of workspace. Returns groups assigned to this workspace | [optional] |
list[GroupOrganizationGroupResponse]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsOrganizationOwner get_organization_owner(organization_id)
Get owner of the organization
Returns organization owner data.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
try:
# Get owner of the organization
api_response = api_instance.get_organization_owner(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_owner: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsOrganizationSegmentation get_organization_segmentation(organization_id)
Organization segmentation data
Returns organization segmentation information
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
try:
# Organization segmentation data
api_response = api_instance.get_organization_segmentation(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_segmentation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization |
ModelsOrganizationSegmentation
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ModelsOrgUser] get_organization_users(organization_id, filter=filter, active_status=active_status, only_admins=only_admins, groups=groups, workspaces=workspaces, page=page, per_page=per_page, sort_dir=sort_dir)
List of users in organization
Returns list of users in organization based on set of url parameters: Result is paginated. Pagination params are returned in headers
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
filter = 'filter_example' # str | Returns records where name or email contains this string (optional)
active_status = 'active_status_example' # str | List of `active` `inactive` `invited` comma separated(if not present, all statuses) (optional)
only_admins = 'only_admins_example' # str | If true returns admins only (optional)
groups = 'groups_example' # str | Comma-separated list of groups ids, returns users belonging to these groups only (optional)
workspaces = 'workspaces_example' # str | Comma-separated list of workspaces ids, returns users belonging to this workspaces only (optional)
page = 56 # int | Page number, default 1 (optional)
per_page = 56 # int | Number of items per page, default 50 (optional)
sort_dir = 'sort_dir_example' # str | Values 'asc' or 'desc', result is sorted on 'names' column, default 'asc' (optional)
try:
# List of users in organization
api_response = api_instance.get_organization_users(organization_id, filter=filter, active_status=active_status, only_admins=only_admins, groups=groups, workspaces=workspaces, page=page, per_page=per_page, sort_dir=sort_dir)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
filter | str | Returns records where name or email contains this string | [optional] |
active_status | str | List of `active` `inactive` `invited` comma separated(if not present, all statuses) | [optional] |
only_admins | str | If true returns admins only | [optional] |
groups | str | Comma-separated list of groups ids, returns users belonging to these groups only | [optional] |
workspaces | str | Comma-separated list of workspaces ids, returns users belonging to this workspaces only | [optional] |
page | int | Page number, default 1 | [optional] |
per_page | int | Number of items per page, default 50 | [optional] |
sort_dir | str | Values 'asc' or 'desc', result is sorted on 'names' column, default 'asc' | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ModelsOrgUserDetailed] get_organization_users_detailed(organization_id, filter=filter, active_status=active_status, only_admins=only_admins, groups=groups, workspaces=workspaces, page=page, per_page=per_page, sort_dir=sort_dir)
List of users in organization with details
Returns list of users in organization based on set of url parameters: Result is paginated. Pagination params are returned in headers
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
filter = 'filter_example' # str | Returns records where name or email contains this string (optional)
active_status = 'active_status_example' # str | List of `active` `inactive` `invited` comma separated(if not present, all statuses) (optional)
only_admins = 'only_admins_example' # str | If true returns admins only (optional)
groups = 'groups_example' # str | Comma-separated list of groups ids, returns users belonging to these groups only (optional)
workspaces = 'workspaces_example' # str | Comma-separated list of workspaces ids, returns users belonging to this workspaces only (optional)
page = 56 # int | Page number, default 1 (optional)
per_page = 56 # int | Number of items per page, default 50 (optional)
sort_dir = 'sort_dir_example' # str | Values 'asc' or 'desc', result is sorted on 'names' column, default 'asc' (optional)
try:
# List of users in organization with details
api_response = api_instance.get_organization_users_detailed(organization_id, filter=filter, active_status=active_status, only_admins=only_admins, groups=groups, workspaces=workspaces, page=page, per_page=per_page, sort_dir=sort_dir)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_users_detailed: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
filter | str | Returns records where name or email contains this string | [optional] |
active_status | str | List of `active` `inactive` `invited` comma separated(if not present, all statuses) | [optional] |
only_admins | str | If true returns admins only | [optional] |
groups | str | Comma-separated list of groups ids, returns users belonging to these groups only | [optional] |
workspaces | str | Comma-separated list of workspaces ids, returns users belonging to this workspaces only | [optional] |
page | int | Page number, default 1 | [optional] |
per_page | int | Number of items per page, default 50 | [optional] |
sort_dir | str | Values 'asc' or 'desc', result is sorted on 'names' column, default 'asc' | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[GroupOrganizationGroupResponse] get_organization_workspaces_groups(organization_id, workspace_id)
List of groups in a workspace within an organization with user assignments.
Returns list of groups in a workspace based on set of url parameters. List is sorted by name.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
workspace_id = 56 # int | Numeric ID of the workspace within the organization
try:
# List of groups in a workspace within an organization with user assignments.
api_response = api_instance.get_organization_workspaces_groups(organization_id, workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_workspaces_groups: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
workspace_id | int | Numeric ID of the workspace within the organization |
list[GroupOrganizationGroupResponse]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
dict(str, ModelsStatistics) get_organization_workspaces_statistics()
Statistics for all workspaces in the organization
Returns map indexed by workspace ID where each map element contains workspace admins list, members count and groups count.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
try:
# Statistics for all workspaces in the organization
api_response = api_instance.get_organization_workspaces_statistics()
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organization_workspaces_statistics: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ModelsUnifiedSubscriptionInvoiceList] get_organizations_payments_records(organization_id, is_unified=is_unified, next=next, prev=prev)
OrganizationsPaymentRecords
Returns paid invoices
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
is_unified = true # bool | If 'true', returns unified invoices (optional)
next = 'next_example' # str | Next cursor for unified subsriptions. Cannot be used at the same time `prev` (optional)
prev = 'prev_example' # str | Previous cursor for unified subsriptions. Cannot be used at the same time with `next` (optional)
try:
# OrganizationsPaymentRecords
api_response = api_instance.get_organizations_payments_records(organization_id, is_unified=is_unified, next=next, prev=prev)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organizations_payments_records: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
is_unified | bool | If 'true', returns unified invoices | [optional] |
next | str | Next cursor for unified subsriptions. Cannot be used at the same time `prev` | [optional] |
prev | str | Previous cursor for unified subsriptions. Cannot be used at the same time with `next` | [optional] |
list[ModelsUnifiedSubscriptionInvoiceList]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingPricingStruct get_organizations_plans(organization_id)
OrganizationsPlans
Returns pricing plans for an organization
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
try:
# OrganizationsPlans
api_response = api_instance.get_organizations_plans(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organizations_plans: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BillingPricingStruct get_organizations_plans_0(organization_id, plan_id)
OrganizationsPlan
Returns pricing plan for an organization identified by plan_id
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
plan_id = 56 # int | Numeric ID of the plan
try:
# OrganizationsPlan
api_response = api_instance.get_organizations_plans_0(organization_id, plan_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->get_organizations_plans_0: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
plan_id | int | Numeric ID of the plan |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupsPatchOutput patch_organization_group(organization_id, group_id, patch_group_request)
Patch group
Patches a group in the specified organization. Patches are applied individually.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
group_id = 56 # int | Numeric ID of the group.
patch_group_request = [toggl.GroupsPatchInput()] # list[GroupsPatchInput] | Array of patch operations.
try:
# Patch group
api_response = api_instance.patch_organization_group(organization_id, group_id, patch_group_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->patch_organization_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
group_id | int | Numeric ID of the group. | |
patch_group_request | list[GroupsPatchInput] | Array of patch operations. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str patch_organization_users(organization_id, params)
Apply changes in bulk to users in an organization
Apply changes in bulk to users in an organization (currently deletion only).
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
params = toggl.UserPatchParams() # UserPatchParams | Input data of the users to be patched.
try:
# Apply changes in bulk to users in an organization
api_response = api_instance.patch_organization_users(organization_id, params)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->patch_organization_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
params | UserPatchParams | Input data of the users to be patched. |
str
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationPostOrganizationReply post_organization(post_organizations_request)
Creates a new organization
Creates a new organization with a single workspace and assigns current user as the organization owner
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
post_organizations_request = toggl.ModelsPostPayload() # ModelsPostPayload | Input data for organization.
try:
# Creates a new organization
api_response = api_instance.post_organization(post_organizations_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->post_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
post_organizations_request | ModelsPostPayload | Input data for organization. |
OrganizationPostOrganizationReply
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str post_organization_accept_invitation(inviutation_code)
Accepts invitation
User connected with invitation is marked as joined, email is sent to the inviter.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = toggl.OrganizationsApi()
inviutation_code = 'inviutation_code_example' # str | Invitation code
try:
# Accepts invitation
api_response = api_instance.post_organization_accept_invitation(inviutation_code)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->post_organization_accept_invitation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
inviutation_code | str | Invitation code |
str
No authorization required
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupOrganizationGroupResponse post_organization_group(organization_id, post_group_request)
Create group
Creates a group in the specified organization
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
post_group_request = toggl.GroupPayload() # GroupPayload | Input data for group creation.
try:
# Create group
api_response = api_instance.post_organization_group(organization_id, post_group_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->post_organization_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
post_group_request | GroupPayload | Input data for group creation. |
GroupOrganizationGroupResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvitationResult post_organization_invitation(organization_id, post_invitation_request)
Creates a new invitation for the user
Creates a new invitation for the user.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
post_invitation_request = toggl.InvitationPost() # InvitationPost | Input data for invitation creation
try:
# Creates a new invitation for the user
api_response = api_instance.post_organization_invitation(organization_id, post_invitation_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->post_organization_invitation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
post_invitation_request | InvitationPost | Input data for invitation creation |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceWorkspace post_organization_workspaces(organization_id, post)
Create a new workspace.
Create a workspace within an existing organization.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
post = toggl.WorkspacePayload() # WorkspacePayload | Parameters of the new workspace
try:
# Create a new workspace.
api_response = api_instance.post_organization_workspaces(organization_id, post)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->post_organization_workspaces: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
post | WorkspacePayload | Parameters of the new workspace |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str put_organization(organization_id, put_organizations_request)
Updates an existing organization
Updates an existing organization
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
put_organizations_request = toggl.ModelsPutPayload() # ModelsPutPayload | Input data for organization.
try:
# Updates an existing organization
api_response = api_instance.put_organization(organization_id, put_organizations_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->put_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
put_organizations_request | ModelsPutPayload | Input data for organization. |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GroupOrganizationGroupResponse put_organization_group(organization_id, put_group_request)
Edit group
Edits a group in the specified organization
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
put_group_request = toggl.GroupPayload() # GroupPayload | Input data for group modification.
try:
# Edit group
api_response = api_instance.put_organization_group(organization_id, put_group_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->put_organization_group: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
put_group_request | GroupPayload | Input data for group modification. |
GroupOrganizationGroupResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsOrganizationSegmentation put_organization_segmentation(organization_id)
Organization segmentation data
Save organization segmentation information
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
try:
# Organization segmentation data
api_response = api_instance.put_organization_segmentation(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->put_organization_segmentation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization |
ModelsOrganizationSegmentation
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str put_organization_users(organization_id, params)
Changes a single organization-user
Changes a single organization-user. Can affect the following values:
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
params = toggl.UserPayload() # UserPayload | Input data of the organization user to be changed.
try:
# Changes a single organization-user
api_response = api_instance.put_organization_users(organization_id, params)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->put_organization_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
params | UserPayload | Input data of the organization user to be changed. |
str
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str put_organization_workspaces_assignments(organization_id, workspace_id, post)
Change assignments of users within a workspace.
Assign or remove users to/from a workspace or to/from groups belonging to said workspace.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.OrganizationsApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
workspace_id = 56 # int | Numeric ID of the workspace within the organization
post = toggl.UserAssignmentsPayload() # UserAssignmentsPayload | Describes the change in assignment
try:
# Change assignments of users within a workspace.
api_response = api_instance.put_organization_workspaces_assignments(organization_id, workspace_id, post)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->put_organization_workspaces_assignments: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
workspace_id | int | Numeric ID of the workspace within the organization | |
post | UserAssignmentsPayload | Describes the change in assignment |
str
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]