IRISLIB database
v1 Class Reference

Api.Atelier.v1 provides version 1 APIs for Atelier More...

Inheritance diagram for v1:
Collaboration diagram for v1:

Static Public Member Functions

_.Library.Status Compile (_.Library.String pNamespace)
 Api.Atelier.v1 provides version 1 APIs for Atelier More...
 
_.Library.Status CvtClientDocToXml (_.Library.String pNamespace)
 This method converts a client Doc to the corresponding XML. More...
 
_.Library.Status CvtXmlToClientDoc (_.Library.String pNamespace)
 This method converts a XML to the corresponding client document format. More...
 
_.Library.Status DeleteDoc (_.Library.String pNamespace, _.Library.String pDocName)
 This method deletes the named document in the specified namespace. More...
 
_.Library.Status DeleteDocs (_.Library.String pNamespace)
 This method deletes the list of named documents which is passed in the body of the http request. More...
 
_.Library.Status GetAdpInputOutputClass (_.Library.String pNamespace, _.Library.String pAdpName)
 This method returns the input and output type for the adapter. More...
 
_.Library.Status GetCSPApps (_.Library.String pNamespace)
 This method returns a list csp apps defined on the server (or namespace) More...
 
_.Library.Status GetDoc (_.Library.String pNamespace, _.Library.String pDocName)
 This method returns the text for the named document and namespace. More...
 
 GetDocNames (_.Library.String pNamespace, pCat, pType)
 This method returns a list of document names. More...
 
_.Library.Status GetDocs (_.Library.String pNamespace)
 This method returns the text for the all the specified documents in the namespace. More...
 
_.Library.Status GetEnsClassType (_.Library.String pNamespace, _.Library.Integer pClassType)
 This method returns a list of Ensemble class names. More...
 
_.Library.Status GetJobs ()
 This method returns a list of running jobs in the InterSystems IRIS instance. More...
 
_.Library.Status GetMetaData (_.Library.String pDataBaseName)
 This method returns the binary contents of the METADATA.zip file for the named database. More...
 
_.Library.Status GetModifiedDocNames (_.Library.String pNamespace, _.Library.String pType)
 This method is passed a list of database keys and hashes as a json array. More...
 
_.Library.Status GetNamespace (pNamespace)
 This method returns information about a specific namespace. More...
 
_.Library.Status HeadDoc (_.Library.String pNamespace, _.Library.String pDocName)
 This method returns the HttpHeader for the named document and namespace. More...
 
_.Library.Status Index (_.Library.String pNamespace)
 This method returns the indices for the all the specified documents in the namespace. More...
 
_.Library.Status PutDoc (_.Library.String pNamespace, _.Library.String pDocName)
 This method saves the supplied document. More...
 
_.Library.Status Query (_.Library.String pNamespace)
 This method returns the results of running the specified query in the specified namespace. More...
 
- Static Public Member Functions inherited from REST
_.Library.Status Http500 (_.Exception.AbstractException pE)
 Use our special format Http500 handler.
 
_.Library.Status Page (_.Library.Boolean skipheader)
 Sets the response's localization domain (something that CSP.REST should do, in theory) and then invokes default super class behavior.
 
_.Library.Status RenderResponseBody (_.Library.Status pStatus, _.Library.DynamicArray pMsgPart, _.Library.DynamicObject pResPart)
 Render the three-part Response Body which contains an status, console, and a result part.
 
_.Library.Status ReportHttpStatusCode (pHttpStatus, _.Library.Status pSC)
 User our special format handler for other status codes.
 
_.Library.Status ServeDoc (_.Library.String pDocName, _.Library.Status pStatus, _.Library.DynamicArray pMsgArray, _.Library.String pResArray, _.Library.String pTimeStamp, _.Library.Boolean pUpToDate, _.Library.DynamicObject pExtensionContent)
 This private helper method server wraps the message and document and returns it to the caller.
 
_.Library.Status ServeXml (_.Library.String pDocName, _.Library.Status pStatus, _.Library.DynamicArray pMsgArray, _.Library.Stream pStream, _.Library.String pTimeStamp)
 This private helper method server wraps the message and document and returns it to the caller.
 
 SetClientServerHash (_.Library.String pHash)
 Set the clients version of the server hash.
 
- Static Public Member Functions inherited from REST
_.Library.Boolean AcceptsContentType (_.Library.String pType)
 This method tests the HTTP_ACCEPT header and returns true if. More...
 
