or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

administration.mdasset-management.mdbitbucket.mdconfluence.mddevelopment-tools.mdindex.mdjira.mdservice-management.mdstatuspage.md

asset-management.mddocs/

0

# Asset Management

1

2

Comprehensive asset and configuration management through Insight CMDB, Portfolio planning, and cloud-based asset tracking. Provides complete visibility into IT infrastructure, business assets, and project portfolio management across Atlassian environments.

3

4

## Insight - On-Premise CMDB

5

6

Insight (Assets) REST API client for comprehensive Configuration Management Database operations including asset discovery, relationship mapping, and configuration tracking.

7

8

### Initialization

9

10

```python { .api }

11

class Insight(AtlassianRestAPI):

12

def __init__(self, url: str, username: str = None, password: str = None,

13

token: str = None, **kwargs):

14

"""

15

Initialize Insight client.

16

17

Parameters:

18

- url (str): Base URL of Jira instance with Insight

19

- username (str, optional): Username for authentication

20

- password (str, optional): Password or API token

21

- token (str, optional): Bearer token for authentication

22

"""

23

```

24

25

### Object Management

26

27

```python { .api }

28

def get_object(self, object_id: str) -> T_resp_json:

29

"""

30

Get object details.

31

32

Parameters:

33

- object_id: Object ID

34

35

Returns:

36

dict: Object information with attributes and relationships

37

"""

38

39

def create_object(self, object_type_id: str, attributes: dict) -> T_resp_json:

40

"""

41

Create object.

42

43

Parameters:

44

- object_type_id: Object type ID

45

- attributes: Object attributes dictionary

46

47

Returns:

48

dict: Created object data

49

"""

50

51

def update_object(self, object_id: str, attributes: dict) -> T_resp_json:

52

"""

53

Update object.

54

55

Parameters:

56

- object_id: Object ID to update

57

- attributes: Updated attributes

58

59

Returns:

60

dict: Updated object data

61

"""

62

63

def delete_object(self, object_id: str) -> bool:

64

"""

65

Delete object.

66

67

Parameters:

68

- object_id: Object ID to delete

69

70

Returns:

71

bool: True if deletion successful

72

"""

73

74

def get_objects_by_iql(self, iql: str, start: int = 0,

75

limit: int = 50) -> T_resp_json:

76

"""

77

Search objects using Insight Query Language.

78

79

Parameters:

80

- iql: IQL query string

81

- start: Starting index

82

- limit: Maximum results

83

84

Returns:

85

dict: Objects matching IQL query

86

"""

87

```

88

89

### Schema Management

90

91

```python { .api }

92

def get_object_schemas(self) -> List[dict]:

93

"""

94

Get all object schemas.

95

96

Returns:

97

List[dict]: Available schemas

98

"""

99

100

def get_object_schema(self, schema_id: str) -> T_resp_json:

101

"""

102

Get schema details.

103

104

Parameters:

105

- schema_id: Schema ID

106

107

Returns:

108

dict: Schema configuration and object types

109

"""

110

111

def get_object_type(self, object_type_id: str) -> T_resp_json:

112

"""

113

Get object type definition.

114

115

Parameters:

116

- object_type_id: Object type ID

117

118

Returns:

119

dict: Object type with attributes and relationships

120

"""

121

122

def get_object_attributes(self, object_id: str) -> List[dict]:

123

"""

124

Get object attributes.

125

126

Parameters:

127

- object_id: Object ID

128

129

Returns:

130

List[dict]: Object attributes with values

131

"""

132

133

def update_object_attribute(self, object_id: str, attribute_id: str,

134

value: str) -> T_resp_json:

135

"""

136

Update object attribute.

137

138

Parameters:

139

- object_id: Object ID

140

- attribute_id: Attribute ID

141

- value: New attribute value

142

143

Returns:

144

dict: Update result

145

"""

146

```

147

148

## Assets Cloud - Cloud CMDB

149

150

Assets Cloud REST API client for Atlassian Cloud asset management with workspace-based organization and enhanced cloud integration.

151

152

### Initialization

153

154

