Introduction to the InterSystems IRIS Source Code File REST API
This REST API provides access to InterSystems IRIS® source code files. We developed this API to allow Atelier, our Eclipse-based IDE, to access InterSystems IRIS code files on an InterSystems IRIS server. You can use the API to perform the actions needed to access InterSystems IRIS code files. These actions include:
Getting the namespaces available on an InterSystems IRIS instance
Finding the class definitions and routines defined in a namespace
Getting the text definitions of the classes and routines
Updating a class definition or routine
Creating a new class definition or routine
Deleting a class definition or routine
Compiling an InterSystems IRIS class or routine
Discovering properties of the InterSystems IRIS environment by performing SQL queries on tables
These actions provide the mechanisms to access InterSystems IRIS source code files. In order to create an InterSystems IRIS development environment, you should understand this API and have a comprehensive understanding of how the InterSystems IRIS source code files are used within InterSystems IRIS.
This is a special-purpose API. If you are creating a development environment or working on a similar application, such as a class browser, you may find this API useful. But, it is not a general-purpose REST API to access InterSystems IRIS objects.
If you want information about downloading Atelier and about using Atelier to develop InterSystems IRIS applications, see http://www.intersystems.com/atelierOpens in a new window, the Atelier home page, which provides links to downloading instructions and to the Atelier documentation.
This document describes versions 1 and 2 of the InterSystems IRIS Source Code File REST API. Future releases of InterSystems IRIS may support higher versions of this REST API that provide additional calls, but you will always be able to call the earlier versions. The APIs for version 1 include /v1/ in the URL and the APIs for version 2 include /v2/. You can find out the version of this API that is provided by InterSystems IRIS by calling the GetServer method.
The following describes the major capabilities of the API and the methods that provide them:
Getting information about the server environment:
GetServer method provides the important information about the server including the namespaces on the server.
GetNamespace method provides additional information about the specified namespace. It includes the list of databases that are mapped to the namespace.
HeadServer method provides header information about the server. You can call HeadServer to check if the server is available.
GetJobs method provides information about the jobs running in InterSystems IRIS.
GetCSPApps method provides information about the web applications defined by the server. These applications provide access to InterSystems IRIS.
Getting information about source code files:
GetDocNames method provides the names of the source code files in the namespace. You can optionally limit the files to a specific category of files or with a specific file type.
GetModifiedDocNames method provides the same names as GetDocNames, but additionally provides a hash for the database state. If you keep a local copy of the file, you can call GetModifiedDocNames and see if the document has changed since you last retrieved it.
GetDoc method gets the contents of the specified source code file. You can optionally use the ETAG and If-None-Match headers to only get the contents of the source code file if it has changed since the previous time you retrieved it.
GetDocs method gets the contents of the specified files.
Index method provides some key properties of the class definitions in the namespace. Your application can use this information to select the class definitions to access.
HeadDoc method provides header information about source code files.
Creating, updating, and deleting source code files
Compiling source code files
Compile method compiles the source code file.
Performing SQL queries to get information from InterSystems IRIS tables
Query method performs an SQL query on any InterSystems IRIS database.
Searching in source code files
Search method searches source code files in the InterSystems IRIS database.
Special calls for dealing with Ensemble classes