_.Library.Status AccessCheck (_.Library.Boolean pAuthorized)
 This method performs a basic access check. More...
 
_.Library.Status DispatchRequest (_.Library.String url, _.Library.String method, _.Library.Boolean forwarded, args)
 Dispatch a REST request according to URL and Method. More...
 
_.Library.Status Error (_.Library.Boolean skipheader)
 Called for a REST page in the event of an error being trapped by CSP server.
 
_.Library.String GetAuthChallenge ()
 This method determines what challenge will be sent with a 401 (Unauthorized) response. More...
 
_.Library.Status Http403 (_.Library.Status pSC)
 Issue a '403' error (Deprecated, use ..ReportHttpStatusCode)
 
_.Library.Status Http404 (_.Library.Status pSC)
 Issue a '404' error (Deprecated, use ..ReportHttpStatusCode)
 
_.Library.Status Http405 (_.Library.String pSupportedVerbs)
 Issue a '405' error ( user can override)
 
_.Library.Status Login (_.Library.Boolean skipheader)
 Called for a REST page in the event of a login being required.
 
_.Library.Status OnPreDispatch (_.Library.String pUrl, _.Library.String pMethod, _.Library.Boolean pContinue)
 This method gets called prior to dispatch of the request. More...
 
 SetResponseHeaderIfEmpty (_.Library.String pHeader, _.Library.String pValue)
 This utility method sets a response header only if it currently does not have a value.
 
_.Library.Status StatusToJSON (_.Library.Status pSC, _.Library.DynamicObject pJSON)
 Render a Status as JSON.
 
_.Library.Status StatusToProxyObject (_.Library.Status pSC, _.ZEN.proxyObject pJSON)
 Render a Status as JSON (in the form of an array of objects representing each status value).
 
_.Library.Status SupportedVerbs (pUrl, _.Library.String pVerbs)
 This generator creates the SupportedVerbs Method used to determine supported verbs to return for the OPTIONS request.
 
- Static Public Member Functions inherited from Login
 DrawCSS3STYLE ()
 Draw the style definitions for the login page. More...
 
 DrawHEAD (pTitle)
 Draw the HEAD section of the login page. More...
 
 DrawSTHEAD ()
 Draw the HEAD section of the security token page. More...
 
 DrawSTTitle (_.Library.String pTitle)
 Draw the title section of the security token page. More...
 
 DrawSTYLE ()
 Draw the style definitions for the login page. More...
 
 DrawTitle (_.Library.String pTitle)
 Draw the title section of the login page. More...
 
 DrawTitleSection (_.Library.String msgs)
 Draw the title section of the page. More...
 
_.Library.Status OnHandleCorsRequest (_.Library.String url)
 This is the CORS request handler. More...
 
_.Library.Status OnHandleOptionsRequest (_.Library.String url)
 This methods provides handling of the options request for this CSP application. More...
 
_.Library.Status OnPage ()
 Output the default login page as HTML.
 
_.Library.Boolean OnPreHTTP ()
 Determine if we need login CSRF tokens and if so add them. More...
 
- Static Public Member Functions inherited from Page
_.Library.Status ConvertParameter (_.Library.String url, _.Library.String name, _.Library.String value)
 You pass this the <parameter>url</parameter> of the page you are going to and a. More...
 
_.Library.Binary Decrypt (_.Library.String data)
 Decrypts the input string using the session.Key value that is unique to. More...
 
_.Library.String Encrypt (_.Library.Binary data)
 Encrypts the input string using the session.Key value that is unique to this. More...
 
_.Library.String EscapeHTML (in)
 This method converts input HTML text into Escaped HTML text.
 
_.Library.String EscapeURL (_.Library.String in, _.Library.String charset)
 This method converts the in input URL string into Escaped URL string. More...
 
_.Library.String HyperEventCall (_.Library.String methodName, _.Library.String args, _.Library.Integer type, _.Library.Boolean mobile)
 This method returns the string that needs to be written to the current. More...
 
_.Library.String HyperEventHead (_.Library.Boolean iframeOnly, _.Library.Boolean strict, _.Library.Boolean optionalBroker)
 This method returns the string that needs to be written to the current. More...
 
 Include (_.Library.String url)
 Include another csp page or file in the output at this point. More...
 
_.Library.String InsertHiddenField (_.Library.String url, _.Library.String name, _.Library.String value, _.Library.String extra)
 Inserts a '<input type="hidden" name="Name" value="Value">' tag into the current document. More...
 