```python { .api }

155

class AssetsCloud(AtlassianRestAPI):

156

def __init__(self, url: str, username: str = None, password: str = None,

157

token: str = None, **kwargs):

158

"""

159

Initialize Assets Cloud client.

160

161

Parameters:

162

- url (str): Base URL of Atlassian Cloud instance

163

- username (str, optional): Username for authentication

164

- password (str, optional): Password or API token

165

- token (str, optional): Bearer token for authentication

166

"""

167

```

168

169

### Workspace Operations

170

171

```python { .api }

172

def get_workspaces(self) -> List[dict]:

173

"""

174

Get all workspaces.

175

176

Returns:

177

List[dict]: Available workspaces

178

"""

179

180

def get_workspace(self, workspace_id: str) -> T_resp_json:

181

"""

182

Get workspace details.

183

184

Parameters:

185

- workspace_id: Workspace ID

186

187

Returns:

188

dict: Workspace information with schemas

189

"""

190

191

def create_workspace(self, name: str, description: Optional[str] = None) -> T_resp_json:

192

"""

193

Create workspace.

194

195

Parameters:

196

- name: Workspace name

197

- description: Workspace description

198

199

Returns:

200

dict: Created workspace data

201

"""

202

```

203

204

### Object Management

205

206

```python { .api }

207

def get_objects(self, workspace_id: str, object_schema_id: Optional[str] = None,

208

object_type_id: Optional[str] = None, aql: Optional[str] = None,

209

start: int = 0, limit: int = 50) -> T_resp_json:

210

"""

211

Get objects from workspace.

212

213

Parameters:

214

- workspace_id: Workspace ID

215

- object_schema_id: Filter by schema

216

- object_type_id: Filter by object type

217

- aql: Assets Query Language filter

218

- start: Starting index

219

- limit: Maximum results

220

221

Returns:

222

dict: Objects list with pagination

223

"""

224

225

def create_object(self, workspace_id: str, object_type_id: str,

226

attributes: List[dict]) -> T_resp_json:

227

"""

228

Create object in workspace.

229

230

Parameters:

231

- workspace_id: Workspace ID

232

- object_type_id: Object type ID

233

- attributes: Object attributes list

234

235

Returns:

236

dict: Created object data

237

"""

238

239

def update_object(self, workspace_id: str, object_id: str,

240

attributes: List[dict]) -> T_resp_json:

241

"""

242

Update object.

243

244

Parameters:

245

- workspace_id: Workspace ID

246

- object_id: Object ID

247

- attributes: Updated attributes

248

249

Returns:

250

dict: Updated object data

251

"""

252

253

def delete_object(self, workspace_id: str, object_id: str) -> bool:

254

"""

255

Delete object.

256

257

Parameters:

258

- workspace_id: Workspace ID

259

- object_id: Object ID

260

261

Returns:

262

bool: True if deletion successful

263

"""

264

```

265

266

### Schema Management

267

268

```python { .api }

269

def get_object_schemas(self, workspace_id: str) -> List[dict]:

270

"""

271

Get workspace object schemas.

272

273

Parameters:

274

- workspace_id: Workspace ID

275

276

Returns:

277

List[dict]: Object schemas in workspace

278

"""

279

280

def get_object_schema(self, workspace_id: str, schema_id: str) -> T_resp_json:

281

"""

282

Get object schema details.

283

284

Parameters:

285

- workspace_id: Workspace ID

286

- schema_id: Schema ID

287

288

Returns:

289

dict: Schema configuration

290

"""

291

```

292

293

## Portfolio - Project Portfolio Management

294

295

Portfolio REST API client for Advanced Roadmaps project portfolio management including capacity planning, resource allocation, and strategic alignment.

296

297

### Initialization

298

299

```python { .api }

300

class Portfolio(AtlassianRestAPI):

301

def __init__(self, url: str, username: str = None, password: str = None,

302

token: str = None, **kwargs):

303

"""

304

Initialize Portfolio client.

305

306

Parameters:

307

- url (str): Base URL of Jira instance with Portfolio

308

- username (str, optional): Username for authentication

309

- password (str, optional): Password or API token

310

- token (str, optional): Bearer token for authentication

311

"""

312

```

313

314

### Plan Management

315

316

