CRM Query

Requires Pro Edition and CRM plugin >= 3.3.0.


All operations on the CrmQuery resource are provided by it’s manager. To get access to it you have to call redmine.crm_query where redmine is a configured redmine object. See the Configuration about how to configure redmine object.

Create methods

Not supported by CRM plugin

Read methods


New in version 2.1.0.

redminelib.managers.ResourceManager.get(resource_id, **params)

Returns single CrmQuery resource from the CRM plugin by it’s id.

  • resource_id (int) – (required). Id of the crm query.
  • resource (string) – (required). Get crm query for the resource. One of:
    • contact
    • deal

Resource object

>>> query = redmine.crm_query.get(1, resource='contact')
>>> query
<redminelib.resources.CrmQuery #1 "By companies">


Not supported by CRM plugin



Returns crm query resources that match the given lookup parameters.

  • resource (string) – (required). Get crm queries for the resource. One of:
    • contact
    • deal
  • limit (int) – (optional). How much resources to return.
  • offset (int) – (optional). Starting from what resource to return the other resources.

ResourceSet object

>>> queries = redmine.crm_query.filter(resource='contact')
>>> queries
<redminelib.resultsets.ResourceSet object with CrmQuery resources>


CrmQuery resource object provides you with some relations. Relations are the other resource objects wrapped in a ResourceSet which are somehow related to a CrmQuery resource object. The relations provided by the CrmQuery resource object are:

  • deals
>>> queries = redmine.crm_query.filter(resource='deal')
>>> queries[0]
<redminelib.resources.CrmQuery #10 "Deals by category">
>>> queries[0].deals
<redminelib.resultsets.ResourceSet object with Deal resources>

Update methods

Not supported by CRM plugin

Delete methods

Not supported by CRM plugin


Not supported by CRM plugin