_.Library.String InsertHiddenFields (_.Library.String url, _.Library.String query)
 Return the string containing the hidden form tags. More...
 
_.Library.Boolean IsPrivate ()
 Returns 1 if this page is in fact a private page (see <parameter>PRIVATE</parameter>).
 
_.Library.String Link (_.Library.String link, _.Library.String query, _.Library.Boolean addQ)
 Tranforms the link specified by link into a URL and returns it as a string. More...
 
_.Library.Status OnHTTPHeader (_.Library.Boolean OutputBody)
 Event handler for PAGE event: this is invoked in order to
More...
 
 OnPageError (_.Library.Status sc)
 Event handler for any error that occurs on the page. More...
 
 OnPostHTTP ()
 Event handler for POSTPAGE event: this is invoked after the data. More...
 
_.Library.Status OnPostHyperEvent (_.Library.String class, _.Library.String method)
 Event handler which is invoked after a hyperevent method is called on this page.
 
_.Library.Status OnPreHyperEvent (_.Library.String class, _.Library.String method)
 Event handler which is invoked before a hyperevent method is called on this page. More...
 
_.Library.String QuoteJS (in)
 This method converts input string into quoted JavaScript literal.
 
_.Library.String RewriteURL (_.Library.String url)
 This method will rewrite a URL to use #url()# if needed.
 
 ShowError (_.Library.Status sc)
 Display a <class>Status</class> error code to the CSP Page.
 
 StartTimer (_.Library.String name)
 Used to get performance information on your CSP pages. More...
 
 StopTimer (_.Library.String name)
 Used to time performance information on your CSP pages. More...
 
 ThrowError (_.Library.Status sc)
 Passed a <class>Status</class> code this goes to the error page passing this status code.
 
_.Library.String UnescapeHTML (in)
 This method converts Escaped HTML text into normal HTML text.
 
_.Library.String UnescapeURL (_.Library.String in, _.Library.String charset)
 This method converts the in Escaped URL string back to its original form. More...
 

Additional Inherited Members

- Static Public Attributes inherited from REST
 DOMAIN = None
 Atelier.REST classes are unlikely to actually define messages with $$$Text More...
 
- Static Public Attributes inherited from REST
 HandleCorsRequest = None
 This parameter influences the CORS support. More...
 
 TokenLoginEndpoint = None
 If the REST application is using token authentication, then this parameter gives the path to use for the "login" endpoint. More...
 
 TokenLogoutEndpoint = None
 If the REST application is using token authentication, then this parameter gives the path to use for the "logout" endpoint. More...
 
 TokenRefreshEndpoint = None
 If the REST application is using token authentication, then this parameter gives the path to use for the "refresh" endpoint. More...
 
 TokenRevokeEndpoint = None
 If the REST application is using token authentication, then this parameter gives the path to use for the token revocation endpoint. More...
 
 UseSession = None
 This parameter controls the CSP session support. More...
 
- Static Public Attributes inherited from Login
 DOMAIN = None
 Provide a default login and security-token pages for CSP applications. More...
 
 FAVORITEICON = None
 Home favorite icon.
 
 HandleCorsRequest = None
 This parameter influences the CORS support for the CSP application that has this login page assigned. More...
 
 LOGINTITLE = None
 Title displayed for login page. More...
 
 STYLESHEET = None
 Name of stylesheet used for login page. More...
 
- Static Public Attributes inherited from Page
 CHARSET = None
 The <CLASS>CSP.Page</CLASS> object serves as an event handler for CSP requests. More...
 
 CONTENTTYPE = None
 Specifies the default content type for the page. More...
 
 CONVERTINPUTSTREAM = None
 Specifies if input request.Content or request.MimeData values are converted from their. More...
 
 CSPFILE = None
 If this page was compiled from a .csp file, then this parameter contains the. More...
 
 CSPSTRICT = None
 The CSPSTRICT parameter is set to 1, if the DOCTYPE indicates that this. More...
 
 CSPURL = None
 This parameter is used to make sure that if multiple. More...
 
 CSPXHTML = None
 The CSPXHTML parameter is set to 1, if the DOCTYPE indicates that this. More...
 
 DOMAIN = None
 The default domain for csp:text, span and div tags. More...
 
 ENCODED = None
 Controls how the query parameters for this page are passed, it can. More...
 
 ERRORPAGE = None
 Specify a custom error page to call if there are any problems with generating this page. More...
 
 EXPIRES = None
 Specified the default value for the response.Expires. More...
 
 NOCHARSETCONVERT = None
 Specifies if we wish to turn off charset conversion for this page. More...
 
 PAGETIMING = None
 If this parameter is true then we automatically record timing statistics of how long it takes to. More...
 
 PRIVATE = None
 Controls the access to the page, it can be set to one of the following:
