or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

admin-api.mdcore-types.mddata-management.mdindex.mdmulti-language.mdplugins.mdtasks-workflows.md

admin-api.mddocs/

0

# Administrative API

1

2

The AdminService provides the primary interface for managing Flyte resources, offering comprehensive CRUD operations for tasks, workflows, launch plans, executions, and projects. This service handles the complete lifecycle management of Flyte entities and serves as the main integration point for Flyte administrators and applications.

3

4

## Capabilities

5

6

### Task Management

7

8

Create, retrieve, update, and list task definitions. Tasks are the fundamental execution units in Flyte workflows.

9

10

```python { .api }

11

def CreateTask(request: TaskCreateRequest) -> TaskCreateResponse:

12

"""

13

Create a new task definition.

14

15

Args:

16

request: TaskCreateRequest containing task identifier and specification

17

18

Returns:

19

TaskCreateResponse with creation status

20

21

Raises:

22

ALREADY_EXISTS: Task with the same identifier already exists

23

INVALID_ARGUMENT: Invalid task specification

24

"""

25

26

def GetTask(request: ObjectGetRequest) -> Task:

27

"""

28

Retrieve a task by identifier.

29

30

Args:

31

request: ObjectGetRequest with task identifier

32

33

Returns:

34

Task entity with complete specification and closure

35

36

Raises:

37

NOT_FOUND: Task with specified identifier does not exist

38

"""

39

40

def ListTasks(request: ResourceListRequest) -> TaskList:

41

"""

42

List tasks with filtering and pagination.

43

44

Args:

45

request: ResourceListRequest with filters, sorting, and pagination

46

47

Returns:

48

TaskList with matching tasks and pagination metadata

49

"""

50

51

def ListTaskIds(request: NamedEntityIdentifierListRequest) -> NamedEntityIdentifierList:

52

"""

53

List task identifiers with minimal metadata.

54

55

Args:

56

request: NamedEntityIdentifierListRequest with filters and pagination

57

58

Returns:

59

NamedEntityIdentifierList with task identifiers only

60

"""

61

```

62

63

### Workflow Management

64

65

Manage workflow definitions including creation, retrieval, and listing with comprehensive filtering capabilities.

66

67

```python { .api }

68

def CreateWorkflow(request: WorkflowCreateRequest) -> WorkflowCreateResponse:

69

"""

70

Create a new workflow definition.

71

72

Args:

73

request: WorkflowCreateRequest containing workflow identifier and specification

74

75

Returns:

76

WorkflowCreateResponse with creation status

77

78

Raises:

79

ALREADY_EXISTS: Workflow with the same identifier already exists

80

INVALID_ARGUMENT: Invalid workflow specification

81

"""

82

83

def GetWorkflow(request: ObjectGetRequest) -> Workflow:

84

"""

85

Retrieve a workflow by identifier.

86

87

Args:

88

request: ObjectGetRequest with workflow identifier

89

90

Returns:

91

Workflow entity with complete specification and closure

92

93

Raises:

94

NOT_FOUND: Workflow with specified identifier does not exist

95

"""

96

97

def ListWorkflows(request: ResourceListRequest) -> WorkflowList:

98

"""

99

List workflows with filtering and pagination.

100

101

Args:

102

request: ResourceListRequest with filters, sorting, and pagination

103

104

Returns:

105

WorkflowList with matching workflows and pagination metadata

106

"""

107

108

def ListWorkflowIds(request: NamedEntityIdentifierListRequest) -> NamedEntityIdentifierList:

109

"""

110

List workflow identifiers with minimal metadata.

111

112

Args:

113

request: NamedEntityIdentifierListRequest with filters and pagination

114

115

Returns:

116

NamedEntityIdentifierList with workflow identifiers only

117

"""

118

```

119

120

### Launch Plan Management

121

122

Handle launch plan lifecycle including creation, updates, activation state management, and listing.

123

124

```python { .api }

125

def CreateLaunchPlan(request: LaunchPlanCreateRequest) -> LaunchPlanCreateResponse:

126

"""

127

Create a new launch plan.

128

129

Args:

130

request: LaunchPlanCreateRequest with launch plan specification

131

132

Returns:

133

LaunchPlanCreateResponse with creation status

134

"""

135

136

def GetLaunchPlan(request: ObjectGetRequest) -> LaunchPlan:

137

"""

138

Retrieve a launch plan by identifier.

139

140

Args:

141

request: ObjectGetRequest with launch plan identifier

142

143

Returns:

144

LaunchPlan entity with specification and current state

145

"""

146

147

def GetActiveLaunchPlan(request: ActiveLaunchPlanRequest) -> LaunchPlan:

148

"""

149

Get the currently active launch plan for a workflow.

150

151

Args:

152

request: ActiveLaunchPlanRequest with workflow identifier

153

154

Returns:

155

LaunchPlan that is currently active for the workflow

156

"""

157

158

def ListActiveLaunchPlans(request: ActiveLaunchPlanListRequest) -> LaunchPlanList:

159

"""

160

List active launch plans with filtering.

161

162

Args:

163

request: ActiveLaunchPlanListRequest with filters and pagination

164

165

Returns:

166

LaunchPlanList containing active launch plans

167

"""

168

169

def ListLaunchPlans(request: ResourceListRequest) -> LaunchPlanList:

170

"""

171

List launch plans with filtering and pagination.

172

173

Args:

174

request: ResourceListRequest with filters, sorting, and pagination

175

176

Returns:

177

LaunchPlanList with matching launch plans and pagination metadata

178

"""

179

180

def ListLaunchPlanIds(request: NamedEntityIdentifierListRequest) -> NamedEntityIdentifierList:

181

"""

182

List launch plan identifiers with minimal metadata.

183

184

Args:

185

request: NamedEntityIdentifierListRequest with filters and pagination

186

187

Returns:

188

NamedEntityIdentifierList with launch plan identifiers only

189

"""

190

191

def UpdateLaunchPlan(request: LaunchPlanUpdateRequest) -> LaunchPlanUpdateResponse:

192

"""

193

Update launch plan state (activate/deactivate).

194

195

Args:

196

request: LaunchPlanUpdateRequest with identifier and state change

197

198

Returns:

199

LaunchPlanUpdateResponse with update status

200

"""

201

```

202

203

### Execution Management

204

205

Comprehensive execution lifecycle management including creation, monitoring, control operations, and data retrieval.

206

207

```python { .api }

208

def CreateExecution(request: ExecutionCreateRequest) -> ExecutionCreateResponse:

209

"""

210

Start a new workflow execution.

211

212

Args:

213

request: ExecutionCreateRequest with launch plan or workflow reference and inputs

214

215

Returns:

216

ExecutionCreateResponse with execution identifier and initial status

217

218

Raises:

219

INVALID_ARGUMENT: Invalid execution specification or inputs

220

RESOURCE_EXHAUSTED: Execution quota exceeded

221

"""

222

223

def RelaunchExecution(request: ExecutionRelaunchRequest) -> ExecutionCreateResponse:

224

"""

225

Relaunch an existing execution with the same or modified inputs.

226

227

Args:

228

request: ExecutionRelaunchRequest with original execution reference

229

230

Returns:

231

ExecutionCreateResponse with new execution details

232

"""

233

234

def RecoverExecution(request: ExecutionRecoverRequest) -> ExecutionCreateResponse:

235

"""

236

Recover a failed execution from the point of failure.

237

238

Args:

239

request: ExecutionRecoverRequest with failed execution reference

240

241

Returns:

242

ExecutionCreateResponse with recovered execution details

243

"""

244

245

def GetExecution(request: WorkflowExecutionGetRequest) -> Execution:

246

"""

247

Retrieve execution details including current state and metadata.

248

249

Args:

250

request: WorkflowExecutionGetRequest with execution identifier

251

252

Returns:

253

Execution entity with complete status and metadata

254

255

Raises:

256

NOT_FOUND: Execution with specified identifier does not exist

257

"""

258

259

def UpdateExecution(request: ExecutionUpdateRequest) -> ExecutionUpdateResponse:

260

"""

261

Update execution metadata and state.

262

263

Args:

264

request: ExecutionUpdateRequest with execution identifier and updates

265

266

Returns:

267

ExecutionUpdateResponse with update status

268

"""

269

270

def GetExecutionData(request: WorkflowExecutionGetDataRequest) -> WorkflowExecutionGetDataResponse:

271

"""

272

Retrieve execution inputs, outputs, and intermediate data.

273

274

Args:

275

request: WorkflowExecutionGetDataRequest with execution identifier

276

277

Returns:

278

WorkflowExecutionGetDataResponse with input/output literals and metadata

279

"""

280

281

def ListExecutions(request: ResourceListRequest) -> ExecutionList:

282

"""

283

List executions with comprehensive filtering and pagination.

284

285

Args:

286

request: ResourceListRequest with filters, sorting, and pagination

287

288

Returns:

289

ExecutionList with matching executions and pagination metadata

290

"""

291

292

def TerminateExecution(request: ExecutionTerminateRequest) -> ExecutionTerminateResponse:

293

"""

294

Terminate a running execution.

295

296

Args:

297

request: ExecutionTerminateRequest with execution identifier and cause

298

299

Returns:

300

ExecutionTerminateResponse with termination status

301

302

Raises:

303

FAILED_PRECONDITION: Execution is not in a terminable state

304

"""

305

```

