Introduction to the InterSystems IRIS Source Code File REST API
This REST API provides access to InterSystems IRIS® data platform source code files. Our VS Code - ObjectScript IDE uses the API to perform the actions needed to access InterSystems IRIS code files, and you can use the API in your own code. 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.
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
-
PutDoc method updates an existing source code file, or, if the file does not exist, creates a new source code file.
-
DeleteDoc method deletes the specified source code file.
-
DeleteDocs method deletes the specified list of 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
-
GetEnsClassType method returns the class type for Ensemble objects.
-
GetAdpInputOutputClass method returns the input and output adapter class for production adapters.
-