More...
 
 SECURITYRESOURCE = None
 This is a comma-delimited list of system Resources and associated. More...
 
 TIMINGSLOTS = None
 Used by the timing to decide how many slots a day should be divided up into. More...
 
 UseSession = None
 This parameter controls the CSP session support. More...
 

Detailed Description

Api.Atelier.v1 provides version 1 APIs for Atelier

Member Function Documentation

◆ Compile()

_.Library.Status Compile ( _.Library.String  pNamespace)
static

Api.Atelier.v1 provides version 1 APIs for Atelier

This method permits the compilation of more than one document at a time.


The method expects a content body to be encoded in JSON and contain an
array of items (document names) to be compiled.

HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the resource name is an invalid document name
HTTP 404 if the resource is not found
HTTP 423 if the document is locked
HTTP 500 if an error occurs (details will be in status error array)

Return content will be an array of document objects.
Errors pertaining to the document will be in the status property of the document object.

The URL parameter 'flags' can be passed (default 'cuk') which will be passed to the compiler.
The URL parameter 'source' can be passed with a value of 0 if you don't want the source of the
compiled document to be returned.

POSTED: ["Atelier.NewClass1.cls"]

Example Output :-

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [
        "Compilation started on 01/12/2016 17:44:00 with qualifiers 'cuk'",
        "Compiling class Atelier.NewClass1",
        "Compiling table Atelier.NewClass1",
        "Compiling routine Atelier.NewClass1.1",
        "Compilation finished successfully in 0.067s.",
        ""
      ],
      "result": {
        "content": [
          {
            "name": "Atelier.NewClass1.cls",
            "status": "",
            "content": [
              "Storage Default",
              "{",
              "<Data name=\"NewClass1DefaultData">",
              "<Value name="1">",
              "
%CLASSNAME
",
              "
",
              "</Data>",
              "<DataLocation>^Atelier.NewClass1D</DataLocation>",
              "<DefaultData>NewClass1DefaultData</DefaultData>",
              "<IdLocation>^Atelier.NewClass1D</IdLocation>",
              "<IndexLocation>^Atelier.NewClass1I</IndexLocation>",
              "<StreamLocation>^Atelier.NewClass1S</StreamLocation>",
              "<Type>Storage.Persistent</Type>",
              "}",
              ""
            ],
            "db": "IRISSYS",
            "ts": "2016-01-12 17:44:00.053",
            "enc": false
          }
        ]
      }
    }
    

◆ CvtClientDocToXml()

_.Library.Status CvtClientDocToXml ( _.Library.String  pNamespace)
static

This method converts a client Doc to the corresponding XML.


Note: This is NOT a public API and will be retired in a future version
Customers SHOULD NOT call this API from their own code

HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the posted content is empty
HTTP 415 if content type is not application/json
HTTP 500 if an error occurs (details will be in status error array)

Returned content is XML.

◆ CvtXmlToClientDoc()

_.Library.Status CvtXmlToClientDoc ( _.Library.String  pNamespace)
static

This method converts a XML to the corresponding client document format.


Note: This is NOT a public API and will be retired in a later version
Customers SHOULD NOT call this API from their own code

HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the posted content is empty
HTTP 415 if content type is not application/xml
HTTP 500 if an error occurs (details will be in status error array)

Returned content is plain text.

◆ DeleteDoc()

_.Library.Status DeleteDoc ( _.Library.String  pNamespace,
_.Library.String  pDocName 
)
static

This method deletes the named document in the specified namespace.



HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the resource name is an invalid document name
HTTP 404 if the resource is not found
HTTP 423 if the resource is locked
HTTP 500 if an error occurs (details will be in status error array)

Return content will be a document object.
errors pertaining to the document will be in the status property of the document object

Example Output :-

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [
      ],
      "result": {
        "name": "xyz.mac",
        "db": "IRISSYS",
        "ts": "",
        "cat": "RTN",
        "status": "",
        "enc": false,
        "content": []
      }
    }
    

◆ DeleteDocs()

