Desk¶
-
class
desk.
Desk
(subdomain, api_key, api_secret=None, access_token=None, access_token_secret=None)¶ Create a Desk service.
Variables: - subdomain (str) – The account-specific part of the Desk domain, for instance use mycompany if your Desk domain is mycompany.desk.com, or the full domain if using Desk whitelabel, for instance support.mycompany.com. If the parameter contains a dot, it is treated as a full domain, otherwise as a subdomain.
- api_key (str) – The API key.
- api_secret (str) – API secret.
- access_token (str) – OAuth 1.0a access token.
- access_token_secret (str) – OAuth 1.0a access token secret. requests.
Article¶
-
Desk.
article
(article_id)¶ Return the resource corresponding to a single article.
-
Article.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Article.
delete
()¶ Delete this resource.
-
Article.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Article.
update
(obj)¶
Case¶
-
Desk.
case
(case_id, is_external=False)¶ Return the resource corresponding to a single case.
Variables: - case_id (bool) – The case id
- is_external – Use the external id
Replies¶
-
Case.
replies
()¶ Return the resource corresponding to the case replies
-
Replies.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Replies.
delete
()¶ Delete this resource.
-
Replies.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Replies.
update
(obj)¶
Reply¶
-
Case.
reply
(reply_id)¶ Return the resource corresponding to a single reply
-
Reply.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Reply.
delete
()¶ Delete this resource.
-
Reply.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Reply.
update
(obj)¶
-
Case.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Case.
delete
()¶ Delete this resource.
-
Case.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Case.
history
(per_page=None, page=None)¶ The case history endpoint will display a paginated list of all events/actions that have happened to the case
Upstream documentation: http://dev.desk.com/API/cases#history
-
Case.
message
()¶ Retrieve the original message for this case.
Upstream documentation: http://dev.desk.com/API/cases#message-show
-
Case.
update
(obj)¶
Cases¶
-
Desk.
cases
()¶ Return the resource corresponding to all the cases.
-
Cases.
get
(embed=None, fields=None, per_page=None, page=None)¶ Retrieve a paginated list of all cases.
Upstream documentation: http://dev.desk.com/API/cases#list
-
Cases.
search
(name=None, first_name=None, last_name=None, email=None, phone=None, company=None, twitter=None, labels=None, case_id=None, subject=None, description=None, status=None, priority=None, assigned_group=None, assigned_user=None, channels=None, notes=None, attachments=None, created=None, updated=None, since_created_at=None, max_created_at=None, since_updated_at=None, max_updated_at=None, since_id=None, max_id=None, per_page=None, page=None, embed=None, fields=None, **case_custom_fields)¶ Search cases based on a combination of parameters with pagination.
Upstream documentation: http://dev.desk.com/API/cases#search
Companies¶
-
Desk.
companies
()¶ Return the resource corresponding to all companies.
-
Companies.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Companies.
get
(embed=None, fields=None, per_page=None, page=None)¶ Retrieve a paginated list of all companies
Upstream documentation: http://dev.desk.com/API/companies/#list
-
Companies.
search
(q, per_page=None, page=None, sort_field=None, sort_direction=None)¶ Search companies based on a search parameter with pagination.
Upstream documentation: http://dev.desk.com/API/companies/#search
Cases¶
-
Company.
cases
()¶
-
Cases.
get
(embed=None, fields=None, per_page=None, page=None) Retrieve a paginated list of all cases.
Upstream documentation: http://dev.desk.com/API/cases#list
-
Cases.
search
(name=None, first_name=None, last_name=None, email=None, phone=None, company=None, twitter=None, labels=None, case_id=None, subject=None, description=None, status=None, priority=None, assigned_group=None, assigned_user=None, channels=None, notes=None, attachments=None, created=None, updated=None, since_created_at=None, max_created_at=None, since_updated_at=None, max_updated_at=None, since_id=None, max_id=None, per_page=None, page=None, embed=None, fields=None, **case_custom_fields) Search cases based on a combination of parameters with pagination.
Upstream documentation: http://dev.desk.com/API/cases#search
Customers¶
-
Company.
customers
()¶
-
Customers.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Customers.
get
(embed=None, fields=None, per_page=None, page=None)¶ Retrieve a paginated list of all customers
Upstream documentation: http://dev.desk.com/API/customers#list
-
Customers.
search
(first_name=None, last_name=None, full_name=None, email=None, phone=None, twitter=None, external_id=None, since_created_at=None, max_created_at=None, since_updated_at=None, max_updated_at=None, since_id=None, max_id=None, per_page=None, page=None, **custom_fields)¶ Search customers based on a combination of parameters with pagination.
Upstream documentation: http://dev.desk.com/API/customers#search
-
Company.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Company.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Company.
update
(obj)¶
Cases¶
-
Customer.
cases
()¶
-
Cases.
get
(embed=None, fields=None, per_page=None, page=None) Retrieve a paginated list of all cases.
Upstream documentation: http://dev.desk.com/API/cases#list
-
Cases.
search
(name=None, first_name=None, last_name=None, email=None, phone=None, company=None, twitter=None, labels=None, case_id=None, subject=None, description=None, status=None, priority=None, assigned_group=None, assigned_user=None, channels=None, notes=None, attachments=None, created=None, updated=None, since_created_at=None, max_created_at=None, since_updated_at=None, max_updated_at=None, since_id=None, max_id=None, per_page=None, page=None, embed=None, fields=None, **case_custom_fields) Search cases based on a combination of parameters with pagination.
Upstream documentation: http://dev.desk.com/API/cases#search
-
Customer.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Customer.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Customer.
update
(obj)¶
Customers¶
-
Desk.
customers
()¶ Return the resource corresponding to all customers.
-
Customers.
create
(obj) Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Customers.
get
(embed=None, fields=None, per_page=None, page=None) Retrieve a paginated list of all customers
Upstream documentation: http://dev.desk.com/API/customers#list
-
Customers.
search
(first_name=None, last_name=None, full_name=None, email=None, phone=None, twitter=None, external_id=None, since_created_at=None, max_created_at=None, since_updated_at=None, max_updated_at=None, since_id=None, max_id=None, per_page=None, page=None, **custom_fields) Search customers based on a combination of parameters with pagination.
Upstream documentation: http://dev.desk.com/API/customers#search
Group¶
-
Desk.
group
(group_id)¶ Return the resource corresponding to a single group.
-
Group.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Group.
group_filters
(per_page=None, page=None)¶ Retrieve a paginated list of all filters for the given group.
Upstream documentation: http://dev.desk.com/API/groups#list-filters
-
Group.
users
(per_page=None, page=None)¶ Retrieve a paginated list of all users for the given group.
Upstream documentation: http://dev.desk.com/API/groups#list-users
Groups¶
-
Desk.
groups
()¶ Return the resource corresponding to all groups.
-
Groups.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
Insights¶
-
Desk.
insights
()¶ Return the resource corresponding to insights.
-
Insights.
meta
()¶ Retrieve Insights meta data for the authenticated site.
Upstream documentation: http://dev.desk.com/API/insights/#meta-show
-
Insights.
report
(resolution=None, min_date=None, max_date=None, dimension1_name=None, dimension1_values=None, dimension2_name=None, dimension2_values=None, metrics=None, sort_by=None, sort_order=None, dimension1_per_page=None, dimension1_page=None)¶ Create a report.
Upstream documentation: http://dev.desk.com/API/insights/#report-create
Actions¶
-
Macro.
action
(action_id)¶ Return the resource corresponding to single macro action
-
Actions.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Actions.
delete
()¶ Delete this resource.
-
Actions.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Actions.
update
(obj)¶
Actions¶
-
Macro.
actions
()¶ Return the resource corresponding to macro actions
-
Actions.
create
(obj) Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Actions.
delete
() Delete this resource.
-
Actions.
get
(embed=None, fields=None, per_page=None, page=None) Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Actions.
update
(obj)
-
Macro.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Macro.
delete
()¶ Delete this resource.
-
Macro.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Macro.
update
(obj)¶
Macros¶
-
Desk.
macros
()¶ Return the resource corresponding to all macros.
-
Macros.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Macros.
delete
()¶ Delete this resource.
-
Macros.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
SiteSettings¶
-
Desk.
site_settings
()¶ Return the resource corresponding to the site settings.
-
SiteSettings.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
Translation¶
-
Articles.
translation
(translation_id)¶ Return the resource corresponding to a single translation
-
Translation.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Translation.
delete
()¶ Delete this resource.
-
Translation.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Translation.
update
(obj)¶
Translations¶
-
Articles.
translations
()¶ Return the resource corresponding to the article translations
-
Translations.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Translations.
delete
()¶ Delete this resource.
-
Translations.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Translations.
update
(obj)¶
-
Articles.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Articles.
delete
()¶ Delete this resource.
-
Articles.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Articles.
search
(text=None, topic_ids=None, per_page=None, page=None)¶ Perform a search across all public articles.
Upstream documentation: http://dev.desk.com/API/articles#search
-
Articles.
update
(obj)¶
Translation¶
-
Topic.
translation
(translation_id)¶ Return the resource corresponding to a single translation
-
Translation.
create
(obj) Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Translation.
delete
() Delete this resource.
-
Translation.
get
(embed=None, fields=None) For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Translation.
update
(obj)
Translations¶
-
Topic.
translations
()¶ Return the resource corresponding to the topic translations
-
Translations.
create
(obj) Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Translations.
delete
() Delete this resource.
-
Translations.
get
(embed=None, fields=None, per_page=None, page=None) Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Translations.
update
(obj)
-
Topic.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Topic.
delete
()¶ Delete this resource.
-
Topic.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
Topic.
update
(obj)¶
Topics¶
-
Desk.
topics
()¶ Return the resource corresponding to all topics.
-
Topics.
create
(obj)¶ Create a new resource.
Variables: obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
-
Topics.
delete
()¶ Delete this resource.
-
Topics.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/
User¶
-
Desk.
user
(user_id)¶ Return the resource corresponding to a single user.
-
User.
get
(embed=None, fields=None)¶ For single-object resources, fetch the object’s data. For collections, fetch all of the objects.
Upstream documentation: http://dev.desk.com/API/using-the-api/
-
User.
preference
(preference_id)¶ Show a single user preference
Upstream documentation: http://dev.desk.com/API/users/#preferences-show
-
User.
preferences
(per_page=None, page=None)¶ List all of the user’s preferences.
Upstream documentation: http://dev.desk.com/API/users/#preferences-list
-
User.
update_preference
(preference_id, obj)¶ Update a user preference
Upstream documentation: http://dev.desk.com/API/users/#preferences
Users¶
-
Desk.
users
()¶ Return the resource corresponding to all users.
-
Users.
get
(embed=None, fields=None, per_page=None, page=None)¶ Returns a paginated list of elements
Upstream documentation: http://dev.desk.com/API/using-the-api/