You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update version to 3.5.8 and add support for optional org_identifier and project_identifier in Harness microclients. Modify API request URLs to conditionally include these parameters,
# Now you can make calls without specifying account_identifier in each request
174
+
# Now you can make calls without specifying identifiers in each request
149
175
tokens = client.token.list() # account_identifier is automatically included
150
-
projects = client.harness_project.list() # account_identifier is automatically included
176
+
projects = client.harness_project.list() # account_identifier and org_identifier are automatically included (project_identifier is not used for projects endpoint)
177
+
```
178
+
179
+
**Note on Optional Identifiers:**
180
+
-`account_identifier` is **required** for all Harness operations
181
+
-`org_identifier` and `project_identifier` are **optional** and will be omitted from API requests if not provided
182
+
- If `org_identifier` or `project_identifier` are not set, they will not appear in the URL at all (not even as empty parameters)
183
+
-**Important:** The `harness_project` microclient does **not** support `project_identifier` as a query parameter. The projects endpoint only uses `org_identifier` (and `account_identifier`). Other microclients (service_account, token, role, etc.) do support `project_identifier`.
184
+
- You can override default identifiers by passing them as parameters to individual method calls:
185
+
186
+
```python
187
+
# Override default identifiers for a specific request
188
+
# Note: project_identifier is not used for harness_project endpoints
189
+
projects = client.harness_project.list(
190
+
account_identifier='DIFFERENT_ACCOUNT_ID',
191
+
org_identifier='DIFFERENT_ORG_ID'
192
+
)
193
+
194
+
# Use default identifiers but override only org_identifier
195
+
# Note: project_identifier is not used for harness_project endpoints
0 commit comments