_.Library.Status DeleteDocs ( _.Library.String  pNamespace)
static

This method deletes the list of named documents which is passed in the body of the http request.


as a JSON array [ "%Activate.Enum.cls", ... ]

HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the posted data does not contain a JSON array
HTTP 415 if the we are not passed application/json as the content type
HTTP 500 if an error occurs (details will be in status error array)

Return content will be an array of document objects. Errors pertaining to a each document
will be in the status property of each document object. If the status is an empty string then
the document was deleted successfully. Otherwise the document was NOT deleted. For deleted docs
the db entry will indicate from which database the doc was deleted.

POSTED: ["xyz.mac","notexist.cls"]

Result :-

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [
      ],
      "result": [
        {
          "name": "xyz.mac",
          "db": "",
          "status": ""
        },
        {
          "name": "notexist.cls",
          "db": "",
          "status": "ERROR #5001: Document Does Not Exist: User.notexist.cls [zExistsDoc+3^%Atelier.v1.Utils.General.1:%SYS]"
        }
      ]
    }
    

◆ GetAdpInputOutputClass()

_.Library.Status GetAdpInputOutputClass ( _.Library.String  pNamespace,
_.Library.String  pAdpName 
)
static

This method returns the input and output type for the adapter.



HTTP Codes returned:-

HTTP 200 if OK
HTTP 404 if the adapter does not exist
HTTP 500 if an error occurs (details will be in status error array)

Example response:

    {
      status: {
        errors: []
        summary: ""
      }
      console: []
      result: {
        content: {
          input: "%Stream.Object"
          output: "%String"
        }
      }
    }
    

◆ GetCSPApps()

_.Library.Status GetCSPApps ( _.Library.String  pNamespace)
static

This method returns a list csp apps defined on the server (or namespace)



GET http://localhost:57772/api/atelier/v1/%25SYS/cspapps
GET http://localhost:57772/api/atelier/v1/%25SYS/cspapps/DOCBOOK

HTTP Codes returned:-

HTTP 200 if OK
HTTP 500 if an error occurs (details will be in status error array)

Returned content is an array of csp application descriptors.

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "content": [
          "/csp/broker",
          "/csp/docbook",
          "/csp/documatic",
          "/csp/samples",
          "/csp/samples/docserver",
          "/csp/sys",
          "/csp/sys/bi",
          "/csp/sys/exp",
          "/csp/sys/mgr",
          "/csp/sys/op",
          "/csp/sys/sec",
          "/csp/user",
          "/isc/pki",
          "/isc/studio/rules",
          "/isc/studio/templates",
          "/isc/studio/usertemplates"
        ]
      }
    }
    



passing the URL parameter ?detail=1 will return an array containing objects which describe
the application in more detail :-

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "content": [
          {
            "default": false,
            "name": "/csp/broker"
          },
          {
            "default": true,
            "name": "/csp/sys"
          },
          {
            "default": false,
            "name": "/csp/sys/bi"
          },
          {
            "default": false,
            "name": "/csp/sys/exp"
          },
          {
            "default": false,
            "name": "/csp/sys/mgr"
          },
          {
            "default": false,
            "name": "/csp/sys/op"
          },
          {
            "default": false,
            "name": "/csp/sys/sec"
          },
          {
            "default": false,
            "name": "/isc/pki"
          },
          {
            "default": false,
            "name": "/isc/studio/rules"
          },
          {
            "default": false,
            "name": "/isc/studio/templates"
          },
          {
            "default": false,
            "name": "/isc/studio/usertemplates"
          }
        ]
      }
    }
    

◆ GetDoc()

_.Library.Status GetDoc ( _.Library.String  pNamespace,
_.Library.String  pDocName 
)
static

This method returns the text for the named document and namespace.



HTTP Codes returned:-

