$ npx ts-node src/samples/release/releaseSample.ts
下記のような JSON データが出力されると思います。
リリース:
[
{
"Key": "bb2cxxxx-xxxxx",
"ProcessKey": "MyAttendedFramework",
"ProcessVersion": "1.0.2",
"IsLatestVersion": false,
"IsProcessDeleted": false,
"Description": "",
"Name": "MyAttendedFramework_Main",
"EnvironmentId": 3,
"EnvironmentName": "Main",
"InputArguments": null,
"Id": 12,
"Arguments": { "Input": null, "Output": null },
"ProcessSettings": null
} ...
]
ProcessKey とありますが、この値は画面上に表示されるプロセスの「名前」です。
また Name が、タスクトレイに表示されるワークフロー名となります。
import config from 'config'
import OrchestratorApi from '../../index'
async function sample() {
const api = new OrchestratorApi(config)
// まずは認証
await api.authenticate()
try {
const releases: any[] = await api.release.findAll()
console.log(releases)
const release: any = await api.release.findByProcessKey('MyAttendedFramework') // 画面の名前でも検索できる
console.log(release)
} catch (error) {
console.error(error)
}
}
if (!module.parent) {
(async () => {
await sample()
})()
}
- findAll (queries?: any)
- GET
/odata/Releases
- GET
- findByProcessKey (processKey: string)
- GET
/odata/Releases
に$filter: `ProcessKey eq '${processKey}'`
- GET