```python { .api }

317

def get_plans(self) -> List[dict]:

318

"""

319

Get all portfolio plans.

320

321

Returns:

322

List[dict]: Available plans

323

"""

324

325

def get_plan(self, plan_id: str) -> T_resp_json:

326

"""

327

Get plan details.

328

329

Parameters:

330

- plan_id: Plan ID

331

332

Returns:

333

dict: Plan configuration with issues and timeline

334

"""

335

336

def create_plan(self, name: str, description: str = "",

337

project_keys: Optional[List[str]] = None) -> T_resp_json:

338

"""

339

Create portfolio plan.

340

341

Parameters:

342

- name: Plan name

343

- description: Plan description

344

- project_keys: Associated project keys

345

346

Returns:

347

dict: Created plan data

348

"""

349

350

def update_plan(self, plan_id: str, name: Optional[str] = None,

351

description: Optional[str] = None) -> T_resp_json:

352

"""

353

Update plan.

354

355

Parameters:

356

- plan_id: Plan ID

357

- name: New plan name

358

- description: New description

359

360

Returns:

361

dict: Updated plan data

362

"""

363

364

def delete_plan(self, plan_id: str) -> bool:

365

"""

366

Delete plan.

367

368

Parameters:

369

- plan_id: Plan ID to delete

370

371

Returns:

372

bool: True if deletion successful

373

"""

374

```

375

376

### Team Management

377

378

```python { .api }

379

def get_teams(self) -> List[dict]:

380

"""

381

Get all teams.

382

383

Returns:

384

List[dict]: Available teams

385

"""

386

387

def get_team(self, team_id: str) -> T_resp_json:

388

"""

389

Get team details.

390

391

Parameters:

392

- team_id: Team ID

393

394

Returns:

395

dict: Team information with members and capacity

396

"""

397

398

def create_team(self, name: str, members: Optional[List[str]] = None) -> T_resp_json:

399

"""

400

Create team.

401

402

Parameters:

403

- name: Team name

404

- members: List of member user keys

405

406

Returns:

407

dict: Created team data

408

"""

409

410

def update_team(self, team_id: str, name: Optional[str] = None,

411

members: Optional[List[str]] = None) -> T_resp_json:

412

"""

413

Update team.

414

415

Parameters:

416

- team_id: Team ID

417

- name: New team name

418

- members: Updated member list

419

420

Returns:

421

dict: Updated team data

422

"""

423

```

424

425

### Scenario Management

426

427

```python { .api }

428

def get_scenarios(self, plan_id: str) -> List[dict]:

429

"""

430

Get plan scenarios.

431

432

Parameters:

433

- plan_id: Plan ID

434

435

Returns:

436

List[dict]: Plan scenarios for capacity planning

437

"""

438

439

def create_scenario(self, plan_id: str, name: str,

440

description: Optional[str] = None) -> T_resp_json:

441

"""

442

Create planning scenario.

443

444

Parameters:

445

- plan_id: Plan ID

446

- name: Scenario name

447

- description: Scenario description

448

449

Returns:

450

dict: Created scenario data

451

"""

452

453

def get_capacity(self, plan_id: str, team_id: Optional[str] = None) -> T_resp_json:

454

"""

455

Get capacity information.

456

457

Parameters:

458

- plan_id: Plan ID

459

- team_id: Filter by team ID

460

461

Returns:

462

dict: Capacity data with allocations

463

"""

464

```

465

466

## Usage Examples

467

468

### Insight Asset Management

469

470

```python

471

from atlassian import Insight

472

473

insight = Insight(

474

url="https://jira.company.com",

475

username="username",

476

password="password"

477

)

478

479

# Get schemas

480

schemas = insight.get_object_schemas()

481

482

# Search for servers using IQL

483

servers = insight.get_objects_by_iql(

484

'objectType = "Server" AND Status = "Active"'

485

)

486

487

# Create new server object

488

server = insight.create_object(

489

object_type_id="server-type-id",

490

attributes={

491

"Name": "web-server-01",

492

"IP Address": "192.168.1.100",

493

"Operating System": "Ubuntu 20.04",

494

"Status": "Active"

495

}

496

)

497

498

# Update server attributes

499

insight.update_object_attribute(

500

server["id"],

501

"status-attribute-id",

502

"Maintenance"

503

)

504

```