HTTP 200 if OK
HTTP 304 if the document has not been modified (see https://en.wikipedia.org/wiki/HTTP_ETag)
HTTP 400 if the named resource is not a valid document name
HTTP 404 if the document does not exist
HTTP 500 if an unxpected error occurs (details will be in status error array)

Return content will contain a document object.
Errors pertaining to the document will be in the status property of the document object. If source control hooks are enabled for the namespace any console output generated by the hook will be captured and returned as an array of lines in the 'console' array.

The result contains the name of the requested file, the database where it is stored, its timestamp and category (CLS - class, RTN -routine, CSP - csp file, OTH - other), as well as the document contents which are returned in an array.

For text files this will be an array of strings and the 'enc' json field will be set to false.
For binary files this will be an array of base64 encoded chunks and the 'enc' field will be set to true.

The URL parameter ?binary=1 can be passed to force the document to be encoded as binary.

The URL parameter ?storageOnly=1 can be passed to return only the storage portion of a class.

If a 'soft' error occurs such as a 'document does not exist', additional information can be found in the 'status' field of the result. Examples of other soft errors are 'file is locked' etc.

Here is an example of the result of asking for Activate.Enum.cls

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "name": "%Activate.Enum.cls",
        "db": "IRISLIB",
        "ts": "2016-01-04 14:00:04.000",
        "cat": "CLS",
        "status": "",
        "enc": false,
        "content": [
          "/// This class is the superclass for all enumerated types generated from",
          "/// a type library",
          "Class %Activate.Enum Extends %Integer [ Not ProcedureBlock, System = 3 ]",
          "{",
          "",
          "}",
          ""
        ]
      }
    }
    



and here is the result with ?binary=1

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "name": "%Activate.Enum.cls",
        "db": "IRISLIB",
        "ts": "2016-01-04 14:00:04.000",
        "cat": "CLS",
        "status": "",
        "enc": true,
        "content": [
          "Ly8vIFRoaXMgY2xhc3MgaXMgdGhlIHN1cGVyY2xhc3MgZm9yIGFsbCBlbnVtZXJhdGVkIHR5cGVzIGdlbmVyYXRlZCBmcm9tCi8vLyBhIHR5cGUgbGlicmFyeQpDbGFzcyAlQWN0aXZhdGUuRW51bSBFeHRlbmRzICVJbnRlZ2VyIFsgTm90IFByb2NlZHVyZUJsb2NrLCBTeXN0ZW0gPSAzIF0KewoKfQo="
        ]
      }
    }
    

Reimplemented in v4, and v2.

◆ GetDocNames()

GetDocNames ( _.Library.String  pNamespace,
  pCat,
  pType 
)
static

This method returns a list of document names.

Cat and Type constrain the types of documents,


whilst the URL parameter 'generated' determines whether generated documents should be included
and the 'filter' parameter provides a SQL filter that can be used to match the names.

HTTP Codes returned:-

HTTP 200 if OK
HTTP 500 if an error occurs (details will be in status error array)

Return content will be an array of document descriptors :-

    {
        "status": {
            "errors": [],
            "summary": ""
        },
        "console": [],
        "result": {
            "content": [{
                "name": "%Activate.Enum.cls",
                "cat": "CLS",
                "ts": "2016-01-04 14:00:04.000",
                "db": "IRISLIB",
                "gen": false
            }]
        }
    }
    

◆ GetDocs()

_.Library.Status GetDocs ( _.Library.String  pNamespace)
static

This method returns the text for the all the specified documents in the namespace.


A list of documents to be fetched is passed in the body of the http request.
The request body is simply a JSON array of names of documents you want to fetch [ "%Activate.Enum.cls", ... ]

HTTP Codes returned:-

HTTP 200 if OK
HTTP 415 if the we are not passed application/json as the content type
HTTP 500 if an error occurs (details will be in status error array)

Return content will be an array of document objects. Errors pertaining to a document
will be in the status property of each document object.

See the 'GetDoc' description above for a detailed explanation of the individual fields returned.
This method does NOT support the storageOnly flag. Neither does it do ETAG checking (and therefore
will NOT return an HTTP 304 under any circumstances).

◆ GetEnsClassType()

_.Library.Status GetEnsClassType ( _.Library.String  pNamespace,
_.Library.Integer  pClassType 
)
static

This method returns a list of Ensemble class names.


HTTP Codes returned:-

HTTP 200 if OK
HTTP 500 if an error occurs (details will be in status error array)

Returned content is an array of selected Ensemble class names.

These are the query types:
Adapters 1
InboundAdapters 2
OutboundAdapters 3
Messages 4
Requests 5
Responses 6
BusinessServices 7
BusinessProcesses 8
BusinessOperations 9
DataTransformation 10
Production 11
BusinessHost 12
Dashboard 13
Rule 14

Example response:

    {
      status: {
        errors: []
        summary: ""
      }
      console: []
      result: {
        content: [
            "Ens.Enterprise.MsgBank.BankTCPAdapter"
            "Ens.Enterprise.MsgBank.ClientTCPAdapter"
            "Ens.InboundAdapter"
            "Ens.OutboundAdapter"
        ]
      }
    }
    

