atlassian-python-api 5.0.1__py3-none-any.whl → 5.0.3__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.
Files changed (46) hide show
  1. atlassian/VERSION +1 -1
  2. atlassian/__init__.py +18 -3
  3. atlassian/assets/__init__.py +6 -0
  4. atlassian/{assets.py → assets/assets_cloud.py} +274 -9
  5. atlassian/assets/assets_server.py +24 -0
  6. atlassian/bamboo.py +178 -2
  7. atlassian/bitbucket/__init__.py +176 -1
  8. atlassian/bitbucket/base.py +9 -2
  9. atlassian/bitbucket/cloud/repositories/commits.py +13 -3
  10. atlassian/bitbucket/cloud/repositories/repositoryVariables.py +23 -0
  11. atlassian/bitbucket/cloud/workspaces/__init__.py +6 -1
  12. atlassian/bitbucket/server/__init__.py +11 -0
  13. atlassian/cloud_admin.py +418 -0
  14. atlassian/compass/__init__.py +109 -0
  15. atlassian/confluence/__init__.py +9 -0
  16. atlassian/confluence/base.py +44 -11
  17. atlassian/confluence/cloud/__init__.py +36 -0
  18. atlassian/confluence/cloud/admin_management.py +125 -0
  19. atlassian/confluence/cloud/classification_levels.py +77 -0
  20. atlassian/confluence/cloud/cloud.py +50 -26
  21. atlassian/confluence/cloud/content_properties.py +71 -0
  22. atlassian/confluence/cloud/graphql.py +99 -0
  23. atlassian/confluence/server/__init__.py +344 -76
  24. atlassian/confluence_base.py +24 -13
  25. atlassian/crowd.py +78 -0
  26. atlassian/jira/__init__.py +21 -0
  27. atlassian/jira/core_methods.py +11698 -0
  28. atlassian/jira/jira_cloud.py +243 -0
  29. atlassian/{jira.py → jira/jira_server.py} +498 -37
  30. atlassian/jira/service_management_methods.py +1381 -0
  31. atlassian/jira/software_methods.py +2114 -0
  32. atlassian/rest_client.py +26 -1
  33. atlassian/service_desk.py +79 -12
  34. atlassian/{xray.py → xray/__init__.py} +136 -9
  35. atlassian/yogi/__init__.py +17 -0
  36. atlassian/yogi/base.py +11 -0
  37. atlassian/yogi/cloud.py +2367 -0
  38. atlassian/yogi/yogi_confluence_cloud.py +10 -0
  39. atlassian/yogi/yogi_confluence_dc.py +94 -0
  40. atlassian/yogi/yogi_jira_cloud.py +10 -0
  41. atlassian/yogi/yogi_jira_dc.py +64 -0
  42. {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.3.dist-info}/METADATA +80 -10
  43. {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.3.dist-info}/RECORD +46 -27
  44. {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.3.dist-info}/WHEEL +0 -0
  45. {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.3.dist-info}/licenses/LICENSE +0 -0
  46. {atlassian_python_api-5.0.1.dist-info → atlassian_python_api-5.0.3.dist-info}/top_level.txt +0 -0
atlassian/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.1
1
+ 5.0.3
atlassian/__init__.py CHANGED
@@ -5,20 +5,22 @@ Atlassian Python API
5
5
  from .bamboo import Bamboo
6
6
  from .bitbucket import Bitbucket
7
7
  from .bitbucket import Bitbucket as Stash
8
- from .cloud_admin import CloudAdminOrgs, CloudAdminUsers
8
+ from .cloud_admin import CloudAdmin, CloudAdminOrgs, CloudAdminUsers
9
+ from .compass import Compass
9
10
  from .confluence import Confluence, ConfluenceBase, ConfluenceCloud, ConfluenceServer
10
11
  from .confluence.cloud.cloud import ConfluenceCloud as ConfluenceV2
11
12
  from .crowd import Crowd
12
13
  from .insight import Insight
13
14
  from .insight import Insight as Assets # used for Insight on-premise
14
- from .assets import AssetsCloud # used for Insight Cloud
15
- from .jira import Jira
15
+ from .assets import AssetsCloud, AssetsDataCenter, AssetsServer # Assets Cloud and Data Center
16
+ from .jira import Jira, JiraCloud, JiraServer, JiraServiceManagement, JiraSoftware, create_jira_cloud
16
17
  from .marketplace import MarketPlace
