Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Additionally, auditing data can be accessed with a SQL query or via the SkySync Web Service. The queries are listed below: 

 

sql   DECLARE @pageindex as Int
Code Block
language
Expand
titleTSQL
(SQL
Server)
query:


Code Block
DECLARE @pageindex as Int = 0; 
DECLARE @pageSize as Int
DECLARE @pageSize as Int = 1000; 
DECLARE @offset as Int
DECLARE @offset as Int = @pageindex * @pageSize; 
WITH CTE AS
WITH CTE AS 
       SELECT ID
       SELECT ID, JobID, ExecutionID, IsContainer, IsDirectionSwitched, ConnectionID, Path, DesiredName,
Size
 Size, Version, SourceConnectionID, SourcePath, OperationType, OperationOnTicks, Reason, ROW_NUMBER() 
       OVER
       OVER (
ORDER BY OperationOnTicks DESC
ORDER BY OperationOnTicks DESC) 
r FROM TransferAudits 
r FROM TransferAudits 
)
SELECT
 SELECT *
FROM CTE WHERE r > @offset AND r
 FROM CTE WHERE r > @offset AND r <= (@offset + @pageSize);
    Omit CTE to query all data:  SELECT ID


 

Expand
titleOmit CTE to query all data:


Code Block
languagesql
SELECTID, JobID, ExecutionID, IsContainer, IsDirectionSwitched, ConnectionID, Path, DesiredName,
Size
 Size, Version, SourceConnectionID, SourcePath, OperationType, OperationOnTicks, Reason 
FROM TransferAudits  ORDER BY OperationOnTicks DESC 

...

FROMTransferAudits 
ORDERBYOperationOnTicks DESC
 


Expand
titleLinks to retrieve/export the Auditing Data via the SkySync Web Service:

...


Info

For these queries, the "pageSize" default and maximum are both 100.



Retrieve the first 100 audits:
 

http://localhost:9000/v1/jobs/executions/audits?sort=OperationOnTicks&desc=true&pageIndex=0&pageSize=100 

 

Retrieve the first 100 audits for job X: 

http://localhost:9000/v1/jobs/X/executions/audits?sort=OperationOnTicks&desc=true&pageIndex=0&pageSize=100 

 

Retrieve the first 100 audits for job X, execution ID of Y: 

http://localhost:9000/v1/jobs/X/executions/Y/audits?sort=OperationOnTicks&desc=true&pageIndex=0&pageSize=100 

 

Export all audits: 

http://localhost:9000/v1/jobs/executions/audits.csv 

 

Export all audits for job X: 

http://localhost:9000/v1/jobs/X/executions/audits.csv 

 

Export all audits for job X, execution ID of Y: 

http://localhost:9000/v1/jobs/X/executions/Y/audits.csv 

 

To query failures, use the previous three queries, substituting "failures.csv" for "audits.csv".

For example, to export all failures for job X, execution ID of Y: 

http://localhost:9000/v1/jobs/X/executions/Y/failures.csv 

...

 

For these queries, the "pageSize" default and maximum are both 100. 


 
Please contact Portal Architects Support for assistance with this article.