◆ GetJobs()

_.Library.Status GetJobs ( )
static

This method returns a list of running jobs in the InterSystems IRIS instance.



GET http://localhost:57772/api/atelier/v1/%25SYS/jobs?system=1

HTTP Codes returned:-

HTTP 200 if OK
HTTP 500 if an error occurs (details will be in status error array)

Returned content is an array of job descriptors.
{ "status": { "errors": [], "summary": "" }, "console": [], "result": { "content": [ { "pid": 1394, "namespace": "%SYS", "routine": "%Studio.Debugger.1", "state": "RUN", "device": "|TCP|1972|1394" }, { "pid": 1345, "namespace": "%SYS", "routine": "RECEIVE", "state": "HANG", "device": "/dev/null" }, { "pid": 1364, "namespace": "%SYS", "routine": "%SYS.TaskSuper.1", "state": "SELECTW", "device": "/dev/null" }, { "pid": 1396, "namespace": "%SYS", "routine": "%SYS.cspServer3", "state": "READ", "device": "|TCP|1972|1396" }, { "pid": 1346, "namespace": "%SYS", "routine": "ECPWork", "state": "RUNW", "device": "/dev/null" }, { "pid": 1417, "namespace": "%SYS", "routine": "%SYS.BINDSRV", "state": "READ", "device": "|TCP|1972|1417" } ] } }

◆ GetMetaData()

_.Library.Status GetMetaData ( _.Library.String  pDataBaseName)
static

This method returns the binary contents of the METADATA.zip file for the named database.



HTTP Codes returned:-

HTTP 200 if OK
HTTP 404 if the document does not exist
HTTP 500 if an error occurs (details will be in status error array)

◆ GetModifiedDocNames()

_.Library.Status GetModifiedDocNames ( _.Library.String  pNamespace,
_.Library.String  pType 
)
static

This method is passed a list of database keys and hashes as a json array.


The hash values are used to determine if anything has changed in the database defined by the key.
The first call to this api necessarily POSTS an empty array. Subsequent posts can post the dbname
and dbhash to discover which documents have been modified on the server since the last call

Input format :-

[ { "dbname" : "USER", "dbhash" : "KWAGbOdnRblPzANaiv1Oiu0BZLI" }, ... ]

Output format :-

[ { "dbname" : "USER", "dbhash" : "Qx1zuNaulq3b_1yR9ahZAfjkc-", "crhash" : "47763751EC",
"docs" : [{ "name": "User.NewClass1.cls", "ts": "2015-05-29 17:24:30.156", "gen": false, "depl": false }, ... ]
}, ... ]

HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the posted content is empty or type is anything other than CLS
HTTP 415 if content type is not application/json
HTTP 500 if an error occurs (details will be in status error array)

◆ GetNamespace()

_.Library.Status GetNamespace (   pNamespace)
static

This method returns information about a specific namespace.



GET http://localhost:57772/api/atelier/v1/:namespace

GET http://localhost:57772/api/atelier/v1/DOCBOOK

HTTP Codes returned:-

HTTP 200 if OK
HTTP 500 if an error occurs (details will be in status error array)

Returned content is information about a namespace

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "content": {
          "name": "DOCBOOK",
          "db": [
            { "name": "DOCBOOK", "crhash": "5046B9BF0DE", "default": true },
            { "name": "IRISSYS", "crhash": "47763751EC", "default": false },
            { "name": "IRISLOCALDATA", "crhash": "4776EDD1C3", "default": false },
            { "name": "IRISLIB", "crhash": "5023332D0A7", "default": false }
          ],
          "features": [
            {
              "name": "ENSEMBLE",
              "enabled": false
            }
          ],
        }
      }
    }
    

◆ HeadDoc()

_.Library.Status HeadDoc ( _.Library.String  pNamespace,
_.Library.String  pDocName 
)
static

This method returns the HttpHeader for the named document and namespace.


This information primarily contains the timestamp and can be used to detect
discrepancies between server and client version

HTTP Codes returned:-

HTTP 200 if OK
HTTP 400 if the resource name is an invalid document name
HTTP 404 if the resource is not found
HTTP 500 if an error occurs (details will be in status error array)

◆ Index()

_.Library.Status Index ( _.Library.String  pNamespace)
static

This method returns the indices for the all the specified documents in the namespace.