17
18
  from .portfolio import Portfolio
18
19
  from .service_desk import ServiceDesk
19
20
  from .service_desk import ServiceDesk as ServiceManagement
20
21
  from .tempo import TempoCloud, TempoServer
21
22
  from .xray import Xray
23
+ from .yogi import YogiConfluenceCloud, YogiConfluenceDC, YogiJiraCloud, YogiJiraDC
22
24
 
23
25
 
24
26
  # Confluence REST API v2 client. The existing ``Confluence`` class remains
@@ -36,9 +38,16 @@ __all__ = [
36
38
  "ConfluenceV2",
37
39
  "create_confluence",
38
40
  "Jira",
41
+ "JiraServer",
42
+ "JiraCloud",
43
+ "JiraSoftware",
44
+ "JiraServiceManagement",
45
+ "create_jira_cloud",
39
46
  "Bitbucket",
40
47
  "CloudAdminOrgs",
41
48
  "CloudAdminUsers",
49
+ "CloudAdmin",
50
+ "Compass",
42
51
  "Portfolio",
43
52
  "Bamboo",
44
53
  "Stash",
@@ -50,6 +59,12 @@ __all__ = [
50
59
  "Insight",
51
60
  "Assets",
52
61
  "AssetsCloud",
62
+ "AssetsDataCenter",
63
+ "AssetsServer",
53
64
  "TempoCloud",
54
65
  "TempoServer",
66
+ "YogiJiraCloud",
67
+ "YogiJiraDC",
68
+ "YogiConfluenceCloud",
69
+ "YogiConfluenceDC",
55
70
  ]
@@ -0,0 +1,6 @@
1
+ """Assets clients for Jira Cloud and Jira Data Center."""
2
+
3
+ from .assets_cloud import AssetsCloud
4
+ from .assets_server import AssetsDataCenter, AssetsServer
5
+
6
+ __all__ = ["AssetsCloud", "AssetsDataCenter", "AssetsServer"]
@@ -1,7 +1,7 @@
1
1
  # coding=utf-8
2
2
  import logging
3
3
 
4
- from .rest_client import AtlassianRestAPI
4
+ from ..rest_client import AtlassianRestAPI
5
5
 
6
6
  # from deprecated import deprecated
7
7
 
@@ -72,6 +72,11 @@ class AssetsCloud(AtlassianRestAPI):
72
72
  """
73
73
  return next(iter(self._get_assets_workspace_ids()))
74
74
 
75
+ @staticmethod
76
+ def _params(**kwargs):
77
+ """Drop unset query parameters while preserving false/zero values."""
78
+ return {key: value for key, value in kwargs.items() if value is not None}
79
+
75
80
  # Attachments
76
81
  def get_attachments_of_objects(self, object_id):
77
82
  """
@@ -215,6 +220,11 @@ class AssetsCloud(AtlassianRestAPI):
215
220
  url = self.url_joiner(self.api_root, "icon/global")
216
221
  return self.get(url)
217
222
 
223
+ def get_icon_image(self, icon_id, not_json_response=True):
224
+ """Return the binary image for an Assets icon."""
225
+ url = self.url_joiner(self.api_root, f"icon/{icon_id}/icon.png")
226
+ return self.get(url, not_json_response=not_json_response)
227
+
218
228
  # Import
219
229
  # Start configured imports. To see an ongoing import see the Progress resource
220
230
  def start_import_configuration(self, import_id):
@@ -230,6 +240,62 @@ class AssetsCloud(AtlassianRestAPI):
230
240
  )
231
241
  return self.post(url)
232
242
 
