Skip to content

feat(orchestrator): add Jobs getAll service [PLT-99452]#290

Merged
ninja-shreyash merged 13 commits intomainfrom
sv/jobs-get-all
Mar 23, 2026
Merged

feat(orchestrator): add Jobs getAll service [PLT-99452]#290
ninja-shreyash merged 13 commits intomainfrom
sv/jobs-get-all

Conversation

@ninja-shreyash
Copy link
Copy Markdown
Contributor

@ninja-shreyash ninja-shreyash commented Mar 14, 2026

Method Added

Layer Method Signature
Service jobs.getAll() getAll(options?: JobGetAllOptions): Promise<NonPaginatedResponse<JobGetResponse> | PaginatedResponse<JobGetResponse>>

Endpoint Called

Method HTTP Endpoint OAuth Scope
getAll() GET /orchestrator_/odata/Jobs OR.Monitoring or OR.Monitoring.Read
getAll() GET /orchestrator_/odata/Jobs OR.Jobs or OR.Jobs.Read
  • Extends FolderScopedService — sets X-UIPATH-OrganizationUnitId header when folderId is provided
  • Supports OData pagination ($top, $skip, $count)
  • Supports OData $filter for server-side filtering (e.g. "State eq 'Running'")

Example Usage

import { UiPath } from '@uipath/uipath-typescript/core';
import { Jobs } from '@uipath/uipath-typescript/jobs';

const sdk = new UiPath(config);
await sdk.initialize();
const jobs = new Jobs(sdk);

// Get all jobs in a folder (non-paginated)
const allJobs = await jobs.getAll({ folderId: 123 });
// allJobs.items → JobGetResponse[]

// With pagination
const page1 = await jobs.getAll({ folderId: 123, pageSize: 10 });
if (page1.hasNextPage) {
  const page2 = await jobs.getAll({ folderId: 123, cursor: page1.nextCursor });
}

// Jump to a specific page
const page5 = await jobs.getAll({ folderId: 123, jumpToPage: 5, pageSize: 10 });

// With OData filter
const runningJobs = await jobs.getAll({
  folderId: 123,
  filter: "State eq 'Running'"
});

API Response vs SDK Response

Transform pipeline

pascalToCamelCaseKeys()transformData(data, JobMap)

Field mapping

API Response (PascalCase) SDK Response (camelCase) Change Reason
Id id Case pascalToCamelCaseKeys
Key key Case pascalToCamelCaseKeys
State state Case pascalToCamelCaseKeys
CreationTime createdTime Case + Rename Renamed via JobMap — aligns with SDK convention (createdTime) used across other services
LastModificationTime lastModifiedTime Case + Rename Renamed via JobMap — aligns with SDK convention (lastModifiedTime)
OrganizationUnitId folderId Case + Rename Renamed via JobMapOrganizationUnit is an internal API term; folder is user-facing concept
OrganizationUnitFullyQualifiedName folderName Case + Rename Renamed via JobMap — same reasoning as above
StartTime startTime Case pascalToCamelCaseKeys
EndTime endTime Case pascalToCamelCaseKeys
ReleaseName releaseName Case pascalToCamelCaseKeys
HostMachineName hostMachineName Case pascalToCamelCaseKeys
JobPriority jobPriority Case pascalToCamelCaseKeys
InputArguments inputArguments Case pascalToCamelCaseKeys
OutputArguments outputArguments Case pascalToCamelCaseKeys
All other fields camelCase equivalent Case pascalToCamelCaseKeys

Docs

image

Sample App

image

Files

Area Files
Endpoint src/utils/constants/endpoints/orchestrator.ts
Types src/models/orchestrator/jobs.types.ts
Constants src/models/orchestrator/jobs.constants.ts
Models src/models/orchestrator/jobs.models.ts
Service src/services/orchestrator/jobs/jobs.ts, index.ts
Build package.json, rollup.config.js
Barrel exports src/models/orchestrator/index.ts, src/services/orchestrator/index.ts
Unit tests tests/unit/services/orchestrator/jobs.test.ts (5 tests)
Integration tests tests/integration/shared/orchestrator/jobs.integration.test.ts
Test utils tests/utils/constants/jobs.ts, tests/utils/mocks/jobs.ts
Docs docs/oauth-scopes.md, docs/pagination.md