306

307

### Node Execution Tracking

308

309

Monitor and retrieve detailed information about individual node executions within workflows.

310

311

```python { .api }

312

def GetNodeExecution(request: NodeExecutionGetRequest) -> NodeExecution:

313

"""

314

Get detailed information about a specific node execution.

315

316

Args:

317

request: NodeExecutionGetRequest with node execution identifier

318

319

Returns:

320

NodeExecution with state, timing, and metadata

321

"""

322

323

def GetNodeExecutionData(request: NodeExecutionGetDataRequest) -> NodeExecutionGetDataResponse:

324

"""

325

Retrieve input and output data for a node execution.

326

327

Args:

328

request: NodeExecutionGetDataRequest with node execution identifier

329

330

Returns:

331

NodeExecutionGetDataResponse with input/output literals

332

"""

333

334

def GetDynamicNodeWorkflow(request: GetDynamicNodeWorkflowRequest) -> DynamicNodeWorkflowResponse:

335

"""

336

Retrieve the dynamically generated workflow for a dynamic node.

337

338

Args:

339

request: GetDynamicNodeWorkflowRequest with dynamic node execution identifier

340

341

Returns:

342

DynamicNodeWorkflowResponse containing the generated workflow definition

343

"""

344

345

def ListNodeExecutions(request: NodeExecutionListRequest) -> NodeExecutionList:

346

"""

347

List node executions for a workflow execution.

348

349

Args:

350

request: NodeExecutionListRequest with parent execution identifier

351

352

Returns:

353

NodeExecutionList with node executions and metadata

354

"""

355

356

def ListNodeExecutionsForTask(request: NodeExecutionForTaskListRequest) -> NodeExecutionList:

357

"""

358

List node executions for a specific task.

359

360

Args:

361

request: NodeExecutionForTaskListRequest with task identifier

362

363

Returns:

364

NodeExecutionList with matching node executions

365

"""

366

```

367

368

### Task Execution Tracking

369

370

Monitor and retrieve detailed information about individual task executions and their retry attempts.

371

372

```python { .api }

373

def GetTaskExecution(request: TaskExecutionGetRequest) -> TaskExecution:

374

"""

375

Get detailed information about a specific task execution.

376

377

Args:

378

request: TaskExecutionGetRequest with task execution identifier

379

380

Returns:

381

TaskExecution with state, timing, logs, and metadata

382

"""

383

384

def GetTaskExecutionData(request: TaskExecutionGetDataRequest) -> TaskExecutionGetDataResponse:

385

"""

386

Retrieve input and output data for a task execution.

387

388

Args:

389

request: TaskExecutionGetDataRequest with task execution identifier

390

391

Returns:

392

TaskExecutionGetDataResponse with input/output literals

393

"""

394

395

def ListTaskExecutions(request: TaskExecutionListRequest) -> TaskExecutionList:

396

"""

397

List task executions for a node execution.

398

399

Args:

400

request: TaskExecutionListRequest with node execution identifier

401

402

Returns:

403

TaskExecutionList with task executions including retries

404

"""

405

```

