Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
simonaubert
Partner - Specialist II
Partner - Specialist II

QRS endpoint for trigger start on schedule

Hello all,

I try to find a way to retrieve these informations :

simonaubert_0-1647506177150.png



All I manage to do right now is retrieve the informations for event trigger. But I guess there is a way to get the same thing for schedule event ?

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
Labels (1)
1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

QMC calling the SchemaEvent for displaying these informations:

amartinez35_0-1647513592033.png

 

Doc: https://help.qlik.com/en-US/sense-developer/February2022/APIs/RepositoryServiceAPI/index.html?page=1...

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

2 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

QMC calling the SchemaEvent for displaying these informations:

amartinez35_0-1647513592033.png

 

Doc: https://help.qlik.com/en-US/sense-developer/February2022/APIs/RepositoryServiceAPI/index.html?page=1...

Aurélien

Help users find answers! Don't forget to mark a solution that worked for you!
simonaubert
Partner - Specialist II
Partner - Specialist II
Author

Hello @Aurelien_Martinez 

So, I read the description and created a rest connection on https://localhost:4242/qrs/schemaevent/full/ .

simonaubert_0-1647636919932.png

 

Then here is my code. Attention required : Qlik didn't gave me all the fields in the second party (avec the rest query) so I had to edit manuallay the load script.

LIB CONNECT TO 'REST_Custom_Monitor_SchemaEvent';

RestConnectorMasterTable:
SQL SELECT 
	"id" AS "id_u8",
	"createdDate",
	"modifiedDate",
	"modifiedByUserName",
	"timeZone",
	"daylightSavingTime",
	"startDate",
	"expirationDate",
	"incrementDescription",
	"incrementOption",
	"name" AS "name_u1",
	"enabled" AS "enabled_u1",
	"eventType",
	"userSyncTask",
	"externalProgramTask",
	"privileges" AS "privileges_u8",
	"schemaPath",
	"reloadTask",
	"__KEY_root",
	(SELECT 
		"@Value",
		"__FK_schemaFilterDescription"
	FROM "schemaFilterDescription" FK "__FK_schemaFilterDescription" ArrayValueAlias "@Value"),
// 	(SELECT 
// 		"id",
// 		"nextExecution",
// 		"timesTriggered",
// 		"privileges",
// 		"__FK_operational"
// 	FROM "operational" FK "__FK_operational"),
	(SELECT 
		"id" AS "id_u3",
		"name",
		"taskType",
		"enabled",
		"taskSessionTimeout",
		"maxRetries",
		"privileges" AS "privileges_u3",
		"__FK_reloadTask",
		"__KEY_reloadTask"//,
// 		(SELECT 
// 			"id" AS "id_u2",
// 			"nextExecution" AS "nextExecution_u0",
// 			"privileges" AS "privileges_u2",
// 			"__FK_operational_u0",
// 			"__KEY_operational",
// 			(SELECT 
// 				"id" AS "id_u1",
// 				"executingNodeName",
// 				"status",
// 				"startTime",
// 				"stopTime",
// 				"duration",
// 				"fileReferenceID",
// 				"scriptLogAvailable",
// 				"scriptLogLocation",
// 				"scriptLogSize",
// 				"privileges" AS "privileges_u1",
// 				"__FK_lastExecutionResult",
// 				"__KEY_lastExecutionResult",
// 				(SELECT 
// 					"id" AS "id_u0",
// 					"detailsType",
// 					"message",
// 					"detailCreatedDate",
// 					"privileges" AS "privileges_u0",
// 					"__FK_details"
// 				FROM "details" FK "__FK_details")
// 			FROM "lastExecutionResult" PK "__KEY_lastExecutionResult" FK "__FK_lastExecutionResult")
// 		FROM "operational" PK "__KEY_operational" FK "__FK_operational_u0")
	FROM "reloadTask" PK "__KEY_reloadTask" FK "__FK_reloadTask"),
	(SELECT 
		"id" AS "id_u7",
		"name" AS "name_u0",
		"taskType" AS "taskType_u0",
		"enabled" AS "enabled_u0",
		"taskSessionTimeout" AS "taskSessionTimeout_u0",
		"maxRetries" AS "maxRetries_u0",
		"privileges" AS "privileges_u7",
		"__FK_userSyncTask",
		"__KEY_userSyncTask"//,
// 		(SELECT 
// 			"id" AS "id_u6",
// 			"nextExecution" AS "nextExecution_u1",
// 			"privileges" AS "privileges_u6",
// 			"__FK_operational_u1",
// 			"__KEY_operational_u0",
// 			(SELECT 
// 				"id" AS "id_u5",
// 				"executingNodeName" AS "executingNodeName_u0",
// 				"status" AS "status_u0",
// 				"startTime" AS "startTime_u0",
// 				"stopTime" AS "stopTime_u0",
// 				"duration" AS "duration_u0",
// 				"fileReferenceID" AS "fileReferenceID_u0",
// 				"scriptLogAvailable" AS "scriptLogAvailable_u0",
// 				"scriptLogLocation" AS "scriptLogLocation_u0",
// 				"scriptLogSize" AS "scriptLogSize_u0",
// 				"privileges" AS "privileges_u5",
// 				"__FK_lastExecutionResult_u0",
// 				"__KEY_lastExecutionResult_u0",
// 				(SELECT 
// 					"id" AS "id_u4",
// 					"detailsType" AS "detailsType_u0",
// 					"message" AS "message_u0",
// 					"detailCreatedDate" AS "detailCreatedDate_u0",
// 					"privileges" AS "privileges_u4",
// 					"__FK_details_u0"
// 				FROM "details" FK "__FK_details_u0")
// 			FROM "lastExecutionResult" PK "__KEY_lastExecutionResult_u0" FK "__FK_lastExecutionResult_u0")
// 		FROM "operational" PK "__KEY_operational_u0" FK "__FK_operational_u1")
	FROM "userSyncTask" PK "__KEY_userSyncTask" FK "__FK_userSyncTask")