🤖 Auto-generated using onboarding skills

@ninja-shreyash ninja-shreyash changed the title feat(orchestrator): add Jobs getAll service feat(orchestrator): add Jobs getAll service [PLT-99452] Mar 16, 2026
@ninja-shreyash
Copy link
Copy Markdown
Contributor Author

test-and-build PR gate would be fixed by onboarding the same API to CF workers

ninja-shreyash and others added 3 commits March 16, 2026 12:11
Add new Jobs service for querying Orchestrator job executions via
GET /odata/Jobs endpoint with OData pagination support.

- JobService extends FolderScopedService with OData pagination
- Types reuse existing enums (JobState, JobPriority, JobType, etc.)
- New enums: JobProcessType, JobRuntimeType, ServerlessJobType
- Transform pipeline: pascalToCamelCaseKeys + JobMap semantic renames
- Subpath export at @uipath/uipath-typescript/jobs
- Unit tests (5), integration tests, docs updated

PLT-99452

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace console.log with throw Error in integration tests
- Remove try/catch blocks that swallow test errors
- Remove duplicate JSDoc comment block in endpoints file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread src/models/orchestrator/jobs.models.ts Outdated
Comment thread src/models/orchestrator/jobs.models.ts Outdated
Comment thread src/models/orchestrator/jobs.models.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts
Comment thread src/models/orchestrator/jobs.models.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts
Comment thread src/models/orchestrator/jobs.types.ts
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/processes.types.ts
Comment thread tests/integration/shared/orchestrator/jobs.integration.test.ts
@swati354
Copy link
Copy Markdown
Collaborator

Question : Do the mapped names work with filters?
Will filter : "processName eq 'X'" work?

@Raina451
Copy link
Copy Markdown
Collaborator

Raina451 commented Mar 18, 2026

Question : Do the mapped names work with filters? Will filter : "processName eq 'X'" work?

yes these works ( I meant only case conversion)

Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts
Comment thread src/models/orchestrator/jobs.types.ts
@ninja-shreyash
Copy link
Copy Markdown
Contributor Author

ninja-shreyash commented Mar 18, 2026

Question : Do the mapped names work with filters? Will filter : "processName eq 'X'" work?
This doesn't work

Eg. I am mapping processType -> packageType within Jobs service

But in filter, processType eq 'Process' works but packageType eq 'Process' doesn't work (Invalid OData parameters)

Creating a bug to fix this: PLT-99731

Comment thread tests/integration/config/unified-setup.ts Outdated
@ninja-shreyash ninja-shreyash changed the title feat(orchestrator): add Jobs getAll service [PLT-99452] feat(orchestrator): add Jobs service (getAll + getById) [PLT-99452] Mar 22, 2026
@ninja-shreyash ninja-shreyash changed the title feat(orchestrator): add Jobs service (getAll + getById) [PLT-99452] feat(orchestrator): add Jobs getAll service [PLT-99452] Mar 22, 2026
@ninja-shreyash ninja-shreyash mentioned this pull request Mar 22, 2026
6 tasks
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/jobs.types.ts Outdated
Comment thread src/models/orchestrator/processes.types.ts Outdated
Comment thread tests/utils/mocks/jobs.ts Outdated
Comment thread tests/utils/mocks/jobs.ts
Comment thread src/services/orchestrator/jobs/index.ts
@sonarqubecloud
Copy link
Copy Markdown

@ninja-shreyash ninja-shreyash merged commit 3e90eca into main Mar 23, 2026
11 checks passed
@ninja-shreyash ninja-shreyash deleted the sv/jobs-get-all branch March 23, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants