insight
Insight
Bases: AtlassianRestAPI
Insight for Jira API wrapper.
Source code in server/vendor/atlassian/insight.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
|
__cloud_init(*args, **kwargs)
Creates a InsightCloud specific version of Insight()
Returns:
Type | Description |
---|---|
Insight(AtlassianRestAPI) |
Source code in server/vendor/atlassian/insight.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
__init__(*args, **kwargs)
Initialize Insight()
:param args: :param kwargs: :return: Insight()
Source code in server/vendor/atlassian/insight.py
15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
add_comment_to_object(comment, object_id, role)
Add comment to Object
:param comment: str :param object_id: int - Object ID :param role: int - Role ID 0 Insight Users 1 Insight Managers 2 Insight Administrators 3 Insight Developers :return: { "created": "2019-11-27T12:37:41.492Z", "updated": "2019-11-27T12:37:41.492Z", "id": 1, "actor": { "avatarUrl": "https://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&s=48", "displayName": "admin", "name": "admin", "key": "admin", "renderedLink": "admin", "isDeleted": false }, "role": 0, "comment": "A comment to be added", "commentOutput": "A comment to be added", "objectId": 1, "canEdit": true, "canDelete": true }
Source code in server/vendor/atlassian/insight.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
check_duplicate_attribute_values()
Check for duplicate attribute values in Insight objects with cardinality maximum 1 used for Data Center link: https://confluence.atlassian.com/jirakb/duplicated-attribute-values-in-insight-objects-with-cardinality-maximum-1-1114816155.html :return:
Source code in server/vendor/atlassian/insight.py
660 661 662 663 664 665 666 667 668 |
|
create_object(object_type_id, attributes, has_avatar=False, avatar_uuid='')
Create a new object in Insight
:param object_type_id: :param attributes: :param has_avatar: :param avatar_uuid: :return: :return:
Source code in server/vendor/atlassian/insight.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
create_object_navlist_iql(iql, object_type_id, results_per_page, order_by_type_attr_id=None, object_id=None, object_schema_id=None, include_attributes=None, attributes_to_display=None, page=1, asc=0)
A filter object that is used to find a paginated result set based on an object type and an IQL query
:param iql: :param object_type_id: :param page: :param results_per_page: :param order_by_type_attr_id: :param asc: :param object_id: :param object_schema_id: :param include_attributes: :param attributes_to_display: :return:
Source code in server/vendor/atlassian/insight.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
|
delete_attachment(attachment_id)
Add attachment to Object :param attachment_id: int
Source code in server/vendor/atlassian/insight.py
127 128 129 130 131 132 133 134 135 136 |
|
delete_duplicate_attribute_values()
Delete duplicate attribute values in Insight objects with cardinality maximum 1 used for Data Center link: https://confluence.atlassian.com/jirakb/duplicated-attribute-values-in-insight-objects-with-cardinality-maximum-1-1114816155.html :return:
Source code in server/vendor/atlassian/insight.py
670 671 672 673 674 675 676 677 678 |
|
delete_object(object_id)
Delete the referenced object
:param object_id: :return:
Source code in server/vendor/atlassian/insight.py
340 341 342 343 344 345 346 347 348 |
|
delete_object_schema(schema_id)
Delete a schema
Source code in server/vendor/atlassian/insight.py
519 520 521 522 523 524 |
|
get_all_global_icons()
All existing global icons
:return:
Source code in server/vendor/atlassian/insight.py
208 209 210 211 212 213 214 215 |
|
get_attachments_of_objects(object_id)
Get Attachment info Example output: [ { "id": 1, "author": "admin", "mimeType": "image/png", "filename": "astronaut.png", "filesize": "490 B", "created": "2019-11-27T11:42:22.283Z", "comment": "", "commentOutput": "", "url": "http://jira/rest/insight/1.0/attachments/1" } ]
:param object_id Object ID :return list of object id: required(string) author: (string) mimeType: (string) filename: required(string) filesize: (string) created: required(datetime) comment: (string) commentOutput: (string) url: required(string)
Source code in server/vendor/atlassian/insight.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
get_comment_of_object(object_id)
The object id to fetch comments from
:param object_id: :return:
Source code in server/vendor/atlassian/insight.py
178 179 180 181 182 183 184 185 186 187 188 |
|
get_icon_by_id(icon_id)
Load a single icon by id
:param icon_id: :return: { "id": 1, "name": "Delete", "url16": "http://jira/rest/insight/1.0/icon/1/icon.png?size=16", "url48": "http://jira/rest/insight/1.0/icon/1/icon.png?size=48" }
Source code in server/vendor/atlassian/insight.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
get_object(object_id)
Load one object
:param object_id: :return:
Source code in server/vendor/atlassian/insight.py
303 304 305 306 307 308 309 310 311 |
|
get_object_attributes(object_id)
List all attributes for the given object
:param object_id: :return:
Source code in server/vendor/atlassian/insight.py
350 351 352 353 354 355 356 357 358 |
|
get_object_connected_tickets(object_id)
Relation between Jira issues and Insight objects
:param object_id: :return:
Source code in server/vendor/atlassian/insight.py
458 459 460 461 462 463 464 465 466 467 468 469 |
|
get_object_history(object_id, asc=False, abbreviate=True)
Retrieve the history entries for this object
:param object_id: :param asc: :param abbreviate: :return:
Source code in server/vendor/atlassian/insight.py
360 361 362 363 364 365 366 367 368 369 370 371 |
|
get_object_reference_info(object_id)
Find all references for an object
:param object_id: :return:
Source code in server/vendor/atlassian/insight.py
379 380 381 382 383 384 385 386 387 |
|
get_object_referenceinfo(object_id)
Let's use the get_object_reference_info()
Source code in server/vendor/atlassian/insight.py
373 374 375 376 377 |
|
get_object_schema(schema_id)
Find a schema by id :param schema_id:
Source code in server/vendor/atlassian/insight.py
505 506 507 508 509 510 511 |
|
get_object_schema_attributes(schema_id)
Find all object type attributes for this object schema
Source code in server/vendor/atlassian/insight.py
526 527 528 529 530 |
|
get_object_schema_object_types_flat(schema_id, query=None, exclude=None, includeObjectCounts=None)
Find all object types for this object schema https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-objecttypes-flat-get Args: schema_id (str): id of the object schema query (bool, optional): Object Type Names to search for, defaults to None (Use API default) exclude (str, optional): Exclude objects with this name, defaults to None (Use API default) includeObjectCounts (bool, optional): Populate objectCount attribute for each object type, defaults to None (Use API default)
Source code in server/vendor/atlassian/insight.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
|
get_object_type_attributes(type_id, only_value_editable=None, order_by_name=None, query=None, include_values_exist=None, exclude_parent_attributes=None, include_children=None, order_by_required=None)
Find all attributes for this object type https://developer.atlassian.com/cloud/insight/rest/api-group-objecttype/#api-objecttype-id-attributes-get Args: type_id (str): id of the object type only_value_editable (bool, optional): only return editable values, defaults to None (Use API default) order_by_name (bool, optional): values, defaults to None (Use API default) query (str, optional): Not documented in API, defaults to None (Use API default) include_values_exist (bool, optional): Include only where values exist, defaults to None (Use API default) exclude_parent_attributes (bool, optional): Exclude parent attributes, defaults to None (Use API default) include_children (bool, optional): include attributes from children, defaults to None (Use API default) order_by_required (bool, optional): Order by required fields, defaults to None (Use API default)
Source code in server/vendor/atlassian/insight.py
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
|
get_progress_of_import(import_id)
Show ongoing insight processes :type import_id: int: The id of the import source configuration that the progress should be fetched for :return:
Source code in server/vendor/atlassian/insight.py
612 613 614 615 616 617 618 619 620 621 622 |
|
get_progress_of_reindex()
Show ongoing insight processes :return:
Source code in server/vendor/atlassian/insight.py
602 603 604 605 606 607 608 609 610 |
|
iql(iql, object_schema_id, page=1, order_by_attribute_id=None, order_asc=True, result_per_page=25, include_attributes=True, include_attributes_deep=1, include_type_attributes=False, include_extended_info=False, extended=None)
Resource dedicated to finding objects based on the Insight Query Language (IQL)
:param iql: :param object_schema_id: :param page: :param order_by_attribute_id: :param order_asc: :param result_per_page: :param include_attributes: :param include_attributes_deep: :param include_type_attributes: :param include_extended_info: :param extended: :return:
Source code in server/vendor/atlassian/insight.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
|
list_object_schema()
Resource to find object schemas in Insight :return: { "objectschemas": [ { "id": 1, "name": "Test", "objectSchemaKey": "TEST", "status": "Ok", "created": "2019-11-26T08:05:46.894Z", "updated": "2019-11-26T08:05:46.894Z", "objectCount": 2, "objectTypeCount": 3 } ] }
Source code in server/vendor/atlassian/insight.py
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
|
reindex_current_node_insight()
Should the reindex clean the index before doing the reindex
:return:
Source code in server/vendor/atlassian/insight.py
245 246 247 248 249 250 251 252 253 254 |
|
reindex_insight()
Should the reindex clean the index before doing the reindex
:return:
Source code in server/vendor/atlassian/insight.py
234 235 236 237 238 239 240 241 242 243 |
|
start_import_configuration(import_id)
The id of the import configuration that should be started
:param import_id: :return:
Source code in server/vendor/atlassian/insight.py
219 220 221 222 223 224 225 226 227 228 229 230 |
|
update_issue_insight_field(key, field_id, insight_keys, add=False)
Set the value of an Insight field. Args: key (str): Jira issue key, eg. SFT-446 field_id (str): The internal Jira name of the Insight field, e.g. customfield_10200 insight_keys (list): List of Insight objects to associate with the field. Limited to 20 objects. If the field only takes a single object pass a single value list. add (bool, optional): Add to the existing field rather than setting the field value. Defaults to False. Returns: [type]: The insight object updated.
Source code in server/vendor/atlassian/insight.py
637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
|
update_object(object_id, object_type_id, attributes, has_avatar=False, avatar_uuid='')
Update an existing object in Insight
:param object_id: :param object_type_id: :param attributes: :param has_avatar: :param avatar_uuid: :return:
Source code in server/vendor/atlassian/insight.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
|
update_object_schema(schema_id)
Update an object schema
Source code in server/vendor/atlassian/insight.py
513 514 515 516 517 |
|
upload_attachment_to_object(object_id, filename)
Add attachment to Object :param object_id: int :param filename: str, name, if file in current directory or full path to file
Source code in server/vendor/atlassian/insight.py
113 114 115 116 117 118 119 120 121 122 123 124 125 |
|