FROM JSON (wrap on) "root" PK "__KEY_root";

[schemaFilterDescription]:
LOAD	[@Value],
[__FK_schemaFilterDescription] as __KEY_root
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_schemaFilterDescription]);


// [operational]:
// LOAD	[id],
// 	[nextExecution],
// 	[timesTriggered],
// 	[privileges]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_operational]);


// [details]:
// LOAD	[id_u0] AS [id_u0],
// 	[detailsType],
// 	[message],
// 	[detailCreatedDate],
// 	[privileges_u0] AS [privileges_u0]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_details]);


// [lastExecutionResult]:
// LOAD	[id_u1] AS [id_u1],
// 	[executingNodeName],
// 	[status],
// 	[startTime],
// 	[stopTime],
// 	[duration],
// 	[fileReferenceID],
// 	[scriptLogAvailable],
// 	[scriptLogLocation],
// 	[scriptLogSize],
// 	[privileges_u1] AS [privileges_u1]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_lastExecutionResult]);


// [operational_u0]:
// LOAD	[id_u2] AS [id_u2],
// 	[nextExecution_u0] AS [nextExecution_u0],
// 	[privileges_u2] AS [privileges_u2]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_operational_u0]);


[reloadTask]:
LOAD	[id_u3] AS [id_u3],
	[name],
	[taskType],
	[enabled],
	[taskSessionTimeout],
	[maxRetries],
    [__FK_reloadTask] as __KEY_root,
    __KEY_reloadTask//,
// 	[privileges_u3] AS [privileges_u3]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_reloadTask]);


// [details_u0]:
// LOAD	[id_u4] AS [id_u4],
// 	[detailsType_u0] AS [detailsType_u0],
// 	[message_u0] AS [message_u0],
// 	[detailCreatedDate_u0] AS [detailCreatedDate_u0]//,
// 	//[privileges_u4] AS [privileges_u4]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_details_u0]);


// [lastExecutionResult_u0]:
// LOAD	[id_u5] AS [id_u5],
// 	[executingNodeName_u0] AS [executingNodeName_u0],
// 	[status_u0] AS [status_u0],
// 	[startTime_u0] AS [startTime_u0],
// 	[stopTime_u0] AS [stopTime_u0],
// 	[duration_u0] AS [duration_u0],
// 	[fileReferenceID_u0] AS [fileReferenceID_u0],
// 	[scriptLogAvailable_u0] AS [scriptLogAvailable_u0],
// 	[scriptLogLocation_u0] AS [scriptLogLocation_u0],
// 	[scriptLogSize_u0] AS [scriptLogSize_u0],
// 	[privileges_u5] AS [privileges_u5]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_lastExecutionResult_u0]);


// [operational_u1]:
// LOAD	[id_u6] AS [id_u6],
// 	[nextExecution_u1] AS [nextExecution_u1],
// 	[privileges_u6] AS [privileges_u6]
// RESIDENT RestConnectorMasterTable
// WHERE NOT IsNull([__FK_operational_u1]);


[userSyncTask]:
LOAD	[id_u7] AS [id_u7],
	[name_u0] AS [name_u0],
	[taskType_u0] AS [taskType_u0],
	[enabled_u0] AS [enabled_u0],
	[taskSessionTimeout_u0] AS [taskSessionTimeout_u0],
	[maxRetries_u0] AS [maxRetries_u0],
//     __KEY_userSyncTask//,
   [__FK_userSyncTask] as __KEY_root
	//[privileges_u7] AS [privileges_u7]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_userSyncTask]);


[root]:
LOAD	[id_u8] AS [id_u8],
	[createdDate],
	[modifiedDate],
	[modifiedByUserName],
	[timeZone],
	[daylightSavingTime],
	[startDate],
	[expirationDate],
	[incrementDescription],
	[incrementOption],
	[name_u1] AS [name_u1],
	[enabled_u1] AS [enabled_u1],
	[eventType],
	[userSyncTask],
	[externalProgramTask],
// 	[privileges_u8] AS [privileges_u8],
	[schemaPath],
	[reloadTask],
    __KEY_userSyncTask,
   __KEY_root
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);


DROP TABLE RestConnectorMasterTable;


exit script;

 

Bi Consultant (Dataviz & Dataprep) @ Business & Decision