universal-mcp-applications 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- universal_mcp/applications/ahrefs/README.md +51 -0
- universal_mcp/applications/ahrefs/__init__.py +1 -0
- universal_mcp/applications/ahrefs/app.py +2291 -0
- universal_mcp/applications/airtable/README.md +22 -0
- universal_mcp/applications/airtable/__init__.py +1 -0
- universal_mcp/applications/airtable/app.py +479 -0
- universal_mcp/applications/apollo/README.md +44 -0
- universal_mcp/applications/apollo/__init__.py +1 -0
- universal_mcp/applications/apollo/app.py +1847 -0
- universal_mcp/applications/asana/README.md +199 -0
- universal_mcp/applications/asana/__init__.py +1 -0
- universal_mcp/applications/asana/app.py +9509 -0
- universal_mcp/applications/aws-s3/README.md +0 -0
- universal_mcp/applications/aws-s3/__init__.py +1 -0
- universal_mcp/applications/aws-s3/app.py +552 -0
- universal_mcp/applications/bill/README.md +0 -0
- universal_mcp/applications/bill/__init__.py +1 -0
- universal_mcp/applications/bill/app.py +8705 -0
- universal_mcp/applications/box/README.md +307 -0
- universal_mcp/applications/box/__init__.py +1 -0
- universal_mcp/applications/box/app.py +15987 -0
- universal_mcp/applications/braze/README.md +106 -0
- universal_mcp/applications/braze/__init__.py +1 -0
- universal_mcp/applications/braze/app.py +4754 -0
- universal_mcp/applications/cal-com-v2/README.md +150 -0
- universal_mcp/applications/cal-com-v2/__init__.py +1 -0
- universal_mcp/applications/cal-com-v2/app.py +5541 -0
- universal_mcp/applications/calendly/README.md +53 -0
- universal_mcp/applications/calendly/__init__.py +1 -0
- universal_mcp/applications/calendly/app.py +1436 -0
- universal_mcp/applications/canva/README.md +43 -0
- universal_mcp/applications/canva/__init__.py +1 -0
- universal_mcp/applications/canva/app.py +941 -0
- universal_mcp/applications/clickup/README.md +135 -0
- universal_mcp/applications/clickup/__init__.py +1 -0
- universal_mcp/applications/clickup/app.py +5009 -0
- universal_mcp/applications/coda/README.md +108 -0
- universal_mcp/applications/coda/__init__.py +1 -0
- universal_mcp/applications/coda/app.py +3671 -0
- universal_mcp/applications/confluence/README.md +198 -0
- universal_mcp/applications/confluence/__init__.py +1 -0
- universal_mcp/applications/confluence/app.py +6273 -0
- universal_mcp/applications/contentful/README.md +17 -0
- universal_mcp/applications/contentful/__init__.py +1 -0
- universal_mcp/applications/contentful/app.py +364 -0
- universal_mcp/applications/crustdata/README.md +25 -0
- universal_mcp/applications/crustdata/__init__.py +1 -0
- universal_mcp/applications/crustdata/app.py +586 -0
- universal_mcp/applications/dialpad/README.md +202 -0
- universal_mcp/applications/dialpad/__init__.py +1 -0
- universal_mcp/applications/dialpad/app.py +5949 -0
- universal_mcp/applications/digitalocean/README.md +463 -0
- universal_mcp/applications/digitalocean/__init__.py +1 -0
- universal_mcp/applications/digitalocean/app.py +20835 -0
- universal_mcp/applications/domain-checker/README.md +13 -0
- universal_mcp/applications/domain-checker/__init__.py +1 -0
- universal_mcp/applications/domain-checker/app.py +265 -0
- universal_mcp/applications/e2b/README.md +12 -0
- universal_mcp/applications/e2b/__init__.py +1 -0
- universal_mcp/applications/e2b/app.py +187 -0
- universal_mcp/applications/elevenlabs/README.md +88 -0
- universal_mcp/applications/elevenlabs/__init__.py +1 -0
- universal_mcp/applications/elevenlabs/app.py +3235 -0
- universal_mcp/applications/exa/README.md +15 -0
- universal_mcp/applications/exa/__init__.py +1 -0
- universal_mcp/applications/exa/app.py +221 -0
- universal_mcp/applications/falai/README.md +17 -0
- universal_mcp/applications/falai/__init__.py +1 -0
- universal_mcp/applications/falai/app.py +331 -0
- universal_mcp/applications/figma/README.md +49 -0
- universal_mcp/applications/figma/__init__.py +1 -0
- universal_mcp/applications/figma/app.py +1090 -0
- universal_mcp/applications/firecrawl/README.md +20 -0
- universal_mcp/applications/firecrawl/__init__.py +1 -0
- universal_mcp/applications/firecrawl/app.py +514 -0
- universal_mcp/applications/fireflies/README.md +25 -0
- universal_mcp/applications/fireflies/__init__.py +1 -0
- universal_mcp/applications/fireflies/app.py +506 -0
- universal_mcp/applications/fpl/README.md +23 -0
- universal_mcp/applications/fpl/__init__.py +1 -0
- universal_mcp/applications/fpl/app.py +1327 -0
- universal_mcp/applications/fpl/utils/api.py +142 -0
- universal_mcp/applications/fpl/utils/fixtures.py +629 -0
- universal_mcp/applications/fpl/utils/helper.py +982 -0
- universal_mcp/applications/fpl/utils/league_utils.py +546 -0
- universal_mcp/applications/fpl/utils/position_utils.py +68 -0
- universal_mcp/applications/ghost-content/README.md +25 -0
- universal_mcp/applications/ghost-content/__init__.py +1 -0
- universal_mcp/applications/ghost-content/app.py +654 -0
- universal_mcp/applications/github/README.md +1049 -0
- universal_mcp/applications/github/__init__.py +1 -0
- universal_mcp/applications/github/app.py +50600 -0
- universal_mcp/applications/gong/README.md +63 -0
- universal_mcp/applications/gong/__init__.py +1 -0
- universal_mcp/applications/gong/app.py +2297 -0
- universal_mcp/applications/google-ads/README.md +0 -0
- universal_mcp/applications/google-ads/__init__.py +1 -0
- universal_mcp/applications/google-ads/app.py +23 -0
- universal_mcp/applications/google-calendar/README.md +21 -0
- universal_mcp/applications/google-calendar/__init__.py +1 -0
- universal_mcp/applications/google-calendar/app.py +574 -0
- universal_mcp/applications/google-docs/README.md +25 -0
- universal_mcp/applications/google-docs/__init__.py +1 -0
- universal_mcp/applications/google-docs/app.py +760 -0
- universal_mcp/applications/google-drive/README.md +68 -0
- universal_mcp/applications/google-drive/__init__.py +1 -0
- universal_mcp/applications/google-drive/app.py +4936 -0
- universal_mcp/applications/google-gemini/README.md +25 -0
- universal_mcp/applications/google-gemini/__init__.py +1 -0
- universal_mcp/applications/google-gemini/app.py +663 -0
- universal_mcp/applications/google-mail/README.md +31 -0
- universal_mcp/applications/google-mail/__init__.py +1 -0
- universal_mcp/applications/google-mail/app.py +1354 -0
- universal_mcp/applications/google-searchconsole/README.md +21 -0
- universal_mcp/applications/google-searchconsole/__init__.py +1 -0
- universal_mcp/applications/google-searchconsole/app.py +320 -0
- universal_mcp/applications/google-sheet/README.md +36 -0
- universal_mcp/applications/google-sheet/__init__.py +1 -0
- universal_mcp/applications/google-sheet/app.py +1941 -0
- universal_mcp/applications/hashnode/README.md +20 -0
- universal_mcp/applications/hashnode/__init__.py +1 -0
- universal_mcp/applications/hashnode/app.py +455 -0
- universal_mcp/applications/heygen/README.md +44 -0
- universal_mcp/applications/heygen/__init__.py +1 -0
- universal_mcp/applications/heygen/app.py +961 -0
- universal_mcp/applications/http-tools/README.md +16 -0
- universal_mcp/applications/http-tools/__init__.py +1 -0
- universal_mcp/applications/http-tools/app.py +153 -0
- universal_mcp/applications/hubspot/README.md +239 -0
- universal_mcp/applications/hubspot/__init__.py +1 -0
- universal_mcp/applications/hubspot/app.py +416 -0
- universal_mcp/applications/jira/README.md +600 -0
- universal_mcp/applications/jira/__init__.py +1 -0
- universal_mcp/applications/jira/app.py +28804 -0
- universal_mcp/applications/klaviyo/README.md +313 -0
- universal_mcp/applications/klaviyo/__init__.py +1 -0
- universal_mcp/applications/klaviyo/app.py +11236 -0
- universal_mcp/applications/linkedin/README.md +15 -0
- universal_mcp/applications/linkedin/__init__.py +1 -0
- universal_mcp/applications/linkedin/app.py +243 -0
- universal_mcp/applications/mailchimp/README.md +281 -0
- universal_mcp/applications/mailchimp/__init__.py +1 -0
- universal_mcp/applications/mailchimp/app.py +10937 -0
- universal_mcp/applications/markitdown/README.md +12 -0
- universal_mcp/applications/markitdown/__init__.py +1 -0
- universal_mcp/applications/markitdown/app.py +63 -0
- universal_mcp/applications/miro/README.md +151 -0
- universal_mcp/applications/miro/__init__.py +1 -0
- universal_mcp/applications/miro/app.py +5429 -0
- universal_mcp/applications/ms-teams/README.md +42 -0
- universal_mcp/applications/ms-teams/__init__.py +1 -0
- universal_mcp/applications/ms-teams/app.py +1823 -0
- universal_mcp/applications/neon/README.md +74 -0
- universal_mcp/applications/neon/__init__.py +1 -0
- universal_mcp/applications/neon/app.py +2018 -0
- universal_mcp/applications/notion/README.md +30 -0
- universal_mcp/applications/notion/__init__.py +1 -0
- universal_mcp/applications/notion/app.py +527 -0
- universal_mcp/applications/openai/README.md +22 -0
- universal_mcp/applications/openai/__init__.py +1 -0
- universal_mcp/applications/openai/app.py +759 -0
- universal_mcp/applications/outlook/README.md +20 -0
- universal_mcp/applications/outlook/__init__.py +1 -0
- universal_mcp/applications/outlook/app.py +444 -0
- universal_mcp/applications/perplexity/README.md +12 -0
- universal_mcp/applications/perplexity/__init__.py +1 -0
- universal_mcp/applications/perplexity/app.py +65 -0
- universal_mcp/applications/pipedrive/README.md +284 -0
- universal_mcp/applications/pipedrive/__init__.py +1 -0
- universal_mcp/applications/pipedrive/app.py +12924 -0
- universal_mcp/applications/posthog/README.md +132 -0
- universal_mcp/applications/posthog/__init__.py +1 -0
- universal_mcp/applications/posthog/app.py +7125 -0
- universal_mcp/applications/reddit/README.md +135 -0
- universal_mcp/applications/reddit/__init__.py +1 -0
- universal_mcp/applications/reddit/app.py +4652 -0
- universal_mcp/applications/replicate/README.md +18 -0
- universal_mcp/applications/replicate/__init__.py +1 -0
- universal_mcp/applications/replicate/app.py +495 -0
- universal_mcp/applications/resend/README.md +40 -0
- universal_mcp/applications/resend/__init__.py +1 -0
- universal_mcp/applications/resend/app.py +881 -0
- universal_mcp/applications/retell/README.md +21 -0
- universal_mcp/applications/retell/__init__.py +1 -0
- universal_mcp/applications/retell/app.py +333 -0
- universal_mcp/applications/rocketlane/README.md +70 -0
- universal_mcp/applications/rocketlane/__init__.py +1 -0
- universal_mcp/applications/rocketlane/app.py +4346 -0
- universal_mcp/applications/semanticscholar/README.md +25 -0
- universal_mcp/applications/semanticscholar/__init__.py +1 -0
- universal_mcp/applications/semanticscholar/app.py +482 -0
- universal_mcp/applications/semrush/README.md +44 -0
- universal_mcp/applications/semrush/__init__.py +1 -0
- universal_mcp/applications/semrush/app.py +2081 -0
- universal_mcp/applications/sendgrid/README.md +362 -0
- universal_mcp/applications/sendgrid/__init__.py +1 -0
- universal_mcp/applications/sendgrid/app.py +9752 -0
- universal_mcp/applications/sentry/README.md +186 -0
- universal_mcp/applications/sentry/__init__.py +1 -0
- universal_mcp/applications/sentry/app.py +7471 -0
- universal_mcp/applications/serpapi/README.md +14 -0
- universal_mcp/applications/serpapi/__init__.py +1 -0
- universal_mcp/applications/serpapi/app.py +293 -0
- universal_mcp/applications/sharepoint/README.md +0 -0
- universal_mcp/applications/sharepoint/__init__.py +1 -0
- universal_mcp/applications/sharepoint/app.py +215 -0
- universal_mcp/applications/shopify/README.md +321 -0
- universal_mcp/applications/shopify/__init__.py +1 -0
- universal_mcp/applications/shopify/app.py +15392 -0
- universal_mcp/applications/shortcut/README.md +128 -0
- universal_mcp/applications/shortcut/__init__.py +1 -0
- universal_mcp/applications/shortcut/app.py +4478 -0
- universal_mcp/applications/slack/README.md +0 -0
- universal_mcp/applications/slack/__init__.py +1 -0
- universal_mcp/applications/slack/app.py +570 -0
- universal_mcp/applications/spotify/README.md +91 -0
- universal_mcp/applications/spotify/__init__.py +1 -0
- universal_mcp/applications/spotify/app.py +2526 -0
- universal_mcp/applications/supabase/README.md +87 -0
- universal_mcp/applications/supabase/__init__.py +1 -0
- universal_mcp/applications/supabase/app.py +2970 -0
- universal_mcp/applications/tavily/README.md +12 -0
- universal_mcp/applications/tavily/__init__.py +1 -0
- universal_mcp/applications/tavily/app.py +51 -0
- universal_mcp/applications/trello/README.md +266 -0
- universal_mcp/applications/trello/__init__.py +1 -0
- universal_mcp/applications/trello/app.py +10875 -0
- universal_mcp/applications/twillo/README.md +0 -0
- universal_mcp/applications/twillo/__init__.py +1 -0
- universal_mcp/applications/twillo/app.py +269 -0
- universal_mcp/applications/twitter/README.md +100 -0
- universal_mcp/applications/twitter/__init__.py +1 -0
- universal_mcp/applications/twitter/api_segments/__init__.py +0 -0
- universal_mcp/applications/twitter/api_segments/api_segment_base.py +51 -0
- universal_mcp/applications/twitter/api_segments/compliance_api.py +122 -0
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +255 -0
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +140 -0
- universal_mcp/applications/twitter/api_segments/likes_api.py +159 -0
- universal_mcp/applications/twitter/api_segments/lists_api.py +395 -0
- universal_mcp/applications/twitter/api_segments/openapi_json_api.py +34 -0
- universal_mcp/applications/twitter/api_segments/spaces_api.py +309 -0
- universal_mcp/applications/twitter/api_segments/trends_api.py +40 -0
- universal_mcp/applications/twitter/api_segments/tweets_api.py +1403 -0
- universal_mcp/applications/twitter/api_segments/usage_api.py +40 -0
- universal_mcp/applications/twitter/api_segments/users_api.py +1498 -0
- universal_mcp/applications/twitter/app.py +46 -0
- universal_mcp/applications/unipile/README.md +28 -0
- universal_mcp/applications/unipile/__init__.py +1 -0
- universal_mcp/applications/unipile/app.py +829 -0
- universal_mcp/applications/whatsapp/README.md +23 -0
- universal_mcp/applications/whatsapp/__init__.py +1 -0
- universal_mcp/applications/whatsapp/app.py +595 -0
- universal_mcp/applications/whatsapp-business/README.md +34 -0
- universal_mcp/applications/whatsapp-business/__init__.py +1 -0
- universal_mcp/applications/whatsapp-business/app.py +1065 -0
- universal_mcp/applications/wrike/README.md +46 -0
- universal_mcp/applications/wrike/__init__.py +1 -0
- universal_mcp/applications/wrike/app.py +1583 -0
- universal_mcp/applications/youtube/README.md +57 -0
- universal_mcp/applications/youtube/__init__.py +1 -0
- universal_mcp/applications/youtube/app.py +1696 -0
- universal_mcp/applications/zenquotes/README.md +12 -0
- universal_mcp/applications/zenquotes/__init__.py +1 -0
- universal_mcp/applications/zenquotes/app.py +31 -0
- universal_mcp_applications-0.1.1.dist-info/METADATA +172 -0
- universal_mcp_applications-0.1.1.dist-info/RECORD +268 -0
- universal_mcp_applications-0.1.1.dist-info/WHEEL +4 -0
- universal_mcp_applications-0.1.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,4346 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from loguru import logger
|
|
4
|
+
from universal_mcp.applications.application import APIApplication
|
|
5
|
+
from universal_mcp.integrations import Integration
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RocketlaneApp(APIApplication):
|
|
9
|
+
def __init__(self, integration: Integration = None, **kwargs) -> None:
|
|
10
|
+
super().__init__(name="rocketlane", integration=integration, **kwargs)
|
|
11
|
+
self.base_url = "https://api.rocketlane.com/api"
|
|
12
|
+
|
|
13
|
+
def _get_headers(self) -> dict[str, str]:
|
|
14
|
+
"""
|
|
15
|
+
Get the headers for Rocketlane API requests.
|
|
16
|
+
Overrides the base class method to use 'api-key'.
|
|
17
|
+
"""
|
|
18
|
+
if not self.integration:
|
|
19
|
+
logger.warning(
|
|
20
|
+
"RocketlaneApp: No integration configured, returning empty headers."
|
|
21
|
+
)
|
|
22
|
+
return {}
|
|
23
|
+
|
|
24
|
+
credentials = self.integration.get_credentials()
|
|
25
|
+
|
|
26
|
+
api_key = (
|
|
27
|
+
credentials.get("api_key")
|
|
28
|
+
or credentials.get("API_KEY")
|
|
29
|
+
or credentials.get("apiKey")
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
if not api_key:
|
|
33
|
+
logger.error("RocketlaneApp: API key not found in integration credentials.")
|
|
34
|
+
return {"Content-Type": "application/json", "Cache-Control": "no-cache"}
|
|
35
|
+
|
|
36
|
+
logger.debug("RocketlaneApp: Using 'api-key' for authentication.")
|
|
37
|
+
return {
|
|
38
|
+
"api-key": api_key, # Correct header name for Rocketlane
|
|
39
|
+
"Content-Type": "application/json",
|
|
40
|
+
"Cache-Control": "no-cache",
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
def get_time_entry(
|
|
44
|
+
self,
|
|
45
|
+
timeEntryId: str,
|
|
46
|
+
includeFields: list[str] | None = None,
|
|
47
|
+
includeAllFields: bool | None = None,
|
|
48
|
+
) -> dict[str, Any]:
|
|
49
|
+
"""
|
|
50
|
+
Get a time entry
|
|
51
|
+
|
|
52
|
+
Args:
|
|
53
|
+
timeEntryId (string): timeEntryId
|
|
54
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
55
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
59
|
+
|
|
60
|
+
Raises:
|
|
61
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
62
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
63
|
+
|
|
64
|
+
Tags:
|
|
65
|
+
Time Tracking
|
|
66
|
+
"""
|
|
67
|
+
if timeEntryId is None:
|
|
68
|
+
raise ValueError("Missing required parameter 'timeEntryId'.")
|
|
69
|
+
url = f"{self.base_url}/1.0/time-entries/{timeEntryId}"
|
|
70
|
+
query_params = {
|
|
71
|
+
k: v
|
|
72
|
+
for k, v in [
|
|
73
|
+
("includeFields", includeFields),
|
|
74
|
+
("includeAllFields", includeAllFields),
|
|
75
|
+
]
|
|
76
|
+
if v is not None
|
|
77
|
+
}
|
|
78
|
+
response = self._get(url, params=query_params)
|
|
79
|
+
response.raise_for_status()
|
|
80
|
+
if (
|
|
81
|
+
response.status_code == 204
|
|
82
|
+
or not response.content
|
|
83
|
+
or not response.text.strip()
|
|
84
|
+
):
|
|
85
|
+
return None
|
|
86
|
+
try:
|
|
87
|
+
return response.json()
|
|
88
|
+
except ValueError:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
def update_time_entry(
|
|
92
|
+
self,
|
|
93
|
+
timeEntryId: str,
|
|
94
|
+
includeFields: list[str] | None = None,
|
|
95
|
+
includeAllFields: bool | None = None,
|
|
96
|
+
timeEntryId_body: int | None = None,
|
|
97
|
+
date: str | None = None,
|
|
98
|
+
minutes: int | None = None,
|
|
99
|
+
activityName: str | None = None,
|
|
100
|
+
notes: str | None = None,
|
|
101
|
+
category: dict[str, Any] | None = None,
|
|
102
|
+
billable: bool | None = None,
|
|
103
|
+
) -> dict[str, Any]:
|
|
104
|
+
"""
|
|
105
|
+
Update a time entry
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
timeEntryId (string): timeEntryId
|
|
109
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
110
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
111
|
+
timeEntryId_body (integer): The unique, system-generated identifier, which can be used to identify the time entry globally. Example: '201'.
|
|
112
|
+
date (string): Date of the time entry in format YYYY-MM-DD Example: '2023-03-28'.
|
|
113
|
+
minutes (integer): Duration of the time entry in minutes Example: '250'.
|
|
114
|
+
activityName (string): Name of the adhoc activity being performed Example: 'Pre-Sales campaign'.
|
|
115
|
+
notes (string): Notes for the time entry Example: 'Working on API integration'.
|
|
116
|
+
category (object): Category associated with the time entry
|
|
117
|
+
billable (boolean): billable
|
|
118
|
+
|
|
119
|
+
Returns:
|
|
120
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
121
|
+
|
|
122
|
+
Raises:
|
|
123
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
124
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
125
|
+
|
|
126
|
+
Tags:
|
|
127
|
+
Time Tracking
|
|
128
|
+
"""
|
|
129
|
+
if timeEntryId is None:
|
|
130
|
+
raise ValueError("Missing required parameter 'timeEntryId'.")
|
|
131
|
+
request_body_data = None
|
|
132
|
+
request_body_data = {
|
|
133
|
+
"timeEntryId": timeEntryId_body,
|
|
134
|
+
"date": date,
|
|
135
|
+
"minutes": minutes,
|
|
136
|
+
"activityName": activityName,
|
|
137
|
+
"notes": notes,
|
|
138
|
+
"category": category,
|
|
139
|
+
"billable": billable,
|
|
140
|
+
}
|
|
141
|
+
request_body_data = {
|
|
142
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
143
|
+
}
|
|
144
|
+
url = f"{self.base_url}/1.0/time-entries/{timeEntryId}"
|
|
145
|
+
query_params = {
|
|
146
|
+
k: v
|
|
147
|
+
for k, v in [
|
|
148
|
+
("includeFields", includeFields),
|
|
149
|
+
("includeAllFields", includeAllFields),
|
|
150
|
+
]
|
|
151
|
+
if v is not None
|
|
152
|
+
}
|
|
153
|
+
response = self._put(
|
|
154
|
+
url,
|
|
155
|
+
data=request_body_data,
|
|
156
|
+
params=query_params,
|
|
157
|
+
content_type="application/json",
|
|
158
|
+
)
|
|
159
|
+
response.raise_for_status()
|
|
160
|
+
if (
|
|
161
|
+
response.status_code == 204
|
|
162
|
+
or not response.content
|
|
163
|
+
or not response.text.strip()
|
|
164
|
+
):
|
|
165
|
+
return None
|
|
166
|
+
try:
|
|
167
|
+
return response.json()
|
|
168
|
+
except ValueError:
|
|
169
|
+
return None
|
|
170
|
+
|
|
171
|
+
def delete_time_entry(self, timeEntryId: str) -> Any:
|
|
172
|
+
"""
|
|
173
|
+
Delete a time entry
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
timeEntryId (string): timeEntryId
|
|
177
|
+
|
|
178
|
+
Returns:
|
|
179
|
+
Any: The resource was successfully removed from the database.
|
|
180
|
+
|
|
181
|
+
Raises:
|
|
182
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
183
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
184
|
+
|
|
185
|
+
Tags:
|
|
186
|
+
Time Tracking
|
|
187
|
+
"""
|
|
188
|
+
if timeEntryId is None:
|
|
189
|
+
raise ValueError("Missing required parameter 'timeEntryId'.")
|
|
190
|
+
url = f"{self.base_url}/1.0/time-entries/{timeEntryId}"
|
|
191
|
+
query_params = {}
|
|
192
|
+
response = self._delete(url, params=query_params)
|
|
193
|
+
response.raise_for_status()
|
|
194
|
+
if (
|
|
195
|
+
response.status_code == 204
|
|
196
|
+
or not response.content
|
|
197
|
+
or not response.text.strip()
|
|
198
|
+
):
|
|
199
|
+
return None
|
|
200
|
+
try:
|
|
201
|
+
return response.json()
|
|
202
|
+
except ValueError:
|
|
203
|
+
return None
|
|
204
|
+
|
|
205
|
+
def get_task(
|
|
206
|
+
self,
|
|
207
|
+
taskId: str,
|
|
208
|
+
includeFields: list[str] | None = None,
|
|
209
|
+
includeAllFields: bool | None = None,
|
|
210
|
+
) -> dict[str, Any]:
|
|
211
|
+
"""
|
|
212
|
+
Get task by Id
|
|
213
|
+
|
|
214
|
+
Args:
|
|
215
|
+
taskId (string): taskId
|
|
216
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
217
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
218
|
+
|
|
219
|
+
Returns:
|
|
220
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
221
|
+
|
|
222
|
+
Raises:
|
|
223
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
224
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
225
|
+
|
|
226
|
+
Tags:
|
|
227
|
+
Tasks
|
|
228
|
+
"""
|
|
229
|
+
if taskId is None:
|
|
230
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
231
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}"
|
|
232
|
+
query_params = {
|
|
233
|
+
k: v
|
|
234
|
+
for k, v in [
|
|
235
|
+
("includeFields", includeFields),
|
|
236
|
+
("includeAllFields", includeAllFields),
|
|
237
|
+
]
|
|
238
|
+
if v is not None
|
|
239
|
+
}
|
|
240
|
+
response = self._get(url, params=query_params)
|
|
241
|
+
response.raise_for_status()
|
|
242
|
+
if (
|
|
243
|
+
response.status_code == 204
|
|
244
|
+
or not response.content
|
|
245
|
+
or not response.text.strip()
|
|
246
|
+
):
|
|
247
|
+
return None
|
|
248
|
+
try:
|
|
249
|
+
return response.json()
|
|
250
|
+
except ValueError:
|
|
251
|
+
return None
|
|
252
|
+
|
|
253
|
+
def update_task(
|
|
254
|
+
self,
|
|
255
|
+
taskId: str,
|
|
256
|
+
includeFields: list[str] | None = None,
|
|
257
|
+
includeAllFields: bool | None = None,
|
|
258
|
+
taskId_body: int | None = None,
|
|
259
|
+
taskName: str | None = None,
|
|
260
|
+
taskDescription: str | None = None,
|
|
261
|
+
taskPrivateNote: str | None = None,
|
|
262
|
+
startDate: str | None = None,
|
|
263
|
+
dueDate: str | None = None,
|
|
264
|
+
effortInMinutes: int | None = None,
|
|
265
|
+
progress: int | None = None,
|
|
266
|
+
atRisk: bool | None = None,
|
|
267
|
+
type: str | None = None,
|
|
268
|
+
fields: list[dict[str, Any]] | None = None,
|
|
269
|
+
status: dict[str, Any] | None = None,
|
|
270
|
+
externalReferenceId: str | None = None,
|
|
271
|
+
private: bool | None = None,
|
|
272
|
+
) -> dict[str, Any]:
|
|
273
|
+
"""
|
|
274
|
+
Update task by Id
|
|
275
|
+
|
|
276
|
+
Args:
|
|
277
|
+
taskId (string): taskId
|
|
278
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
279
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
280
|
+
taskId_body (integer): The task’s unique, system-generated **identifier**, which can be used to identify the task globally Example: '201'.
|
|
281
|
+
taskName (string): The **name** of the task. Example: 'Kick off'.
|
|
282
|
+
taskDescription (string): The `description` of the task. The description body needs to be in **html** format to avoid any formatting issues in the application. Example: '<p>Schedule Kick off meeting with the stakeholders involved.</p>'.
|
|
283
|
+
taskPrivateNote (string): The `privateNote` for the task is intended exclusively for team members. The note's content should be in `HTML` format to prevent any formatting issues in the application. Example: '<p>Schedule Kick off meeting with the stakeholders involved.</p>'.
|
|
284
|
+
startDate (string): The date when a task starts its execution. It can be empty. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
285
|
+
dueDate (string): The date when a task completes its execution. It can be empty. If both `startDate` and `dueDate` are specified for a given task, it is necessary that the latter should be on or after the given `startDate`. The format for the due date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
286
|
+
effortInMinutes (integer): The effort is the expected time required to complete the task. The value is determined in minutes. Example: '3000'.
|
|
287
|
+
progress (integer): The task’s progress, if indicated, will be available here and ranges in value from 0 to 100. The task’s status can be used in place of this field, however progress can offer more precise data. Example: '50'.
|
|
288
|
+
atRisk (boolean): Indicates whether the task has been marked as At Risk. This parameter is used to indicate that immediate action is necessary to unblock the task’s execution. Example: 'True'.
|
|
289
|
+
type (string): The type of the task if specified will be available here. There are two options: `MILESTONE` or `TASK`. If a task is not explicitly marked as a milestone, it takes the default value as `TASK`. Milestones refer to critical tasks in the project that include an inbuilt CSAT capability that allows customers to offer CSAT evaluations depending on the task’s execution. Example: 'MILESTONE'.
|
|
290
|
+
fields (array): The custom fields can be set during the task creation with the help of `fields`. The `fieldValue` can be either a string or a number or an array and it has to comply with the type of the field. Refer [examples](https://developer.rocketlane.com/v1.0/docs/custom-fields#examples-of-requests-and-responses-for-assigning-custom-field-values) to know how to assign `fieldValue` based on their `field_type`.
|
|
291
|
+
status (object): The value of the task status can be specified here and this is essential to keep track of it.
|
|
292
|
+
externalReferenceId (string): An externalReferenceId is a unique identifier that links entities or transactions between external systems and Rocketlane, ensuring accurate data correlation and consistency. Example: 'task_8171'.
|
|
293
|
+
private (boolean): This depicts if the task is private or not. Example: 'False'.
|
|
294
|
+
|
|
295
|
+
Returns:
|
|
296
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
297
|
+
|
|
298
|
+
Raises:
|
|
299
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
300
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
301
|
+
|
|
302
|
+
Tags:
|
|
303
|
+
Tasks
|
|
304
|
+
"""
|
|
305
|
+
if taskId is None:
|
|
306
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
307
|
+
request_body_data = None
|
|
308
|
+
request_body_data = {
|
|
309
|
+
"taskId": taskId_body,
|
|
310
|
+
"taskName": taskName,
|
|
311
|
+
"taskDescription": taskDescription,
|
|
312
|
+
"taskPrivateNote": taskPrivateNote,
|
|
313
|
+
"startDate": startDate,
|
|
314
|
+
"dueDate": dueDate,
|
|
315
|
+
"effortInMinutes": effortInMinutes,
|
|
316
|
+
"progress": progress,
|
|
317
|
+
"atRisk": atRisk,
|
|
318
|
+
"type": type,
|
|
319
|
+
"fields": fields,
|
|
320
|
+
"status": status,
|
|
321
|
+
"externalReferenceId": externalReferenceId,
|
|
322
|
+
"private": private,
|
|
323
|
+
}
|
|
324
|
+
request_body_data = {
|
|
325
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
326
|
+
}
|
|
327
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}"
|
|
328
|
+
query_params = {
|
|
329
|
+
k: v
|
|
330
|
+
for k, v in [
|
|
331
|
+
("includeFields", includeFields),
|
|
332
|
+
("includeAllFields", includeAllFields),
|
|
333
|
+
]
|
|
334
|
+
if v is not None
|
|
335
|
+
}
|
|
336
|
+
response = self._put(
|
|
337
|
+
url,
|
|
338
|
+
data=request_body_data,
|
|
339
|
+
params=query_params,
|
|
340
|
+
content_type="application/json",
|
|
341
|
+
)
|
|
342
|
+
response.raise_for_status()
|
|
343
|
+
if (
|
|
344
|
+
response.status_code == 204
|
|
345
|
+
or not response.content
|
|
346
|
+
or not response.text.strip()
|
|
347
|
+
):
|
|
348
|
+
return None
|
|
349
|
+
try:
|
|
350
|
+
return response.json()
|
|
351
|
+
except ValueError:
|
|
352
|
+
return None
|
|
353
|
+
|
|
354
|
+
def delete_task(self, taskId: str) -> Any:
|
|
355
|
+
"""
|
|
356
|
+
Delete task by Id
|
|
357
|
+
|
|
358
|
+
Args:
|
|
359
|
+
taskId (string): taskId
|
|
360
|
+
|
|
361
|
+
Returns:
|
|
362
|
+
Any: The resource was successfully removed from the database.
|
|
363
|
+
|
|
364
|
+
Raises:
|
|
365
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
366
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
367
|
+
|
|
368
|
+
Tags:
|
|
369
|
+
Tasks
|
|
370
|
+
"""
|
|
371
|
+
if taskId is None:
|
|
372
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
373
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}"
|
|
374
|
+
query_params = {}
|
|
375
|
+
response = self._delete(url, params=query_params)
|
|
376
|
+
response.raise_for_status()
|
|
377
|
+
if (
|
|
378
|
+
response.status_code == 204
|
|
379
|
+
or not response.content
|
|
380
|
+
or not response.text.strip()
|
|
381
|
+
):
|
|
382
|
+
return None
|
|
383
|
+
try:
|
|
384
|
+
return response.json()
|
|
385
|
+
except ValueError:
|
|
386
|
+
return None
|
|
387
|
+
|
|
388
|
+
def get_space(self, spaceId: str) -> dict[str, Any]:
|
|
389
|
+
"""
|
|
390
|
+
Get space by Id
|
|
391
|
+
|
|
392
|
+
Args:
|
|
393
|
+
spaceId (string): spaceId
|
|
394
|
+
|
|
395
|
+
Returns:
|
|
396
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
397
|
+
|
|
398
|
+
Raises:
|
|
399
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
400
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
401
|
+
|
|
402
|
+
Tags:
|
|
403
|
+
Spaces
|
|
404
|
+
"""
|
|
405
|
+
if spaceId is None:
|
|
406
|
+
raise ValueError("Missing required parameter 'spaceId'.")
|
|
407
|
+
url = f"{self.base_url}/1.0/spaces/{spaceId}"
|
|
408
|
+
query_params = {}
|
|
409
|
+
response = self._get(url, params=query_params)
|
|
410
|
+
response.raise_for_status()
|
|
411
|
+
if (
|
|
412
|
+
response.status_code == 204
|
|
413
|
+
or not response.content
|
|
414
|
+
or not response.text.strip()
|
|
415
|
+
):
|
|
416
|
+
return None
|
|
417
|
+
try:
|
|
418
|
+
return response.json()
|
|
419
|
+
except ValueError:
|
|
420
|
+
return None
|
|
421
|
+
|
|
422
|
+
def update_space(
|
|
423
|
+
self, spaceId: str, spaceName: str | None = None
|
|
424
|
+
) -> dict[str, Any]:
|
|
425
|
+
"""
|
|
426
|
+
Update space by Id
|
|
427
|
+
|
|
428
|
+
Args:
|
|
429
|
+
spaceId (string): spaceId
|
|
430
|
+
spaceName (string): The name of the space. Example: 'Shared space'.
|
|
431
|
+
|
|
432
|
+
Returns:
|
|
433
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
434
|
+
|
|
435
|
+
Raises:
|
|
436
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
437
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
438
|
+
|
|
439
|
+
Tags:
|
|
440
|
+
Spaces
|
|
441
|
+
"""
|
|
442
|
+
if spaceId is None:
|
|
443
|
+
raise ValueError("Missing required parameter 'spaceId'.")
|
|
444
|
+
request_body_data = None
|
|
445
|
+
request_body_data = {
|
|
446
|
+
"spaceName": spaceName,
|
|
447
|
+
}
|
|
448
|
+
request_body_data = {
|
|
449
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
450
|
+
}
|
|
451
|
+
url = f"{self.base_url}/1.0/spaces/{spaceId}"
|
|
452
|
+
query_params = {}
|
|
453
|
+
response = self._put(
|
|
454
|
+
url,
|
|
455
|
+
data=request_body_data,
|
|
456
|
+
params=query_params,
|
|
457
|
+
content_type="application/json",
|
|
458
|
+
)
|
|
459
|
+
response.raise_for_status()
|
|
460
|
+
if (
|
|
461
|
+
response.status_code == 204
|
|
462
|
+
or not response.content
|
|
463
|
+
or not response.text.strip()
|
|
464
|
+
):
|
|
465
|
+
return None
|
|
466
|
+
try:
|
|
467
|
+
return response.json()
|
|
468
|
+
except ValueError:
|
|
469
|
+
return None
|
|
470
|
+
|
|
471
|
+
def delete_space(self, spaceId: str) -> Any:
|
|
472
|
+
"""
|
|
473
|
+
Delete space by Id
|
|
474
|
+
|
|
475
|
+
Args:
|
|
476
|
+
spaceId (string): spaceId
|
|
477
|
+
|
|
478
|
+
Returns:
|
|
479
|
+
Any: The resource was successfully removed from the database.
|
|
480
|
+
|
|
481
|
+
Raises:
|
|
482
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
483
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
484
|
+
|
|
485
|
+
Tags:
|
|
486
|
+
Spaces
|
|
487
|
+
"""
|
|
488
|
+
if spaceId is None:
|
|
489
|
+
raise ValueError("Missing required parameter 'spaceId'.")
|
|
490
|
+
url = f"{self.base_url}/1.0/spaces/{spaceId}"
|
|
491
|
+
query_params = {}
|
|
492
|
+
response = self._delete(url, params=query_params)
|
|
493
|
+
response.raise_for_status()
|
|
494
|
+
if (
|
|
495
|
+
response.status_code == 204
|
|
496
|
+
or not response.content
|
|
497
|
+
or not response.text.strip()
|
|
498
|
+
):
|
|
499
|
+
return None
|
|
500
|
+
try:
|
|
501
|
+
return response.json()
|
|
502
|
+
except ValueError:
|
|
503
|
+
return None
|
|
504
|
+
|
|
505
|
+
def get_space_document(self, spaceDocumentId: str) -> dict[str, Any]:
|
|
506
|
+
"""
|
|
507
|
+
Get space document by Id
|
|
508
|
+
|
|
509
|
+
Args:
|
|
510
|
+
spaceDocumentId (string): spaceDocumentId
|
|
511
|
+
|
|
512
|
+
Returns:
|
|
513
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
514
|
+
|
|
515
|
+
Raises:
|
|
516
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
517
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
518
|
+
|
|
519
|
+
Tags:
|
|
520
|
+
Space Documents
|
|
521
|
+
"""
|
|
522
|
+
if spaceDocumentId is None:
|
|
523
|
+
raise ValueError("Missing required parameter 'spaceDocumentId'.")
|
|
524
|
+
url = f"{self.base_url}/1.0/space-documents/{spaceDocumentId}"
|
|
525
|
+
query_params = {}
|
|
526
|
+
response = self._get(url, params=query_params)
|
|
527
|
+
response.raise_for_status()
|
|
528
|
+
if (
|
|
529
|
+
response.status_code == 204
|
|
530
|
+
or not response.content
|
|
531
|
+
or not response.text.strip()
|
|
532
|
+
):
|
|
533
|
+
return None
|
|
534
|
+
try:
|
|
535
|
+
return response.json()
|
|
536
|
+
except ValueError:
|
|
537
|
+
return None
|
|
538
|
+
|
|
539
|
+
def update_space_document(
|
|
540
|
+
self,
|
|
541
|
+
spaceDocumentId: str,
|
|
542
|
+
spaceDocumentId_body: int | None = None,
|
|
543
|
+
spaceDocumentName: str | None = None,
|
|
544
|
+
url: str | None = None,
|
|
545
|
+
) -> dict[str, Any]:
|
|
546
|
+
"""
|
|
547
|
+
Update space document by Id
|
|
548
|
+
|
|
549
|
+
Args:
|
|
550
|
+
spaceDocumentId (string): spaceDocumentId
|
|
551
|
+
spaceDocumentId_body (integer): The space document’s unique, system-generated identifier, which can be used to identify the space document globally. Example: '201'.
|
|
552
|
+
spaceDocumentName (string): The name of the space document. Example: 'Sample file'.
|
|
553
|
+
url (string): The url that is embedded in the space document. Example: 'https://www.google.com'.
|
|
554
|
+
|
|
555
|
+
Returns:
|
|
556
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
557
|
+
|
|
558
|
+
Raises:
|
|
559
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
560
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
561
|
+
|
|
562
|
+
Tags:
|
|
563
|
+
Space Documents
|
|
564
|
+
"""
|
|
565
|
+
if spaceDocumentId is None:
|
|
566
|
+
raise ValueError("Missing required parameter 'spaceDocumentId'.")
|
|
567
|
+
request_body_data = None
|
|
568
|
+
request_body_data = {
|
|
569
|
+
"spaceDocumentId": spaceDocumentId_body,
|
|
570
|
+
"spaceDocumentName": spaceDocumentName,
|
|
571
|
+
"url": url,
|
|
572
|
+
}
|
|
573
|
+
request_body_data = {
|
|
574
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
575
|
+
}
|
|
576
|
+
url = f"{self.base_url}/1.0/space-documents/{spaceDocumentId}"
|
|
577
|
+
query_params = {}
|
|
578
|
+
response = self._put(
|
|
579
|
+
url,
|
|
580
|
+
data=request_body_data,
|
|
581
|
+
params=query_params,
|
|
582
|
+
content_type="application/json",
|
|
583
|
+
)
|
|
584
|
+
response.raise_for_status()
|
|
585
|
+
if (
|
|
586
|
+
response.status_code == 204
|
|
587
|
+
or not response.content
|
|
588
|
+
or not response.text.strip()
|
|
589
|
+
):
|
|
590
|
+
return None
|
|
591
|
+
try:
|
|
592
|
+
return response.json()
|
|
593
|
+
except ValueError:
|
|
594
|
+
return None
|
|
595
|
+
|
|
596
|
+
def delete_space_document(self, spaceDocumentId: str) -> Any:
|
|
597
|
+
"""
|
|
598
|
+
Delete space document by Id
|
|
599
|
+
|
|
600
|
+
Args:
|
|
601
|
+
spaceDocumentId (string): spaceDocumentId
|
|
602
|
+
|
|
603
|
+
Returns:
|
|
604
|
+
Any: The resource was successfully removed from the database.
|
|
605
|
+
|
|
606
|
+
Raises:
|
|
607
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
608
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
609
|
+
|
|
610
|
+
Tags:
|
|
611
|
+
Space Documents
|
|
612
|
+
"""
|
|
613
|
+
if spaceDocumentId is None:
|
|
614
|
+
raise ValueError("Missing required parameter 'spaceDocumentId'.")
|
|
615
|
+
url = f"{self.base_url}/1.0/space-documents/{spaceDocumentId}"
|
|
616
|
+
query_params = {}
|
|
617
|
+
response = self._delete(url, params=query_params)
|
|
618
|
+
response.raise_for_status()
|
|
619
|
+
if (
|
|
620
|
+
response.status_code == 204
|
|
621
|
+
or not response.content
|
|
622
|
+
or not response.text.strip()
|
|
623
|
+
):
|
|
624
|
+
return None
|
|
625
|
+
try:
|
|
626
|
+
return response.json()
|
|
627
|
+
except ValueError:
|
|
628
|
+
return None
|
|
629
|
+
|
|
630
|
+
def get_project(
|
|
631
|
+
self,
|
|
632
|
+
projectId: str,
|
|
633
|
+
includeFields: list[str] | None = None,
|
|
634
|
+
includeAllFields: bool | None = None,
|
|
635
|
+
) -> dict[str, Any]:
|
|
636
|
+
"""
|
|
637
|
+
Get project by Id
|
|
638
|
+
|
|
639
|
+
Args:
|
|
640
|
+
projectId (string): projectId
|
|
641
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
642
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
643
|
+
|
|
644
|
+
Returns:
|
|
645
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
646
|
+
|
|
647
|
+
Raises:
|
|
648
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
649
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
650
|
+
|
|
651
|
+
Tags:
|
|
652
|
+
Projects, important
|
|
653
|
+
"""
|
|
654
|
+
if projectId is None:
|
|
655
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
656
|
+
url = f"{self.base_url}/1.0/projects/{projectId}"
|
|
657
|
+
query_params = {
|
|
658
|
+
k: v
|
|
659
|
+
for k, v in [
|
|
660
|
+
("includeFields", includeFields),
|
|
661
|
+
("includeAllFields", includeAllFields),
|
|
662
|
+
]
|
|
663
|
+
if v is not None
|
|
664
|
+
}
|
|
665
|
+
response = self._get(url, params=query_params)
|
|
666
|
+
response.raise_for_status()
|
|
667
|
+
if (
|
|
668
|
+
response.status_code == 204
|
|
669
|
+
or not response.content
|
|
670
|
+
or not response.text.strip()
|
|
671
|
+
):
|
|
672
|
+
return None
|
|
673
|
+
try:
|
|
674
|
+
return response.json()
|
|
675
|
+
except ValueError:
|
|
676
|
+
return None
|
|
677
|
+
|
|
678
|
+
def update_project(
|
|
679
|
+
self,
|
|
680
|
+
projectId: str,
|
|
681
|
+
includeFields: list[str] | None = None,
|
|
682
|
+
includeAllFields: bool | None = None,
|
|
683
|
+
projectName: str | None = None,
|
|
684
|
+
startDate: str | None = None,
|
|
685
|
+
dueDate: str | None = None,
|
|
686
|
+
visibility: str | None = None,
|
|
687
|
+
owner: dict[str, Any] | None = None,
|
|
688
|
+
status: dict[str, Any] | None = None,
|
|
689
|
+
fields: list[dict[str, Any]] | None = None,
|
|
690
|
+
annualizedRecurringRevenue: int | None = None,
|
|
691
|
+
projectFee: int | None = None,
|
|
692
|
+
autoAllocation: bool | None = None,
|
|
693
|
+
budgetedHours: float | None = None,
|
|
694
|
+
externalReferenceId: str | None = None,
|
|
695
|
+
) -> dict[str, Any]:
|
|
696
|
+
"""
|
|
697
|
+
Update project by Id
|
|
698
|
+
|
|
699
|
+
Args:
|
|
700
|
+
projectId (string): projectId
|
|
701
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
702
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
703
|
+
projectName (string): The `name` of the project. The name specified will be displayed everywhere else and can be used for filtering purposes. Example: 'Acme onboarding'.
|
|
704
|
+
startDate (string): On this date the project's execution officially begins. If sources (templates) are mentioned in the request, the start date is required. For projects without any defined sources, it may be empty. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
705
|
+
dueDate (string): The day on which the project's execution is planned to be completed. The due date is not required and can be left blank. If sources (templates) are included as part of the project creation, the project's due date will be calculated depending on the duration of the specified sources. For projects where both `startDate` and `dueDate` are specified, the latter must be on or after the given `startDate`. The format for the due date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
706
|
+
visibility (string): Set visibility parameters to restrict who can see your project. There are two options: `EVERYONE` and `MEMBERS`. Selecting `EVERYONE` allows all team members from your firm to view the project, while selecting `MEMBERS` restricts access to only those team members who have been specifically invited. Example: 'EVERYONE'.
|
|
707
|
+
owner (object): The project owner gets access to everything in the project and can be used to control the activities that happens in the project. Note: Changing the owner can result in `transfer of ownership` from the older member to the specified member. All the access for the older member will be `revoked`.
|
|
708
|
+
status (object): The value of the project status can be specified here and this is essential to keep track of the project. Example: 'In progress'.
|
|
709
|
+
fields (array): The custom fields can be set during the project creation with the help of `fields`. The `fieldValue` can be either a string or a number or an array and it has to comply with the type of the field. Refer [examples](https://developer.rocketlane.com/v1.0/docs/custom-fields#examples-of-requests-and-responses-for-assigning-custom-field-values) to know how to assign `fieldValue` based on their `field_type`.
|
|
710
|
+
annualizedRecurringRevenue (integer): Indicates the value of the recurring revenue of the customer's subscriptions for a single calendar year. Example: '10000'.
|
|
711
|
+
projectFee (integer): The total fee that is charged for the project. Example: '100000'.
|
|
712
|
+
autoAllocation (boolean): The field autoAllocation defines whether Auto Allocation is enabled for the project or not. If auto allocation is enabled, instead of adding it manually, the allocations are computed from the tasks duration, effort and the assignees specified in the project. Example: 'False'.
|
|
713
|
+
budgetedHours (number): Budgeted hours represent the total hours allocated for project execution. This value can be edited at any point throughout the project’s duration. You can enter the budgeted hours in decimal form, including both hours and minutes, with up to two decimal places of precision. Eg: 1.65 hrs = 1h 39m(1.65h * 60m = 99m). Example: '10.5'.
|
|
714
|
+
externalReferenceId (string): An externalReferenceId is a unique identifier that links entities or transactions between external systems and Rocketlane, ensuring accurate data correlation and consistency. Example: 'pr_8171'.
|
|
715
|
+
|
|
716
|
+
Returns:
|
|
717
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
718
|
+
|
|
719
|
+
Raises:
|
|
720
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
721
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
722
|
+
|
|
723
|
+
Tags:
|
|
724
|
+
Projects, important
|
|
725
|
+
"""
|
|
726
|
+
if projectId is None:
|
|
727
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
728
|
+
request_body_data = None
|
|
729
|
+
request_body_data = {
|
|
730
|
+
"projectName": projectName,
|
|
731
|
+
"startDate": startDate,
|
|
732
|
+
"dueDate": dueDate,
|
|
733
|
+
"visibility": visibility,
|
|
734
|
+
"owner": owner,
|
|
735
|
+
"status": status,
|
|
736
|
+
"fields": fields,
|
|
737
|
+
"annualizedRecurringRevenue": annualizedRecurringRevenue,
|
|
738
|
+
"projectFee": projectFee,
|
|
739
|
+
"autoAllocation": autoAllocation,
|
|
740
|
+
"budgetedHours": budgetedHours,
|
|
741
|
+
"externalReferenceId": externalReferenceId,
|
|
742
|
+
}
|
|
743
|
+
request_body_data = {
|
|
744
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
745
|
+
}
|
|
746
|
+
url = f"{self.base_url}/1.0/projects/{projectId}"
|
|
747
|
+
query_params = {
|
|
748
|
+
k: v
|
|
749
|
+
for k, v in [
|
|
750
|
+
("includeFields", includeFields),
|
|
751
|
+
("includeAllFields", includeAllFields),
|
|
752
|
+
]
|
|
753
|
+
if v is not None
|
|
754
|
+
}
|
|
755
|
+
response = self._put(
|
|
756
|
+
url,
|
|
757
|
+
data=request_body_data,
|
|
758
|
+
params=query_params,
|
|
759
|
+
content_type="application/json",
|
|
760
|
+
)
|
|
761
|
+
response.raise_for_status()
|
|
762
|
+
if (
|
|
763
|
+
response.status_code == 204
|
|
764
|
+
or not response.content
|
|
765
|
+
or not response.text.strip()
|
|
766
|
+
):
|
|
767
|
+
return None
|
|
768
|
+
try:
|
|
769
|
+
return response.json()
|
|
770
|
+
except ValueError:
|
|
771
|
+
return None
|
|
772
|
+
|
|
773
|
+
def delete_project(self, projectId: str) -> Any:
|
|
774
|
+
"""
|
|
775
|
+
Delete project by Id
|
|
776
|
+
|
|
777
|
+
Args:
|
|
778
|
+
projectId (string): projectId
|
|
779
|
+
|
|
780
|
+
Returns:
|
|
781
|
+
Any: The resource was successfully removed from the database.
|
|
782
|
+
|
|
783
|
+
Raises:
|
|
784
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
785
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
786
|
+
|
|
787
|
+
Tags:
|
|
788
|
+
Projects, important
|
|
789
|
+
"""
|
|
790
|
+
if projectId is None:
|
|
791
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
792
|
+
url = f"{self.base_url}/1.0/projects/{projectId}"
|
|
793
|
+
query_params = {}
|
|
794
|
+
response = self._delete(url, params=query_params)
|
|
795
|
+
response.raise_for_status()
|
|
796
|
+
if (
|
|
797
|
+
response.status_code == 204
|
|
798
|
+
or not response.content
|
|
799
|
+
or not response.text.strip()
|
|
800
|
+
):
|
|
801
|
+
return None
|
|
802
|
+
try:
|
|
803
|
+
return response.json()
|
|
804
|
+
except ValueError:
|
|
805
|
+
return None
|
|
806
|
+
|
|
807
|
+
def get_phase(
|
|
808
|
+
self,
|
|
809
|
+
phaseId: str,
|
|
810
|
+
includeFields: list[str] | None = None,
|
|
811
|
+
includeAllFields: bool | None = None,
|
|
812
|
+
) -> dict[str, Any]:
|
|
813
|
+
"""
|
|
814
|
+
Get phase by Id
|
|
815
|
+
|
|
816
|
+
Args:
|
|
817
|
+
phaseId (string): phaseId
|
|
818
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
819
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
820
|
+
|
|
821
|
+
Returns:
|
|
822
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
823
|
+
|
|
824
|
+
Raises:
|
|
825
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
826
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
827
|
+
|
|
828
|
+
Tags:
|
|
829
|
+
Phases
|
|
830
|
+
"""
|
|
831
|
+
if phaseId is None:
|
|
832
|
+
raise ValueError("Missing required parameter 'phaseId'.")
|
|
833
|
+
url = f"{self.base_url}/1.0/phases/{phaseId}"
|
|
834
|
+
query_params = {
|
|
835
|
+
k: v
|
|
836
|
+
for k, v in [
|
|
837
|
+
("includeFields", includeFields),
|
|
838
|
+
("includeAllFields", includeAllFields),
|
|
839
|
+
]
|
|
840
|
+
if v is not None
|
|
841
|
+
}
|
|
842
|
+
response = self._get(url, params=query_params)
|
|
843
|
+
response.raise_for_status()
|
|
844
|
+
if (
|
|
845
|
+
response.status_code == 204
|
|
846
|
+
or not response.content
|
|
847
|
+
or not response.text.strip()
|
|
848
|
+
):
|
|
849
|
+
return None
|
|
850
|
+
try:
|
|
851
|
+
return response.json()
|
|
852
|
+
except ValueError:
|
|
853
|
+
return None
|
|
854
|
+
|
|
855
|
+
def update_phase(
|
|
856
|
+
self,
|
|
857
|
+
phaseId: str,
|
|
858
|
+
includeFields: list[str] | None = None,
|
|
859
|
+
includeAllFields: bool | None = None,
|
|
860
|
+
phaseName: str | None = None,
|
|
861
|
+
startDate: str | None = None,
|
|
862
|
+
dueDate: str | None = None,
|
|
863
|
+
status: dict[str, Any] | None = None,
|
|
864
|
+
private: bool | None = None,
|
|
865
|
+
) -> dict[str, Any]:
|
|
866
|
+
"""
|
|
867
|
+
Update phase by Id
|
|
868
|
+
|
|
869
|
+
Args:
|
|
870
|
+
phaseId (string): phaseId
|
|
871
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
872
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
873
|
+
phaseName (string): The `name` of the phase. The name specified will be displayed everywhere else and can be used for filtering purposes. Example: 'Go live'.
|
|
874
|
+
startDate (string): On this date the phase's execution officially begins. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
875
|
+
dueDate (string): The day on which the phase's execution is planned to be completed. The `dueDate` must be on or after the given `startDate`. The format for the due date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
876
|
+
status (object): The value of the phase status can be specified here and this is essential to keep track of the phase.
|
|
877
|
+
private (boolean): Describes the privacy of the phase i.e. if it is private or shared. Example: 'True'.
|
|
878
|
+
|
|
879
|
+
Returns:
|
|
880
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
881
|
+
|
|
882
|
+
Raises:
|
|
883
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
884
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
885
|
+
|
|
886
|
+
Tags:
|
|
887
|
+
Phases
|
|
888
|
+
"""
|
|
889
|
+
if phaseId is None:
|
|
890
|
+
raise ValueError("Missing required parameter 'phaseId'.")
|
|
891
|
+
request_body_data = None
|
|
892
|
+
request_body_data = {
|
|
893
|
+
"phaseName": phaseName,
|
|
894
|
+
"startDate": startDate,
|
|
895
|
+
"dueDate": dueDate,
|
|
896
|
+
"status": status,
|
|
897
|
+
"private": private,
|
|
898
|
+
}
|
|
899
|
+
request_body_data = {
|
|
900
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
901
|
+
}
|
|
902
|
+
url = f"{self.base_url}/1.0/phases/{phaseId}"
|
|
903
|
+
query_params = {
|
|
904
|
+
k: v
|
|
905
|
+
for k, v in [
|
|
906
|
+
("includeFields", includeFields),
|
|
907
|
+
("includeAllFields", includeAllFields),
|
|
908
|
+
]
|
|
909
|
+
if v is not None
|
|
910
|
+
}
|
|
911
|
+
response = self._put(
|
|
912
|
+
url,
|
|
913
|
+
data=request_body_data,
|
|
914
|
+
params=query_params,
|
|
915
|
+
content_type="application/json",
|
|
916
|
+
)
|
|
917
|
+
response.raise_for_status()
|
|
918
|
+
if (
|
|
919
|
+
response.status_code == 204
|
|
920
|
+
or not response.content
|
|
921
|
+
or not response.text.strip()
|
|
922
|
+
):
|
|
923
|
+
return None
|
|
924
|
+
try:
|
|
925
|
+
return response.json()
|
|
926
|
+
except ValueError:
|
|
927
|
+
return None
|
|
928
|
+
|
|
929
|
+
def delete_phase(self, phaseId: str) -> Any:
|
|
930
|
+
"""
|
|
931
|
+
Delete phase by Id
|
|
932
|
+
|
|
933
|
+
Args:
|
|
934
|
+
phaseId (string): phaseId
|
|
935
|
+
|
|
936
|
+
Returns:
|
|
937
|
+
Any: The resource was successfully removed from the database.
|
|
938
|
+
|
|
939
|
+
Raises:
|
|
940
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
941
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
942
|
+
|
|
943
|
+
Tags:
|
|
944
|
+
Phases
|
|
945
|
+
"""
|
|
946
|
+
if phaseId is None:
|
|
947
|
+
raise ValueError("Missing required parameter 'phaseId'.")
|
|
948
|
+
url = f"{self.base_url}/1.0/phases/{phaseId}"
|
|
949
|
+
query_params = {}
|
|
950
|
+
response = self._delete(url, params=query_params)
|
|
951
|
+
response.raise_for_status()
|
|
952
|
+
if (
|
|
953
|
+
response.status_code == 204
|
|
954
|
+
or not response.content
|
|
955
|
+
or not response.text.strip()
|
|
956
|
+
):
|
|
957
|
+
return None
|
|
958
|
+
try:
|
|
959
|
+
return response.json()
|
|
960
|
+
except ValueError:
|
|
961
|
+
return None
|
|
962
|
+
|
|
963
|
+
def get_field(
|
|
964
|
+
self,
|
|
965
|
+
fieldId: str,
|
|
966
|
+
includeFields: list[str] | None = None,
|
|
967
|
+
includeAllFields: bool | None = None,
|
|
968
|
+
) -> dict[str, Any]:
|
|
969
|
+
"""
|
|
970
|
+
Get field by Id
|
|
971
|
+
|
|
972
|
+
Args:
|
|
973
|
+
fieldId (string): fieldId
|
|
974
|
+
includeFields (array): This query parameter allows you to specify which field properties should be returned in the response body by selecting from the drop down. To get the relevant field properties, use comma separated values. If this field is left blank, the default properties are returned.
|
|
975
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the field properties should be returned in the response body. If the field is left blank, the default field properties are returned. Example: 'True'.
|
|
976
|
+
|
|
977
|
+
Returns:
|
|
978
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
979
|
+
|
|
980
|
+
Raises:
|
|
981
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
982
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
983
|
+
|
|
984
|
+
Tags:
|
|
985
|
+
Fields
|
|
986
|
+
"""
|
|
987
|
+
if fieldId is None:
|
|
988
|
+
raise ValueError("Missing required parameter 'fieldId'.")
|
|
989
|
+
url = f"{self.base_url}/1.0/fields/{fieldId}"
|
|
990
|
+
query_params = {
|
|
991
|
+
k: v
|
|
992
|
+
for k, v in [
|
|
993
|
+
("includeFields", includeFields),
|
|
994
|
+
("includeAllFields", includeAllFields),
|
|
995
|
+
]
|
|
996
|
+
if v is not None
|
|
997
|
+
}
|
|
998
|
+
response = self._get(url, params=query_params)
|
|
999
|
+
response.raise_for_status()
|
|
1000
|
+
if (
|
|
1001
|
+
response.status_code == 204
|
|
1002
|
+
or not response.content
|
|
1003
|
+
or not response.text.strip()
|
|
1004
|
+
):
|
|
1005
|
+
return None
|
|
1006
|
+
try:
|
|
1007
|
+
return response.json()
|
|
1008
|
+
except ValueError:
|
|
1009
|
+
return None
|
|
1010
|
+
|
|
1011
|
+
def update_field(
|
|
1012
|
+
self,
|
|
1013
|
+
fieldId: str,
|
|
1014
|
+
includeFields: list[str] | None = None,
|
|
1015
|
+
includeAllFields: bool | None = None,
|
|
1016
|
+
fieldLabel: str | None = None,
|
|
1017
|
+
fieldDescription: str | None = None,
|
|
1018
|
+
enabled: bool | None = None,
|
|
1019
|
+
private: bool | None = None,
|
|
1020
|
+
) -> dict[str, Any]:
|
|
1021
|
+
"""
|
|
1022
|
+
Update field by Id
|
|
1023
|
+
|
|
1024
|
+
Args:
|
|
1025
|
+
fieldId (string): fieldId
|
|
1026
|
+
includeFields (array): This query parameter allows you to specify which field properties should be returned in the response body by selecting from the drop down. To get the relevant field properties, use comma separated values. If this field is left blank, the default properties are returned.
|
|
1027
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the field properties should be returned in the response body. If the field is left blank, the default field properties are returned. Example: 'True'.
|
|
1028
|
+
fieldLabel (string): The fieldLabel is the name of the field. Example: 'Priority'.
|
|
1029
|
+
fieldDescription (string): The description of the field. Example: 'Priority of the bug.'.
|
|
1030
|
+
enabled (boolean): This depicts if the field is enabled or not. Only those fields which are enabled will reflect in the account. Example: 'False'.
|
|
1031
|
+
private (boolean): This depicts if the field is private or not. Example: 'False'.
|
|
1032
|
+
|
|
1033
|
+
Returns:
|
|
1034
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1035
|
+
|
|
1036
|
+
Raises:
|
|
1037
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1038
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1039
|
+
|
|
1040
|
+
Tags:
|
|
1041
|
+
Fields
|
|
1042
|
+
"""
|
|
1043
|
+
if fieldId is None:
|
|
1044
|
+
raise ValueError("Missing required parameter 'fieldId'.")
|
|
1045
|
+
request_body_data = None
|
|
1046
|
+
request_body_data = {
|
|
1047
|
+
"fieldLabel": fieldLabel,
|
|
1048
|
+
"fieldDescription": fieldDescription,
|
|
1049
|
+
"enabled": enabled,
|
|
1050
|
+
"private": private,
|
|
1051
|
+
}
|
|
1052
|
+
request_body_data = {
|
|
1053
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1054
|
+
}
|
|
1055
|
+
url = f"{self.base_url}/1.0/fields/{fieldId}"
|
|
1056
|
+
query_params = {
|
|
1057
|
+
k: v
|
|
1058
|
+
for k, v in [
|
|
1059
|
+
("includeFields", includeFields),
|
|
1060
|
+
("includeAllFields", includeAllFields),
|
|
1061
|
+
]
|
|
1062
|
+
if v is not None
|
|
1063
|
+
}
|
|
1064
|
+
response = self._put(
|
|
1065
|
+
url,
|
|
1066
|
+
data=request_body_data,
|
|
1067
|
+
params=query_params,
|
|
1068
|
+
content_type="application/json",
|
|
1069
|
+
)
|
|
1070
|
+
response.raise_for_status()
|
|
1071
|
+
if (
|
|
1072
|
+
response.status_code == 204
|
|
1073
|
+
or not response.content
|
|
1074
|
+
or not response.text.strip()
|
|
1075
|
+
):
|
|
1076
|
+
return None
|
|
1077
|
+
try:
|
|
1078
|
+
return response.json()
|
|
1079
|
+
except ValueError:
|
|
1080
|
+
return None
|
|
1081
|
+
|
|
1082
|
+
def delete_field(self, fieldId: str) -> Any:
|
|
1083
|
+
"""
|
|
1084
|
+
Delete field by Id
|
|
1085
|
+
|
|
1086
|
+
Args:
|
|
1087
|
+
fieldId (string): fieldId
|
|
1088
|
+
|
|
1089
|
+
Returns:
|
|
1090
|
+
Any: The resource was successfully removed from the database.
|
|
1091
|
+
|
|
1092
|
+
Raises:
|
|
1093
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1094
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1095
|
+
|
|
1096
|
+
Tags:
|
|
1097
|
+
Fields
|
|
1098
|
+
"""
|
|
1099
|
+
if fieldId is None:
|
|
1100
|
+
raise ValueError("Missing required parameter 'fieldId'.")
|
|
1101
|
+
url = f"{self.base_url}/1.0/fields/{fieldId}"
|
|
1102
|
+
query_params = {}
|
|
1103
|
+
response = self._delete(url, params=query_params)
|
|
1104
|
+
response.raise_for_status()
|
|
1105
|
+
if (
|
|
1106
|
+
response.status_code == 204
|
|
1107
|
+
or not response.content
|
|
1108
|
+
or not response.text.strip()
|
|
1109
|
+
):
|
|
1110
|
+
return None
|
|
1111
|
+
try:
|
|
1112
|
+
return response.json()
|
|
1113
|
+
except ValueError:
|
|
1114
|
+
return None
|
|
1115
|
+
|
|
1116
|
+
def get_all_timeoffs(
|
|
1117
|
+
self,
|
|
1118
|
+
pageSize: float | None = None,
|
|
1119
|
+
pageToken: str | None = None,
|
|
1120
|
+
includeFields: list[str] | None = None,
|
|
1121
|
+
includeAllFields: bool | None = None,
|
|
1122
|
+
sortBy: str | None = None,
|
|
1123
|
+
sortOrder: str | None = None,
|
|
1124
|
+
match: str | None = None,
|
|
1125
|
+
startDate_gt: str | None = None,
|
|
1126
|
+
startDate_eq: str | None = None,
|
|
1127
|
+
startDate_lt: str | None = None,
|
|
1128
|
+
startDate_ge: str | None = None,
|
|
1129
|
+
startDate_le: str | None = None,
|
|
1130
|
+
endDate_gt: str | None = None,
|
|
1131
|
+
endDate_eq: str | None = None,
|
|
1132
|
+
endDate_lt: str | None = None,
|
|
1133
|
+
endDate_ge: str | None = None,
|
|
1134
|
+
endDate_le: str | None = None,
|
|
1135
|
+
type_eq: list[str] | None = None,
|
|
1136
|
+
type_oneOf: list[str] | None = None,
|
|
1137
|
+
type_noneOf: list[str] | None = None,
|
|
1138
|
+
userId_eq: str | None = None,
|
|
1139
|
+
userId_oneOf: str | None = None,
|
|
1140
|
+
userId_noneOf: str | None = None,
|
|
1141
|
+
) -> dict[str, Any]:
|
|
1142
|
+
"""
|
|
1143
|
+
Get all time-offs
|
|
1144
|
+
|
|
1145
|
+
Args:
|
|
1146
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
1147
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
1148
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
1149
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
1150
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
1151
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
1152
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
1153
|
+
startDate_gt (string): Returns responses with start dates greater than the specified date. Example: '2023-03-28'.
|
|
1154
|
+
startDate_eq (string): Returns responses with start dates equal to the specified date. Example: '2023-03-28'.
|
|
1155
|
+
startDate_lt (string): Returns responses with start dates lesser than the specified date. Example: '2023-03-28'.
|
|
1156
|
+
startDate_ge (string): Returns responses with start dates greater than or equal to the specified date. Example: '2023-03-28'.
|
|
1157
|
+
startDate_le (string): Returns responses with start dates lesser than or equal to the specified date. Example: '2023-03-28'.
|
|
1158
|
+
endDate_gt (string): Returns responses with start dates greater than the specified date. Example: '2023-03-28'.
|
|
1159
|
+
endDate_eq (string): Returns responses with start dates equal to the specified date. Example: '2023-03-28'.
|
|
1160
|
+
endDate_lt (string): Returns responses with start dates lesser than the specified date. Example: '2023-03-28'.
|
|
1161
|
+
endDate_ge (string): Returns responses with start dates greater than or equal to the specified date. Example: '2023-03-28'.
|
|
1162
|
+
endDate_le (string): Returns responses with start dates lesser than or equal to the specified date.e. Example: '2023-03-28'.
|
|
1163
|
+
type_eq (array): Returns responses with time-offs that exactly match the specified time off type.
|
|
1164
|
+
type_oneOf (array): Returns responses with time-offs that matches one of the specified time off type.
|
|
1165
|
+
type_noneOf (array): Returns responses with time-offs that matches none of the specified time off type.
|
|
1166
|
+
userId_eq (string): Returns responses with time-offs that exactly match the specified user id. Example: '1'.
|
|
1167
|
+
userId_oneOf (string): Returns responses with time-offs that matches one of the specified user id. Example: '1,2,3'.
|
|
1168
|
+
userId_noneOf (string): Returns responses with time-offs that matches none of the specified user id. Example: '1,2'.
|
|
1169
|
+
|
|
1170
|
+
Returns:
|
|
1171
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1172
|
+
|
|
1173
|
+
Raises:
|
|
1174
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1175
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1176
|
+
|
|
1177
|
+
Tags:
|
|
1178
|
+
Time-Offs
|
|
1179
|
+
"""
|
|
1180
|
+
url = f"{self.base_url}/1.0/time-offs"
|
|
1181
|
+
query_params = {
|
|
1182
|
+
k: v
|
|
1183
|
+
for k, v in [
|
|
1184
|
+
("pageSize", pageSize),
|
|
1185
|
+
("pageToken", pageToken),
|
|
1186
|
+
("includeFields", includeFields),
|
|
1187
|
+
("includeAllFields", includeAllFields),
|
|
1188
|
+
("sortBy", sortBy),
|
|
1189
|
+
("sortOrder", sortOrder),
|
|
1190
|
+
("match", match),
|
|
1191
|
+
("startDate.gt", startDate_gt),
|
|
1192
|
+
("startDate.eq", startDate_eq),
|
|
1193
|
+
("startDate.lt", startDate_lt),
|
|
1194
|
+
("startDate.ge", startDate_ge),
|
|
1195
|
+
("startDate.le", startDate_le),
|
|
1196
|
+
("endDate.gt", endDate_gt),
|
|
1197
|
+
("endDate.eq", endDate_eq),
|
|
1198
|
+
("endDate.lt", endDate_lt),
|
|
1199
|
+
("endDate.ge", endDate_ge),
|
|
1200
|
+
("endDate.le", endDate_le),
|
|
1201
|
+
("type.eq", type_eq),
|
|
1202
|
+
("type.oneOf", type_oneOf),
|
|
1203
|
+
("type.noneOf", type_noneOf),
|
|
1204
|
+
("userId.eq", userId_eq),
|
|
1205
|
+
("userId.oneOf", userId_oneOf),
|
|
1206
|
+
("userId.noneOf", userId_noneOf),
|
|
1207
|
+
]
|
|
1208
|
+
if v is not None
|
|
1209
|
+
}
|
|
1210
|
+
response = self._get(url, params=query_params)
|
|
1211
|
+
response.raise_for_status()
|
|
1212
|
+
if (
|
|
1213
|
+
response.status_code == 204
|
|
1214
|
+
or not response.content
|
|
1215
|
+
or not response.text.strip()
|
|
1216
|
+
):
|
|
1217
|
+
return None
|
|
1218
|
+
try:
|
|
1219
|
+
return response.json()
|
|
1220
|
+
except ValueError:
|
|
1221
|
+
return None
|
|
1222
|
+
|
|
1223
|
+
def create_timeoff(
|
|
1224
|
+
self,
|
|
1225
|
+
includeFields: list[str] | None = None,
|
|
1226
|
+
includeAllFields: bool | None = None,
|
|
1227
|
+
timeOffId: int | None = None,
|
|
1228
|
+
user: dict[str, Any] | None = None,
|
|
1229
|
+
note: str | None = None,
|
|
1230
|
+
startDate: str | None = None,
|
|
1231
|
+
endDate: str | None = None,
|
|
1232
|
+
type: str | None = None,
|
|
1233
|
+
notifyUsers: dict[str, Any] | None = None,
|
|
1234
|
+
durationInMinutes: int | None = None,
|
|
1235
|
+
) -> dict[str, Any]:
|
|
1236
|
+
"""
|
|
1237
|
+
Create a time-off
|
|
1238
|
+
|
|
1239
|
+
Args:
|
|
1240
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
1241
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
1242
|
+
timeOffId (integer): The unique `identifier` of the time-off is generated by the system and used to identify the time-off globally. Example: '201'.
|
|
1243
|
+
user (object): The time-off user.
|
|
1244
|
+
note (string): The note or comment about the time-off. Example: 'Sick leave.'.
|
|
1245
|
+
startDate (string): The time-off start date. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
1246
|
+
endDate (string): The time-off end date. The `endDate` must be on or after the `startDate`, formatted as _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
1247
|
+
type (string): The `type` of the time-off. Example: '50'.
|
|
1248
|
+
notifyUsers (object): Users to notify about your time off.
|
|
1249
|
+
durationInMinutes (integer): The duration of time off is determined by the type selected: if the time off type is `CUSTOM`, the `durationInMinutes` field is `required`. Example: '50'.
|
|
1250
|
+
|
|
1251
|
+
Returns:
|
|
1252
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
1253
|
+
|
|
1254
|
+
Raises:
|
|
1255
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1256
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1257
|
+
|
|
1258
|
+
Tags:
|
|
1259
|
+
Time-Offs
|
|
1260
|
+
"""
|
|
1261
|
+
request_body_data = None
|
|
1262
|
+
request_body_data = {
|
|
1263
|
+
"timeOffId": timeOffId,
|
|
1264
|
+
"user": user,
|
|
1265
|
+
"note": note,
|
|
1266
|
+
"startDate": startDate,
|
|
1267
|
+
"endDate": endDate,
|
|
1268
|
+
"type": type,
|
|
1269
|
+
"notifyUsers": notifyUsers,
|
|
1270
|
+
"durationInMinutes": durationInMinutes,
|
|
1271
|
+
}
|
|
1272
|
+
request_body_data = {
|
|
1273
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1274
|
+
}
|
|
1275
|
+
url = f"{self.base_url}/1.0/time-offs"
|
|
1276
|
+
query_params = {
|
|
1277
|
+
k: v
|
|
1278
|
+
for k, v in [
|
|
1279
|
+
("includeFields", includeFields),
|
|
1280
|
+
("includeAllFields", includeAllFields),
|
|
1281
|
+
]
|
|
1282
|
+
if v is not None
|
|
1283
|
+
}
|
|
1284
|
+
response = self._post(
|
|
1285
|
+
url,
|
|
1286
|
+
data=request_body_data,
|
|
1287
|
+
params=query_params,
|
|
1288
|
+
content_type="application/json",
|
|
1289
|
+
)
|
|
1290
|
+
response.raise_for_status()
|
|
1291
|
+
if (
|
|
1292
|
+
response.status_code == 204
|
|
1293
|
+
or not response.content
|
|
1294
|
+
or not response.text.strip()
|
|
1295
|
+
):
|
|
1296
|
+
return None
|
|
1297
|
+
try:
|
|
1298
|
+
return response.json()
|
|
1299
|
+
except ValueError:
|
|
1300
|
+
return None
|
|
1301
|
+
|
|
1302
|
+
def get_all_time_entries(
|
|
1303
|
+
self,
|
|
1304
|
+
pageSize: float | None = None,
|
|
1305
|
+
pageToken: str | None = None,
|
|
1306
|
+
includeFields: list[str] | None = None,
|
|
1307
|
+
sortBy: str | None = None,
|
|
1308
|
+
sortOrder: str | None = None,
|
|
1309
|
+
match: str | None = None,
|
|
1310
|
+
date_gt: str | None = None,
|
|
1311
|
+
date_eq: str | None = None,
|
|
1312
|
+
date_lt: str | None = None,
|
|
1313
|
+
date_ge: str | None = None,
|
|
1314
|
+
date_le: str | None = None,
|
|
1315
|
+
project_eq: float | None = None,
|
|
1316
|
+
projectId_eq: float | None = None,
|
|
1317
|
+
task_eq: float | None = None,
|
|
1318
|
+
taskId_eq: float | None = None,
|
|
1319
|
+
taskId_oneOf: float | None = None,
|
|
1320
|
+
taskId_noneOf: float | None = None,
|
|
1321
|
+
projectPhase_eq: float | None = None,
|
|
1322
|
+
category_eq: float | None = None,
|
|
1323
|
+
user_eq: float | None = None,
|
|
1324
|
+
sourceType_eq: str | None = None,
|
|
1325
|
+
activityName_eq: str | None = None,
|
|
1326
|
+
activityName_cn: str | None = None,
|
|
1327
|
+
activityName_nc: str | None = None,
|
|
1328
|
+
approvalStatus_eq: str | None = None,
|
|
1329
|
+
approvedBy_eq: float | None = None,
|
|
1330
|
+
approvedAt_eq: int | None = None,
|
|
1331
|
+
approvedAt_gt: int | None = None,
|
|
1332
|
+
approvedAt_ge: int | None = None,
|
|
1333
|
+
approvedAt_lt: int | None = None,
|
|
1334
|
+
approvedAt_le: int | None = None,
|
|
1335
|
+
billable_eq: bool | None = None,
|
|
1336
|
+
includeDeleted_eq: bool | None = None,
|
|
1337
|
+
createdAt_gt: int | None = None,
|
|
1338
|
+
createdAt_eq: int | None = None,
|
|
1339
|
+
createdAt_lt: int | None = None,
|
|
1340
|
+
createdAt_ge: int | None = None,
|
|
1341
|
+
createdAt_le: int | None = None,
|
|
1342
|
+
updatedAt_gt: int | None = None,
|
|
1343
|
+
updatedAt_eq: int | None = None,
|
|
1344
|
+
updatedAt_lt: int | None = None,
|
|
1345
|
+
updatedAt_ge: int | None = None,
|
|
1346
|
+
updatedAt_le: int | None = None,
|
|
1347
|
+
) -> dict[str, Any]:
|
|
1348
|
+
"""
|
|
1349
|
+
Get all time entries
|
|
1350
|
+
|
|
1351
|
+
Args:
|
|
1352
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
1353
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
1354
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
1355
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field. Valid fields to perform sortBy are: `MINUTES`, `DATE`, `ID` and `BILLABLE`.
|
|
1356
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
1357
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
1358
|
+
date_gt (string): You can use this param to specify some date and the responses will contain time-entries whose date are greater than the given date. Example: '2023-03-28'.
|
|
1359
|
+
date_eq (string): You can use this param to specify some date and the responses will contain exact matches of time-entries that match the given date. Example: '2023-03-28'.
|
|
1360
|
+
date_lt (string): You can use this param to specify some date and the responses will contain time-entries whose date are less than the given date. Example: '2023-03-28'.
|
|
1361
|
+
date_ge (string): You can use this param to specify some date and the responses will contain time-entries whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
1362
|
+
date_le (string): You can use this param to specify some date and the responses will contain time-entries whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
1363
|
+
project_eq (number): You can use this param to specify some project Id and the responses will contain exact matches of time-entries that match the given project. Example: '201'.
|
|
1364
|
+
projectId_eq (number): You can use this param to specify some project Id and the responses will contain exact matches of time-entries that match the given project. Example: '201'.
|
|
1365
|
+
task_eq (number): You can use this param to specify some task Id and the responses will contain exact matches of time-entries that match the given task. Example: '202'.
|
|
1366
|
+
taskId_eq (number): You can use this param to specify some task Id and the responses will contain exact matches of time-entries that match the given task. Example: '202'.
|
|
1367
|
+
taskId_oneOf (number): You can use this param to provide ids of task and the responses will contain time entries whose time entries that contains the given task ids Example: '202'.
|
|
1368
|
+
taskId_noneOf (number): You can use this param to provide ids of task and the responses will contain time entries whose time entries that contains the given task ids Example: '202'.
|
|
1369
|
+
projectPhase_eq (number): You can use this param to specify some project phase Id and the responses will contain exact matches of time-entries that match the given phase. Example: '210'.
|
|
1370
|
+
category_eq (number): You can use this param to specify some category Id and the responses will contain exact matches of time-entries that match the given category. Example: '5'.
|
|
1371
|
+
user_eq (number): You can use this param to specify some user Id and the responses will contain exact matches of time-entries that belong to the user with the given user Id. Example: '5'.
|
|
1372
|
+
sourceType_eq (string): You can use this param to specify a source type for the time entries and the responses will contain exact matches of time-entries that have the given source type.
|
|
1373
|
+
activityName_eq (string): You can use this param to specify some activity name and the responses will contain exact matches of time-entries that match the given activity name. Example: 'Pre-Sales Campaign'.
|
|
1374
|
+
activityName_cn (string): You can use this param to specify some text and the responses will contain time-entries that contain the given text in their activity name. Example: 'Sales'.
|
|
1375
|
+
activityName_nc (string): You can use this param to specify some text and the responses will contain time-entries that _DO NOT_ contain the given text in their activity name. Example: 'Sales'.
|
|
1376
|
+
approvalStatus_eq (string): You can use this param to specify an approval status for the time entries and the responses will contain exact matches of time-entries that have the given approval type.
|
|
1377
|
+
approvedBy_eq (number): You can use this param to specify an approver for the time entries and the response will contain time-entries approved by the given user. Example: '5'.
|
|
1378
|
+
approvedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain time entries approved at the given timestamp. Example: '1625164800000'.
|
|
1379
|
+
approvedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain time entries approved after the given timestamp. Example: '1625164800000'.
|
|
1380
|
+
approvedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain time entries approved at or after the given timestamp. Example: '1625164800000'.
|
|
1381
|
+
approvedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain time entries approved before the given timestamp. Example: '1625164800000'.
|
|
1382
|
+
approvedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain time entries approved at or before the given timestamp. Example: '1625164800000'.
|
|
1383
|
+
billable_eq (boolean): You can use this param to specify the billable flag for the time entries and the responses will contain exact matches of time-entries that have the given billable. Example: 'True'.
|
|
1384
|
+
includeDeleted_eq (boolean): You can use this parameter to specify whether responses will include the deleted time entries. Example: 'False'.
|
|
1385
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are greater than the given time entries created date. Example: '1625164800000'.
|
|
1386
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of time entries that match the given time entries created date. Example: '1625164800000'.
|
|
1387
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are less than the given time entries created date. Example: '1625164800000'.
|
|
1388
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are greater than or equal to the given time entries created date. Example: '1625164800000'.
|
|
1389
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are less than or equal to the given time entries created date. Example: '1625164800000'.
|
|
1390
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are greater than the given time entries updated date. Example: '1625164800000'.
|
|
1391
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of time entries that match the given time entries updated date. Example: '1625164800000'.
|
|
1392
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are less than the given time entries updated date. Example: '1625164800000'.
|
|
1393
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are greater than or equal to the given time entries updated date. Example: '1625164800000'.
|
|
1394
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain time entries whose date are less than or equal to the given time entries updated date. Example: '1625164800000'.
|
|
1395
|
+
|
|
1396
|
+
Returns:
|
|
1397
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1398
|
+
|
|
1399
|
+
Raises:
|
|
1400
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1401
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1402
|
+
|
|
1403
|
+
Tags:
|
|
1404
|
+
Time Tracking
|
|
1405
|
+
"""
|
|
1406
|
+
url = f"{self.base_url}/1.0/time-entries"
|
|
1407
|
+
query_params = {
|
|
1408
|
+
k: v
|
|
1409
|
+
for k, v in [
|
|
1410
|
+
("pageSize", pageSize),
|
|
1411
|
+
("pageToken", pageToken),
|
|
1412
|
+
("includeFields", includeFields),
|
|
1413
|
+
("sortBy", sortBy),
|
|
1414
|
+
("sortOrder", sortOrder),
|
|
1415
|
+
("match", match),
|
|
1416
|
+
("date.gt", date_gt),
|
|
1417
|
+
("date.eq", date_eq),
|
|
1418
|
+
("date.lt", date_lt),
|
|
1419
|
+
("date.ge", date_ge),
|
|
1420
|
+
("date.le", date_le),
|
|
1421
|
+
("project.eq", project_eq),
|
|
1422
|
+
("projectId.eq", projectId_eq),
|
|
1423
|
+
("task.eq", task_eq),
|
|
1424
|
+
("taskId.eq", taskId_eq),
|
|
1425
|
+
("taskId.oneOf", taskId_oneOf),
|
|
1426
|
+
("taskId.noneOf", taskId_noneOf),
|
|
1427
|
+
("projectPhase.eq", projectPhase_eq),
|
|
1428
|
+
("category.eq", category_eq),
|
|
1429
|
+
("user.eq", user_eq),
|
|
1430
|
+
("sourceType.eq", sourceType_eq),
|
|
1431
|
+
("activityName.eq", activityName_eq),
|
|
1432
|
+
("activityName.cn", activityName_cn),
|
|
1433
|
+
("activityName.nc", activityName_nc),
|
|
1434
|
+
("approvalStatus.eq", approvalStatus_eq),
|
|
1435
|
+
("approvedBy.eq", approvedBy_eq),
|
|
1436
|
+
("approvedAt.eq", approvedAt_eq),
|
|
1437
|
+
("approvedAt.gt", approvedAt_gt),
|
|
1438
|
+
("approvedAt.ge", approvedAt_ge),
|
|
1439
|
+
("approvedAt.lt", approvedAt_lt),
|
|
1440
|
+
("approvedAt.le", approvedAt_le),
|
|
1441
|
+
("billable.eq", billable_eq),
|
|
1442
|
+
("includeDeleted.eq", includeDeleted_eq),
|
|
1443
|
+
("createdAt.gt", createdAt_gt),
|
|
1444
|
+
("createdAt.eq", createdAt_eq),
|
|
1445
|
+
("createdAt.lt", createdAt_lt),
|
|
1446
|
+
("createdAt.ge", createdAt_ge),
|
|
1447
|
+
("createdAt.le", createdAt_le),
|
|
1448
|
+
("updatedAt.gt", updatedAt_gt),
|
|
1449
|
+
("updatedAt.eq", updatedAt_eq),
|
|
1450
|
+
("updatedAt.lt", updatedAt_lt),
|
|
1451
|
+
("updatedAt.ge", updatedAt_ge),
|
|
1452
|
+
("updatedAt.le", updatedAt_le),
|
|
1453
|
+
]
|
|
1454
|
+
if v is not None
|
|
1455
|
+
}
|
|
1456
|
+
response = self._get(url, params=query_params)
|
|
1457
|
+
response.raise_for_status()
|
|
1458
|
+
if (
|
|
1459
|
+
response.status_code == 204
|
|
1460
|
+
or not response.content
|
|
1461
|
+
or not response.text.strip()
|
|
1462
|
+
):
|
|
1463
|
+
return None
|
|
1464
|
+
try:
|
|
1465
|
+
return response.json()
|
|
1466
|
+
except ValueError:
|
|
1467
|
+
return None
|
|
1468
|
+
|
|
1469
|
+
def create_time_entry(
|
|
1470
|
+
self,
|
|
1471
|
+
includeFields: list[str] | None = None,
|
|
1472
|
+
includeAllFields: bool | None = None,
|
|
1473
|
+
timeEntryId: int | None = None,
|
|
1474
|
+
date: str | None = None,
|
|
1475
|
+
minutes: int | None = None,
|
|
1476
|
+
activityName: str | None = None,
|
|
1477
|
+
project: dict[str, Any] | None = None,
|
|
1478
|
+
task: dict[str, Any] | None = None,
|
|
1479
|
+
projectPhase: dict[str, Any] | None = None,
|
|
1480
|
+
billable: bool | None = None,
|
|
1481
|
+
user: dict[str, Any] | None = None,
|
|
1482
|
+
notes: str | None = None,
|
|
1483
|
+
category: dict[str, Any] | None = None,
|
|
1484
|
+
) -> dict[str, Any]:
|
|
1485
|
+
"""
|
|
1486
|
+
Create a time entry
|
|
1487
|
+
|
|
1488
|
+
Args:
|
|
1489
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
1490
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
1491
|
+
timeEntryId (integer): The unique, system-generated identifier, which can be used to identify the time entry globally. Example: '201'.
|
|
1492
|
+
date (string): Date of the time entry in format YYYY-MM-DD Example: '2023-03-28'.
|
|
1493
|
+
minutes (integer): Duration of the time entry in minutes Example: '250'.
|
|
1494
|
+
activityName (string): Name of the adhoc activity being performed Example: 'Pre-Sales campaign'.
|
|
1495
|
+
project (object): Project associated with the time entry
|
|
1496
|
+
task (object): Task associated with the time entry
|
|
1497
|
+
projectPhase (object): Project phase associated with the time entry
|
|
1498
|
+
billable (boolean): Whether the time entry is billable. Defaults to true Example: 'True'.
|
|
1499
|
+
user (object): User associated with the time entry
|
|
1500
|
+
notes (string): Notes for the time entry Example: 'Working on API integration'.
|
|
1501
|
+
category (object): Category associated with the time entry
|
|
1502
|
+
|
|
1503
|
+
Returns:
|
|
1504
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
1505
|
+
|
|
1506
|
+
Raises:
|
|
1507
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1508
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1509
|
+
|
|
1510
|
+
Tags:
|
|
1511
|
+
Time Tracking
|
|
1512
|
+
"""
|
|
1513
|
+
request_body_data = None
|
|
1514
|
+
request_body_data = {
|
|
1515
|
+
"timeEntryId": timeEntryId,
|
|
1516
|
+
"date": date,
|
|
1517
|
+
"minutes": minutes,
|
|
1518
|
+
"activityName": activityName,
|
|
1519
|
+
"project": project,
|
|
1520
|
+
"task": task,
|
|
1521
|
+
"projectPhase": projectPhase,
|
|
1522
|
+
"billable": billable,
|
|
1523
|
+
"user": user,
|
|
1524
|
+
"notes": notes,
|
|
1525
|
+
"category": category,
|
|
1526
|
+
}
|
|
1527
|
+
request_body_data = {
|
|
1528
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1529
|
+
}
|
|
1530
|
+
url = f"{self.base_url}/1.0/time-entries"
|
|
1531
|
+
query_params = {
|
|
1532
|
+
k: v
|
|
1533
|
+
for k, v in [
|
|
1534
|
+
("includeFields", includeFields),
|
|
1535
|
+
("includeAllFields", includeAllFields),
|
|
1536
|
+
]
|
|
1537
|
+
if v is not None
|
|
1538
|
+
}
|
|
1539
|
+
response = self._post(
|
|
1540
|
+
url,
|
|
1541
|
+
data=request_body_data,
|
|
1542
|
+
params=query_params,
|
|
1543
|
+
content_type="application/json",
|
|
1544
|
+
)
|
|
1545
|
+
response.raise_for_status()
|
|
1546
|
+
if (
|
|
1547
|
+
response.status_code == 204
|
|
1548
|
+
or not response.content
|
|
1549
|
+
or not response.text.strip()
|
|
1550
|
+
):
|
|
1551
|
+
return None
|
|
1552
|
+
try:
|
|
1553
|
+
return response.json()
|
|
1554
|
+
except ValueError:
|
|
1555
|
+
return None
|
|
1556
|
+
|
|
1557
|
+
def remove_followers_from_task(
|
|
1558
|
+
self, taskId: str, members: list[dict[str, Any]] | None = None
|
|
1559
|
+
) -> dict[str, Any]:
|
|
1560
|
+
"""
|
|
1561
|
+
Remove followers from a task by Id
|
|
1562
|
+
|
|
1563
|
+
Args:
|
|
1564
|
+
taskId (string): taskId
|
|
1565
|
+
members (array): The list includes both `team members` and `customers` assigned to the task.
|
|
1566
|
+
|
|
1567
|
+
Returns:
|
|
1568
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1569
|
+
|
|
1570
|
+
Raises:
|
|
1571
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1572
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1573
|
+
|
|
1574
|
+
Tags:
|
|
1575
|
+
Tasks
|
|
1576
|
+
"""
|
|
1577
|
+
if taskId is None:
|
|
1578
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1579
|
+
request_body_data = None
|
|
1580
|
+
request_body_data = {
|
|
1581
|
+
"members": members,
|
|
1582
|
+
}
|
|
1583
|
+
request_body_data = {
|
|
1584
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1585
|
+
}
|
|
1586
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/remove-followers"
|
|
1587
|
+
query_params = {}
|
|
1588
|
+
response = self._post(
|
|
1589
|
+
url,
|
|
1590
|
+
data=request_body_data,
|
|
1591
|
+
params=query_params,
|
|
1592
|
+
content_type="application/json",
|
|
1593
|
+
)
|
|
1594
|
+
response.raise_for_status()
|
|
1595
|
+
if (
|
|
1596
|
+
response.status_code == 204
|
|
1597
|
+
or not response.content
|
|
1598
|
+
or not response.text.strip()
|
|
1599
|
+
):
|
|
1600
|
+
return None
|
|
1601
|
+
try:
|
|
1602
|
+
return response.json()
|
|
1603
|
+
except ValueError:
|
|
1604
|
+
return None
|
|
1605
|
+
|
|
1606
|
+
def remove_dependencies_from_task(
|
|
1607
|
+
self, taskId: str, dependencies: list[dict[str, Any]] | None = None
|
|
1608
|
+
) -> dict[str, Any]:
|
|
1609
|
+
"""
|
|
1610
|
+
Remove dependencies from a task by Id
|
|
1611
|
+
|
|
1612
|
+
Args:
|
|
1613
|
+
taskId (string): taskId
|
|
1614
|
+
dependencies (array): Task Dependencies allow you to define relationships between tasks that are dependent on each other. Example: '201'.
|
|
1615
|
+
|
|
1616
|
+
Returns:
|
|
1617
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1618
|
+
|
|
1619
|
+
Raises:
|
|
1620
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1621
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1622
|
+
|
|
1623
|
+
Tags:
|
|
1624
|
+
Tasks
|
|
1625
|
+
"""
|
|
1626
|
+
if taskId is None:
|
|
1627
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1628
|
+
request_body_data = None
|
|
1629
|
+
request_body_data = {
|
|
1630
|
+
"dependencies": dependencies,
|
|
1631
|
+
}
|
|
1632
|
+
request_body_data = {
|
|
1633
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1634
|
+
}
|
|
1635
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/remove-dependencies"
|
|
1636
|
+
query_params = {}
|
|
1637
|
+
response = self._post(
|
|
1638
|
+
url,
|
|
1639
|
+
data=request_body_data,
|
|
1640
|
+
params=query_params,
|
|
1641
|
+
content_type="application/json",
|
|
1642
|
+
)
|
|
1643
|
+
response.raise_for_status()
|
|
1644
|
+
if (
|
|
1645
|
+
response.status_code == 204
|
|
1646
|
+
or not response.content
|
|
1647
|
+
or not response.text.strip()
|
|
1648
|
+
):
|
|
1649
|
+
return None
|
|
1650
|
+
try:
|
|
1651
|
+
return response.json()
|
|
1652
|
+
except ValueError:
|
|
1653
|
+
return None
|
|
1654
|
+
|
|
1655
|
+
def remove_assignees_from_task(
|
|
1656
|
+
self,
|
|
1657
|
+
taskId: str,
|
|
1658
|
+
members: list[dict[str, Any]] | None = None,
|
|
1659
|
+
placeholders: list[dict[str, Any]] | None = None,
|
|
1660
|
+
) -> dict[str, Any]:
|
|
1661
|
+
"""
|
|
1662
|
+
Remove assignees from a task by Id
|
|
1663
|
+
|
|
1664
|
+
Args:
|
|
1665
|
+
taskId (string): taskId
|
|
1666
|
+
members (array): The list includes both `team members` and `customers` assigned to the task.
|
|
1667
|
+
placeholders (array): Rocketlane’s placeholders are associated with roles. Based on the kind of roles and expertise that are needed to execute a task, placeholders can be added as assignees to templates as well as projects. Eventually, you can resolve placeholders by replacing them with team members according to their availability and role.
|
|
1668
|
+
Note: If the project is not built using sources, this value will be ignored but the mappings are retained and can be used in the future
|
|
1669
|
+
|
|
1670
|
+
Returns:
|
|
1671
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1672
|
+
|
|
1673
|
+
Raises:
|
|
1674
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1675
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1676
|
+
|
|
1677
|
+
Tags:
|
|
1678
|
+
Tasks
|
|
1679
|
+
"""
|
|
1680
|
+
if taskId is None:
|
|
1681
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1682
|
+
request_body_data = None
|
|
1683
|
+
request_body_data = {
|
|
1684
|
+
"members": members,
|
|
1685
|
+
"placeholders": placeholders,
|
|
1686
|
+
}
|
|
1687
|
+
request_body_data = {
|
|
1688
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1689
|
+
}
|
|
1690
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/remove-assignees"
|
|
1691
|
+
query_params = {}
|
|
1692
|
+
response = self._post(
|
|
1693
|
+
url,
|
|
1694
|
+
data=request_body_data,
|
|
1695
|
+
params=query_params,
|
|
1696
|
+
content_type="application/json",
|
|
1697
|
+
)
|
|
1698
|
+
response.raise_for_status()
|
|
1699
|
+
if (
|
|
1700
|
+
response.status_code == 204
|
|
1701
|
+
or not response.content
|
|
1702
|
+
or not response.text.strip()
|
|
1703
|
+
):
|
|
1704
|
+
return None
|
|
1705
|
+
try:
|
|
1706
|
+
return response.json()
|
|
1707
|
+
except ValueError:
|
|
1708
|
+
return None
|
|
1709
|
+
|
|
1710
|
+
def move_task_to_given_phase(
|
|
1711
|
+
self, taskId: str, phase: dict[str, Any] | None = None
|
|
1712
|
+
) -> dict[str, Any]:
|
|
1713
|
+
"""
|
|
1714
|
+
Move a task to the phase by Id
|
|
1715
|
+
|
|
1716
|
+
Args:
|
|
1717
|
+
taskId (string): taskId
|
|
1718
|
+
phase (object): The phase to which the task will be moved, associating the task with this phase.
|
|
1719
|
+
|
|
1720
|
+
Returns:
|
|
1721
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1722
|
+
|
|
1723
|
+
Raises:
|
|
1724
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1725
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1726
|
+
|
|
1727
|
+
Tags:
|
|
1728
|
+
Tasks
|
|
1729
|
+
"""
|
|
1730
|
+
if taskId is None:
|
|
1731
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1732
|
+
request_body_data = None
|
|
1733
|
+
request_body_data = {
|
|
1734
|
+
"phase": phase,
|
|
1735
|
+
}
|
|
1736
|
+
request_body_data = {
|
|
1737
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1738
|
+
}
|
|
1739
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/move-phase"
|
|
1740
|
+
query_params = {}
|
|
1741
|
+
response = self._post(
|
|
1742
|
+
url,
|
|
1743
|
+
data=request_body_data,
|
|
1744
|
+
params=query_params,
|
|
1745
|
+
content_type="application/json",
|
|
1746
|
+
)
|
|
1747
|
+
response.raise_for_status()
|
|
1748
|
+
if (
|
|
1749
|
+
response.status_code == 204
|
|
1750
|
+
or not response.content
|
|
1751
|
+
or not response.text.strip()
|
|
1752
|
+
):
|
|
1753
|
+
return None
|
|
1754
|
+
try:
|
|
1755
|
+
return response.json()
|
|
1756
|
+
except ValueError:
|
|
1757
|
+
return None
|
|
1758
|
+
|
|
1759
|
+
def add_followers_to_task(
|
|
1760
|
+
self, taskId: str, members: list[dict[str, Any]] | None = None
|
|
1761
|
+
) -> dict[str, Any]:
|
|
1762
|
+
"""
|
|
1763
|
+
Add followers to a task by Id
|
|
1764
|
+
|
|
1765
|
+
Args:
|
|
1766
|
+
taskId (string): taskId
|
|
1767
|
+
members (array): The list includes both `team members` and `customers` assigned to the task.
|
|
1768
|
+
|
|
1769
|
+
Returns:
|
|
1770
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1771
|
+
|
|
1772
|
+
Raises:
|
|
1773
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1774
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1775
|
+
|
|
1776
|
+
Tags:
|
|
1777
|
+
Tasks
|
|
1778
|
+
"""
|
|
1779
|
+
if taskId is None:
|
|
1780
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1781
|
+
request_body_data = None
|
|
1782
|
+
request_body_data = {
|
|
1783
|
+
"members": members,
|
|
1784
|
+
}
|
|
1785
|
+
request_body_data = {
|
|
1786
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1787
|
+
}
|
|
1788
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/add-followers"
|
|
1789
|
+
query_params = {}
|
|
1790
|
+
response = self._post(
|
|
1791
|
+
url,
|
|
1792
|
+
data=request_body_data,
|
|
1793
|
+
params=query_params,
|
|
1794
|
+
content_type="application/json",
|
|
1795
|
+
)
|
|
1796
|
+
response.raise_for_status()
|
|
1797
|
+
if (
|
|
1798
|
+
response.status_code == 204
|
|
1799
|
+
or not response.content
|
|
1800
|
+
or not response.text.strip()
|
|
1801
|
+
):
|
|
1802
|
+
return None
|
|
1803
|
+
try:
|
|
1804
|
+
return response.json()
|
|
1805
|
+
except ValueError:
|
|
1806
|
+
return None
|
|
1807
|
+
|
|
1808
|
+
def add_dependencies_to_task(
|
|
1809
|
+
self, taskId: str, dependencies: list[dict[str, Any]] | None = None
|
|
1810
|
+
) -> dict[str, Any]:
|
|
1811
|
+
"""
|
|
1812
|
+
Add dependencies to a task by Id
|
|
1813
|
+
|
|
1814
|
+
Args:
|
|
1815
|
+
taskId (string): taskId
|
|
1816
|
+
dependencies (array): Task Dependencies allow you to define relationships between tasks that are dependent on each other. Example: '201'.
|
|
1817
|
+
|
|
1818
|
+
Returns:
|
|
1819
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1820
|
+
|
|
1821
|
+
Raises:
|
|
1822
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1823
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1824
|
+
|
|
1825
|
+
Tags:
|
|
1826
|
+
Tasks
|
|
1827
|
+
"""
|
|
1828
|
+
if taskId is None:
|
|
1829
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1830
|
+
request_body_data = None
|
|
1831
|
+
request_body_data = {
|
|
1832
|
+
"dependencies": dependencies,
|
|
1833
|
+
}
|
|
1834
|
+
request_body_data = {
|
|
1835
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1836
|
+
}
|
|
1837
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/add-dependencies"
|
|
1838
|
+
query_params = {}
|
|
1839
|
+
response = self._post(
|
|
1840
|
+
url,
|
|
1841
|
+
data=request_body_data,
|
|
1842
|
+
params=query_params,
|
|
1843
|
+
content_type="application/json",
|
|
1844
|
+
)
|
|
1845
|
+
response.raise_for_status()
|
|
1846
|
+
if (
|
|
1847
|
+
response.status_code == 204
|
|
1848
|
+
or not response.content
|
|
1849
|
+
or not response.text.strip()
|
|
1850
|
+
):
|
|
1851
|
+
return None
|
|
1852
|
+
try:
|
|
1853
|
+
return response.json()
|
|
1854
|
+
except ValueError:
|
|
1855
|
+
return None
|
|
1856
|
+
|
|
1857
|
+
def add_assignee_to_task(
|
|
1858
|
+
self,
|
|
1859
|
+
taskId: str,
|
|
1860
|
+
members: list[dict[str, Any]] | None = None,
|
|
1861
|
+
placeholders: list[dict[str, Any]] | None = None,
|
|
1862
|
+
) -> dict[str, Any]:
|
|
1863
|
+
"""
|
|
1864
|
+
Add assignees to a task by Id
|
|
1865
|
+
|
|
1866
|
+
Args:
|
|
1867
|
+
taskId (string): taskId
|
|
1868
|
+
members (array): The list includes both `team members` and `customers` assigned to the task.
|
|
1869
|
+
placeholders (array): Rocketlane’s placeholders are associated with roles. Based on the kind of roles and expertise that are needed to execute a task, placeholders can be added as assignees to templates as well as projects. Eventually, you can resolve placeholders by replacing them with team members according to their availability and role.
|
|
1870
|
+
Note: If the project is not built using sources, this value will be ignored but the mappings are retained and can be used in the future
|
|
1871
|
+
|
|
1872
|
+
Returns:
|
|
1873
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
1874
|
+
|
|
1875
|
+
Raises:
|
|
1876
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1877
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1878
|
+
|
|
1879
|
+
Tags:
|
|
1880
|
+
Tasks
|
|
1881
|
+
"""
|
|
1882
|
+
if taskId is None:
|
|
1883
|
+
raise ValueError("Missing required parameter 'taskId'.")
|
|
1884
|
+
request_body_data = None
|
|
1885
|
+
request_body_data = {
|
|
1886
|
+
"members": members,
|
|
1887
|
+
"placeholders": placeholders,
|
|
1888
|
+
}
|
|
1889
|
+
request_body_data = {
|
|
1890
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
1891
|
+
}
|
|
1892
|
+
url = f"{self.base_url}/1.0/tasks/{taskId}/add-assignees"
|
|
1893
|
+
query_params = {}
|
|
1894
|
+
response = self._post(
|
|
1895
|
+
url,
|
|
1896
|
+
data=request_body_data,
|
|
1897
|
+
params=query_params,
|
|
1898
|
+
content_type="application/json",
|
|
1899
|
+
)
|
|
1900
|
+
response.raise_for_status()
|
|
1901
|
+
if (
|
|
1902
|
+
response.status_code == 204
|
|
1903
|
+
or not response.content
|
|
1904
|
+
or not response.text.strip()
|
|
1905
|
+
):
|
|
1906
|
+
return None
|
|
1907
|
+
try:
|
|
1908
|
+
return response.json()
|
|
1909
|
+
except ValueError:
|
|
1910
|
+
return None
|
|
1911
|
+
|
|
1912
|
+
def get_all_tasks(
|
|
1913
|
+
self,
|
|
1914
|
+
pageSize: float | None = None,
|
|
1915
|
+
pageToken: str | None = None,
|
|
1916
|
+
includeFields: list[str] | None = None,
|
|
1917
|
+
includeAllFields: bool | None = None,
|
|
1918
|
+
sortBy: str | None = None,
|
|
1919
|
+
sortOrder: str | None = None,
|
|
1920
|
+
match: str | None = None,
|
|
1921
|
+
startDate_gt: str | None = None,
|
|
1922
|
+
startDate_eq: str | None = None,
|
|
1923
|
+
startDate_lt: str | None = None,
|
|
1924
|
+
startDate_ge: str | None = None,
|
|
1925
|
+
startDate_le: str | None = None,
|
|
1926
|
+
dueDate_gt: str | None = None,
|
|
1927
|
+
dueDate_eq: str | None = None,
|
|
1928
|
+
dueDate_lt: str | None = None,
|
|
1929
|
+
dueDate_ge: str | None = None,
|
|
1930
|
+
dueDate_le: str | None = None,
|
|
1931
|
+
startDateActual_gt: str | None = None,
|
|
1932
|
+
startDateActual_eq: str | None = None,
|
|
1933
|
+
startDateActual_lt: str | None = None,
|
|
1934
|
+
startDateActual_ge: str | None = None,
|
|
1935
|
+
startDateActual_le: str | None = None,
|
|
1936
|
+
dueDateActual_gt: str | None = None,
|
|
1937
|
+
dueDateActual_eq: str | None = None,
|
|
1938
|
+
dueDateActual_lt: str | None = None,
|
|
1939
|
+
dueDateActual_ge: str | None = None,
|
|
1940
|
+
dueDateActual_le: str | None = None,
|
|
1941
|
+
createdAt_gt: int | None = None,
|
|
1942
|
+
createdAt_eq: int | None = None,
|
|
1943
|
+
createdAt_lt: int | None = None,
|
|
1944
|
+
createdAt_ge: int | None = None,
|
|
1945
|
+
createdAt_le: int | None = None,
|
|
1946
|
+
updatedAt_gt: int | None = None,
|
|
1947
|
+
updatedAt_eq: int | None = None,
|
|
1948
|
+
updatedAt_lt: int | None = None,
|
|
1949
|
+
updatedAt_ge: int | None = None,
|
|
1950
|
+
updatedAt_le: int | None = None,
|
|
1951
|
+
projectId_eq: float | None = None,
|
|
1952
|
+
phaseId_eq: float | None = None,
|
|
1953
|
+
taskName_eq: str | None = None,
|
|
1954
|
+
taskName_cn: str | None = None,
|
|
1955
|
+
taskName_nc: str | None = None,
|
|
1956
|
+
effortInMinutes_eq: float | None = None,
|
|
1957
|
+
effortInMinutes_gt: float | None = None,
|
|
1958
|
+
effortInMinutes_lt: float | None = None,
|
|
1959
|
+
progress_eq: float | None = None,
|
|
1960
|
+
progress_gt: float | None = None,
|
|
1961
|
+
progress_lt: float | None = None,
|
|
1962
|
+
includeArchive_eq: bool | None = None,
|
|
1963
|
+
task_status_eq: str | None = None,
|
|
1964
|
+
task_status_oneOf: str | None = None,
|
|
1965
|
+
task_status_noneOf: str | None = None,
|
|
1966
|
+
project_status_eq: str | None = None,
|
|
1967
|
+
project_status_oneOf: str | None = None,
|
|
1968
|
+
project_status_noneOf: str | None = None,
|
|
1969
|
+
externalReferenceId_eq: str | None = None,
|
|
1970
|
+
) -> dict[str, Any]:
|
|
1971
|
+
"""
|
|
1972
|
+
Get all tasks
|
|
1973
|
+
|
|
1974
|
+
Args:
|
|
1975
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
1976
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
1977
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
1978
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
1979
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
1980
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
1981
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
1982
|
+
startDate_gt (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than the given date. Example: '2023-03-28'.
|
|
1983
|
+
startDate_eq (string): You can use this param to specify some date and the responses will contain exact matches of tasks that match the given date. Example: '2023-03-28'.
|
|
1984
|
+
startDate_lt (string): You can use this param to specify some date and the responses will contain tasks whose date are less than the given date. Example: '2023-03-28'.
|
|
1985
|
+
startDate_ge (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
1986
|
+
startDate_le (string): You can use this param to specify some date and the responses will contain tasks whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
1987
|
+
dueDate_gt (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than the given date. Example: '2023-03-28'.
|
|
1988
|
+
dueDate_eq (string): You can use this param to specify some date and the responses will contain exact matches of tasks that match the given date. Example: '2023-03-28'.
|
|
1989
|
+
dueDate_lt (string): You can use this param to specify some date and the responses will contain tasks whose date are less than the given date. Example: '2023-03-28'.
|
|
1990
|
+
dueDate_ge (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
1991
|
+
dueDate_le (string): You can use this param to specify some date and the responses will contain tasks whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
1992
|
+
startDateActual_gt (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than the given date. Example: '2023-03-28'.
|
|
1993
|
+
startDateActual_eq (string): You can use this param to specify some date and the responses will contain exact matches of tasks that match the given date. Example: '2023-03-28'.
|
|
1994
|
+
startDateActual_lt (string): You can use this param to specify some date and the responses will contain tasks whose date are less than the given date. Example: '2023-03-28'.
|
|
1995
|
+
startDateActual_ge (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
1996
|
+
startDateActual_le (string): You can use this param to specify some date and the responses will contain tasks whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
1997
|
+
dueDateActual_gt (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than the given date. Example: '2023-03-28'.
|
|
1998
|
+
dueDateActual_eq (string): You can use this param to specify some date and the responses will contain exact matches of tasks that match the given date. Example: '2023-03-28'.
|
|
1999
|
+
dueDateActual_lt (string): You can use this param to specify some date and the responses will contain tasks whose date are less than the given date. Example: '2023-03-28'.
|
|
2000
|
+
dueDateActual_ge (string): You can use this param to specify some date and the responses will contain tasks whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
2001
|
+
dueDateActual_le (string): You can use this param to specify some date and the responses will contain tasks whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
2002
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are greater than the given tasks created date. Example: '1625164800000'.
|
|
2003
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of tasks that match the given tasks created date. Example: '1625164800000'.
|
|
2004
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are less than the given tasks created date. Example: '1625164800000'.
|
|
2005
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are greater than or equal to the given tasks created date. Example: '1625164800000'.
|
|
2006
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are less than or equal to the given tasks created date. Example: '1625164800000'.
|
|
2007
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are greater than the given tasks updated date. Example: '1625164800000'.
|
|
2008
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of tasks that match the given tasks updated date. Example: '1625164800000'.
|
|
2009
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are less than the given tasks updated date. Example: '1625164800000'.
|
|
2010
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are greater than or equal to the given tasks updated date. Example: '1625164800000'.
|
|
2011
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain tasks whose date are less than or equal to the given tasks updated date. Example: '1625164800000'.
|
|
2012
|
+
projectId_eq (number): You can use this param to specify some value as project id and the responses will contain exact matches of tasks that match the given value. Example: '10000'.
|
|
2013
|
+
phaseId_eq (number): You can use this param to specify some value as phase id and the responses will contain exact matches of tasks that match the given value. Example: '10000'.
|
|
2014
|
+
taskName_eq (string): You can use this param to specify some task name and the responses will contain exact matches of tasks that match the given name. Example: 'Stark Onboarding'.
|
|
2015
|
+
taskName_cn (string): You can use this param to specify some task name and the responses will contain matches of tasks that match the given name. Example: 'Stark Onboarding'.
|
|
2016
|
+
taskName_nc (string): You can use this param to specify some task name and the responses will not contain matches of tasks that match the given name. Example: 'Stark Onboarding'.
|
|
2017
|
+
effortInMinutes_eq (number): You can use this param to specify some value as effort and the responses will contain exact matches of tasks that match the given value. Example: '10000'.
|
|
2018
|
+
effortInMinutes_gt (number): You can use this param to specify some value as effort and the responses will contain exact matches of tasks greater than that of the given value. Example: '10000'.
|
|
2019
|
+
effortInMinutes_lt (number): You can use this param to specify some value as effort and the responses will contain exact matches of tasks lesser than that of the given value. Example: '10000'.
|
|
2020
|
+
progress_eq (number): You can use this param to specify some value as progress and the responses will contain exact matches of tasks that match the given value. Example: '55'.
|
|
2021
|
+
progress_gt (number): You can use this param to specify some value as progress and the responses will contain exact matches of tasks greater than that of the given value. Example: '55'.
|
|
2022
|
+
progress_lt (number): You can use this param to specify some value as progress and the responses will contain exact matches of tasks lesser than that of the given value. Example: '55'.
|
|
2023
|
+
includeArchive_eq (boolean): You can use this parameter to specify whether responses will include the archived tasks. Example: 'False'.
|
|
2024
|
+
task_status_eq (string): You can use this param to provide status and the responses will contain tasks that are equal to the given status Example: '1'.
|
|
2025
|
+
task_status_oneOf (string): You can use this param to provide statuses and the responses will contain tasks that contains the given status Example: '1,2'.
|
|
2026
|
+
task_status_noneOf (string): You can use this param to provide statuses and the responses will not contain tasks that are equal to the given status Example: '1,2'.
|
|
2027
|
+
project_status_eq (string): You can use this param to provide status of project and the responses will contain tasks whose project's status are equal to the given status Example: '1'.
|
|
2028
|
+
project_status_oneOf (string): You can use this param to provide statuses of project and the responses will contain tasks whose project's statuses that contains the given status Example: '1,2'.
|
|
2029
|
+
project_status_noneOf (string): You can use this param to provide statuses of project and the responses will not contain tasks whose project's statuses are equal to the given status(es) Example: '1,2'.
|
|
2030
|
+
externalReferenceId_eq (string): You can use this param to provide external reference id and the responses will contain tasks that are equal to the given id Example: 'task_1818910101'.
|
|
2031
|
+
|
|
2032
|
+
Returns:
|
|
2033
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2034
|
+
|
|
2035
|
+
Raises:
|
|
2036
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2037
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2038
|
+
|
|
2039
|
+
Tags:
|
|
2040
|
+
Tasks
|
|
2041
|
+
"""
|
|
2042
|
+
url = f"{self.base_url}/1.0/tasks"
|
|
2043
|
+
query_params = {
|
|
2044
|
+
k: v
|
|
2045
|
+
for k, v in [
|
|
2046
|
+
("pageSize", pageSize),
|
|
2047
|
+
("pageToken", pageToken),
|
|
2048
|
+
("includeFields", includeFields),
|
|
2049
|
+
("includeAllFields", includeAllFields),
|
|
2050
|
+
("sortBy", sortBy),
|
|
2051
|
+
("sortOrder", sortOrder),
|
|
2052
|
+
("match", match),
|
|
2053
|
+
("startDate.gt", startDate_gt),
|
|
2054
|
+
("startDate.eq", startDate_eq),
|
|
2055
|
+
("startDate.lt", startDate_lt),
|
|
2056
|
+
("startDate.ge", startDate_ge),
|
|
2057
|
+
("startDate.le", startDate_le),
|
|
2058
|
+
("dueDate.gt", dueDate_gt),
|
|
2059
|
+
("dueDate.eq", dueDate_eq),
|
|
2060
|
+
("dueDate.lt", dueDate_lt),
|
|
2061
|
+
("dueDate.ge", dueDate_ge),
|
|
2062
|
+
("dueDate.le", dueDate_le),
|
|
2063
|
+
("startDateActual.gt", startDateActual_gt),
|
|
2064
|
+
("startDateActual.eq", startDateActual_eq),
|
|
2065
|
+
("startDateActual.lt", startDateActual_lt),
|
|
2066
|
+
("startDateActual.ge", startDateActual_ge),
|
|
2067
|
+
("startDateActual.le", startDateActual_le),
|
|
2068
|
+
("dueDateActual.gt", dueDateActual_gt),
|
|
2069
|
+
("dueDateActual.eq", dueDateActual_eq),
|
|
2070
|
+
("dueDateActual.lt", dueDateActual_lt),
|
|
2071
|
+
("dueDateActual.ge", dueDateActual_ge),
|
|
2072
|
+
("dueDateActual.le", dueDateActual_le),
|
|
2073
|
+
("createdAt.gt", createdAt_gt),
|
|
2074
|
+
("createdAt.eq", createdAt_eq),
|
|
2075
|
+
("createdAt.lt", createdAt_lt),
|
|
2076
|
+
("createdAt.ge", createdAt_ge),
|
|
2077
|
+
("createdAt.le", createdAt_le),
|
|
2078
|
+
("updatedAt.gt", updatedAt_gt),
|
|
2079
|
+
("updatedAt.eq", updatedAt_eq),
|
|
2080
|
+
("updatedAt.lt", updatedAt_lt),
|
|
2081
|
+
("updatedAt.ge", updatedAt_ge),
|
|
2082
|
+
("updatedAt.le", updatedAt_le),
|
|
2083
|
+
("projectId.eq", projectId_eq),
|
|
2084
|
+
("phaseId.eq", phaseId_eq),
|
|
2085
|
+
("taskName.eq", taskName_eq),
|
|
2086
|
+
("taskName.cn", taskName_cn),
|
|
2087
|
+
("taskName.nc", taskName_nc),
|
|
2088
|
+
("effortInMinutes.eq", effortInMinutes_eq),
|
|
2089
|
+
("effortInMinutes.gt", effortInMinutes_gt),
|
|
2090
|
+
("effortInMinutes.lt", effortInMinutes_lt),
|
|
2091
|
+
("progress.eq", progress_eq),
|
|
2092
|
+
("progress.gt", progress_gt),
|
|
2093
|
+
("progress.lt", progress_lt),
|
|
2094
|
+
("includeArchive.eq", includeArchive_eq),
|
|
2095
|
+
("task.status.eq", task_status_eq),
|
|
2096
|
+
("task.status.oneOf", task_status_oneOf),
|
|
2097
|
+
("task.status.noneOf", task_status_noneOf),
|
|
2098
|
+
("project.status.eq", project_status_eq),
|
|
2099
|
+
("project.status.oneOf", project_status_oneOf),
|
|
2100
|
+
("project.status.noneOf", project_status_noneOf),
|
|
2101
|
+
("externalReferenceId.eq", externalReferenceId_eq),
|
|
2102
|
+
]
|
|
2103
|
+
if v is not None
|
|
2104
|
+
}
|
|
2105
|
+
response = self._get(url, params=query_params)
|
|
2106
|
+
response.raise_for_status()
|
|
2107
|
+
if (
|
|
2108
|
+
response.status_code == 204
|
|
2109
|
+
or not response.content
|
|
2110
|
+
or not response.text.strip()
|
|
2111
|
+
):
|
|
2112
|
+
return None
|
|
2113
|
+
try:
|
|
2114
|
+
return response.json()
|
|
2115
|
+
except ValueError:
|
|
2116
|
+
return None
|
|
2117
|
+
|
|
2118
|
+
def create_task(
|
|
2119
|
+
self,
|
|
2120
|
+
includeFields: list[str] | None = None,
|
|
2121
|
+
includeAllFields: bool | None = None,
|
|
2122
|
+
taskId: int | None = None,
|
|
2123
|
+
taskName: str | None = None,
|
|
2124
|
+
taskDescription: str | None = None,
|
|
2125
|
+
taskPrivateNote: str | None = None,
|
|
2126
|
+
startDate: str | None = None,
|
|
2127
|
+
dueDate: str | None = None,
|
|
2128
|
+
effortInMinutes: int | None = None,
|
|
2129
|
+
progress: int | None = None,
|
|
2130
|
+
atRisk: bool | None = None,
|
|
2131
|
+
type: str | None = None,
|
|
2132
|
+
project: dict[str, Any] | None = None,
|
|
2133
|
+
phase: dict[str, Any] | None = None,
|
|
2134
|
+
status: dict[str, Any] | None = None,
|
|
2135
|
+
fields: list[dict[str, Any]] | None = None,
|
|
2136
|
+
assignees: dict[str, Any] | None = None,
|
|
2137
|
+
followers: dict[str, Any] | None = None,
|
|
2138
|
+
parent: dict[str, Any] | None = None,
|
|
2139
|
+
externalReferenceId: str | None = None,
|
|
2140
|
+
private: bool | None = None,
|
|
2141
|
+
) -> dict[str, Any]:
|
|
2142
|
+
"""
|
|
2143
|
+
Create a task
|
|
2144
|
+
|
|
2145
|
+
Args:
|
|
2146
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
2147
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
2148
|
+
taskId (integer): The task’s unique, system-generated **identifier**, which can be used to identify the task globally Example: '201'.
|
|
2149
|
+
taskName (string): The **name** of the task. Example: 'Kick off'.
|
|
2150
|
+
taskDescription (string): The `description` of the task. The description body needs to be in **html** format to avoid any formatting issues in the application. Example: '<p>Schedule Kick off meeting with the stakeholders involved.</p>'.
|
|
2151
|
+
taskPrivateNote (string): The `privateNote` for the task is intended exclusively for team members. The note's content should be in `HTML` format to prevent any formatting issues in the application. Example: '<p>Schedule Kick off meeting with the stakeholders involved.</p>'.
|
|
2152
|
+
startDate (string): The date when a task starts its execution. It can be empty. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
2153
|
+
dueDate (string): The date when a task completes its execution. It can be empty. If both `startDate` and `dueDate` are specified for a given task, it is necessary that the latter should be on or after the given `startDate`. The format for the due date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
2154
|
+
effortInMinutes (integer): The effort is the expected time required to complete the task. The value is determined in minutes. Example: '3000'.
|
|
2155
|
+
progress (integer): The task’s progress, if indicated, will be available here and ranges in value from 0 to 100. The task’s status can be used in place of this field, however progress can offer more precise data. Example: '50'.
|
|
2156
|
+
atRisk (boolean): Indicates whether the task has been marked as At Risk. This parameter is used to indicate that immediate action is necessary to unblock the task’s execution. Example: 'True'.
|
|
2157
|
+
type (string): The type of the task if specified will be available here. There are two options: `MILESTONE` or `TASK`. If a task is not explicitly marked as a milestone, it takes the default value as `TASK`. Milestones refer to critical tasks in the project that include an inbuilt CSAT capability that allows customers to offer CSAT evaluations depending on the task’s execution. Example: 'MILESTONE'.
|
|
2158
|
+
project (object): The `project` associated with task needs to be specified here and it is mandatory for the task to get created and map accordingly.
|
|
2159
|
+
phase (object): The `phase` that needs to be associated with the task can be mentioned here. Note: The `phase` needs to be associated with the `project` and thus failing the task creation process.
|
|
2160
|
+
status (object): The value of the task status can be specified here and this is essential to keep track of it.
|
|
2161
|
+
fields (array): The custom fields can be set during the task creation with the help of `fields`. The `fieldValue` can be either a string or a number or an array and it has to comply with the type of the field. Refer [examples](https://developer.rocketlane.com/v1.0/docs/custom-fields#examples-of-requests-and-responses-for-assigning-custom-field-values) to know how to assign `fieldValue` based on their `field_type`.
|
|
2162
|
+
assignees (object): assignees
|
|
2163
|
+
followers (object): The task followers can be either `members` (team members or customers) or `placeholders`.
|
|
2164
|
+
parent (object): Parent task id Example: '201'.
|
|
2165
|
+
externalReferenceId (string): An externalReferenceId is a unique identifier that links entities or transactions between external systems and Rocketlane, ensuring accurate data correlation and consistency. Example: 'task_8171'.
|
|
2166
|
+
private (boolean): This depicts if the task is private or not. Example: 'False'.
|
|
2167
|
+
|
|
2168
|
+
Returns:
|
|
2169
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
2170
|
+
|
|
2171
|
+
Raises:
|
|
2172
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2173
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2174
|
+
|
|
2175
|
+
Tags:
|
|
2176
|
+
Tasks
|
|
2177
|
+
"""
|
|
2178
|
+
request_body_data = None
|
|
2179
|
+
request_body_data = {
|
|
2180
|
+
"taskId": taskId,
|
|
2181
|
+
"taskName": taskName,
|
|
2182
|
+
"taskDescription": taskDescription,
|
|
2183
|
+
"taskPrivateNote": taskPrivateNote,
|
|
2184
|
+
"startDate": startDate,
|
|
2185
|
+
"dueDate": dueDate,
|
|
2186
|
+
"effortInMinutes": effortInMinutes,
|
|
2187
|
+
"progress": progress,
|
|
2188
|
+
"atRisk": atRisk,
|
|
2189
|
+
"type": type,
|
|
2190
|
+
"project": project,
|
|
2191
|
+
"phase": phase,
|
|
2192
|
+
"status": status,
|
|
2193
|
+
"fields": fields,
|
|
2194
|
+
"assignees": assignees,
|
|
2195
|
+
"followers": followers,
|
|
2196
|
+
"parent": parent,
|
|
2197
|
+
"externalReferenceId": externalReferenceId,
|
|
2198
|
+
"private": private,
|
|
2199
|
+
}
|
|
2200
|
+
request_body_data = {
|
|
2201
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
2202
|
+
}
|
|
2203
|
+
url = f"{self.base_url}/1.0/tasks"
|
|
2204
|
+
query_params = {
|
|
2205
|
+
k: v
|
|
2206
|
+
for k, v in [
|
|
2207
|
+
("includeFields", includeFields),
|
|
2208
|
+
("includeAllFields", includeAllFields),
|
|
2209
|
+
]
|
|
2210
|
+
if v is not None
|
|
2211
|
+
}
|
|
2212
|
+
response = self._post(
|
|
2213
|
+
url,
|
|
2214
|
+
data=request_body_data,
|
|
2215
|
+
params=query_params,
|
|
2216
|
+
content_type="application/json",
|
|
2217
|
+
)
|
|
2218
|
+
response.raise_for_status()
|
|
2219
|
+
if (
|
|
2220
|
+
response.status_code == 204
|
|
2221
|
+
or not response.content
|
|
2222
|
+
or not response.text.strip()
|
|
2223
|
+
):
|
|
2224
|
+
return None
|
|
2225
|
+
try:
|
|
2226
|
+
return response.json()
|
|
2227
|
+
except ValueError:
|
|
2228
|
+
return None
|
|
2229
|
+
|
|
2230
|
+
def get_all_spaces(
|
|
2231
|
+
self,
|
|
2232
|
+
projectId: int,
|
|
2233
|
+
pageSize: float | None = None,
|
|
2234
|
+
pageToken: str | None = None,
|
|
2235
|
+
sortBy: str | None = None,
|
|
2236
|
+
sortOrder: str | None = None,
|
|
2237
|
+
match: str | None = None,
|
|
2238
|
+
spaceName_eq: str | None = None,
|
|
2239
|
+
spaceName_cn: str | None = None,
|
|
2240
|
+
spaceName_nc: str | None = None,
|
|
2241
|
+
createdAt_gt: int | None = None,
|
|
2242
|
+
createdAt_eq: int | None = None,
|
|
2243
|
+
createdAt_lt: int | None = None,
|
|
2244
|
+
createdAt_ge: int | None = None,
|
|
2245
|
+
createdAt_le: int | None = None,
|
|
2246
|
+
updatedAt_gt: int | None = None,
|
|
2247
|
+
updatedAt_eq: int | None = None,
|
|
2248
|
+
updatedAt_lt: int | None = None,
|
|
2249
|
+
updatedAt_ge: int | None = None,
|
|
2250
|
+
updatedAt_le: int | None = None,
|
|
2251
|
+
) -> dict[str, Any]:
|
|
2252
|
+
"""
|
|
2253
|
+
Get all spaces
|
|
2254
|
+
|
|
2255
|
+
Args:
|
|
2256
|
+
projectId (integer): You can use this param to specify some value as project id and the responses will contain exact matches of spaces that match the given value. Example: '200'.
|
|
2257
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
2258
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
2259
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
2260
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
2261
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
2262
|
+
spaceName_eq (string): You can use this param to specify some space name and the responses will contain exact matches of spaces that match the given name. Example: 'Stark Onboarding'.
|
|
2263
|
+
spaceName_cn (string): You can use this param to specify some space name and the responses will contain matches of spaces that match the given name. Example: 'Stark Onboarding'.
|
|
2264
|
+
spaceName_nc (string): You can use this param to specify some space name and the responses will not contain matches of spaces that match the given name. Example: 'Stark Onboarding'.
|
|
2265
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are greater than the given spaces created date. Example: '1625164800000'.
|
|
2266
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of spaces that match the given spaces created date. Example: '1625164800000'.
|
|
2267
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are less than the given spaces created date. Example: '1625164800000'.
|
|
2268
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are greater than or equal to the given spaces created date. Example: '1625164800000'.
|
|
2269
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are less than or equal to the given spaces created date. Example: '1625164800000'.
|
|
2270
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are greater than the given spaces updated date. Example: '1625164800000'.
|
|
2271
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of spaces that match the given spaces updated date. Example: '1625164800000'.
|
|
2272
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are less than the given spaces updated date. Example: '1625164800000'.
|
|
2273
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are greater than or equal to the given spaces updated date. Example: '1625164800000'.
|
|
2274
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain spaces whose date are less than or equal to the given spaces updated date. Example: '1625164800000'.
|
|
2275
|
+
|
|
2276
|
+
Returns:
|
|
2277
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2278
|
+
|
|
2279
|
+
Raises:
|
|
2280
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2281
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2282
|
+
|
|
2283
|
+
Tags:
|
|
2284
|
+
Spaces
|
|
2285
|
+
"""
|
|
2286
|
+
url = f"{self.base_url}/1.0/spaces"
|
|
2287
|
+
query_params = {
|
|
2288
|
+
k: v
|
|
2289
|
+
for k, v in [
|
|
2290
|
+
("projectId", projectId),
|
|
2291
|
+
("pageSize", pageSize),
|
|
2292
|
+
("pageToken", pageToken),
|
|
2293
|
+
("sortBy", sortBy),
|
|
2294
|
+
("sortOrder", sortOrder),
|
|
2295
|
+
("match", match),
|
|
2296
|
+
("spaceName.eq", spaceName_eq),
|
|
2297
|
+
("spaceName.cn", spaceName_cn),
|
|
2298
|
+
("spaceName.nc", spaceName_nc),
|
|
2299
|
+
("createdAt.gt", createdAt_gt),
|
|
2300
|
+
("createdAt.eq", createdAt_eq),
|
|
2301
|
+
("createdAt.lt", createdAt_lt),
|
|
2302
|
+
("createdAt.ge", createdAt_ge),
|
|
2303
|
+
("createdAt.le", createdAt_le),
|
|
2304
|
+
("updatedAt.gt", updatedAt_gt),
|
|
2305
|
+
("updatedAt.eq", updatedAt_eq),
|
|
2306
|
+
("updatedAt.lt", updatedAt_lt),
|
|
2307
|
+
("updatedAt.ge", updatedAt_ge),
|
|
2308
|
+
("updatedAt.le", updatedAt_le),
|
|
2309
|
+
]
|
|
2310
|
+
if v is not None
|
|
2311
|
+
}
|
|
2312
|
+
response = self._get(url, params=query_params)
|
|
2313
|
+
response.raise_for_status()
|
|
2314
|
+
if (
|
|
2315
|
+
response.status_code == 204
|
|
2316
|
+
or not response.content
|
|
2317
|
+
or not response.text.strip()
|
|
2318
|
+
):
|
|
2319
|
+
return None
|
|
2320
|
+
try:
|
|
2321
|
+
return response.json()
|
|
2322
|
+
except ValueError:
|
|
2323
|
+
return None
|
|
2324
|
+
|
|
2325
|
+
def create_space(
|
|
2326
|
+
self,
|
|
2327
|
+
spaceId: int | None = None,
|
|
2328
|
+
spaceName: str | None = None,
|
|
2329
|
+
project: dict[str, Any] | None = None,
|
|
2330
|
+
private: bool | None = None,
|
|
2331
|
+
) -> dict[str, Any]:
|
|
2332
|
+
"""
|
|
2333
|
+
Create a space
|
|
2334
|
+
|
|
2335
|
+
Args:
|
|
2336
|
+
spaceId (integer): The space’s unique, system-generated identifier, which can be used to identify the space globally. Example: '201'.
|
|
2337
|
+
spaceName (string): The name of the space. Example: 'Shared space'.
|
|
2338
|
+
project (object): The `project` where the `space` exists.
|
|
2339
|
+
private (boolean): Describes the privacy of the space i.e. if it is private or shared. Example: 'True'.
|
|
2340
|
+
|
|
2341
|
+
Returns:
|
|
2342
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
2343
|
+
|
|
2344
|
+
Raises:
|
|
2345
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2346
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2347
|
+
|
|
2348
|
+
Tags:
|
|
2349
|
+
Spaces
|
|
2350
|
+
"""
|
|
2351
|
+
request_body_data = None
|
|
2352
|
+
request_body_data = {
|
|
2353
|
+
"spaceId": spaceId,
|
|
2354
|
+
"spaceName": spaceName,
|
|
2355
|
+
"project": project,
|
|
2356
|
+
"private": private,
|
|
2357
|
+
}
|
|
2358
|
+
request_body_data = {
|
|
2359
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
2360
|
+
}
|
|
2361
|
+
url = f"{self.base_url}/1.0/spaces"
|
|
2362
|
+
query_params = {}
|
|
2363
|
+
response = self._post(
|
|
2364
|
+
url,
|
|
2365
|
+
data=request_body_data,
|
|
2366
|
+
params=query_params,
|
|
2367
|
+
content_type="application/json",
|
|
2368
|
+
)
|
|
2369
|
+
response.raise_for_status()
|
|
2370
|
+
if (
|
|
2371
|
+
response.status_code == 204
|
|
2372
|
+
or not response.content
|
|
2373
|
+
or not response.text.strip()
|
|
2374
|
+
):
|
|
2375
|
+
return None
|
|
2376
|
+
try:
|
|
2377
|
+
return response.json()
|
|
2378
|
+
except ValueError:
|
|
2379
|
+
return None
|
|
2380
|
+
|
|
2381
|
+
def get_all_space_documents(
|
|
2382
|
+
self,
|
|
2383
|
+
projectId: int,
|
|
2384
|
+
pageSize: float | None = None,
|
|
2385
|
+
pageToken: str | None = None,
|
|
2386
|
+
sortBy: str | None = None,
|
|
2387
|
+
sortOrder: str | None = None,
|
|
2388
|
+
match: str | None = None,
|
|
2389
|
+
spaceDocumentName_eq: str | None = None,
|
|
2390
|
+
spaceDocumentName_cn: str | None = None,
|
|
2391
|
+
spaceDocumentName_nc: str | None = None,
|
|
2392
|
+
createdAt_gt: int | None = None,
|
|
2393
|
+
createdAt_eq: int | None = None,
|
|
2394
|
+
createdAt_lt: int | None = None,
|
|
2395
|
+
createdAt_ge: int | None = None,
|
|
2396
|
+
createdAt_le: int | None = None,
|
|
2397
|
+
updatedAt_gt: int | None = None,
|
|
2398
|
+
updatedAt_eq: int | None = None,
|
|
2399
|
+
updatedAt_lt: int | None = None,
|
|
2400
|
+
updatedAt_ge: int | None = None,
|
|
2401
|
+
updatedAt_le: int | None = None,
|
|
2402
|
+
spaceId_eq: float | None = None,
|
|
2403
|
+
) -> dict[str, Any]:
|
|
2404
|
+
"""
|
|
2405
|
+
Get all space documents
|
|
2406
|
+
|
|
2407
|
+
Args:
|
|
2408
|
+
projectId (integer): You can use this param to specify some value as project id and the responses will contain exact matches of space documents that match the given value. Example: '200'.
|
|
2409
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
2410
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
2411
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
2412
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
2413
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
2414
|
+
spaceDocumentName_eq (string): You can use this param to specify some space document name and the responses will contain exact matches of space documents that match the given name. Example: 'Stark Onboarding'.
|
|
2415
|
+
spaceDocumentName_cn (string): You can use this param to specify some space document name and the responses will contain matches of space documents that match the given name. Example: 'Stark Onboarding'.
|
|
2416
|
+
spaceDocumentName_nc (string): You can use this param to specify some space document name and the responses will not contain matches of space documents that match the given name. Example: 'Stark Onboarding'.
|
|
2417
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are greater than the given space documents created date. Example: '1625164800000'.
|
|
2418
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of space documents that match the given space documents created date. Example: '1625164800000'.
|
|
2419
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are less than the given space documents created date. Example: '1625164800000'.
|
|
2420
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are greater than or equal to the given space documents created date. Example: '1625164800000'.
|
|
2421
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are less than or equal to the given space documents created date. Example: '1625164800000'.
|
|
2422
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are greater than the given space documents updated date. Example: '1625164800000'.
|
|
2423
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of space documents that match the given space documents updated date. Example: '1625164800000'.
|
|
2424
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are less than the given space documents updated date. Example: '1625164800000'.
|
|
2425
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are greater than or equal to the given space documents updated date. Example: '1625164800000'.
|
|
2426
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain space documents whose date are less than or equal to the given space documents updated date. Example: '1625164800000'.
|
|
2427
|
+
spaceId_eq (number): You can use this param to specify some value as space id and the responses will contain exact matches of space documents that match the given value. Example: '10000'.
|
|
2428
|
+
|
|
2429
|
+
Returns:
|
|
2430
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2431
|
+
|
|
2432
|
+
Raises:
|
|
2433
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2434
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2435
|
+
|
|
2436
|
+
Tags:
|
|
2437
|
+
Space Documents
|
|
2438
|
+
"""
|
|
2439
|
+
url = f"{self.base_url}/1.0/space-documents"
|
|
2440
|
+
query_params = {
|
|
2441
|
+
k: v
|
|
2442
|
+
for k, v in [
|
|
2443
|
+
("projectId", projectId),
|
|
2444
|
+
("pageSize", pageSize),
|
|
2445
|
+
("pageToken", pageToken),
|
|
2446
|
+
("sortBy", sortBy),
|
|
2447
|
+
("sortOrder", sortOrder),
|
|
2448
|
+
("match", match),
|
|
2449
|
+
("spaceDocumentName.eq", spaceDocumentName_eq),
|
|
2450
|
+
("spaceDocumentName.cn", spaceDocumentName_cn),
|
|
2451
|
+
("spaceDocumentName.nc", spaceDocumentName_nc),
|
|
2452
|
+
("createdAt.gt", createdAt_gt),
|
|
2453
|
+
("createdAt.eq", createdAt_eq),
|
|
2454
|
+
("createdAt.lt", createdAt_lt),
|
|
2455
|
+
("createdAt.ge", createdAt_ge),
|
|
2456
|
+
("createdAt.le", createdAt_le),
|
|
2457
|
+
("updatedAt.gt", updatedAt_gt),
|
|
2458
|
+
("updatedAt.eq", updatedAt_eq),
|
|
2459
|
+
("updatedAt.lt", updatedAt_lt),
|
|
2460
|
+
("updatedAt.ge", updatedAt_ge),
|
|
2461
|
+
("updatedAt.le", updatedAt_le),
|
|
2462
|
+
("spaceId.eq", spaceId_eq),
|
|
2463
|
+
]
|
|
2464
|
+
if v is not None
|
|
2465
|
+
}
|
|
2466
|
+
response = self._get(url, params=query_params)
|
|
2467
|
+
response.raise_for_status()
|
|
2468
|
+
if (
|
|
2469
|
+
response.status_code == 204
|
|
2470
|
+
or not response.content
|
|
2471
|
+
or not response.text.strip()
|
|
2472
|
+
):
|
|
2473
|
+
return None
|
|
2474
|
+
try:
|
|
2475
|
+
return response.json()
|
|
2476
|
+
except ValueError:
|
|
2477
|
+
return None
|
|
2478
|
+
|
|
2479
|
+
def create_space_document(
|
|
2480
|
+
self,
|
|
2481
|
+
spaceDocumentId: int | None = None,
|
|
2482
|
+
spaceDocumentName: str | None = None,
|
|
2483
|
+
space: dict[str, Any] | None = None,
|
|
2484
|
+
spaceDocumentType: str | None = None,
|
|
2485
|
+
url: str | None = None,
|
|
2486
|
+
source: dict[str, Any] | None = None,
|
|
2487
|
+
) -> dict[str, Any]:
|
|
2488
|
+
"""
|
|
2489
|
+
Create a space document
|
|
2490
|
+
|
|
2491
|
+
Args:
|
|
2492
|
+
spaceDocumentId (integer): The space document’s unique, system-generated identifier, which can be used to identify the space document globally. Example: '201'.
|
|
2493
|
+
spaceDocumentName (string): The name of the space document.By default, the name is 'Untitled'. Example: 'Sample file'.
|
|
2494
|
+
space (object): Information about the space to which the space document belongs to.
|
|
2495
|
+
spaceDocumentType (string): Defines the type of the space document. This could be a Rocketlane document or an embedded document. Example: 'ROCKETLANE_DOCUMENT'.
|
|
2496
|
+
url (string): The url that is embedded in the space document. Example: 'https://www.google.com'.
|
|
2497
|
+
source (object): Sources denote the document templates based on which the document is created
|
|
2498
|
+
|
|
2499
|
+
Returns:
|
|
2500
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
2501
|
+
|
|
2502
|
+
Raises:
|
|
2503
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2504
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2505
|
+
|
|
2506
|
+
Tags:
|
|
2507
|
+
Space Documents
|
|
2508
|
+
"""
|
|
2509
|
+
request_body_data = None
|
|
2510
|
+
request_body_data = {
|
|
2511
|
+
"spaceDocumentId": spaceDocumentId,
|
|
2512
|
+
"spaceDocumentName": spaceDocumentName,
|
|
2513
|
+
"space": space,
|
|
2514
|
+
"spaceDocumentType": spaceDocumentType,
|
|
2515
|
+
"url": url,
|
|
2516
|
+
"source": source,
|
|
2517
|
+
}
|
|
2518
|
+
request_body_data = {
|
|
2519
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
2520
|
+
}
|
|
2521
|
+
url = f"{self.base_url}/1.0/space-documents"
|
|
2522
|
+
query_params = {}
|
|
2523
|
+
response = self._post(
|
|
2524
|
+
url,
|
|
2525
|
+
data=request_body_data,
|
|
2526
|
+
params=query_params,
|
|
2527
|
+
content_type="application/json",
|
|
2528
|
+
)
|
|
2529
|
+
response.raise_for_status()
|
|
2530
|
+
if (
|
|
2531
|
+
response.status_code == 204
|
|
2532
|
+
or not response.content
|
|
2533
|
+
or not response.text.strip()
|
|
2534
|
+
):
|
|
2535
|
+
return None
|
|
2536
|
+
try:
|
|
2537
|
+
return response.json()
|
|
2538
|
+
except ValueError:
|
|
2539
|
+
return None
|
|
2540
|
+
|
|
2541
|
+
def unassign_placeholders(
|
|
2542
|
+
self, projectId: str, items: list[dict[str, Any]]
|
|
2543
|
+
) -> dict[str, Any]:
|
|
2544
|
+
"""
|
|
2545
|
+
Un assign placeholders from an user in a project
|
|
2546
|
+
|
|
2547
|
+
Args:
|
|
2548
|
+
projectId (string): projectId
|
|
2549
|
+
|
|
2550
|
+
Returns:
|
|
2551
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2552
|
+
|
|
2553
|
+
Raises:
|
|
2554
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2555
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2556
|
+
|
|
2557
|
+
Tags:
|
|
2558
|
+
Projects
|
|
2559
|
+
"""
|
|
2560
|
+
if projectId is None:
|
|
2561
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
2562
|
+
request_body_data = None
|
|
2563
|
+
# Using array parameter 'items' directly as request body
|
|
2564
|
+
request_body_data = items
|
|
2565
|
+
url = f"{self.base_url}/1.0/projects/{projectId}/unassign-placeholders"
|
|
2566
|
+
query_params = {}
|
|
2567
|
+
response = self._post(
|
|
2568
|
+
url,
|
|
2569
|
+
data=request_body_data,
|
|
2570
|
+
params=query_params,
|
|
2571
|
+
content_type="application/json",
|
|
2572
|
+
)
|
|
2573
|
+
response.raise_for_status()
|
|
2574
|
+
if (
|
|
2575
|
+
response.status_code == 204
|
|
2576
|
+
or not response.content
|
|
2577
|
+
or not response.text.strip()
|
|
2578
|
+
):
|
|
2579
|
+
return None
|
|
2580
|
+
try:
|
|
2581
|
+
return response.json()
|
|
2582
|
+
except ValueError:
|
|
2583
|
+
return None
|
|
2584
|
+
|
|
2585
|
+
def remove_members(
|
|
2586
|
+
self, projectId: str, members: list[dict[str, Any]]
|
|
2587
|
+
) -> dict[str, Any]:
|
|
2588
|
+
"""
|
|
2589
|
+
Remove members from a project
|
|
2590
|
+
|
|
2591
|
+
Args:
|
|
2592
|
+
projectId (string): projectId
|
|
2593
|
+
members (array): The team members from your organization working on the project.
|
|
2594
|
+
|
|
2595
|
+
Returns:
|
|
2596
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2597
|
+
|
|
2598
|
+
Raises:
|
|
2599
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2600
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2601
|
+
|
|
2602
|
+
Tags:
|
|
2603
|
+
Projects
|
|
2604
|
+
"""
|
|
2605
|
+
if projectId is None:
|
|
2606
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
2607
|
+
request_body_data = None
|
|
2608
|
+
request_body_data = {
|
|
2609
|
+
"members": members,
|
|
2610
|
+
}
|
|
2611
|
+
request_body_data = {
|
|
2612
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
2613
|
+
}
|
|
2614
|
+
url = f"{self.base_url}/1.0/projects/{projectId}/remove-members"
|
|
2615
|
+
query_params = {}
|
|
2616
|
+
response = self._post(
|
|
2617
|
+
url,
|
|
2618
|
+
data=request_body_data,
|
|
2619
|
+
params=query_params,
|
|
2620
|
+
content_type="application/json",
|
|
2621
|
+
)
|
|
2622
|
+
response.raise_for_status()
|
|
2623
|
+
if (
|
|
2624
|
+
response.status_code == 204
|
|
2625
|
+
or not response.content
|
|
2626
|
+
or not response.text.strip()
|
|
2627
|
+
):
|
|
2628
|
+
return None
|
|
2629
|
+
try:
|
|
2630
|
+
return response.json()
|
|
2631
|
+
except ValueError:
|
|
2632
|
+
return None
|
|
2633
|
+
|
|
2634
|
+
def import_template(
|
|
2635
|
+
self, projectId: str, items: list[dict[str, Any]]
|
|
2636
|
+
) -> dict[str, Any]:
|
|
2637
|
+
"""
|
|
2638
|
+
Import a template to a project
|
|
2639
|
+
|
|
2640
|
+
Args:
|
|
2641
|
+
projectId (string): projectId
|
|
2642
|
+
|
|
2643
|
+
Returns:
|
|
2644
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2645
|
+
|
|
2646
|
+
Raises:
|
|
2647
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2648
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2649
|
+
|
|
2650
|
+
Tags:
|
|
2651
|
+
Projects
|
|
2652
|
+
"""
|
|
2653
|
+
if projectId is None:
|
|
2654
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
2655
|
+
request_body_data = None
|
|
2656
|
+
# Using array parameter 'items' directly as request body
|
|
2657
|
+
request_body_data = items
|
|
2658
|
+
url = f"{self.base_url}/1.0/projects/{projectId}/import-template"
|
|
2659
|
+
query_params = {}
|
|
2660
|
+
response = self._post(
|
|
2661
|
+
url,
|
|
2662
|
+
data=request_body_data,
|
|
2663
|
+
params=query_params,
|
|
2664
|
+
content_type="application/json",
|
|
2665
|
+
)
|
|
2666
|
+
response.raise_for_status()
|
|
2667
|
+
if (
|
|
2668
|
+
response.status_code == 204
|
|
2669
|
+
or not response.content
|
|
2670
|
+
or not response.text.strip()
|
|
2671
|
+
):
|
|
2672
|
+
return None
|
|
2673
|
+
try:
|
|
2674
|
+
return response.json()
|
|
2675
|
+
except ValueError:
|
|
2676
|
+
return None
|
|
2677
|
+
|
|
2678
|
+
def assign_placeholders(
|
|
2679
|
+
self, projectId: str, items: list[dict[str, Any]]
|
|
2680
|
+
) -> dict[str, Any]:
|
|
2681
|
+
"""
|
|
2682
|
+
Assign placeholders to an user in a project
|
|
2683
|
+
|
|
2684
|
+
Args:
|
|
2685
|
+
projectId (string): projectId
|
|
2686
|
+
|
|
2687
|
+
Returns:
|
|
2688
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2689
|
+
|
|
2690
|
+
Raises:
|
|
2691
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2692
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2693
|
+
|
|
2694
|
+
Tags:
|
|
2695
|
+
Projects
|
|
2696
|
+
"""
|
|
2697
|
+
if projectId is None:
|
|
2698
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
2699
|
+
request_body_data = None
|
|
2700
|
+
# Using array parameter 'items' directly as request body
|
|
2701
|
+
request_body_data = items
|
|
2702
|
+
url = f"{self.base_url}/1.0/projects/{projectId}/assign-placeholders"
|
|
2703
|
+
query_params = {}
|
|
2704
|
+
response = self._post(
|
|
2705
|
+
url,
|
|
2706
|
+
data=request_body_data,
|
|
2707
|
+
params=query_params,
|
|
2708
|
+
content_type="application/json",
|
|
2709
|
+
)
|
|
2710
|
+
response.raise_for_status()
|
|
2711
|
+
if (
|
|
2712
|
+
response.status_code == 204
|
|
2713
|
+
or not response.content
|
|
2714
|
+
or not response.text.strip()
|
|
2715
|
+
):
|
|
2716
|
+
return None
|
|
2717
|
+
try:
|
|
2718
|
+
return response.json()
|
|
2719
|
+
except ValueError:
|
|
2720
|
+
return None
|
|
2721
|
+
|
|
2722
|
+
def archive_project(self, projectId: str) -> Any:
|
|
2723
|
+
"""
|
|
2724
|
+
Archive project by Id
|
|
2725
|
+
|
|
2726
|
+
Args:
|
|
2727
|
+
projectId (string): projectId
|
|
2728
|
+
|
|
2729
|
+
Returns:
|
|
2730
|
+
Any: The resource was successfully removed from the database.
|
|
2731
|
+
|
|
2732
|
+
Raises:
|
|
2733
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2734
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2735
|
+
|
|
2736
|
+
Tags:
|
|
2737
|
+
Projects
|
|
2738
|
+
"""
|
|
2739
|
+
if projectId is None:
|
|
2740
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
2741
|
+
request_body_data = None
|
|
2742
|
+
url = f"{self.base_url}/1.0/projects/{projectId}/archive"
|
|
2743
|
+
query_params = {}
|
|
2744
|
+
response = self._post(
|
|
2745
|
+
url,
|
|
2746
|
+
data=request_body_data,
|
|
2747
|
+
params=query_params,
|
|
2748
|
+
content_type="application/json",
|
|
2749
|
+
)
|
|
2750
|
+
response.raise_for_status()
|
|
2751
|
+
if (
|
|
2752
|
+
response.status_code == 204
|
|
2753
|
+
or not response.content
|
|
2754
|
+
or not response.text.strip()
|
|
2755
|
+
):
|
|
2756
|
+
return None
|
|
2757
|
+
try:
|
|
2758
|
+
return response.json()
|
|
2759
|
+
except ValueError:
|
|
2760
|
+
return None
|
|
2761
|
+
|
|
2762
|
+
def add_members(
|
|
2763
|
+
self,
|
|
2764
|
+
projectId: str,
|
|
2765
|
+
members: list[dict[str, Any]] | None = None,
|
|
2766
|
+
customers: list[dict[str, Any]] | None = None,
|
|
2767
|
+
) -> dict[str, Any]:
|
|
2768
|
+
"""
|
|
2769
|
+
Add members to a project
|
|
2770
|
+
|
|
2771
|
+
Args:
|
|
2772
|
+
projectId (string): projectId
|
|
2773
|
+
members (array): The project team members.
|
|
2774
|
+
customers (array): The project customers.
|
|
2775
|
+
|
|
2776
|
+
Returns:
|
|
2777
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2778
|
+
|
|
2779
|
+
Raises:
|
|
2780
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2781
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2782
|
+
|
|
2783
|
+
Tags:
|
|
2784
|
+
Projects, important
|
|
2785
|
+
"""
|
|
2786
|
+
if projectId is None:
|
|
2787
|
+
raise ValueError("Missing required parameter 'projectId'.")
|
|
2788
|
+
request_body_data = None
|
|
2789
|
+
request_body_data = {
|
|
2790
|
+
"members": members,
|
|
2791
|
+
"customers": customers,
|
|
2792
|
+
}
|
|
2793
|
+
request_body_data = {
|
|
2794
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
2795
|
+
}
|
|
2796
|
+
url = f"{self.base_url}/1.0/projects/{projectId}/add-members"
|
|
2797
|
+
query_params = {}
|
|
2798
|
+
response = self._post(
|
|
2799
|
+
url,
|
|
2800
|
+
data=request_body_data,
|
|
2801
|
+
params=query_params,
|
|
2802
|
+
content_type="application/json",
|
|
2803
|
+
)
|
|
2804
|
+
response.raise_for_status()
|
|
2805
|
+
if (
|
|
2806
|
+
response.status_code == 204
|
|
2807
|
+
or not response.content
|
|
2808
|
+
or not response.text.strip()
|
|
2809
|
+
):
|
|
2810
|
+
return None
|
|
2811
|
+
try:
|
|
2812
|
+
return response.json()
|
|
2813
|
+
except ValueError:
|
|
2814
|
+
return None
|
|
2815
|
+
|
|
2816
|
+
def get_all_projects(
|
|
2817
|
+
self,
|
|
2818
|
+
pageSize: float | None = None,
|
|
2819
|
+
pageToken: str | None = None,
|
|
2820
|
+
includeFields: list[str] | None = None,
|
|
2821
|
+
includeAllFields: bool | None = None,
|
|
2822
|
+
sortBy: str | None = None,
|
|
2823
|
+
sortOrder: str | None = None,
|
|
2824
|
+
match: str | None = None,
|
|
2825
|
+
startDate_gt: str | None = None,
|
|
2826
|
+
startDate_eq: str | None = None,
|
|
2827
|
+
startDate_lt: str | None = None,
|
|
2828
|
+
startDate_ge: str | None = None,
|
|
2829
|
+
startDate_le: str | None = None,
|
|
2830
|
+
dueDate_gt: str | None = None,
|
|
2831
|
+
dueDate_eq: str | None = None,
|
|
2832
|
+
dueDate_lt: str | None = None,
|
|
2833
|
+
dueDate_ge: str | None = None,
|
|
2834
|
+
dueDate_le: str | None = None,
|
|
2835
|
+
startDateActual_gt: str | None = None,
|
|
2836
|
+
startDateActual_eq: str | None = None,
|
|
2837
|
+
startDateActual_lt: str | None = None,
|
|
2838
|
+
startDateActual_ge: str | None = None,
|
|
2839
|
+
startDateActual_le: str | None = None,
|
|
2840
|
+
dueDateActual_gt: str | None = None,
|
|
2841
|
+
dueDateActual_eq: str | None = None,
|
|
2842
|
+
dueDateActual_lt: str | None = None,
|
|
2843
|
+
dueDateActual_ge: str | None = None,
|
|
2844
|
+
dueDateActual_le: str | None = None,
|
|
2845
|
+
createdAt_gt: int | None = None,
|
|
2846
|
+
createdAt_eq: int | None = None,
|
|
2847
|
+
createdAt_lt: int | None = None,
|
|
2848
|
+
createdAt_ge: int | None = None,
|
|
2849
|
+
createdAt_le: int | None = None,
|
|
2850
|
+
updatedAt_gt: int | None = None,
|
|
2851
|
+
updatedAt_eq: int | None = None,
|
|
2852
|
+
updatedAt_lt: int | None = None,
|
|
2853
|
+
updatedAt_ge: int | None = None,
|
|
2854
|
+
updatedAt_le: int | None = None,
|
|
2855
|
+
annualizedRecurringRevenue_eq: float | None = None,
|
|
2856
|
+
annualizedRecurringRevenue_gt: float | None = None,
|
|
2857
|
+
annualizedRecurringRevenue_lt: float | None = None,
|
|
2858
|
+
projectFee_eq: float | None = None,
|
|
2859
|
+
projectFee_gt: float | None = None,
|
|
2860
|
+
projectFee_lt: float | None = None,
|
|
2861
|
+
customerId_eq: str | None = None,
|
|
2862
|
+
customerId_oneOf: str | None = None,
|
|
2863
|
+
customerId_noneOf: str | None = None,
|
|
2864
|
+
teamMemberId_eq: str | None = None,
|
|
2865
|
+
teamMemberId_oneOf: str | None = None,
|
|
2866
|
+
teamMemberId_noneOf: str | None = None,
|
|
2867
|
+
companyId_eq: str | None = None,
|
|
2868
|
+
companyId_oneOf: str | None = None,
|
|
2869
|
+
companyId_noneOf: str | None = None,
|
|
2870
|
+
projectName_eq: str | None = None,
|
|
2871
|
+
projectName_cn: str | None = None,
|
|
2872
|
+
projectName_nc: str | None = None,
|
|
2873
|
+
inferredProgress_eq: list[str] | None = None,
|
|
2874
|
+
contractType_eq: list[str] | None = None,
|
|
2875
|
+
contractType_oneOf: list[str] | None = None,
|
|
2876
|
+
contractType_noneOf: list[str] | None = None,
|
|
2877
|
+
budgetedHours_gt: str | None = None,
|
|
2878
|
+
budgetedHours_eq: str | None = None,
|
|
2879
|
+
budgetedHours_lt: str | None = None,
|
|
2880
|
+
budgetedHours_ge: str | None = None,
|
|
2881
|
+
allocatedHours_le: str | None = None,
|
|
2882
|
+
allocatedHours_gt: str | None = None,
|
|
2883
|
+
allocatedHours_eq: str | None = None,
|
|
2884
|
+
allocatedHours_lt: str | None = None,
|
|
2885
|
+
allocatedHours_ge: str | None = None,
|
|
2886
|
+
customersInvited_gt: str | None = None,
|
|
2887
|
+
customersInvited_eq: str | None = None,
|
|
2888
|
+
customersInvited_lt: str | None = None,
|
|
2889
|
+
customersInvited_ge: str | None = None,
|
|
2890
|
+
customersInvited_le: str | None = None,
|
|
2891
|
+
customersJoined_gt: str | None = None,
|
|
2892
|
+
customersJoined_eq: str | None = None,
|
|
2893
|
+
customersJoined_lt: str | None = None,
|
|
2894
|
+
customersJoined_ge: str | None = None,
|
|
2895
|
+
customersJoined_le: str | None = None,
|
|
2896
|
+
includeArchive_eq: bool | None = None,
|
|
2897
|
+
status_eq: str | None = None,
|
|
2898
|
+
status_oneOf: str | None = None,
|
|
2899
|
+
status_noneOf: str | None = None,
|
|
2900
|
+
externalReferenceId_eq: str | None = None,
|
|
2901
|
+
) -> dict[str, Any]:
|
|
2902
|
+
"""
|
|
2903
|
+
Get all projects
|
|
2904
|
+
|
|
2905
|
+
Args:
|
|
2906
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
2907
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
2908
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
2909
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
2910
|
+
sortBy (string): For sorting the responses by the provided field, use the sortBy parameter.
|
|
2911
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
2912
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
2913
|
+
startDate_gt (string): You can use this param to provide a date and the responses will contain projects whose date are greater than the given start date. Example: '2023-03-28'.
|
|
2914
|
+
startDate_eq (string): You can use this param to provide a date and the responses will contain exact matches of projects that match the given start date. Example: '2023-03-28'.
|
|
2915
|
+
startDate_lt (string): You can use this param to provide a date and the responses will contain projects whose date are less than the given start date. Example: '2023-03-28'.
|
|
2916
|
+
startDate_ge (string): You can use this param to provide a date and the responses will contain projects whose date are greater than or equal to the given start date. Example: '2023-03-28'.
|
|
2917
|
+
startDate_le (string): You can use this param to provide a date and the responses will contain projects whose date are less than or equal to the given start date. Example: '2023-03-28'.
|
|
2918
|
+
dueDate_gt (string): You can use this param to provide a date and the responses will contain projects whose date are greater than the given due date. Example: '2023-03-28'.
|
|
2919
|
+
dueDate_eq (string): You can use this param to provide a date and the responses will contain exact matches of projects that match the given due date. Example: '2023-03-28'.
|
|
2920
|
+
dueDate_lt (string): You can use this param to provide a date and the responses will contain projects whose date are less than the given due date. Example: '2023-03-28'.
|
|
2921
|
+
dueDate_ge (string): You can use this param to provide a date and the responses will contain projects whose date are greater than or equal to the given due date. Example: '2023-03-28'.
|
|
2922
|
+
dueDate_le (string): You can use this param to provide a date and the responses will contain projects whose date are less than or equal to the given due date. Example: '2023-03-28'.
|
|
2923
|
+
startDateActual_gt (string): You can use this param to provide a date and the responses will contain projects whose date are greater than the given actual start date. Example: '2023-03-28'.
|
|
2924
|
+
startDateActual_eq (string): You can use this param to provide a date and the responses will contain exact matches of projects that match the given actual start date. Example: '2023-03-28'.
|
|
2925
|
+
startDateActual_lt (string): You can use this param to provide a date and the responses will contain projects whose date are less than the given actual start date. Example: '2023-03-28'.
|
|
2926
|
+
startDateActual_ge (string): You can use this param to provide a date and the responses will contain projects whose date are greater than or equal to the given actual start date. Example: '2023-03-28'.
|
|
2927
|
+
startDateActual_le (string): You can use this param to provide a date and the responses will contain projects whose date are less than or equal to the given actual start date. Example: '2023-03-28'.
|
|
2928
|
+
dueDateActual_gt (string): You can use this param to provide a date and the responses will contain projects whose date are greater than the given actual due date. Example: '2023-03-28'.
|
|
2929
|
+
dueDateActual_eq (string): You can use this param to provide a date and the responses will contain exact matches of projects that match the given actual due date. Example: '2023-03-28'.
|
|
2930
|
+
dueDateActual_lt (string): You can use this param to provide a date and the responses will contain projects whose date are less than the given actual due date. Example: '2023-03-28'.
|
|
2931
|
+
dueDateActual_ge (string): You can use this param to provide a date and the responses will contain projects whose date are greater than or equal to the given actual due date. Example: '2023-03-28'.
|
|
2932
|
+
dueDateActual_le (string): You can use this param to provide a date and the responses will contain projects whose date are less than or equal to the given actual due date. Example: '2023-03-28'.
|
|
2933
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are greater than the given project created date. Example: '1625164800000'.
|
|
2934
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of projects that match the given project created date. Example: '1625164800000'.
|
|
2935
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are less than the given project created date. Example: '1625164800000'.
|
|
2936
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are greater than or equal to the given project created date. Example: '1625164800000'.
|
|
2937
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are less than or equal to the given project created date. Example: '1625164800000'.
|
|
2938
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are greater than the given project updated date. Example: '1625164800000'.
|
|
2939
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of projects that match the given project updated date. Example: '1625164800000'.
|
|
2940
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are less than the given project updated date. Example: '1625164800000'.
|
|
2941
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are greater than or equal to the given project updated date. Example: '1625164800000'.
|
|
2942
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain projects whose date are less than or equal to the given project updated date. Example: '1625164800000'.
|
|
2943
|
+
annualizedRecurringRevenue_eq (number): You can use this param to specify some value as ARR and the responses will contain exact matches of projects that match the given value. Example: '10000'.
|
|
2944
|
+
annualizedRecurringRevenue_gt (number): You can use this param to specify some value as ARR and the responses will contain exact matches of projects greater than that of the given value. Example: '10000'.
|
|
2945
|
+
annualizedRecurringRevenue_lt (number): You can use this param to specify some value as ARR and the responses will contain exact matches of projects lesser than that of the given value. Example: '10000'.
|
|
2946
|
+
projectFee_eq (number): You can use this param to specify some value as project fee and the responses will contain exact matches of projects that match the given value. Example: '10000'.
|
|
2947
|
+
projectFee_gt (number): You can use this param to specify some value as project fee and the responses will contain matches of projects greater than that of the given value. Example: '10000'.
|
|
2948
|
+
projectFee_lt (number): You can use this param to specify some value as project fee and the responses will contain matches of projects lesser than that of the given value. Example: '10000'.
|
|
2949
|
+
customerId_eq (string): You can use this param to provide a customer company id and the responses will contain exact matches of projects that match the given customer company id. Example: '1'.
|
|
2950
|
+
customerId_oneOf (string): You can use this param to provide customer company ids separated by commas and the responses will contain matches of projects that match any of the given customer company id. Example: '1,2,3'.
|
|
2951
|
+
customerId_noneOf (string): You can use this param to provide customer company id separated by commas and the responses will not contain matches of projects that match the given set of customer company id. Example: '1,2,3'.
|
|
2952
|
+
teamMemberId_eq (string): You can use this param to provide a team member id and the responses will contain exact matches of projects that match the given team member id. Example: '1'.
|
|
2953
|
+
teamMemberId_oneOf (string): You can use this param to provide team member ids separated by commas and the responses will contain matches of projects that match any of the given team member id. Example: '1,2,3'.
|
|
2954
|
+
teamMemberId_noneOf (string): You can use this param to provide team member id separated by commas and the responses will not contain matches of projects that match the given set of team member id. Example: '1,2,3'.
|
|
2955
|
+
companyId_eq (string): You can use this param to provide a customer company id and the responses will contain exact matches of projects that match the given customer company id. Example: '1'.
|
|
2956
|
+
companyId_oneOf (string): You can use this param to provide customer company ids separated by commas and the responses will contain matches of projects that match any of the given customer company id. Example: '1,2,3'.
|
|
2957
|
+
companyId_noneOf (string): You can use this param to provide customer company id separated by commas and the responses will not contain matches of projects that match the given set of customer company id. Example: '1,2,3'.
|
|
2958
|
+
projectName_eq (string): You can use this param to specify some project name and the responses will contain exact matches of projects that match the given name. Example: 'Stark Onboarding'.
|
|
2959
|
+
projectName_cn (string): You can use this param to specify some project name and the responses will contain matches of projects that match the given name. Example: 'Stark Onboarding'.
|
|
2960
|
+
projectName_nc (string): You can use this param to specify some project name and the responses will not contain matches of projects that match the given name. Example: 'Stark Onboarding'.
|
|
2961
|
+
inferredProgress_eq (array): You can use this param to provide a inferred progress and the responses will contain exact matches of projects that match the given inferred progress.
|
|
2962
|
+
contractType_eq (array): You can use this param to provide a contract type and the responses will contain exact matches of projects that match the given contract type
|
|
2963
|
+
contractType_oneOf (array): You can use this param to provide contract types separated by commas and the responses will contain matches of projects that match any of the given contract types.
|
|
2964
|
+
contractType_noneOf (array): You can use this param to provide contract types separated by commas and the responses will not contain matches of projects that match the given set of contract types.
|
|
2965
|
+
budgetedHours_gt (string): You can use this param to provide a budgeted hour and the responses will contain projects whose budgeted hours are greater than the given budgeted hour. Example: '1'.
|
|
2966
|
+
budgetedHours_eq (string): You can use this param to provide a budgeted hour and the responses will contain exact matches of projects that match the given budgeted hour. Example: '2'.
|
|
2967
|
+
budgetedHours_lt (string): You can use this param to provide a budgeted hour and the responses will contain projects whose budgeted hours are less than the given budgeted hour. Example: '1'.
|
|
2968
|
+
budgetedHours_ge (string): You can use this param to provide a budgeted hour and the responses will contain projects whose budgeted hours are greater than or equal to the given budgeted hour. Example: '2'.
|
|
2969
|
+
allocatedHours_le (string): You can use this param to provide a allocated hour and the responses will contain projects whose allocated hours are less than or equal to the given allocated hour. Example: '1'.
|
|
2970
|
+
allocatedHours_gt (string): You can use this param to provide a allocated hour and the responses will contain projects whose allocated hours are greater than the given allocated hour. Example: '1'.
|
|
2971
|
+
allocatedHours_eq (string): You can use this param to provide a allocated hour and the responses will contain exact matches of projects that match the given allocated hour. Example: '2'.
|
|
2972
|
+
allocatedHours_lt (string): You can use this param to provide a allocated hour and the responses will contain projects whose allocated hours are less than the given allocated hour. Example: '1'.
|
|
2973
|
+
allocatedHours_ge (string): You can use this param to provide a allocated hour and the responses will contain projects whose allocated hours are greater than or equal to the given allocated hour. Example: '2'.
|
|
2974
|
+
customersInvited_gt (string): You can use this param to provide a number and the responses will contain projects that have more customers invited than given number of customers invited. Example: '1'.
|
|
2975
|
+
customersInvited_eq (string): You can use this param to provide a number and the responses will contain exact matches of projects that exactly have the given number of customers invited. Example: '2'.
|
|
2976
|
+
customersInvited_lt (string): You can use this param to provide a number and the responses will contain projects that have less customers invited than given number of customers invited. Example: '1'.
|
|
2977
|
+
customersInvited_ge (string): You can use this param to provide a number and the responses will contain projects that have equal or more customers invited than given number of customers invited. Example: '2'.
|
|
2978
|
+
customersInvited_le (string): You can use this param to provide a number and the responses will contain projects that have equal or less customers invited than given number of customers invited. Example: '1'.
|
|
2979
|
+
customersJoined_gt (string): You can use this param to provide a number and the responses will contain projects that have more customers joined than given number of customers joined. Example: '1'.
|
|
2980
|
+
customersJoined_eq (string): You can use this param to provide a number and the responses will contain exact matches of projects that exactly have the given number of customers joined. Example: '2'.
|
|
2981
|
+
customersJoined_lt (string): You can use this param to provide a number and the responses will contain projects that have less customers joined than given number of customers joined. Example: '1'.
|
|
2982
|
+
customersJoined_ge (string): You can use this param to provide a number and the responses will contain projects that have equal or more customers joined than given number of customers joined. Example: '2'.
|
|
2983
|
+
customersJoined_le (string): You can use this param to provide a number and the responses will contain projects that have equal or less customers joined than given number of customers joined. Example: '1'.
|
|
2984
|
+
includeArchive_eq (boolean): You can use this parameter to specify whether responses will include the archived projects. Example: 'False'.
|
|
2985
|
+
status_eq (string): You can use this param to provide status and the responses will contain projects that are equal to the given status Example: '1'.
|
|
2986
|
+
status_oneOf (string): You can use this param to provide statuses and the responses will contain projects that match one of the given statuses Example: '1,2'.
|
|
2987
|
+
status_noneOf (string): You can use this param to provide statuses and the responses will contain projects that matches none of the given statuses Example: '1,2'.
|
|
2988
|
+
externalReferenceId_eq (string): You can use this param to provide external reference id and the responses will contain projects that are equal to the given id Example: 'project_181866171876'.
|
|
2989
|
+
|
|
2990
|
+
Returns:
|
|
2991
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
2992
|
+
|
|
2993
|
+
Raises:
|
|
2994
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
2995
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
2996
|
+
|
|
2997
|
+
Tags:
|
|
2998
|
+
Projects
|
|
2999
|
+
"""
|
|
3000
|
+
url = f"{self.base_url}/1.0/projects"
|
|
3001
|
+
query_params = {
|
|
3002
|
+
k: v
|
|
3003
|
+
for k, v in [
|
|
3004
|
+
("pageSize", pageSize),
|
|
3005
|
+
("pageToken", pageToken),
|
|
3006
|
+
("includeFields", includeFields),
|
|
3007
|
+
("includeAllFields", includeAllFields),
|
|
3008
|
+
("sortBy", sortBy),
|
|
3009
|
+
("sortOrder", sortOrder),
|
|
3010
|
+
("match", match),
|
|
3011
|
+
("startDate.gt", startDate_gt),
|
|
3012
|
+
("startDate.eq", startDate_eq),
|
|
3013
|
+
("startDate.lt", startDate_lt),
|
|
3014
|
+
("startDate.ge", startDate_ge),
|
|
3015
|
+
("startDate.le", startDate_le),
|
|
3016
|
+
("dueDate.gt", dueDate_gt),
|
|
3017
|
+
("dueDate.eq", dueDate_eq),
|
|
3018
|
+
("dueDate.lt", dueDate_lt),
|
|
3019
|
+
("dueDate.ge", dueDate_ge),
|
|
3020
|
+
("dueDate.le", dueDate_le),
|
|
3021
|
+
("startDateActual.gt", startDateActual_gt),
|
|
3022
|
+
("startDateActual.eq", startDateActual_eq),
|
|
3023
|
+
("startDateActual.lt", startDateActual_lt),
|
|
3024
|
+
("startDateActual.ge", startDateActual_ge),
|
|
3025
|
+
("startDateActual.le", startDateActual_le),
|
|
3026
|
+
("dueDateActual.gt", dueDateActual_gt),
|
|
3027
|
+
("dueDateActual.eq", dueDateActual_eq),
|
|
3028
|
+
("dueDateActual.lt", dueDateActual_lt),
|
|
3029
|
+
("dueDateActual.ge", dueDateActual_ge),
|
|
3030
|
+
("dueDateActual.le", dueDateActual_le),
|
|
3031
|
+
("createdAt.gt", createdAt_gt),
|
|
3032
|
+
("createdAt.eq", createdAt_eq),
|
|
3033
|
+
("createdAt.lt", createdAt_lt),
|
|
3034
|
+
("createdAt.ge", createdAt_ge),
|
|
3035
|
+
("createdAt.le", createdAt_le),
|
|
3036
|
+
("updatedAt.gt", updatedAt_gt),
|
|
3037
|
+
("updatedAt.eq", updatedAt_eq),
|
|
3038
|
+
("updatedAt.lt", updatedAt_lt),
|
|
3039
|
+
("updatedAt.ge", updatedAt_ge),
|
|
3040
|
+
("updatedAt.le", updatedAt_le),
|
|
3041
|
+
("annualizedRecurringRevenue.eq", annualizedRecurringRevenue_eq),
|
|
3042
|
+
("annualizedRecurringRevenue.gt", annualizedRecurringRevenue_gt),
|
|
3043
|
+
("annualizedRecurringRevenue.lt", annualizedRecurringRevenue_lt),
|
|
3044
|
+
("projectFee.eq", projectFee_eq),
|
|
3045
|
+
("projectFee.gt", projectFee_gt),
|
|
3046
|
+
("projectFee.lt", projectFee_lt),
|
|
3047
|
+
("customerId.eq", customerId_eq),
|
|
3048
|
+
("customerId.oneOf", customerId_oneOf),
|
|
3049
|
+
("customerId.noneOf", customerId_noneOf),
|
|
3050
|
+
("teamMemberId.eq", teamMemberId_eq),
|
|
3051
|
+
("teamMemberId.oneOf", teamMemberId_oneOf),
|
|
3052
|
+
("teamMemberId.noneOf", teamMemberId_noneOf),
|
|
3053
|
+
("companyId.eq", companyId_eq),
|
|
3054
|
+
("companyId.oneOf", companyId_oneOf),
|
|
3055
|
+
("companyId.noneOf", companyId_noneOf),
|
|
3056
|
+
("projectName.eq", projectName_eq),
|
|
3057
|
+
("projectName.cn", projectName_cn),
|
|
3058
|
+
("projectName.nc", projectName_nc),
|
|
3059
|
+
("inferredProgress.eq", inferredProgress_eq),
|
|
3060
|
+
("contractType.eq", contractType_eq),
|
|
3061
|
+
("contractType.oneOf", contractType_oneOf),
|
|
3062
|
+
("contractType.noneOf", contractType_noneOf),
|
|
3063
|
+
("budgetedHours.gt", budgetedHours_gt),
|
|
3064
|
+
("budgetedHours.eq", budgetedHours_eq),
|
|
3065
|
+
("budgetedHours.lt", budgetedHours_lt),
|
|
3066
|
+
("budgetedHours.ge", budgetedHours_ge),
|
|
3067
|
+
("allocatedHours.le", allocatedHours_le),
|
|
3068
|
+
("allocatedHours.gt", allocatedHours_gt),
|
|
3069
|
+
("allocatedHours.eq", allocatedHours_eq),
|
|
3070
|
+
("allocatedHours.lt", allocatedHours_lt),
|
|
3071
|
+
("allocatedHours.ge", allocatedHours_ge),
|
|
3072
|
+
("customersInvited.gt", customersInvited_gt),
|
|
3073
|
+
("customersInvited.eq", customersInvited_eq),
|
|
3074
|
+
("customersInvited.lt", customersInvited_lt),
|
|
3075
|
+
("customersInvited.ge", customersInvited_ge),
|
|
3076
|
+
("customersInvited.le", customersInvited_le),
|
|
3077
|
+
("customersJoined.gt", customersJoined_gt),
|
|
3078
|
+
("customersJoined.eq", customersJoined_eq),
|
|
3079
|
+
("customersJoined.lt", customersJoined_lt),
|
|
3080
|
+
("customersJoined.ge", customersJoined_ge),
|
|
3081
|
+
("customersJoined.le", customersJoined_le),
|
|
3082
|
+
("includeArchive.eq", includeArchive_eq),
|
|
3083
|
+
("status.eq", status_eq),
|
|
3084
|
+
("status.oneOf", status_oneOf),
|
|
3085
|
+
("status.noneOf", status_noneOf),
|
|
3086
|
+
("externalReferenceId.eq", externalReferenceId_eq),
|
|
3087
|
+
]
|
|
3088
|
+
if v is not None
|
|
3089
|
+
}
|
|
3090
|
+
response = self._get(url, params=query_params)
|
|
3091
|
+
response.raise_for_status()
|
|
3092
|
+
if (
|
|
3093
|
+
response.status_code == 204
|
|
3094
|
+
or not response.content
|
|
3095
|
+
or not response.text.strip()
|
|
3096
|
+
):
|
|
3097
|
+
return None
|
|
3098
|
+
try:
|
|
3099
|
+
return response.json()
|
|
3100
|
+
except ValueError:
|
|
3101
|
+
return None
|
|
3102
|
+
|
|
3103
|
+
def create_project(
|
|
3104
|
+
self,
|
|
3105
|
+
includeFields: list[str] | None = None,
|
|
3106
|
+
includeAllFields: bool | None = None,
|
|
3107
|
+
projectId: int | None = None,
|
|
3108
|
+
projectName: str | None = None,
|
|
3109
|
+
startDate: str | None = None,
|
|
3110
|
+
dueDate: str | None = None,
|
|
3111
|
+
visibility: str | None = None,
|
|
3112
|
+
owner: dict[str, Any] | None = None,
|
|
3113
|
+
teamMembers: dict[str, Any] | None = None,
|
|
3114
|
+
status: dict[str, Any] | None = None,
|
|
3115
|
+
fields: list[dict[str, Any]] | None = None,
|
|
3116
|
+
customer: dict[str, Any] | None = None,
|
|
3117
|
+
partners: list[dict[str, Any]] | None = None,
|
|
3118
|
+
sources: list[dict[str, Any]] | None = None,
|
|
3119
|
+
assignProjectOwner: bool | None = None,
|
|
3120
|
+
placeholders: list[dict[str, Any]] | None = None,
|
|
3121
|
+
annualizedRecurringRevenue: int | None = None,
|
|
3122
|
+
projectFee: int | None = None,
|
|
3123
|
+
autoAllocation: bool | None = None,
|
|
3124
|
+
autoCreateCompany: bool | None = None,
|
|
3125
|
+
budgetedHours: float | None = None,
|
|
3126
|
+
financials: dict[str, Any] | None = None,
|
|
3127
|
+
currency: str | None = None,
|
|
3128
|
+
externalReferenceId: str | None = None,
|
|
3129
|
+
) -> dict[str, Any]:
|
|
3130
|
+
"""
|
|
3131
|
+
Create a project
|
|
3132
|
+
|
|
3133
|
+
Args:
|
|
3134
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
3135
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
3136
|
+
projectId (integer): The `identifier` of the project is generated by the system and can be used to identify the project globally. Example: '201'.
|
|
3137
|
+
projectName (string): The `name` of the project. The name specified will be displayed everywhere else and can be used for filtering purposes. Example: 'Acme onboarding'.
|
|
3138
|
+
startDate (string): On this date the project's execution officially begins. If sources (templates) are mentioned in the request, the start date is required. For projects without any defined sources, it may be empty. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
3139
|
+
dueDate (string): The day on which the project's execution is planned to be completed. The due date is not required and can be left blank. If sources (templates) are included as part of the project creation, the project's due date will be calculated depending on the duration of the specified sources. For projects where both `startDate` and `dueDate` are specified, the latter must be on or after the given `startDate`. The format for the due date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
3140
|
+
visibility (string): Set visibility parameters to restrict who can see your project. There are two options: `EVERYONE` and `MEMBERS`. Selecting `EVERYONE` allows all team members from your firm to view the project, while selecting `MEMBERS` restricts access to only those team members who have been specifically invited. Example: 'EVERYONE'.
|
|
3141
|
+
owner (object): The project owner is mandatory to be specified along with the project creation. The owner gets access to everything in the project and can be used to control the activities that happens in the project. Project owner will receive project invite email based on their notification configuration
|
|
3142
|
+
teamMembers (object): The teamMembers field can be used to specify the project members, customers and customerChampion. Once the project is created, an invite will be emailed to all the `teamMembers` specified.
|
|
3143
|
+
status (object): The value of the project status can be specified here and this is essential to keep track of the project. Example: 'In progress'.
|
|
3144
|
+
fields (array): The custom fields can be set during the project creation with the help of `fields`. The `fieldValue` can be either a string or a number or an array and it has to comply with the type of the field. Refer [examples](https://developer.rocketlane.com/v1.0/docs/custom-fields#examples-of-requests-and-responses-for-assigning-custom-field-values) to know how to assign `fieldValue` based on their `field_type`.
|
|
3145
|
+
customer (object): This field is required to identify the `customer` as part of the request. The customer's name is case-sensitive, and an exact match is required for further processing. It should be noted that once the customer information is entered, it cannot be modified during the project's lifespan.
|
|
3146
|
+
partners (array): The `partners` field is used to specify partner companies.
|
|
3147
|
+
sources (array): Sources denotes the project templates involved in creation/ imported post creation of the `project`.
|
|
3148
|
+
assignProjectOwner (boolean): When a project is created, you can use this param to automatically assign any unassigned tasks to the **project owner**. Note: If the project hasn’t been created using sources, this value will be skipped. Example: 'False'.
|
|
3149
|
+
placeholders (array): Rocketlane’s placeholders are associated with roles. Based on the kind of roles and expertise that are needed to execute a task, placeholders can be added as assignees to templates as well as projects. Eventually, you can resolve placeholders by replacing them with team members according to their availability and role.
|
|
3150
|
+
Note: If the project is not built using sources, this value will be ignored but the mappings are retained and can be used in the future.
|
|
3151
|
+
annualizedRecurringRevenue (integer): Indicates the value of the recurring revenue of the customer's subscriptions for a single calendar year. Example: '10000'.
|
|
3152
|
+
projectFee (integer): The total fee that is charged for the project. Example: '100000'.
|
|
3153
|
+
autoAllocation (boolean): The field autoAllocation defines whether Auto Allocation is enabled for the project or not. If auto allocation is enabled, instead of adding it manually, the allocations are computed from the tasks duration, effort and the assignees specified in the project. Example: 'False'.
|
|
3154
|
+
autoCreateCompany (boolean): The field auto create company defines whether company should be created as part of the project creation. If the field is set to true, then if the company exists we re-use the company and proceed further. Else we will create a new company. Example: 'False'.
|
|
3155
|
+
budgetedHours (number): Budgeted hours represent the total hours allocated for project execution. This value can be edited at any point throughout the project’s duration. You can enter the budgeted hours in decimal form, including both hours and minutes, with up to two decimal places of precision. Eg: 1.65 hrs = 1h 39m(1.65h * 60m = 99m). Example: '10.5'.
|
|
3156
|
+
financials (object): This section addresses the financial aspects of the projects and the associated fields. Example: '1000'.
|
|
3157
|
+
currency (string): The currency for handling the project’s financials. You can only specify a currency for a project that is added at the account level. Please note that the project’s currency cannot to changed once set. Example: 'USD'.
|
|
3158
|
+
externalReferenceId (string): An externalReferenceId is a unique identifier that links entities or transactions between external systems and Rocketlane, ensuring accurate data correlation and consistency. Example: 'pr_8171'.
|
|
3159
|
+
|
|
3160
|
+
Returns:
|
|
3161
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
3162
|
+
|
|
3163
|
+
Raises:
|
|
3164
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3165
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3166
|
+
|
|
3167
|
+
Tags:
|
|
3168
|
+
Projects
|
|
3169
|
+
"""
|
|
3170
|
+
request_body_data = None
|
|
3171
|
+
request_body_data = {
|
|
3172
|
+
"projectId": projectId,
|
|
3173
|
+
"projectName": projectName,
|
|
3174
|
+
"startDate": startDate,
|
|
3175
|
+
"dueDate": dueDate,
|
|
3176
|
+
"visibility": visibility,
|
|
3177
|
+
"owner": owner,
|
|
3178
|
+
"teamMembers": teamMembers,
|
|
3179
|
+
"status": status,
|
|
3180
|
+
"fields": fields,
|
|
3181
|
+
"customer": customer,
|
|
3182
|
+
"partners": partners,
|
|
3183
|
+
"sources": sources,
|
|
3184
|
+
"assignProjectOwner": assignProjectOwner,
|
|
3185
|
+
"placeholders": placeholders,
|
|
3186
|
+
"annualizedRecurringRevenue": annualizedRecurringRevenue,
|
|
3187
|
+
"projectFee": projectFee,
|
|
3188
|
+
"autoAllocation": autoAllocation,
|
|
3189
|
+
"autoCreateCompany": autoCreateCompany,
|
|
3190
|
+
"budgetedHours": budgetedHours,
|
|
3191
|
+
"financials": financials,
|
|
3192
|
+
"currency": currency,
|
|
3193
|
+
"externalReferenceId": externalReferenceId,
|
|
3194
|
+
}
|
|
3195
|
+
request_body_data = {
|
|
3196
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
3197
|
+
}
|
|
3198
|
+
url = f"{self.base_url}/1.0/projects"
|
|
3199
|
+
query_params = {
|
|
3200
|
+
k: v
|
|
3201
|
+
for k, v in [
|
|
3202
|
+
("includeFields", includeFields),
|
|
3203
|
+
("includeAllFields", includeAllFields),
|
|
3204
|
+
]
|
|
3205
|
+
if v is not None
|
|
3206
|
+
}
|
|
3207
|
+
response = self._post(
|
|
3208
|
+
url,
|
|
3209
|
+
data=request_body_data,
|
|
3210
|
+
params=query_params,
|
|
3211
|
+
content_type="application/json",
|
|
3212
|
+
)
|
|
3213
|
+
response.raise_for_status()
|
|
3214
|
+
if (
|
|
3215
|
+
response.status_code == 204
|
|
3216
|
+
or not response.content
|
|
3217
|
+
or not response.text.strip()
|
|
3218
|
+
):
|
|
3219
|
+
return None
|
|
3220
|
+
try:
|
|
3221
|
+
return response.json()
|
|
3222
|
+
except ValueError:
|
|
3223
|
+
return None
|
|
3224
|
+
|
|
3225
|
+
def get_all_phases(
|
|
3226
|
+
self,
|
|
3227
|
+
projectId: int,
|
|
3228
|
+
pageSize: float | None = None,
|
|
3229
|
+
pageToken: str | None = None,
|
|
3230
|
+
includeFields: list[str] | None = None,
|
|
3231
|
+
includeAllFields: bool | None = None,
|
|
3232
|
+
sortBy: str | None = None,
|
|
3233
|
+
sortOrder: str | None = None,
|
|
3234
|
+
match: str | None = None,
|
|
3235
|
+
startDate_gt: str | None = None,
|
|
3236
|
+
startDate_eq: str | None = None,
|
|
3237
|
+
startDate_lt: str | None = None,
|
|
3238
|
+
startDate_ge: str | None = None,
|
|
3239
|
+
startDate_le: str | None = None,
|
|
3240
|
+
dueDate_gt: str | None = None,
|
|
3241
|
+
dueDate_eq: str | None = None,
|
|
3242
|
+
dueDate_lt: str | None = None,
|
|
3243
|
+
dueDate_ge: str | None = None,
|
|
3244
|
+
dueDate_le: str | None = None,
|
|
3245
|
+
startDateActual_gt: str | None = None,
|
|
3246
|
+
startDateActual_eq: str | None = None,
|
|
3247
|
+
startDateActual_lt: str | None = None,
|
|
3248
|
+
startDateActual_ge: str | None = None,
|
|
3249
|
+
startDateActual_le: str | None = None,
|
|
3250
|
+
dueDateActual_gt: str | None = None,
|
|
3251
|
+
dueDateActual_eq: str | None = None,
|
|
3252
|
+
dueDateActual_lt: str | None = None,
|
|
3253
|
+
dueDateActual_ge: str | None = None,
|
|
3254
|
+
dueDateActual_le: str | None = None,
|
|
3255
|
+
createdAt_gt: int | None = None,
|
|
3256
|
+
createdAt_eq: int | None = None,
|
|
3257
|
+
createdAt_lt: int | None = None,
|
|
3258
|
+
createdAt_ge: int | None = None,
|
|
3259
|
+
createdAt_le: int | None = None,
|
|
3260
|
+
updatedAt_gt: int | None = None,
|
|
3261
|
+
updatedAt_eq: int | None = None,
|
|
3262
|
+
updatedAt_lt: int | None = None,
|
|
3263
|
+
updatedAt_ge: int | None = None,
|
|
3264
|
+
updatedAt_le: int | None = None,
|
|
3265
|
+
phaseName_eq: str | None = None,
|
|
3266
|
+
phaseName_cn: str | None = None,
|
|
3267
|
+
phaseName_nc: str | None = None,
|
|
3268
|
+
) -> dict[str, Any]:
|
|
3269
|
+
"""
|
|
3270
|
+
Get all phases
|
|
3271
|
+
|
|
3272
|
+
Args:
|
|
3273
|
+
projectId (integer): The `identifier` of the project is generated by the system and can be used to identify the project globally. Example: '200'.
|
|
3274
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
3275
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
3276
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
3277
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
3278
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
3279
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
3280
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
3281
|
+
startDate_gt (string): You can use this param to specify some date and the responses will contain phases whose date are greater than the given date. Example: '2023-03-28'.
|
|
3282
|
+
startDate_eq (string): You can use this param to specify some date and the responses will contain exact matches of phases that match the given date. Example: '2023-03-28'.
|
|
3283
|
+
startDate_lt (string): You can use this param to specify some date and the responses will contain phases whose date are less than the given date. Example: '2023-03-28'.
|
|
3284
|
+
startDate_ge (string): You can use this param to specify some date and the responses will contain phases whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
3285
|
+
startDate_le (string): You can use this param to specify some date and the responses will contain phases whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
3286
|
+
dueDate_gt (string): You can use this param to specify some date and the responses will contain phases whose date are greater than the given date. Example: '2023-03-28'.
|
|
3287
|
+
dueDate_eq (string): You can use this param to specify some date and the responses will contain exact matches of phases that match the given date. Example: '2023-03-28'.
|
|
3288
|
+
dueDate_lt (string): You can use this param to specify some date and the responses will contain phases whose date are less than the given date. Example: '2023-03-28'.
|
|
3289
|
+
dueDate_ge (string): You can use this param to specify some date and the responses will contain phases whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
3290
|
+
dueDate_le (string): You can use this param to specify some date and the responses will contain phases whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
3291
|
+
startDateActual_gt (string): You can use this param to specify some date and the responses will contain phases whose date are greater than the given date. Example: '2023-03-28'.
|
|
3292
|
+
startDateActual_eq (string): You can use this param to specify some date and the responses will contain exact matches of phases that match the given date. Example: '2023-03-28'.
|
|
3293
|
+
startDateActual_lt (string): You can use this param to specify some date and the responses will contain phases whose date are less than the given date. Example: '2023-03-28'.
|
|
3294
|
+
startDateActual_ge (string): You can use this param to specify some date and the responses will contain phases whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
3295
|
+
startDateActual_le (string): You can use this param to specify some date and the responses will contain phases whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
3296
|
+
dueDateActual_gt (string): You can use this param to specify some date and the responses will contain phases whose date are greater than the given date. Example: '2023-03-28'.
|
|
3297
|
+
dueDateActual_eq (string): You can use this param to specify some date and the responses will contain exact matches of phases that match the given date. Example: '2023-03-28'.
|
|
3298
|
+
dueDateActual_lt (string): You can use this param to specify some date and the responses will contain phases whose date are less than the given date. Example: '2023-03-28'.
|
|
3299
|
+
dueDateActual_ge (string): You can use this param to specify some date and the responses will contain phases whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
3300
|
+
dueDateActual_le (string): You can use this param to specify some date and the responses will contain phases whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
3301
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are greater than the given phases created date. Example: '1625164800000'.
|
|
3302
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of phases that match the given phases created date. Example: '1625164800000'.
|
|
3303
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are less than the given phases created date. Example: '1625164800000'.
|
|
3304
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are greater than or equal to the given phases created date. Example: '1625164800000'.
|
|
3305
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are less than or equal to the given phases created date. Example: '1625164800000'.
|
|
3306
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are greater than the given phases updated date. Example: '1625164800000'.
|
|
3307
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of phases that match the given phases updated date. Example: '1625164800000'.
|
|
3308
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are less than the given phases updated date. Example: '1625164800000'.
|
|
3309
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are greater than or equal to the given phases updated date. Example: '1625164800000'.
|
|
3310
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain phases whose date are less than or equal to the given phases updated date. Example: '1625164800000'.
|
|
3311
|
+
phaseName_eq (string): You can use this param to specify some phase name and the responses will contain exact matches of phases that match the given name. Example: 'Stark Onboarding'.
|
|
3312
|
+
phaseName_cn (string): You can use this param to specify some phase name and the responses will contain matches of phases that match the given name. Example: 'Stark Onboarding'.
|
|
3313
|
+
phaseName_nc (string): You can use this param to specify some phase name and the responses will not contain matches of phases that match the given name. Example: 'Stark Onboarding'.
|
|
3314
|
+
|
|
3315
|
+
Returns:
|
|
3316
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
3317
|
+
|
|
3318
|
+
Raises:
|
|
3319
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3320
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3321
|
+
|
|
3322
|
+
Tags:
|
|
3323
|
+
Phases
|
|
3324
|
+
"""
|
|
3325
|
+
url = f"{self.base_url}/1.0/phases"
|
|
3326
|
+
query_params = {
|
|
3327
|
+
k: v
|
|
3328
|
+
for k, v in [
|
|
3329
|
+
("projectId", projectId),
|
|
3330
|
+
("pageSize", pageSize),
|
|
3331
|
+
("pageToken", pageToken),
|
|
3332
|
+
("includeFields", includeFields),
|
|
3333
|
+
("includeAllFields", includeAllFields),
|
|
3334
|
+
("sortBy", sortBy),
|
|
3335
|
+
("sortOrder", sortOrder),
|
|
3336
|
+
("match", match),
|
|
3337
|
+
("startDate.gt", startDate_gt),
|
|
3338
|
+
("startDate.eq", startDate_eq),
|
|
3339
|
+
("startDate.lt", startDate_lt),
|
|
3340
|
+
("startDate.ge", startDate_ge),
|
|
3341
|
+
("startDate.le", startDate_le),
|
|
3342
|
+
("dueDate.gt", dueDate_gt),
|
|
3343
|
+
("dueDate.eq", dueDate_eq),
|
|
3344
|
+
("dueDate.lt", dueDate_lt),
|
|
3345
|
+
("dueDate.ge", dueDate_ge),
|
|
3346
|
+
("dueDate.le", dueDate_le),
|
|
3347
|
+
("startDateActual.gt", startDateActual_gt),
|
|
3348
|
+
("startDateActual.eq", startDateActual_eq),
|
|
3349
|
+
("startDateActual.lt", startDateActual_lt),
|
|
3350
|
+
("startDateActual.ge", startDateActual_ge),
|
|
3351
|
+
("startDateActual.le", startDateActual_le),
|
|
3352
|
+
("dueDateActual.gt", dueDateActual_gt),
|
|
3353
|
+
("dueDateActual.eq", dueDateActual_eq),
|
|
3354
|
+
("dueDateActual.lt", dueDateActual_lt),
|
|
3355
|
+
("dueDateActual.ge", dueDateActual_ge),
|
|
3356
|
+
("dueDateActual.le", dueDateActual_le),
|
|
3357
|
+
("createdAt.gt", createdAt_gt),
|
|
3358
|
+
("createdAt.eq", createdAt_eq),
|
|
3359
|
+
("createdAt.lt", createdAt_lt),
|
|
3360
|
+
("createdAt.ge", createdAt_ge),
|
|
3361
|
+
("createdAt.le", createdAt_le),
|
|
3362
|
+
("updatedAt.gt", updatedAt_gt),
|
|
3363
|
+
("updatedAt.eq", updatedAt_eq),
|
|
3364
|
+
("updatedAt.lt", updatedAt_lt),
|
|
3365
|
+
("updatedAt.ge", updatedAt_ge),
|
|
3366
|
+
("updatedAt.le", updatedAt_le),
|
|
3367
|
+
("phaseName.eq", phaseName_eq),
|
|
3368
|
+
("phaseName.cn", phaseName_cn),
|
|
3369
|
+
("phaseName.nc", phaseName_nc),
|
|
3370
|
+
]
|
|
3371
|
+
if v is not None
|
|
3372
|
+
}
|
|
3373
|
+
response = self._get(url, params=query_params)
|
|
3374
|
+
response.raise_for_status()
|
|
3375
|
+
if (
|
|
3376
|
+
response.status_code == 204
|
|
3377
|
+
or not response.content
|
|
3378
|
+
or not response.text.strip()
|
|
3379
|
+
):
|
|
3380
|
+
return None
|
|
3381
|
+
try:
|
|
3382
|
+
return response.json()
|
|
3383
|
+
except ValueError:
|
|
3384
|
+
return None
|
|
3385
|
+
|
|
3386
|
+
def create_phase(
|
|
3387
|
+
self,
|
|
3388
|
+
includeFields: list[str] | None = None,
|
|
3389
|
+
includeAllFields: bool | None = None,
|
|
3390
|
+
phaseId: int | None = None,
|
|
3391
|
+
phaseName: str | None = None,
|
|
3392
|
+
project: dict[str, Any] | None = None,
|
|
3393
|
+
startDate: str | None = None,
|
|
3394
|
+
dueDate: str | None = None,
|
|
3395
|
+
status: dict[str, Any] | None = None,
|
|
3396
|
+
private: bool | None = None,
|
|
3397
|
+
) -> dict[str, Any]:
|
|
3398
|
+
"""
|
|
3399
|
+
Create a phase
|
|
3400
|
+
|
|
3401
|
+
Args:
|
|
3402
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
3403
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
3404
|
+
phaseId (integer): The `identifier` of the phase is generated by the system and can be used to identify the phase globally. Example: '201'.
|
|
3405
|
+
phaseName (string): The `name` of the phase. The name specified will be displayed everywhere else and can be used for filtering purposes. Example: 'Kick off'.
|
|
3406
|
+
project (object): The `project` associated with phase needs to be specified here and it is mandatory for the phase to get created and map accordingly.
|
|
3407
|
+
startDate (string): On this date the phase's execution officially begins. The start date is required. The format for the start date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
3408
|
+
dueDate (string): The day on which the phase's execution is planned to be completed. The due date is required and cannot be left blank. The `dueDate` must be on or after the given `startDate`. The format for the due date is _YYYY-MM-DD_. Example: '2023-03-28'.
|
|
3409
|
+
status (object): The value of the phase status can be specified here and this is essential to keep track of the phase.
|
|
3410
|
+
private (boolean): Describes the privacy of the phase i.e. if it is private or shared. Example: 'True'.
|
|
3411
|
+
|
|
3412
|
+
Returns:
|
|
3413
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
3414
|
+
|
|
3415
|
+
Raises:
|
|
3416
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3417
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3418
|
+
|
|
3419
|
+
Tags:
|
|
3420
|
+
Phases
|
|
3421
|
+
"""
|
|
3422
|
+
request_body_data = None
|
|
3423
|
+
request_body_data = {
|
|
3424
|
+
"phaseId": phaseId,
|
|
3425
|
+
"phaseName": phaseName,
|
|
3426
|
+
"project": project,
|
|
3427
|
+
"startDate": startDate,
|
|
3428
|
+
"dueDate": dueDate,
|
|
3429
|
+
"status": status,
|
|
3430
|
+
"private": private,
|
|
3431
|
+
}
|
|
3432
|
+
request_body_data = {
|
|
3433
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
3434
|
+
}
|
|
3435
|
+
url = f"{self.base_url}/1.0/phases"
|
|
3436
|
+
query_params = {
|
|
3437
|
+
k: v
|
|
3438
|
+
for k, v in [
|
|
3439
|
+
("includeFields", includeFields),
|
|
3440
|
+
("includeAllFields", includeAllFields),
|
|
3441
|
+
]
|
|
3442
|
+
if v is not None
|
|
3443
|
+
}
|
|
3444
|
+
response = self._post(
|
|
3445
|
+
url,
|
|
3446
|
+
data=request_body_data,
|
|
3447
|
+
params=query_params,
|
|
3448
|
+
content_type="application/json",
|
|
3449
|
+
)
|
|
3450
|
+
response.raise_for_status()
|
|
3451
|
+
if (
|
|
3452
|
+
response.status_code == 204
|
|
3453
|
+
or not response.content
|
|
3454
|
+
or not response.text.strip()
|
|
3455
|
+
):
|
|
3456
|
+
return None
|
|
3457
|
+
try:
|
|
3458
|
+
return response.json()
|
|
3459
|
+
except ValueError:
|
|
3460
|
+
return None
|
|
3461
|
+
|
|
3462
|
+
def update_field_option(
|
|
3463
|
+
self,
|
|
3464
|
+
fieldId: str,
|
|
3465
|
+
optionValue: int | None = None,
|
|
3466
|
+
optionColor: str | None = None,
|
|
3467
|
+
optionLabel: str | None = None,
|
|
3468
|
+
) -> dict[str, Any]:
|
|
3469
|
+
"""
|
|
3470
|
+
Update field Option
|
|
3471
|
+
|
|
3472
|
+
Args:
|
|
3473
|
+
fieldId (string): fieldId
|
|
3474
|
+
optionValue (integer): The optionValue is the unique identifier and is unique for each field. Example: '3'.
|
|
3475
|
+
optionColor (string): The optionColor reflects the color of the options for the single or multiple choice field. Example: 'RED'.
|
|
3476
|
+
optionLabel (string): The optionLabel reflects the name of the options for the single or multiple choice field. Example: 'High'.
|
|
3477
|
+
|
|
3478
|
+
Returns:
|
|
3479
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
3480
|
+
|
|
3481
|
+
Raises:
|
|
3482
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3483
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3484
|
+
|
|
3485
|
+
Tags:
|
|
3486
|
+
Fields
|
|
3487
|
+
"""
|
|
3488
|
+
if fieldId is None:
|
|
3489
|
+
raise ValueError("Missing required parameter 'fieldId'.")
|
|
3490
|
+
request_body_data = None
|
|
3491
|
+
request_body_data = {
|
|
3492
|
+
"optionValue": optionValue,
|
|
3493
|
+
"optionColor": optionColor,
|
|
3494
|
+
"optionLabel": optionLabel,
|
|
3495
|
+
}
|
|
3496
|
+
request_body_data = {
|
|
3497
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
3498
|
+
}
|
|
3499
|
+
url = f"{self.base_url}/1.0/fields/{fieldId}/update-option"
|
|
3500
|
+
query_params = {}
|
|
3501
|
+
response = self._post(
|
|
3502
|
+
url,
|
|
3503
|
+
data=request_body_data,
|
|
3504
|
+
params=query_params,
|
|
3505
|
+
content_type="application/json",
|
|
3506
|
+
)
|
|
3507
|
+
response.raise_for_status()
|
|
3508
|
+
if (
|
|
3509
|
+
response.status_code == 204
|
|
3510
|
+
or not response.content
|
|
3511
|
+
or not response.text.strip()
|
|
3512
|
+
):
|
|
3513
|
+
return None
|
|
3514
|
+
try:
|
|
3515
|
+
return response.json()
|
|
3516
|
+
except ValueError:
|
|
3517
|
+
return None
|
|
3518
|
+
|
|
3519
|
+
def add_field_option(
|
|
3520
|
+
self,
|
|
3521
|
+
fieldId: str,
|
|
3522
|
+
optionColor: str | None = None,
|
|
3523
|
+
optionLabel: str | None = None,
|
|
3524
|
+
) -> dict[str, Any]:
|
|
3525
|
+
"""
|
|
3526
|
+
Add field Option
|
|
3527
|
+
|
|
3528
|
+
Args:
|
|
3529
|
+
fieldId (string): fieldId
|
|
3530
|
+
optionColor (string): The optionColor reflects the color of the options for the single or multiple choice field. Example: 'RED'.
|
|
3531
|
+
optionLabel (string): The optionLabel reflects the name of the options for the single or multiple choice field. Example: 'High'.
|
|
3532
|
+
|
|
3533
|
+
Returns:
|
|
3534
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
3535
|
+
|
|
3536
|
+
Raises:
|
|
3537
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3538
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3539
|
+
|
|
3540
|
+
Tags:
|
|
3541
|
+
Fields
|
|
3542
|
+
"""
|
|
3543
|
+
if fieldId is None:
|
|
3544
|
+
raise ValueError("Missing required parameter 'fieldId'.")
|
|
3545
|
+
request_body_data = None
|
|
3546
|
+
request_body_data = {
|
|
3547
|
+
"optionColor": optionColor,
|
|
3548
|
+
"optionLabel": optionLabel,
|
|
3549
|
+
}
|
|
3550
|
+
request_body_data = {
|
|
3551
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
3552
|
+
}
|
|
3553
|
+
url = f"{self.base_url}/1.0/fields/{fieldId}/add-option"
|
|
3554
|
+
query_params = {}
|
|
3555
|
+
response = self._post(
|
|
3556
|
+
url,
|
|
3557
|
+
data=request_body_data,
|
|
3558
|
+
params=query_params,
|
|
3559
|
+
content_type="application/json",
|
|
3560
|
+
)
|
|
3561
|
+
response.raise_for_status()
|
|
3562
|
+
if (
|
|
3563
|
+
response.status_code == 204
|
|
3564
|
+
or not response.content
|
|
3565
|
+
or not response.text.strip()
|
|
3566
|
+
):
|
|
3567
|
+
return None
|
|
3568
|
+
try:
|
|
3569
|
+
return response.json()
|
|
3570
|
+
except ValueError:
|
|
3571
|
+
return None
|
|
3572
|
+
|
|
3573
|
+
def get_all_fields(
|
|
3574
|
+
self,
|
|
3575
|
+
pageSize: float | None = None,
|
|
3576
|
+
pageToken: str | None = None,
|
|
3577
|
+
includeFields: list[str] | None = None,
|
|
3578
|
+
includeAllFields: bool | None = None,
|
|
3579
|
+
sortBy: str | None = None,
|
|
3580
|
+
sortOrder: str | None = None,
|
|
3581
|
+
match: str | None = None,
|
|
3582
|
+
createdAt_gt: int | None = None,
|
|
3583
|
+
createdAt_eq: int | None = None,
|
|
3584
|
+
createdAt_lt: int | None = None,
|
|
3585
|
+
createdAt_ge: int | None = None,
|
|
3586
|
+
createdAt_le: int | None = None,
|
|
3587
|
+
updatedAt_gt: int | None = None,
|
|
3588
|
+
updatedAt_eq: int | None = None,
|
|
3589
|
+
updatedAt_lt: int | None = None,
|
|
3590
|
+
updatedAt_ge: int | None = None,
|
|
3591
|
+
updatedAt_le: int | None = None,
|
|
3592
|
+
objectType_eq: str | None = None,
|
|
3593
|
+
fieldType_eq: str | None = None,
|
|
3594
|
+
enabled_eq: bool | None = None,
|
|
3595
|
+
private_eq: bool | None = None,
|
|
3596
|
+
) -> dict[str, Any]:
|
|
3597
|
+
"""
|
|
3598
|
+
Get all fields
|
|
3599
|
+
|
|
3600
|
+
Args:
|
|
3601
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
3602
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
3603
|
+
includeFields (array): This query parameter allows you to specify which field properties should be returned in the response body by selecting from the drop down. To get the relevant field properties, use comma separated values. If this field is left blank, the default properties are returned.
|
|
3604
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the field properties should be returned in the response body. If the field is left blank, the default field properties are returned. Example: 'True'.
|
|
3605
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
3606
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
3607
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
3608
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are greater than the given fields created date. Example: '1625164800000'.
|
|
3609
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of fields that match the given fields created date. Example: '1625164800000'.
|
|
3610
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are less than the given fields created date. Example: '1625164800000'.
|
|
3611
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are greater than or equal to the given fields created date. Example: '1625164800000'.
|
|
3612
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are less than or equal to the given fields created date. Example: '1625164800000'.
|
|
3613
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are greater than the given fields updated date. Example: '1625164800000'.
|
|
3614
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of fields that match the given fields updated date. Example: '1625164800000'.
|
|
3615
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are less than the given fields updated date. Example: '1625164800000'.
|
|
3616
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are greater than or equal to the given fields updated date. Example: '1625164800000'.
|
|
3617
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain fields whose date are less than or equal to the given fields updated date. Example: '1625164800000'.
|
|
3618
|
+
objectType_eq (string): You can use this param to specify a object type for the fields and the responses will contain exact matches of fields that have the given object type.
|
|
3619
|
+
fieldType_eq (string): You can use this param to specify a field type for the fields and the responses will contain exact matches of fields that have the given field type.
|
|
3620
|
+
enabled_eq (boolean): You can use this parameter to specify whether responses will contains the enabled or disabled fields. Example: 'True'.
|
|
3621
|
+
private_eq (boolean): You can use this parameter to specify whether responses will contains the private or shared fields. Example: 'True'.
|
|
3622
|
+
|
|
3623
|
+
Returns:
|
|
3624
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
3625
|
+
|
|
3626
|
+
Raises:
|
|
3627
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3628
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3629
|
+
|
|
3630
|
+
Tags:
|
|
3631
|
+
Fields
|
|
3632
|
+
"""
|
|
3633
|
+
url = f"{self.base_url}/1.0/fields"
|
|
3634
|
+
query_params = {
|
|
3635
|
+
k: v
|
|
3636
|
+
for k, v in [
|
|
3637
|
+
("pageSize", pageSize),
|
|
3638
|
+
("pageToken", pageToken),
|
|
3639
|
+
("includeFields", includeFields),
|
|
3640
|
+
("includeAllFields", includeAllFields),
|
|
3641
|
+
("sortBy", sortBy),
|
|
3642
|
+
("sortOrder", sortOrder),
|
|
3643
|
+
("match", match),
|
|
3644
|
+
("createdAt.gt", createdAt_gt),
|
|
3645
|
+
("createdAt.eq", createdAt_eq),
|
|
3646
|
+
("createdAt.lt", createdAt_lt),
|
|
3647
|
+
("createdAt.ge", createdAt_ge),
|
|
3648
|
+
("createdAt.le", createdAt_le),
|
|
3649
|
+
("updatedAt.gt", updatedAt_gt),
|
|
3650
|
+
("updatedAt.eq", updatedAt_eq),
|
|
3651
|
+
("updatedAt.lt", updatedAt_lt),
|
|
3652
|
+
("updatedAt.ge", updatedAt_ge),
|
|
3653
|
+
("updatedAt.le", updatedAt_le),
|
|
3654
|
+
("objectType.eq", objectType_eq),
|
|
3655
|
+
("fieldType.eq", fieldType_eq),
|
|
3656
|
+
("enabled.eq", enabled_eq),
|
|
3657
|
+
("private.eq", private_eq),
|
|
3658
|
+
]
|
|
3659
|
+
if v is not None
|
|
3660
|
+
}
|
|
3661
|
+
response = self._get(url, params=query_params)
|
|
3662
|
+
response.raise_for_status()
|
|
3663
|
+
if (
|
|
3664
|
+
response.status_code == 204
|
|
3665
|
+
or not response.content
|
|
3666
|
+
or not response.text.strip()
|
|
3667
|
+
):
|
|
3668
|
+
return None
|
|
3669
|
+
try:
|
|
3670
|
+
return response.json()
|
|
3671
|
+
except ValueError:
|
|
3672
|
+
return None
|
|
3673
|
+
|
|
3674
|
+
def create_field(
|
|
3675
|
+
self,
|
|
3676
|
+
includeFields: list[str] | None = None,
|
|
3677
|
+
includeAllFields: bool | None = None,
|
|
3678
|
+
fieldId: int | None = None,
|
|
3679
|
+
fieldLabel: str | None = None,
|
|
3680
|
+
fieldDescription: str | None = None,
|
|
3681
|
+
fieldType: str | None = None,
|
|
3682
|
+
objectType: str | None = None,
|
|
3683
|
+
fieldOptions: list[dict[str, Any]] | None = None,
|
|
3684
|
+
ratingScale: str | None = None,
|
|
3685
|
+
enabled: bool | None = None,
|
|
3686
|
+
private: bool | None = None,
|
|
3687
|
+
) -> dict[str, Any]:
|
|
3688
|
+
"""
|
|
3689
|
+
Create a Field
|
|
3690
|
+
|
|
3691
|
+
Args:
|
|
3692
|
+
includeFields (array): This query parameter allows you to specify which field properties should be returned in the response body by selecting from the drop down. To get the relevant field properties, use comma separated values. If this field is left blank, the default properties are returned.
|
|
3693
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the field properties should be returned in the response body. If the field is left blank, the default field properties are returned. Example: 'True'.
|
|
3694
|
+
fieldId (integer): The field’s unique, system-generated identifier, which can be used to identify the field globally. Example: '201'.
|
|
3695
|
+
fieldLabel (string): The fieldLabel is the name of the field. Example: 'Priority'.
|
|
3696
|
+
fieldDescription (string): The description of the field. Example: 'Priority of the bug.'.
|
|
3697
|
+
fieldType (string): This defines type of the field. Refer [Custom Fields](https://developer.rocketlane.com/v1.0/docs/custom-fields) for further information Example: 'MULTI_LINE_TEXT'.
|
|
3698
|
+
objectType (string): This defines type of object that is associated with the field. This could be `TASK`, `PROJECT` or `USER`. Example: 'PROJECT'.
|
|
3699
|
+
fieldOptions (array): The fieldOptions params define the value and label for the different options available for `SINGLE_CHOICE` and `MULTIPLE_CHOICE` fields.
|
|
3700
|
+
ratingScale (string): The number of stars in the Rating Scale when Field Type is `RATING`. Example: 'THREE'.
|
|
3701
|
+
enabled (boolean): This depicts if the field is enabled or not. Only those fields which are enabled will reflect in the account. Example: 'False'.
|
|
3702
|
+
private (boolean): This depicts if the field is private or not. Example: 'False'.
|
|
3703
|
+
|
|
3704
|
+
Returns:
|
|
3705
|
+
dict[str, Any]: The resource was successfully created in the database.
|
|
3706
|
+
|
|
3707
|
+
Raises:
|
|
3708
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3709
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3710
|
+
|
|
3711
|
+
Tags:
|
|
3712
|
+
Fields, important
|
|
3713
|
+
"""
|
|
3714
|
+
request_body_data = None
|
|
3715
|
+
request_body_data = {
|
|
3716
|
+
"fieldId": fieldId,
|
|
3717
|
+
"fieldLabel": fieldLabel,
|
|
3718
|
+
"fieldDescription": fieldDescription,
|
|
3719
|
+
"fieldType": fieldType,
|
|
3720
|
+
"objectType": objectType,
|
|
3721
|
+
"fieldOptions": fieldOptions,
|
|
3722
|
+
"ratingScale": ratingScale,
|
|
3723
|
+
"enabled": enabled,
|
|
3724
|
+
"private": private,
|
|
3725
|
+
}
|
|
3726
|
+
request_body_data = {
|
|
3727
|
+
k: v for k, v in request_body_data.items() if v is not None
|
|
3728
|
+
}
|
|
3729
|
+
url = f"{self.base_url}/1.0/fields"
|
|
3730
|
+
query_params = {
|
|
3731
|
+
k: v
|
|
3732
|
+
for k, v in [
|
|
3733
|
+
("includeFields", includeFields),
|
|
3734
|
+
("includeAllFields", includeAllFields),
|
|
3735
|
+
]
|
|
3736
|
+
if v is not None
|
|
3737
|
+
}
|
|
3738
|
+
response = self._post(
|
|
3739
|
+
url,
|
|
3740
|
+
data=request_body_data,
|
|
3741
|
+
params=query_params,
|
|
3742
|
+
content_type="application/json",
|
|
3743
|
+
)
|
|
3744
|
+
response.raise_for_status()
|
|
3745
|
+
if (
|
|
3746
|
+
response.status_code == 204
|
|
3747
|
+
or not response.content
|
|
3748
|
+
or not response.text.strip()
|
|
3749
|
+
):
|
|
3750
|
+
return None
|
|
3751
|
+
try:
|
|
3752
|
+
return response.json()
|
|
3753
|
+
except ValueError:
|
|
3754
|
+
return None
|
|
3755
|
+
|
|
3756
|
+
def get_user(
|
|
3757
|
+
self,
|
|
3758
|
+
userId: str,
|
|
3759
|
+
includeFields: list[str] | None = None,
|
|
3760
|
+
includeAllFields: bool | None = None,
|
|
3761
|
+
) -> dict[str, Any]:
|
|
3762
|
+
"""
|
|
3763
|
+
Get user by Id
|
|
3764
|
+
|
|
3765
|
+
Args:
|
|
3766
|
+
userId (string): userId
|
|
3767
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
3768
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
3769
|
+
|
|
3770
|
+
Returns:
|
|
3771
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
3772
|
+
|
|
3773
|
+
Raises:
|
|
3774
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3775
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3776
|
+
|
|
3777
|
+
Tags:
|
|
3778
|
+
Users, important
|
|
3779
|
+
"""
|
|
3780
|
+
if userId is None:
|
|
3781
|
+
raise ValueError("Missing required parameter 'userId'.")
|
|
3782
|
+
url = f"{self.base_url}/1.0/users/{userId}"
|
|
3783
|
+
query_params = {
|
|
3784
|
+
k: v
|
|
3785
|
+
for k, v in [
|
|
3786
|
+
("includeFields", includeFields),
|
|
3787
|
+
("includeAllFields", includeAllFields),
|
|
3788
|
+
]
|
|
3789
|
+
if v is not None
|
|
3790
|
+
}
|
|
3791
|
+
response = self._get(url, params=query_params)
|
|
3792
|
+
response.raise_for_status()
|
|
3793
|
+
if (
|
|
3794
|
+
response.status_code == 204
|
|
3795
|
+
or not response.content
|
|
3796
|
+
or not response.text.strip()
|
|
3797
|
+
):
|
|
3798
|
+
return None
|
|
3799
|
+
try:
|
|
3800
|
+
return response.json()
|
|
3801
|
+
except ValueError:
|
|
3802
|
+
return None
|
|
3803
|
+
|
|
3804
|
+
def get_all_users(
|
|
3805
|
+
self,
|
|
3806
|
+
pageSize: float | None = None,
|
|
3807
|
+
pageToken: str | None = None,
|
|
3808
|
+
includeFields: list[str] | None = None,
|
|
3809
|
+
includeAllFields: bool | None = None,
|
|
3810
|
+
sortBy: str | None = None,
|
|
3811
|
+
sortOrder: str | None = None,
|
|
3812
|
+
match: str | None = None,
|
|
3813
|
+
firstName_eq: str | None = None,
|
|
3814
|
+
firstName_cn: str | None = None,
|
|
3815
|
+
firstName_nc: str | None = None,
|
|
3816
|
+
lastName_eq: str | None = None,
|
|
3817
|
+
lastName_cn: str | None = None,
|
|
3818
|
+
lastName_nc: str | None = None,
|
|
3819
|
+
email_eq: str | None = None,
|
|
3820
|
+
email_cn: str | None = None,
|
|
3821
|
+
email_nc: str | None = None,
|
|
3822
|
+
status_eq: list[str] | None = None,
|
|
3823
|
+
status_oneOf: list[str] | None = None,
|
|
3824
|
+
status_noneOf: list[str] | None = None,
|
|
3825
|
+
type_eq: list[str] | None = None,
|
|
3826
|
+
type_oneOf: list[str] | None = None,
|
|
3827
|
+
roleId_eq: str | None = None,
|
|
3828
|
+
roleId_oneOf: str | None = None,
|
|
3829
|
+
roleId_noneOf: str | None = None,
|
|
3830
|
+
permissionId_eq: str | None = None,
|
|
3831
|
+
permissionId_oneOf: str | None = None,
|
|
3832
|
+
permissionId_noneOf: str | None = None,
|
|
3833
|
+
capacityInMinutes_eq: float | None = None,
|
|
3834
|
+
capacityInMinutes_gt: float | None = None,
|
|
3835
|
+
capacityInMinutes_ge: float | None = None,
|
|
3836
|
+
capacityInMinutes_lt: float | None = None,
|
|
3837
|
+
capacityInMinutes_le: float | None = None,
|
|
3838
|
+
createdAt_gt: int | None = None,
|
|
3839
|
+
createdAt_eq: int | None = None,
|
|
3840
|
+
createdAt_lt: int | None = None,
|
|
3841
|
+
createdAt_ge: int | None = None,
|
|
3842
|
+
createdAt_le: int | None = None,
|
|
3843
|
+
updatedAt_gt: int | None = None,
|
|
3844
|
+
updatedAt_eq: int | None = None,
|
|
3845
|
+
updatedAt_lt: int | None = None,
|
|
3846
|
+
updatedAt_ge: int | None = None,
|
|
3847
|
+
updatedAt_le: int | None = None,
|
|
3848
|
+
) -> dict[str, Any]:
|
|
3849
|
+
"""
|
|
3850
|
+
Get all users
|
|
3851
|
+
|
|
3852
|
+
Args:
|
|
3853
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
3854
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
3855
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
3856
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
3857
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
3858
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
3859
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
3860
|
+
firstName_eq (string): You can use this param to specify some user first name and the responses will contain exact matches of users that match the given first name. Example: 'John'.
|
|
3861
|
+
firstName_cn (string): You can use this param to specify some user first name and the responses will contain matches of users that match the given first name. Example: 'John'.
|
|
3862
|
+
firstName_nc (string): You can use this param to specify some user first name and the responses will not contain matches of users that match the given first name. Example: 'John'.
|
|
3863
|
+
lastName_eq (string): You can use this param to specify some user last name and the responses will contain exact matches of users that match the given last ame. Example: 'Doe'.
|
|
3864
|
+
lastName_cn (string): You can use this param to specify some user last name and the responses will contain matches of users that match the given last name. Example: 'Doe'.
|
|
3865
|
+
lastName_nc (string): You can use this param to specify some user last name and the responses will not contain matches of users that match the given last name. Example: 'Doe'.
|
|
3866
|
+
email_eq (string): You can use this param to specify some user email id and the responses will contain exact matches of users that match the given email id. Example: 'johndoe@rocketlane.com'.
|
|
3867
|
+
email_cn (string): You can use this param to specify some user email id and the responses will contain matches of users that match the given email id. Example: 'johndoe@rocketlane.com'.
|
|
3868
|
+
email_nc (string): You can use this param to specify some user email id and the responses will not contain matches of users that match the given email id. Example: 'johndoe@rocketlane.com'.
|
|
3869
|
+
status_eq (array): You can use this param to provide a user status and the responses will contain exact matches of users that match the given status.
|
|
3870
|
+
status_oneOf (array): You can use this param to provide user statuses separated by commas and the responses will contain matches of users that match one of the given user status.
|
|
3871
|
+
status_noneOf (array): You can use this param to provide user statuses separated by commas and the responses will contain matches of users that match the none of the given set of user statuses.
|
|
3872
|
+
type_eq (array): You can use this param to provide a user type and the responses will contain exact matches of users that match the given type.
|
|
3873
|
+
type_oneOf (array): You can use this param to provide user types separated by commas and the responses will contain matches of users that match the none of the given set of user types.
|
|
3874
|
+
roleId_eq (string): You can use this param to provide a role id and the responses will contain exact matches of users that match the given role id. Example: '1'.
|
|
3875
|
+
roleId_oneOf (string): You can use this param to provide role ids separated by commas and the responses will contain matches of users that match one of the given role id. Example: '1,2,3'.
|
|
3876
|
+
roleId_noneOf (string): You can use this param to provide role id separated by commas and the responses will contain matches of users that match the none of the given set of role id. Example: '1,2,3'.
|
|
3877
|
+
permissionId_eq (string): You can use this param to provide a permission id and the responses will contain exact matches of users that match the given permission id. Example: '1'.
|
|
3878
|
+
permissionId_oneOf (string): You can use this param to provide permission ids separated by commas and the responses will contain matches of users that match one of the given set of permission id. Example: '1,2,3'.
|
|
3879
|
+
permissionId_noneOf (string): You can use this param to provide permission ids separated by commas and the responses will contain matches of users that match the none of the given set of permission id. Example: '1,2,3'.
|
|
3880
|
+
capacityInMinutes_eq (number): You can use this param to specify some value as capacity and the responses will contain exact matches of users that match the given value. Example: '2400'.
|
|
3881
|
+
capacityInMinutes_gt (number): You can use this param to specify some value as capacity and the responses will contain exact matches of capacity greater than that of the given value. Example: '2400'.
|
|
3882
|
+
capacityInMinutes_ge (number): You can use this param to specify some value as capacity and the responses will contain exact matches of capacity greater than or equal to that of the given value. Example: '2400'.
|
|
3883
|
+
capacityInMinutes_lt (number): You can use this param to specify some value as capacity and the responses will contain exact matches of capacity lesser than that of the given value. Example: '2400'.
|
|
3884
|
+
capacityInMinutes_le (number): You can use this param to specify some value as capacity and the responses will contain exact matches of capacity lesser than or equal to that of the given value. Example: '2400'.
|
|
3885
|
+
createdAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are greater than the given users created date. Example: '1625164800000'.
|
|
3886
|
+
createdAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of users that match the given users created date. Example: '1625164800000'.
|
|
3887
|
+
createdAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are less than the given users created date. Example: '1625164800000'.
|
|
3888
|
+
createdAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are greater than or equal to the given users created date. Example: '1625164800000'.
|
|
3889
|
+
createdAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are less than or equal to the given users created date. Example: '1625164800000'.
|
|
3890
|
+
updatedAt_gt (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are greater than the given users updated date. Example: '1625164800000'.
|
|
3891
|
+
updatedAt_eq (integer): You can use this param to provide an epoch milli value and the responses will contain exact matches of users that match the given users updated date. Example: '1625164800000'.
|
|
3892
|
+
updatedAt_lt (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are less than the given users updated date. Example: '1625164800000'.
|
|
3893
|
+
updatedAt_ge (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are greater than or equal to the given users updated date. Example: '1625164800000'.
|
|
3894
|
+
updatedAt_le (integer): You can use this param to provide an epoch milli value and the responses will contain users whose date are less than or equal to the given users updated date. Example: '1625164800000'.
|
|
3895
|
+
|
|
3896
|
+
Returns:
|
|
3897
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
3898
|
+
|
|
3899
|
+
Raises:
|
|
3900
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3901
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3902
|
+
|
|
3903
|
+
Tags:
|
|
3904
|
+
Users
|
|
3905
|
+
"""
|
|
3906
|
+
url = f"{self.base_url}/1.0/users"
|
|
3907
|
+
query_params = {
|
|
3908
|
+
k: v
|
|
3909
|
+
for k, v in [
|
|
3910
|
+
("pageSize", pageSize),
|
|
3911
|
+
("pageToken", pageToken),
|
|
3912
|
+
("includeFields", includeFields),
|
|
3913
|
+
("includeAllFields", includeAllFields),
|
|
3914
|
+
("sortBy", sortBy),
|
|
3915
|
+
("sortOrder", sortOrder),
|
|
3916
|
+
("match", match),
|
|
3917
|
+
("firstName.eq", firstName_eq),
|
|
3918
|
+
("firstName.cn", firstName_cn),
|
|
3919
|
+
("firstName.nc", firstName_nc),
|
|
3920
|
+
("lastName.eq", lastName_eq),
|
|
3921
|
+
("lastName.cn", lastName_cn),
|
|
3922
|
+
("lastName.nc", lastName_nc),
|
|
3923
|
+
("email.eq", email_eq),
|
|
3924
|
+
("email.cn", email_cn),
|
|
3925
|
+
("email.nc", email_nc),
|
|
3926
|
+
("status.eq", status_eq),
|
|
3927
|
+
("status.oneOf", status_oneOf),
|
|
3928
|
+
("status.noneOf", status_noneOf),
|
|
3929
|
+
("type.eq", type_eq),
|
|
3930
|
+
("type.oneOf", type_oneOf),
|
|
3931
|
+
("roleId.eq", roleId_eq),
|
|
3932
|
+
("roleId.oneOf", roleId_oneOf),
|
|
3933
|
+
("roleId.noneOf", roleId_noneOf),
|
|
3934
|
+
("permissionId.eq", permissionId_eq),
|
|
3935
|
+
("permissionId.oneOf", permissionId_oneOf),
|
|
3936
|
+
("permissionId.noneOf", permissionId_noneOf),
|
|
3937
|
+
("capacityInMinutes.eq", capacityInMinutes_eq),
|
|
3938
|
+
("capacityInMinutes.gt", capacityInMinutes_gt),
|
|
3939
|
+
("capacityInMinutes.ge", capacityInMinutes_ge),
|
|
3940
|
+
("capacityInMinutes.lt", capacityInMinutes_lt),
|
|
3941
|
+
("capacityInMinutes.le", capacityInMinutes_le),
|
|
3942
|
+
("createdAt.gt", createdAt_gt),
|
|
3943
|
+
("createdAt.eq", createdAt_eq),
|
|
3944
|
+
("createdAt.lt", createdAt_lt),
|
|
3945
|
+
("createdAt.ge", createdAt_ge),
|
|
3946
|
+
("createdAt.le", createdAt_le),
|
|
3947
|
+
("updatedAt.gt", updatedAt_gt),
|
|
3948
|
+
("updatedAt.eq", updatedAt_eq),
|
|
3949
|
+
("updatedAt.lt", updatedAt_lt),
|
|
3950
|
+
("updatedAt.ge", updatedAt_ge),
|
|
3951
|
+
("updatedAt.le", updatedAt_le),
|
|
3952
|
+
]
|
|
3953
|
+
if v is not None
|
|
3954
|
+
}
|
|
3955
|
+
response = self._get(url, params=query_params)
|
|
3956
|
+
response.raise_for_status()
|
|
3957
|
+
if (
|
|
3958
|
+
response.status_code == 204
|
|
3959
|
+
or not response.content
|
|
3960
|
+
or not response.text.strip()
|
|
3961
|
+
):
|
|
3962
|
+
return None
|
|
3963
|
+
try:
|
|
3964
|
+
return response.json()
|
|
3965
|
+
except ValueError:
|
|
3966
|
+
return None
|
|
3967
|
+
|
|
3968
|
+
def get_timeoff(
|
|
3969
|
+
self,
|
|
3970
|
+
timeOffId: str,
|
|
3971
|
+
includeFields: list[str] | None = None,
|
|
3972
|
+
includeAllFields: bool | None = None,
|
|
3973
|
+
) -> dict[str, Any]:
|
|
3974
|
+
"""
|
|
3975
|
+
Get time-off by Id
|
|
3976
|
+
|
|
3977
|
+
Args:
|
|
3978
|
+
timeOffId (string): timeOffId
|
|
3979
|
+
includeFields (array): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned.
|
|
3980
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
3981
|
+
|
|
3982
|
+
Returns:
|
|
3983
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
3984
|
+
|
|
3985
|
+
Raises:
|
|
3986
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
3987
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
3988
|
+
|
|
3989
|
+
Tags:
|
|
3990
|
+
Time-Offs
|
|
3991
|
+
"""
|
|
3992
|
+
if timeOffId is None:
|
|
3993
|
+
raise ValueError("Missing required parameter 'timeOffId'.")
|
|
3994
|
+
url = f"{self.base_url}/1.0/time-offs/{timeOffId}"
|
|
3995
|
+
query_params = {
|
|
3996
|
+
k: v
|
|
3997
|
+
for k, v in [
|
|
3998
|
+
("includeFields", includeFields),
|
|
3999
|
+
("includeAllFields", includeAllFields),
|
|
4000
|
+
]
|
|
4001
|
+
if v is not None
|
|
4002
|
+
}
|
|
4003
|
+
response = self._get(url, params=query_params)
|
|
4004
|
+
response.raise_for_status()
|
|
4005
|
+
if (
|
|
4006
|
+
response.status_code == 204
|
|
4007
|
+
or not response.content
|
|
4008
|
+
or not response.text.strip()
|
|
4009
|
+
):
|
|
4010
|
+
return None
|
|
4011
|
+
try:
|
|
4012
|
+
return response.json()
|
|
4013
|
+
except ValueError:
|
|
4014
|
+
return None
|
|
4015
|
+
|
|
4016
|
+
def delete_timeoff(self, timeOffId: str) -> Any:
|
|
4017
|
+
"""
|
|
4018
|
+
Delete a time-off
|
|
4019
|
+
|
|
4020
|
+
Args:
|
|
4021
|
+
timeOffId (string): timeOffId
|
|
4022
|
+
|
|
4023
|
+
Returns:
|
|
4024
|
+
Any: The resource was successfully removed from the database.
|
|
4025
|
+
|
|
4026
|
+
Raises:
|
|
4027
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
4028
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
4029
|
+
|
|
4030
|
+
Tags:
|
|
4031
|
+
Time-Offs
|
|
4032
|
+
"""
|
|
4033
|
+
if timeOffId is None:
|
|
4034
|
+
raise ValueError("Missing required parameter 'timeOffId'.")
|
|
4035
|
+
url = f"{self.base_url}/1.0/time-offs/{timeOffId}"
|
|
4036
|
+
query_params = {}
|
|
4037
|
+
response = self._delete(url, params=query_params)
|
|
4038
|
+
response.raise_for_status()
|
|
4039
|
+
if (
|
|
4040
|
+
response.status_code == 204
|
|
4041
|
+
or not response.content
|
|
4042
|
+
or not response.text.strip()
|
|
4043
|
+
):
|
|
4044
|
+
return None
|
|
4045
|
+
try:
|
|
4046
|
+
return response.json()
|
|
4047
|
+
except ValueError:
|
|
4048
|
+
return None
|
|
4049
|
+
|
|
4050
|
+
def search_time_entries(
|
|
4051
|
+
self,
|
|
4052
|
+
pageSize: float | None = None,
|
|
4053
|
+
pageToken: str | None = None,
|
|
4054
|
+
includeFields: str | None = None,
|
|
4055
|
+
includeAllFields: bool | None = None,
|
|
4056
|
+
sortBy: str | None = None,
|
|
4057
|
+
sortOrder: str | None = None,
|
|
4058
|
+
match: str | None = None,
|
|
4059
|
+
date_gt: str | None = None,
|
|
4060
|
+
date_eq: str | None = None,
|
|
4061
|
+
date_lt: str | None = None,
|
|
4062
|
+
date_ge: str | None = None,
|
|
4063
|
+
date_le: str | None = None,
|
|
4064
|
+
project_eq: float | None = None,
|
|
4065
|
+
task_eq: float | None = None,
|
|
4066
|
+
projectPhase_eq: float | None = None,
|
|
4067
|
+
category_eq: float | None = None,
|
|
4068
|
+
user_eq: float | None = None,
|
|
4069
|
+
sourceType_eq: str | None = None,
|
|
4070
|
+
activityName_eq: str | None = None,
|
|
4071
|
+
activityName_cn: str | None = None,
|
|
4072
|
+
activityName_nc: str | None = None,
|
|
4073
|
+
approvalStatus_eq: str | None = None,
|
|
4074
|
+
) -> dict[str, Any]:
|
|
4075
|
+
"""
|
|
4076
|
+
Search time entries
|
|
4077
|
+
|
|
4078
|
+
Args:
|
|
4079
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
4080
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
4081
|
+
includeFields (string): This query parameter allows you to specify which fields should be returned in the response body by selecting from the drop down. To get the relevant fields, use comma separated values. If the field is left blank, the default properties are returned. Example: 'notes,user'.
|
|
4082
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
4083
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field. Valid fields to perform sortBy are: `MINUTES`, `DATE`, `ID` and `BILLABLE`.
|
|
4084
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
4085
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
4086
|
+
date_gt (string): You can use this param to specify some date and the responses will contain time-entries whose date are greater than the given date. Example: '2023-03-28'.
|
|
4087
|
+
date_eq (string): You can use this param to specify some date and the responses will contain exact matches of time-entries that match the given date. Example: '2023-03-28'.
|
|
4088
|
+
date_lt (string): You can use this param to specify some date and the responses will contain time-entries whose date are less than the given date. Example: '2023-03-28'.
|
|
4089
|
+
date_ge (string): You can use this param to specify some date and the responses will contain time-entries whose date are greater than or equal to the given date. Example: '2023-03-28'.
|
|
4090
|
+
date_le (string): You can use this param to specify some date and the responses will contain time-entries whose date are less than or equal to the given date. Example: '2023-03-28'.
|
|
4091
|
+
project_eq (number): You can use this param to specify some project Id and the responses will contain exact matches of time-entries that match the given project. Example: '201'.
|
|
4092
|
+
task_eq (number): You can use this param to specify some task Id and the responses will contain exact matches of time-entries that match the given task. Example: '202'.
|
|
4093
|
+
projectPhase_eq (number): You can use this param to specify some project phase Id and the responses will contain exact matches of time-entries that match the given phase. Example: '210'.
|
|
4094
|
+
category_eq (number): You can use this param to specify some category Id and the responses will contain exact matches of time-entries that match the given category. Example: '5'.
|
|
4095
|
+
user_eq (number): You can use this param to specify some user Id and the responses will contain exact matches of time-entries that belong to the user with the given user Id. Example: '5'.
|
|
4096
|
+
sourceType_eq (string): You can use this param to specify a source type for the time entries and the responses will contain exact matches of time-entries that have the given source type.
|
|
4097
|
+
activityName_eq (string): You can use this param to specify some activity name and the responses will contain exact matches of time-entries that match the given activity name. Example: 'Pre-Sales Campaign'.
|
|
4098
|
+
activityName_cn (string): You can use this param to specify some text and the responses will contain time-entries that contain the given text in their activity name. Example: 'Sales'.
|
|
4099
|
+
activityName_nc (string): You can use this param to specify some text and the responses will contain time-entries that _DO NOT_ contain the given text in their activity name. Example: 'Sales'.
|
|
4100
|
+
approvalStatus_eq (string): You can use this param to specify an approval status for the time entries and the responses will contain exact matches of time-entries that have the given approval type.
|
|
4101
|
+
|
|
4102
|
+
Returns:
|
|
4103
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
4104
|
+
|
|
4105
|
+
Raises:
|
|
4106
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
4107
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
4108
|
+
|
|
4109
|
+
Tags:
|
|
4110
|
+
Time Tracking
|
|
4111
|
+
"""
|
|
4112
|
+
url = f"{self.base_url}/1.0/time-entries/search"
|
|
4113
|
+
query_params = {
|
|
4114
|
+
k: v
|
|
4115
|
+
for k, v in [
|
|
4116
|
+
("pageSize", pageSize),
|
|
4117
|
+
("pageToken", pageToken),
|
|
4118
|
+
("includeFields", includeFields),
|
|
4119
|
+
("includeAllFields", includeAllFields),
|
|
4120
|
+
("sortBy", sortBy),
|
|
4121
|
+
("sortOrder", sortOrder),
|
|
4122
|
+
("match", match),
|
|
4123
|
+
("date.gt", date_gt),
|
|
4124
|
+
("date.eq", date_eq),
|
|
4125
|
+
("date.lt", date_lt),
|
|
4126
|
+
("date.ge", date_ge),
|
|
4127
|
+
("date.le", date_le),
|
|
4128
|
+
("project.eq", project_eq),
|
|
4129
|
+
("task.eq", task_eq),
|
|
4130
|
+
("projectPhase.eq", projectPhase_eq),
|
|
4131
|
+
("category.eq", category_eq),
|
|
4132
|
+
("user.eq", user_eq),
|
|
4133
|
+
("sourceType.eq", sourceType_eq),
|
|
4134
|
+
("activityName.eq", activityName_eq),
|
|
4135
|
+
("activityName.cn", activityName_cn),
|
|
4136
|
+
("activityName.nc", activityName_nc),
|
|
4137
|
+
("approvalStatus.eq", approvalStatus_eq),
|
|
4138
|
+
]
|
|
4139
|
+
if v is not None
|
|
4140
|
+
}
|
|
4141
|
+
response = self._get(url, params=query_params)
|
|
4142
|
+
response.raise_for_status()
|
|
4143
|
+
if (
|
|
4144
|
+
response.status_code == 204
|
|
4145
|
+
or not response.content
|
|
4146
|
+
or not response.text.strip()
|
|
4147
|
+
):
|
|
4148
|
+
return None
|
|
4149
|
+
try:
|
|
4150
|
+
return response.json()
|
|
4151
|
+
except ValueError:
|
|
4152
|
+
return None
|
|
4153
|
+
|
|
4154
|
+
def get_time_entry_categories(
|
|
4155
|
+
self, pageSize: float | None = None, pageToken: str | None = None
|
|
4156
|
+
) -> dict[str, Any]:
|
|
4157
|
+
"""
|
|
4158
|
+
Get time entry categories
|
|
4159
|
+
|
|
4160
|
+
Args:
|
|
4161
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
4162
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
4163
|
+
|
|
4164
|
+
Returns:
|
|
4165
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
4166
|
+
|
|
4167
|
+
Raises:
|
|
4168
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
4169
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
4170
|
+
|
|
4171
|
+
Tags:
|
|
4172
|
+
Time Tracking
|
|
4173
|
+
"""
|
|
4174
|
+
url = f"{self.base_url}/1.0/time-entries/categories"
|
|
4175
|
+
query_params = {
|
|
4176
|
+
k: v
|
|
4177
|
+
for k, v in [("pageSize", pageSize), ("pageToken", pageToken)]
|
|
4178
|
+
if v is not None
|
|
4179
|
+
}
|
|
4180
|
+
response = self._get(url, params=query_params)
|
|
4181
|
+
response.raise_for_status()
|
|
4182
|
+
if (
|
|
4183
|
+
response.status_code == 204
|
|
4184
|
+
or not response.content
|
|
4185
|
+
or not response.text.strip()
|
|
4186
|
+
):
|
|
4187
|
+
return None
|
|
4188
|
+
try:
|
|
4189
|
+
return response.json()
|
|
4190
|
+
except ValueError:
|
|
4191
|
+
return None
|
|
4192
|
+
|
|
4193
|
+
def get_all_resource_allocations(
|
|
4194
|
+
self,
|
|
4195
|
+
startDate: str,
|
|
4196
|
+
endDate: str,
|
|
4197
|
+
pageSize: float | None = None,
|
|
4198
|
+
pageToken: str | None = None,
|
|
4199
|
+
includeFields: list[str] | None = None,
|
|
4200
|
+
includeAllFields: bool | None = None,
|
|
4201
|
+
sortBy: str | None = None,
|
|
4202
|
+
sortOrder: str | None = None,
|
|
4203
|
+
match: str | None = None,
|
|
4204
|
+
memberId_eq: str | None = None,
|
|
4205
|
+
memberId_oneOf: str | None = None,
|
|
4206
|
+
memberId_noneOf: str | None = None,
|
|
4207
|
+
projectId_eq: str | None = None,
|
|
4208
|
+
projectId_oneOf: str | None = None,
|
|
4209
|
+
projectId_noneOf: str | None = None,
|
|
4210
|
+
placeholderId_eq: str | None = None,
|
|
4211
|
+
placeholderId_oneOf: str | None = None,
|
|
4212
|
+
placeholderId_noneOf: str | None = None,
|
|
4213
|
+
) -> dict[str, Any]:
|
|
4214
|
+
"""
|
|
4215
|
+
Get all Resource allocations
|
|
4216
|
+
|
|
4217
|
+
Args:
|
|
4218
|
+
startDate (string): You can use this parameter to define the start date, and the API response will return all resource allocations that start on or after the specified date. Example: '2023-03-28'.
|
|
4219
|
+
endDate (string): You can use this parameter to define an end date, and the API will return allocations that end on or before the specified date. Example: '2023-03-28'.
|
|
4220
|
+
pageSize (number): This parameter sets the maximum number of responses to be displayed per page. If the page size is insufficient to accommodate the whole number of responses obtained, the pagination object will include a link to the next page as well as the next page token. If left blank, it defaults to 100. Example: '100'.
|
|
4221
|
+
pageToken (string): Use this parameter to specify the pageToken of a page to which you want to navigate. This pageToken can be obtained from a previous request which specified a limit and will only be active for 15 minutes after it is created. Example: '59c12a42-dd10-11ed-afa1-0242ac120002'.
|
|
4222
|
+
includeFields (array): Use this query parameter to opt in for fields to be returned in the response body. Use comma separated values to fetch the respective fields. If left blank, default properties are returned.
|
|
4223
|
+
includeAllFields (boolean): This query parameter allows you to specify if all the fields should be returned in the response body. If the field is left blank, the default properties are returned. Example: 'True'.
|
|
4224
|
+
sortBy (string): You can use the sortBy param to sort the responses by the given field.
|
|
4225
|
+
sortOrder (string): The sortOrder param can be used to specify the sorting order, which can be Ascending (ASC) or Descending (DESC). Descending is the default option.
|
|
4226
|
+
match (string): You can use the match param to specify if we need to filter the entries using either AND(all) / OR(any). Defaults to AND.
|
|
4227
|
+
memberId_eq (string): You can use this parameter to specify a member id, and the API will return allocations that exactly match the given member id. This allows for precise filtering of allocations based on the specified user. Example: '1'.
|
|
4228
|
+
memberId_oneOf (string): You can use this parameter to specify multiple member ids, separated by commas, and the API will return allocations that match any of the provided member ids. Example: '1,2,3'.
|
|
4229
|
+
memberId_noneOf (string): You can use this parameter to specify multiple member ids, separated by commas, and the API will return allocations that exclude any of the provided member ids. Example: '1,2,3'.
|
|
4230
|
+
projectId_eq (string): You can use this parameter to specify a project id, and the API will return allocations that exactly match the given project id. Example: '1'.
|
|
4231
|
+
projectId_oneOf (string): You can use this parameter to specify multiple project ids, separated by commas, and the API will return allocations that match any of the provided project ids. Example: '1,2,3'.
|
|
4232
|
+
projectId_noneOf (string): You can use this parameter to specify multiple project ids, separated by commas, and the API will return allocations that exclude any of the provided project ids. Example: '1,2,3'.
|
|
4233
|
+
placeholderId_eq (string): You can use this parameter to specify a placeholder id, and the API will return allocations that exactly match the given placeholder id. Example: '1'.
|
|
4234
|
+
placeholderId_oneOf (string): You can use this parameter to specify multiple placeholder ids, separated by commas, and the API will return allocations that match any of the provided placeholder ids. Example: '1,2,3'.
|
|
4235
|
+
placeholderId_noneOf (string): You can use this parameter to specify multiple placeholder ids, separated by commas, and the API will return allocations that exclude any matching placeholder ids. Example: '1,2,3'.
|
|
4236
|
+
|
|
4237
|
+
Returns:
|
|
4238
|
+
dict[str, Any]: The requested action was successfully executed.
|
|
4239
|
+
|
|
4240
|
+
Raises:
|
|
4241
|
+
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
4242
|
+
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
4243
|
+
|
|
4244
|
+
Tags:
|
|
4245
|
+
Resource Allocations
|
|
4246
|
+
"""
|
|
4247
|
+
url = f"{self.base_url}/1.0/resource-allocations"
|
|
4248
|
+
query_params = {
|
|
4249
|
+
k: v
|
|
4250
|
+
for k, v in [
|
|
4251
|
+
("startDate", startDate),
|
|
4252
|
+
("endDate", endDate),
|
|
4253
|
+
("pageSize", pageSize),
|
|
4254
|
+
("pageToken", pageToken),
|
|
4255
|
+
("includeFields", includeFields),
|
|
4256
|
+
("includeAllFields", includeAllFields),
|
|
4257
|
+
("sortBy", sortBy),
|
|
4258
|
+
("sortOrder", sortOrder),
|
|
4259
|
+
("match", match),
|
|
4260
|
+
("memberId.eq", memberId_eq),
|
|
4261
|
+
("memberId.oneOf", memberId_oneOf),
|
|
4262
|
+
("memberId.noneOf", memberId_noneOf),
|
|
4263
|
+
("projectId.eq", projectId_eq),
|
|
4264
|
+
("projectId.oneOf", projectId_oneOf),
|
|
4265
|
+
("projectId.noneOf", projectId_noneOf),
|
|
4266
|
+
("placeholderId.eq", placeholderId_eq),
|
|
4267
|
+
("placeholderId.oneOf", placeholderId_oneOf),
|
|
4268
|
+
("placeholderId.noneOf", placeholderId_noneOf),
|
|
4269
|
+
]
|
|
4270
|
+
if v is not None
|
|
4271
|
+
}
|
|
4272
|
+
response = self._get(url, params=query_params)
|
|
4273
|
+
response.raise_for_status()
|
|
4274
|
+
if (
|
|
4275
|
+
response.status_code == 204
|
|
4276
|
+
or not response.content
|
|
4277
|
+
or not response.text.strip()
|
|
4278
|
+
):
|
|
4279
|
+
return None
|
|
4280
|
+
try:
|
|
4281
|
+
return response.json()
|
|
4282
|
+
except ValueError:
|
|
4283
|
+
return None
|
|
4284
|
+
|
|
4285
|
+
def list_tools(self):
|
|
4286
|
+
return [
|
|
4287
|
+
self.get_time_entry,
|
|
4288
|
+
self.update_time_entry,
|
|
4289
|
+
self.delete_time_entry,
|
|
4290
|
+
self.get_task,
|
|
4291
|
+
self.update_task,
|
|
4292
|
+
self.delete_task,
|
|
4293
|
+
self.get_space,
|
|
4294
|
+
self.update_space,
|
|
4295
|
+
self.delete_space,
|
|
4296
|
+
self.get_space_document,
|
|
4297
|
+
self.update_space_document,
|
|
4298
|
+
self.delete_space_document,
|
|
4299
|
+
self.get_project,
|
|
4300
|
+
self.update_project,
|
|
4301
|
+
self.delete_project,
|
|
4302
|
+
self.get_phase,
|
|
4303
|
+
self.update_phase,
|
|
4304
|
+
self.delete_phase,
|
|
4305
|
+
self.get_field,
|
|
4306
|
+
self.update_field,
|
|
4307
|
+
self.delete_field,
|
|
4308
|
+
self.get_all_timeoffs,
|
|
4309
|
+
self.create_timeoff,
|
|
4310
|
+
self.get_all_time_entries,
|
|
4311
|
+
self.create_time_entry,
|
|
4312
|
+
self.remove_followers_from_task,
|
|
4313
|
+
self.remove_dependencies_from_task,
|
|
4314
|
+
self.remove_assignees_from_task,
|
|
4315
|
+
self.move_task_to_given_phase,
|
|
4316
|
+
self.add_followers_to_task,
|
|
4317
|
+
self.add_dependencies_to_task,
|
|
4318
|
+
self.add_assignee_to_task,
|
|
4319
|
+
self.get_all_tasks,
|
|
4320
|
+
self.create_task,
|
|
4321
|
+
self.get_all_spaces,
|
|
4322
|
+
self.create_space,
|
|
4323
|
+
self.get_all_space_documents,
|
|
4324
|
+
self.create_space_document,
|
|
4325
|
+
self.unassign_placeholders,
|
|
4326
|
+
self.remove_members,
|
|
4327
|
+
self.import_template,
|
|
4328
|
+
self.assign_placeholders,
|
|
4329
|
+
self.archive_project,
|
|
4330
|
+
self.add_members,
|
|
4331
|
+
self.get_all_projects,
|
|
4332
|
+
self.create_project,
|
|
4333
|
+
self.get_all_phases,
|
|
4334
|
+
self.create_phase,
|
|
4335
|
+
self.update_field_option,
|
|
4336
|
+
self.add_field_option,
|
|
4337
|
+
self.get_all_fields,
|
|
4338
|
+
self.create_field,
|
|
4339
|
+
self.get_user,
|
|
4340
|
+
self.get_all_users,
|
|
4341
|
+
self.get_timeoff,
|
|
4342
|
+
self.delete_timeoff,
|
|
4343
|
+
self.search_time_entries,
|
|
4344
|
+
self.get_time_entry_categories,
|
|
4345
|
+
self.get_all_resource_allocations,
|
|
4346
|
+
]
|