243
+ def get_import_source(self, import_source_id):
244
+ return self.get(self.url_joiner(self.api_root, f"importsource/{import_source_id}"))
245
+
246
+ def update_import_source_mapping(self, import_source_id, data, partial=False):
247
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/mapping")
248
+ if partial:
249
+ return self.patch(url, data=data)
250
+ return self.put(url, data=data)
251
+
252
+ def get_import_mapping_progress(self, import_source_id, resource_id):
253
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/mapping/progress/{resource_id}")
254
+ return self.get(url)
255
+
256
+ def get_import_config_status(self, import_source_id):
257
+ return self.get(self.url_joiner(self.api_root, f"importsource/{import_source_id}/configstatus"))
258
+
259
+ def get_import_schema_and_mapping(self, import_source_id):
260
+ return self.get(self.url_joiner(self.api_root, f"importsource/{import_source_id}/schema-and-mapping"))
261
+
262
+ def create_import_execution(self, import_source_id, data=None):
263
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/executions")
264
+ return self.post(url, data=data)
265
+
266
+ def delete_import_execution(self, import_source_id, import_execution_id):
267
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/executions/{import_execution_id}")
268
+ return self.delete(url)
269
+
270
+ def update_import_execution_progress(self, import_source_id, import_execution_id, data=None):
271
+ url = self.url_joiner(
272
+ self.api_root, f"importsource/{import_source_id}/executions/{import_execution_id}/progress"
273
+ )
274
+ return self.put(url, data=data)
275
+
276
+ def add_import_execution_data(self, import_source_id, import_execution_id, data=None):
277
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/executions/{import_execution_id}/data")
278
+ return self.post(url, data=data)
279
+
280
+ def get_import_execution_status(self, import_source_id, import_execution_id):
281
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/executions/{import_execution_id}/status")
282
+ return self.get(url)
283
+
284
+ def get_import_executions_status(self, import_source_id):
285
+ return self.get(self.url_joiner(self.api_root, f"importsource/{import_source_id}/executions/status"))
286
+
287
+ def add_failed_import_execution_history(self, import_source_id, execution_id, data=None):
288
+ url = self.url_joiner(
289
+ self.api_root, f"importsource/{import_source_id}/executions/{execution_id}/history/failed"
290
+ )
291
+ return self.post(url, data=data)
292
+
293
+ def create_import_token(self, import_source_id, data=None):
294
+ return self.post(self.url_joiner(self.api_root, f"importsource/{import_source_id}/token"), data=data)
295
+
296
+ def get_import_schedule(self, import_source_id):
297
+ return self.get(self.url_joiner(self.api_root, f"importsource/{import_source_id}/schedule"))
298
+
233
299
  # Index
234
300
  # Handle the indexing of Assets
235
301
  def reindex_assets(self):
@@ -275,6 +341,55 @@ class AssetsCloud(AtlassianRestAPI):
275
341
  url = self.url_joiner(self.api_root, "object/aql")
276
342
  return self.post(url, params=params, data=data)
277
343
 
344
+ def get_aql_objects(
345
+ self,
346
+ query=None,
347
+ page=None,
348
+ result_per_page=None,
349
+ include_attributes=None,
350
+ include_attributes_deep=None,
351
+ include_type_attributes=None,
352
+ include_extended_info=None,
353
+ ):
354
+ """Retrieve objects through the legacy AQL collection endpoint."""
355
+ params = self._params(
356
+ qlQuery=query,
357
+ page=page,
358
+ resultPerPage=result_per_page,
359
+ includeAttributes=include_attributes,
360
+ includeAttributesDeep=include_attributes_deep,
361
+ includeTypeAttributes=include_type_attributes,
362
+ includeExtendedInfo=include_extended_info,
363
+ )
364
+ return self.get(self.url_joiner(self.api_root, "aql/objects"), params=params or None)
365
+
366
+ def get_iql_objects(
367
+ self,
368
+ query=None,
369
+ page=None,
370
+ result_per_page=None,
371
+ include_attributes=None,
372
+ include_attributes_deep=None,
373
+ include_type_attributes=None,
374
+ include_extended_info=None,
375
+ ):
376
+ """Retrieve objects through the IQL collection endpoint."""
377
+ params = self._params(
378
+ iql=query,
379
+ page=page,
380
+ resultPerPage=result_per_page,
381
+ includeAttributes=include_attributes,
382
+ includeAttributesDeep=include_attributes_deep,
383
+ includeTypeAttributes=include_type_attributes,
384
+ includeExtendedInfo=include_extended_info,
385
+ )
386
+ return self.get(self.url_joiner(self.api_root, "iql/objects"), params=params or None)
387
+
388
+ def iql(self, query, start=0, max_results=25, include_attributes=True):
389
+ """Find Assets objects using the IQL-compatible Cloud endpoint."""
390
+ params = self._params(startAt=start, maxResults=max_results, includeAttributes=include_attributes)
391
+ return self.post(self.url_joiner(self.api_root, "object/aql"), params=params, data={"qlQuery": query})
392
+
278
393
  # Navlist AQL
