Skip to main content

%Api.Atelier.v8

Class %Api.Atelier.v8 Extends %Api.Atelier.v7

%Api.Atelier.v8 provides version 8 APIs for Atelier

XDatas

UrlMap

XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]

Methods

QueueAsync

ClassMethod QueueAsync(pNameSpace As %String) As %Status [ Internal ]

This call queues an item for work. On success it returns 202 and sets the 'Location' header
to indicate where the results can be retrieved from with an HTTP GET.

HTTP Codes returned:-

HTTP 202 if Accepted
HTTP 404 if the request type does not exist
HTTP 500 if an error occurs (details will be in status error array)

PollAsync

ClassMethod PollAsync(pNameSpace As %String, pID As %Integer) As %Status [ Internal ]

This call polls a queued item for console output and results. On success it returns 200.
Console output and results are found in the standard locations for Atelier REST APIs.
If there is more output expected the server will set the 'Retry-After' header. The client
should read this header to determine if another call should be made.
When the result of processing is available (or the work is finished) a GET to this API
will return any results in the 'content' field and (crucially) will NOT set the 'Retry-After'
header. This is an indication that processing is finished.

HTTP Codes returned:-

HTTP 200 if Accepted
HTTP 404 if the request ID does not exist
HTTP 423 if the global node is locked
HTTP 500 if an error occurs (details will be in status error array)

CancelAsync

ClassMethod CancelAsync(pNameSpace As %String, pID As %Integer) As %Status [ Internal ]

This call cancels a work request that has been previously queued.

HTTP Codes returned:-

HTTP 200 if Cancelled
HTTP 404 if the request ID does not exist
HTTP 423 if the global node is locked
HTTP 500 if an error occurs (details will be in status error array)

ExecuteAsyncRequest

ClassMethod ExecuteAsyncRequest(pID As %Integer) [ Internal ]

This method performs the long-running work that was queued by the POST /work (QueueAsync) endpoint

CleanUpAfterUnitTestRequest

ClassMethod CleanUpAfterUnitTestRequest(pID As %Integer) [ Internal, Private ]

Delete any files created for unit test request pID and restore the value of ^UnitTestRoot.

UnitTestResultToJSON

ClassMethod UnitTestResultToJSON(pID As %Integer, ByRef pResult As %DynamicArray) As %Status [ Internal, Private ]

Convert unit test result global data into a JSON array.