406

407

### Project Management

408

409

Manage Flyte projects including creation, registration, updates, and domain configuration.

410

411

```python { .api }

412

def CreateProject(request: ProjectRegisterRequest) -> ProjectRegisterResponse:

413

"""

414

Create a new project.

415

416

Args:

417

request: ProjectRegisterRequest with project specification

418

419

Returns:

420

ProjectRegisterResponse with creation status

421

422

Raises:

423

ALREADY_EXISTS: Project with the same identifier already exists

424

"""

425

426

def RegisterProject(request: ProjectRegisterRequest) -> ProjectRegisterResponse:

427

"""

428

Register an existing project in the Flyte system.

429

430

Args:

431

request: ProjectRegisterRequest with project details

432

433

Returns:

434

ProjectRegisterResponse with registration status

435

"""

436

437

def UpdateProject(request: Project) -> ProjectUpdateResponse:

438

"""

439

Update project configuration and metadata.

440

441

Args:

442

request: Project with updated configuration

443

444

Returns:

445

ProjectUpdateResponse with update status

446

"""

447

448

def ListProjects(request: ProjectListRequest) -> Projects:

449

"""

450

List all projects with filtering.

451

452

Args:

453

request: ProjectListRequest with optional filters

454

455

Returns:

456

Projects list with project details

457

"""

458

459

def GetDomains(request: GetDomainRequest) -> GetDomainsResponse:

460

"""

461

Get available domains for a project.

462

463

Args:

464

request: GetDomainRequest (typically empty)

465

466

Returns:

467

GetDomainsResponse with domain list and configurations

468

"""

469

```

470

471

### Resource Attributes Management

472

473

Configure resource attributes at project, domain, and workflow levels for execution customization.

474

475

```python { .api }

476

def UpdateProjectAttributes(request: ProjectAttributesUpdateRequest) -> ProjectAttributesUpdateResponse:

477

"""

478

Update project-level resource attributes.

479

480

Args:

481

request: ProjectAttributesUpdateRequest with attribute configuration

482

483

Returns:

484

ProjectAttributesUpdateResponse with update status

485

"""

486

487

def GetProjectAttributes(request: ProjectAttributesGetRequest) -> ProjectAttributesGetResponse:

488

"""

489

Retrieve project-level resource attributes.

490

491

Args:

492

request: ProjectAttributesGetRequest with project identifier

493

494

Returns:

495

ProjectAttributesGetResponse with current attributes

496

"""

497

498

def DeleteProjectAttributes(request: ProjectAttributesDeleteRequest) -> ProjectAttributesDeleteResponse:

499

"""

500

Delete project-level resource attributes.

501

502

Args:

503

request: ProjectAttributesDeleteRequest with project and attribute type

504

505

Returns:

506

ProjectAttributesDeleteResponse with deletion status

507

"""

508

509

def UpdateWorkflowAttributes(request: WorkflowAttributesUpdateRequest) -> WorkflowAttributesUpdateResponse:

510

"""

511

Update workflow-level resource attributes.

512

513

Args:

514

request: WorkflowAttributesUpdateRequest with workflow and attributes

515

516

Returns:

517

WorkflowAttributesUpdateResponse with update status

518

"""

519

520

def GetWorkflowAttributes(request: WorkflowAttributesGetRequest) -> WorkflowAttributesGetResponse:

521

"""

522

Retrieve workflow-level resource attributes.

523

524

Args:

525

request: WorkflowAttributesGetRequest with workflow identifier

526

527

Returns:

528

WorkflowAttributesGetResponse with current attributes

529

"""

530

531

def DeleteWorkflowAttributes(request: WorkflowAttributesDeleteRequest) -> WorkflowAttributesDeleteResponse:

532

"""

533

Delete workflow-level resource attributes.

534

535

Args:

536

request: WorkflowAttributesDeleteRequest with workflow and attribute type

537

538

Returns:

539

WorkflowAttributesDeleteResponse with deletion status

540

"""

541

542

def ListMatchableAttributes(request: ListMatchableAttributesRequest) -> ListMatchableAttributesResponse:

543

"""

544

List all matchable resource attributes with hierarchical resolution.

545

546

Args:

547

request: ListMatchableAttributesRequest with resource scope

548

549

Returns:

550

ListMatchableAttributesResponse with attribute configurations

551

"""

552

```