279
394
  # Retrieve a list of objects based on an AQL query
280
395
  # Server-only. Cloud use aql()
@@ -387,6 +502,44 @@ class AssetsCloud(AtlassianRestAPI):
387
502
  url = self.url_joiner(self.api_root, f"object/{object_id}/attributes")
388
503
  return self.get(url)
389
504
 
505
+ def get_object_attribute_value(self, object_id, attribute_id, default=None):
506
+ """Return the first value for an object type attribute.
507
+
508
+ Assets exposes object attributes as a collection rather than a
509
+ dedicated value endpoint. This helper fetches that collection and
510
+ selects the entry whose ``objectTypeAttributeId`` matches
511
+ ``attribute_id``. ``None`` (or ``default``) is returned when the
512
+ attribute is absent or has no values.
513
+
514
+ :param object_id: Assets object ID
515
+ :param attribute_id: object type attribute ID
516
+ :param default: value returned when no matching value exists
517
+ """
518
+ attributes = self.get_object_attributes(object_id)
519
+ if isinstance(attributes, dict):
520
+ attributes = attributes.get("objectAttributeBeans", attributes.get("values", []))
521
+ if not isinstance(attributes, list):
522
+ return default
523
+
524
+ for attribute in attributes:
525
+ if not isinstance(attribute, dict):
526
+ continue
527
+ object_type_attribute = attribute.get("objectTypeAttribute") or {}
528
+ current_id = attribute.get("objectTypeAttributeId", object_type_attribute.get("id"))
529
+ if str(current_id) != str(attribute_id):
530
+ continue
531
+
532
+ values = attribute.get("objectAttributeValues")
533
+ if values is None:
534
+ values = attribute.get("values")
535
+ if values:
536
+ value = values[0]
537
+ return value.get("value") if isinstance(value, dict) else value
538
+ if "value" in attribute:
539
+ return attribute["value"]
540
+ return default
541
+ return default
542
+
390
543
  def get_object_history(self, object_id, asc=False, abbreviate=True):
391
544
  """
392
545
  Retrieve the history entries for this object
@@ -410,6 +563,21 @@ class AssetsCloud(AtlassianRestAPI):
410
563
  url = self.url_joiner(self.api_root, f"object/{object_id}/referenceinfo")
411
564
  return self.get(url)
412
565
 
566
+ def search_objects_aql(self, query, start=0, max_results=25, include_attributes=True):
567
+ return self.aql(query, start=start, max_results=max_results, include_attributes=include_attributes)
568
+
569
+ def search_objects_iql(self, query, start=0, max_results=25, include_attributes=True):
570
+ return self.iql(query, start=start, max_results=max_results, include_attributes=include_attributes)
571
+
572
+ def search_objects_aql_navigation(self, data=None):
573
+ return self.post(self.url_joiner(self.api_root, "object/navlist/aql"), data=data)
574
+
575
+ def search_objects_iql_navigation(self, data=None):
576
+ return self.post(self.url_joiner(self.api_root, "object/navlist/iql"), data=data)
577
+
578
+ def get_object_aql_total_count(self, query):
579
+ return self.post(self.url_joiner(self.api_root, "object/aql/totalcount"), data={"qlQuery": query})
580
+
413
581
  def create_object(self, object_type_id, attributes, has_avatar=False, avatar_uuid=""):
414
582
  """
415
583
  Create a new object in Assets
@@ -467,7 +635,8 @@ class AssetsCloud(AtlassianRestAPI):
467
635
  return self.get(url)
468
636
 
469
637
  def create_object_schema(self, object_schema_key, description):
470
- raise NotImplementedError
638
+ data = {"objectSchemaKey": object_schema_key, "description": description}
639
+ return self.post(self.url_joiner(self.api_root, "objectschema/create"), data=data)
471
640
 
472
641
  def get_object_schema(self, schema_id):
473
642
  """
@@ -477,23 +646,26 @@ class AssetsCloud(AtlassianRestAPI):
477
646
  url = self.url_joiner(self.api_root, f"objectschema/{schema_id}")
478
647
  return self.get(url)
479
648
 
480
- def update_object_schema(self, schema_id):
649
+ def update_object_schema(self, schema_id, data=None):
481
650
  """
