Discovering REST Services
To use the /api/mgmnt service to discover the REST services that are available on an instance, use the following REST call:
-
For the HTTP action, select or specify GET.
-
For the URL, specify a URL of the following form, using the <baseURL> for your instance:
http://<baseURL>/api/mgmnt/v2/
Or, if you want to examine only one namespace:
http://<baseURL>/api/mgmnt/v2/:namespace
Where namespace is the namespace you want to examine.
(Note that these calls ignore manually-coded REST services. To discover manually-coded REST applications, use the calls GET /api/mgmnt/ and GET /api/mgmnt/:v1/:namespace/restapps.)
If the call is successful, InterSystems IRIS returns an array that lists the REST services, in JSON format. For example:
[
{
"name": "%Api.Mgmnt.v2",
"webApplications": "/api/mgmnt",
"dispatchClass": "%Api.Mgmnt.v2.disp",
"namespace": "%SYS",
"swaggerSpec": "/api/mgmnt/v2/%25SYS/%Api.Mgmnt.v2"
},
{
"name": "myapp",
"webApplications": "/api/myapp",
"dispatchClass": "myapp.disp",
"namespace": "USER",
"swaggerSpec": "/api/mgmnt/v2/USER/myapp"
}
]