553

554

### Event Processing

555

556

Handle workflow, node, and task execution events for state tracking and monitoring.

557

558

```python { .api }

559

def CreateWorkflowEvent(request: WorkflowExecutionEventRequest) -> WorkflowExecutionEventResponse:

560

"""

561

Create a workflow execution event.

562

563

Args:

564

request: WorkflowExecutionEventRequest with event details

565

566

Returns:

567

WorkflowExecutionEventResponse with processing status

568

"""

569

570

def CreateNodeEvent(request: NodeExecutionEventRequest) -> NodeExecutionEventResponse:

571

"""

572

Create a node execution event.

573

574

Args:

575

request: NodeExecutionEventRequest with event details

576

577

Returns:

578

NodeExecutionEventResponse with processing status

579

"""

580

581

def CreateTaskEvent(request: TaskExecutionEventRequest) -> TaskExecutionEventResponse:

582

"""

583

Create a task execution event.

584

585

Args:

586

request: TaskExecutionEventRequest with event details

587

588

Returns:

589

TaskExecutionEventResponse with processing status

590

"""

591

```

592

593

### System Information

594

595

Retrieve server version and system status information.

596

597

```python { .api }

598

def GetVersion(request: GetVersionRequest) -> GetVersionResponse:

599

"""

600

Get Flyte server version and build information.

601

602

Args:

603

request: GetVersionRequest (typically empty)

604

605

Returns:

606

GetVersionResponse with version details and build metadata

607

"""

608

```

609

610

## Types

611

612

### Request/Response Types

613

614

```python { .api }

615

class TaskCreateRequest:

616

id: Identifier

617

spec: TaskSpec

618

619

class TaskCreateResponse:

620

pass

621

622

class ObjectGetRequest:

623

id: Identifier

624

625

class ResourceListRequest:

626

id: NamedEntityIdentifier

627

limit: int

628

token: str

629

filters: str

630

sort_by: Sort

631

632

class WorkflowExecutionGetRequest:

633

id: WorkflowExecutionIdentifier

634

635

class ExecutionCreateRequest:

636

project: str

637

domain: str

638

name: str

639

spec: ExecutionSpec

640

inputs: LiteralMap

641

642

class ExecutionCreateResponse:

643

id: WorkflowExecutionIdentifier

644

645

class ExecutionTerminateRequest:

646

id: WorkflowExecutionIdentifier

647

cause: str

648

649

class ExecutionTerminateResponse:

650

pass

651

```

652

653

### Entity Types

654

655

```python { .api }

656

class Task:

657

id: Identifier

658

closure: TaskClosure

659

660

class Workflow:

661

id: Identifier

662

closure: WorkflowClosure

663

664

class LaunchPlan:

665

id: Identifier

666

spec: LaunchPlanSpec

667

closure: LaunchPlanClosure

668

669

class Execution:

670

id: WorkflowExecutionIdentifier

671

spec: ExecutionSpec

672

closure: ExecutionClosure

673

674

class NodeExecution:

675

id: NodeExecutionIdentifier

676

input_uri: str

677

closure: NodeExecutionClosure

678

metadata: NodeExecutionMetaData

679

680

class TaskExecution:

681

id: TaskExecutionIdentifier

682

input_uri: str

683

closure: TaskExecutionClosure

684

is_parent: bool

685

```