482
651
  Update an object schema
483
652
  """
484
- raise NotImplementedError
653
+ return self.put(self.url_joiner(self.api_root, f"objectschema/{schema_id}"), data=data)
485
654
 
486
655
  def delete_object_schema(self, schema_id):
487
656
  """
488
657
  Delete a schema
489
658
  """
490
- raise NotImplementedError
659
+ return self.delete(self.url_joiner(self.api_root, f"objectschema/{schema_id}"))
491
660
 
492
661
  def get_object_schema_attributes(self, schema_id):
493
662
  """
494
663
  Find all object type attributes for this object schema
495
664
  """
496
- raise NotImplementedError
665
+ return self.get(self.url_joiner(self.api_root, f"objectschema/{schema_id}/attributes"))
666
+
667
+ def get_object_schema_object_types(self, schema_id):
668
+ return self.get(self.url_joiner(self.api_root, f"objectschema/{schema_id}/objecttypes"))
497
669
 
498
670
  def get_object_schema_object_types_flat(self, schema_id, query=None, exclude=None, includeObjectCounts=None):
499
671
  """
@@ -538,9 +710,16 @@ class AssetsCloud(AtlassianRestAPI):
538
710
  order_by_required (bool, optional): Order by required fields, defaults to None (Use API default)
539
711
  """
540
712
 
541
- kwargs = list(locals().items())
542
- params = dict()
543
- params.update({k: v for k, v in kwargs if v is not None and k not in ["self", "type_id"]})
713
+ params = {
714
+ "onlyValueEditable": only_value_editable,
715
+ "orderByName": order_by_name,
716
+ "query": query,
717
+ "includeValuesExist": include_values_exist,
718
+ "excludeParentAttributes": exclude_parent_attributes,
719
+ "includeChildren": include_children,
720
+ "orderByRequired": order_by_required,
721
+ }
722
+ params = {k: v for k, v in params.items() if v is not None}
544
723
 
545
724
  return self.get(
546
725
  f"{self.api_root}/objecttype/{type_id}/attributes",
@@ -589,6 +768,10 @@ class AssetsCloud(AtlassianRestAPI):
589
768
  url = self.url_joiner(self.api_root, f"progress/category/imports/{import_id}")
590
769
  return self.get(url)
591
770
 
771
+ def get_import_progress(self, import_id):
772
+ """Return progress for a Cloud import."""
773
+ return self.get(self.url_joiner(self.api_root, f"progress/category/imports/{import_id}"))
774
+
592
775
  # Assets Config API
593
776
  # TODO: Get config statustype:
594
777
  # https://developer.atlassian.com/cloud/assets/rest/api-group-config/#api-config-statustype-get
@@ -624,3 +807,85 @@ class AssetsCloud(AtlassianRestAPI):
624
807
  }
625
808
  data = {"fields": {field_id: [{"key": i} for i in assets_keys]}}
626
809
  return self.put(f"{base_url}/{key}", data=data)
810
+
811
+ # Object type and configuration resources
812
+ def get_object_type(self, object_type_id):
813
+ return self.get(self.url_joiner(self.api_root, f"objecttype/{object_type_id}"))
814
+
815
+ def update_object_type(self, object_type_id, data=None):
816
+ return self.put(self.url_joiner(self.api_root, f"objecttype/{object_type_id}"), data=data)
817
+
818
+ def delete_object_type(self, object_type_id):
819
+ return self.delete(self.url_joiner(self.api_root, f"objecttype/{object_type_id}"))
820
+
821
+ def create_object_type(self, data=None):
822
+ return self.post(self.url_joiner(self.api_root, "objecttype/create"), data=data)
823
+
824
+ def move_object_type(self, object_type_id, data=None):
825
+ return self.post(self.url_joiner(self.api_root, f"objecttype/{object_type_id}/position"), data=data)
826
+
827
+ def create_object_type_attribute(self, object_type_id, data=None):
828
+ return self.post(self.url_joiner(self.api_root, f"objecttypeattribute/{object_type_id}"), data=data)
829
+
830
+ def update_object_type_attribute(self, object_type_id, attribute_id, data=None):
831
+ url = self.url_joiner(self.api_root, f"objecttypeattribute/{object_type_id}/{attribute_id}")
832
+ return self.put(url, data=data)
833
+
834
+ def delete_object_type_attribute(self, attribute_id):
835
+ return self.delete(self.url_joiner(self.api_root, f"objecttypeattribute/{attribute_id}"))
836
+
837
+ def get_status_types(self):
838
+ return self.get(self.url_joiner(self.api_root, "config/statustype"))
839
+
840
+ def create_status_type(self, data=None):
841
+ return self.post(self.url_joiner(self.api_root, "config/statustype"), data=data)
842
+
843
+ def get_status_type(self, status_type_id):
844
+ return self.get(self.url_joiner(self.api_root, f"config/statustype/{status_type_id}"))
845
+
846
+ def update_status_type(self, status_type_id, data=None):
847
+ return self.put(self.url_joiner(self.api_root, f"config/statustype/{status_type_id}"), data=data)
848
+
849
+ def delete_status_type(self, status_type_id):
850
+ return self.delete(self.url_joiner(self.api_root, f"config/statustype/{status_type_id}"))
851
+
852
+ def get_reference_types(self):
853
+ return self.get(self.url_joiner(self.api_root, "config/referencetype"))
854
+
855
+ def create_reference_type(self, data=None):
856
+ return self.post(self.url_joiner(self.api_root, "config/referencetype"), data=data)
857
+
858
+ def set_object_schema_property(self, schema_id, data=None):
859
+ url = self.url_joiner(self.api_root, f"global/config/objectschema/{schema_id}/property")
860
+ return self.post(url, data=data)
861
+
862
+ def create_import_schedule(self, import_source_id, data=None):
863
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/importschedule")
864
+ return self.post(url, data=data)
865
+
866
+ def get_import_schedule_by_id(self, import_source_id, import_schedule_id):
867
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/importschedule/{import_schedule_id}")
868
+ return self.get(url)
869
+
870
+ def update_import_schedule(self, import_source_id, import_schedule_id, data=None):
871
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/importschedule/{import_schedule_id}")
872
+ return self.put(url, data=data)
873
+
874
+ def delete_import_schedule(self, import_source_id, import_schedule_id):
875
+ url = self.url_joiner(self.api_root, f"importsource/{import_source_id}/importschedule/{import_schedule_id}")
876
+ return self.delete(url)
877
+
878
+ def get_usage(self):
879
+ return self.get(self.url_joiner(self.api_root, "usage"))
880
+
881
+ def export_dataset(self, **filters):
882
+ """Export dataset information as CSV."""
883
+ allowed = {"testIssueId", "testIssueKey", "testVersion", "contextIssueId", "contextIssueKey", "resolved"}
884
+ params = self._params(**{key: value for key, value in filters.items() if key in allowed})
885
+ return self.get(self.url_joiner(self.api_root, "dataset/export"), params=params or None, not_json_response=True)
886
+
887
+ def import_dataset(self, files=None, **filters):
888
+ """Import a dataset CSV using optional entity context filters."""
889
+ allowed = {"testIssueId", "testIssueKey", "testVersion", "contextIssueId", "contextIssueKey"}
890
+ params = self._params(**{key: value for key, value in filters.items() if key in allowed})
891
+ return self.post(self.url_joiner(self.api_root, "dataset/import"), params=params or None, files=files)
@@ -0,0 +1,24 @@
1
+ """Jira Service Management Assets Server/Data Center client."""
2
+
3
+ from .assets_cloud import AssetsCloud
4
+
5
+
6
+ class AssetsServer(AssetsCloud):
7
+ """Assets REST client for Jira Server/Data Center installations.
8
+
9
+ Assets Data Center 10.x exposes the REST resources below
10
+ ``/rest/assets/1.0``. The implementation shares the resource methods
11
+ with :class:`~atlassian.assets.assets_cloud.AssetsCloud`; only workspace
12
+ discovery and the Cloud gateway are skipped.
13
+ """
14
+
15
+ def __init__(self, *args, **kwargs):
16
+ # Explicitly force the server path even if a caller reuses a config
17
+ # dictionary that contains ``cloud=True``.
18
+ kwargs["cloud"] = False
19
+ super().__init__(*args, **kwargs)
20
+
21
+
22
+ # Data Center is the current product name; retain this descriptive alias for
23
+ # callers that used the previous class name.
24
+ AssetsDataCenter = AssetsServer