505

506

### Assets Cloud Management

507

508

```python

509

from atlassian import AssetsCloud

510

511

assets = AssetsCloud(

512

url="https://your-domain.atlassian.net",

513

username="email@example.com",

514

password="api-token"

515

)

516

517

# Get workspaces

518

workspaces = assets.get_workspaces()

519

520

# Get objects from workspace

521

objects = assets.get_objects(

522

workspace_id="workspace-123",

523

aql='Name LIKE "server%"'

524

)

525

526

# Create asset

527

asset = assets.create_object(

528

workspace_id="workspace-123",

529

object_type_id="server-type",

530

attributes=[

531

{

532

"objectTypeAttributeId": "name-attr-id",

533

"objectAttributeValues": [{"value": "new-server"}]

534

},

535

{

536

"objectTypeAttributeId": "ip-attr-id",

537

"objectAttributeValues": [{"value": "10.0.0.50"}]

538

}

539

]

540

)

541

```

542

543

### Portfolio Planning

544

545

```python

546

from atlassian import Portfolio

547

548

portfolio = Portfolio(

549

url="https://your-domain.atlassian.net",

550

username="email@example.com",

551

password="api-token"

552

)

553

554

# Create portfolio plan

555

plan = portfolio.create_plan(

556

name="Q4 2024 Roadmap",

557

description="Strategic initiatives for Q4",

558

project_keys=["PROJ1", "PROJ2", "PROJ3"]

559

)

560

561

# Create team

562

team = portfolio.create_team(

563

name="Backend Development Team",

564

members=["john.doe", "jane.smith", "bob.wilson"]

565

)

566

567

# Create planning scenario

568

scenario = portfolio.create_scenario(

569

plan_id=plan["id"],

570

name="Aggressive Timeline",

571

description="Scenario with compressed delivery timeline"

572

)

573

574

# Get capacity data

575

capacity = portfolio.get_capacity(

576

plan_id=plan["id"],

577

team_id=team["id"]

578

)

579

580

print(f"Team capacity: {capacity['totalCapacity']} hours")

581

print(f"Allocated: {capacity['allocatedCapacity']} hours")

582

print(f"Available: {capacity['remainingCapacity']} hours")

583

```

584

585

### Integrated Asset Discovery

586

587

```python

588

# Automated asset discovery and update

589

def discover_and_update_assets():

590

# Discover servers from Insight

591

servers = insight.get_objects_by_iql(

592

'objectType = "Server" AND "Last Updated" < now("-30d")'

593

)

594

595

for server in servers["objectEntries"]:

596

# Get server details from monitoring system

597

server_data = get_server_monitoring_data(server["name"])

598

599

# Update asset with current information

600

insight.update_object(

601

server["id"],

602

{

603

"CPU Usage": server_data["cpu_usage"],

604

"Memory Usage": server_data["memory_usage"],

605

"Disk Usage": server_data["disk_usage"],

606

"Last Updated": datetime.now().isoformat()

607

}

608

)

609

610

# Create alerts in Portfolio if capacity issues

611

if server_data["cpu_usage"] > 80:

612

# Link to capacity planning in Portfolio

613

portfolio.create_scenario(

614

plan_id="infrastructure-plan",

615

name=f"Scale {server['name']}",

616

description=f"Server {server['name']} requires scaling"

617

)

618

```

619

620

## Error Handling

621

622

```python

623

from atlassian.errors import ApiNotFoundError, ApiPermissionError

624

625

try:

626

object_data = insight.get_object("invalid-id")

627

except ApiNotFoundError:

628

print("Object not found")

629

except ApiPermissionError:

630

print("Access denied to object")

631

```

632

633

## Types

634

635

```python { .api }

636

from atlassian.typehints import T_id, T_resp_json

637

from typing import List, Dict, Optional

638

639

# Insight types

640

ObjectId = str

641

ObjectTypeId = str

642

SchemaId = str

643

IQLQuery = str # Insight Query Language

644

645

# Assets Cloud types

646

WorkspaceId = str

647

AQLQuery = str # Assets Query Language

648

649

# Portfolio types

650

PlanId = str

651

TeamId = str

652

ScenarioId = str

653

```