A list of documents to be indexed is passed in the body of the http request.
The request body is simply a JSON array of names of documents you want to index [ "%Activate.Enum.cls", ... ]

NOTE: Currently we only support the indexing of classes

HTTP Codes returned:-

HTTP 200 if OK
HTTP 415 if the we are not passed application/json as the content type
HTTP 500 if an error occurs (details will be in status error array)

Return content will be an array of index document objects. Errors pertaining to a document
will be in the status property of each document object. The index contains information relating
to the structure and documentation of documents on the server and will vary by the category to
which the document belongs. Below is an example for a class.

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "content": [
          {
            "name": "%Activate.GenericObject.cls",
            "db": "IRISLIB",
            "ts": "2016-01-04 14:00:04.000",
            "gen": false,
            "others": [
              "%Activate.GenericObject.1.INT"
            ],
            "cat": "CLS",
            "content": {
              "desc": "This class provides functionality to create an ActiveX object, invoke its methods\nand Get/Set its properties by name.",
              "depl": false,
              "depr": false,
              "final": false,
              "hidden": false,
              "super": [
                "%Activate.IDispatch"
              ],
              "methods": [
                {
                  "name": "CreateObject",
                  "desc": "This method is used to create a generic object given only its progid. If the object\ncannot be found an exception is thrown. The return value should be tested against\n$$$NULLOREF  in the usual manner to ensure that the object has been successfully\ncreated",
                  "depr": false,
                  "final": true,
                  "internal": false,
                  "private": false,
                  "scope": "class",
                  "returntype": "%Library.RegisteredObject",
                  "args": [
                    {
                      "name": "Progid",
                      "type": "%Library.String"
                    }
                  ]
                },
                {
                  "name": "GetObject",
                  "desc": "This method is used to create a generic object from a moniker. If the object\ncannot be found an exception is thrown. The return value should be tested against\n$$$NULLOREF  in the usual manner to ensure that the object has been successfully\ncreated.",
                  "depr": false,
                  "final": true,
                  "internal": false,
                  "private": false,
                  "scope": "class",
                  "returntype": "%Library.RegisteredObject",
                  "args": [
                    {
                      "name": "Moniker",
                      "type": "%Library.String"
                    }
                  ]
                }
              ],
              "parameters": [],
              "properties": []
            },
            "status": ""
          }
        ]
      }
    }
    

Reimplemented in v4.

◆ PutDoc()

_.Library.Status PutDoc ( _.Library.String  pNamespace,
_.Library.String  pDocName 
)
static

This method saves the supplied document.



HTTP Codes returned:-

HTTP 201 if created
HTTP 400 if the resource name is an invalid document name
HTTP 404 if the resource is not found
HTTP 409 if a conflict between server and client versions is detected
HTTP 415 if not passed text/plain as content type
HTTP 425 if the document is locked and cannot be written to
HTTP 500 if an error occurs (details will be in status error array)

Return content will be a document object.
Errors pertaining to the document will be in the status property of the document object.

The URL parameter ?ignoreConflict=1 can be passed to bypass ETAG checking (see reference
above in 'GetDoc') and force the document to be written on the server.

Note that if the text on the server is changed during the save process (for example
by a source control hook) the new text will be returned in the content array
of the returned document.

Here is an example of a PUT for the document xyz.mac

    {
     "enc": false,
     "content": [
       "ROUTINE xyz",
       "xyz ;",
       "   w \"hello""
       ]
    }
    



and the corresponding response :-

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [
      ],
      "result": {
        "name": "xyz.mac",
        "db": "IRISSYS",
        "ts": "2016-01-12 17:18:29.332",
        "cat": "RTN",
        "status": "",
        "enc": false,
        "content": []
      }
    }
    

Reimplemented in v2.

◆ Query()

_.Library.Status Query ( _.Library.String  pNamespace)
static

This method returns the results of running the specified query in the specified namespace.


The request body is simply a JSON object which specifies the query
{
"query":"call %studio.debugger_processlist()",
"parameters" : []
}

HTTP Codes returned:-

HTTP 200 if OK
HTTP 415 if the we are not passed application/json as the content type
HTTP 500 if an error occurs (details will be in status error array)

Return content will be an array of objects. Errors will be in the status property of each document object.
The objects contain information relating to each row returned by the query.

    {
      "status": {
        "errors": [],
        "summary": ""
      },
      "console": [],
      "result": {
        "content": [
        ]
      }
    }
    

Reimplemented in v6.