REST API: SQL Schemas

Obtain a list of schemas associated with the data source. The SQL Schemas service implements a CA IDMS Server JDBC API method getSchemas within the class IdmsDatabaseMetaData.
HTTP Method and URI Path
The URI path has the following format:
GET
<base url>
/sql/schemas/
<datasource>
?
<query parameters>
Where:
  • <base URL>
    Specifies the base URL address for the CA IDMS REST API service
  • <datasource>
    (required) Identifies the CA IDMS system where the API request is to be sent and is defined in the datasources.yml file
  • <query parameters>
    (optional) The following parameters can be used to filter results. See "About Parameters and Parameter Values" for usage information.
    • schemaPattern -- Filter pattern for the schema name
About Parameters and Parameter Values:
  • The parameter "catalog" is not used within CA IDMS.
  • The filtering parameters allow the wildcards
    %
    and
    _
    . Within a pattern string,
    %
    means match any substring of 0 or more characters, and
    _
    means match any one character. Only metadata entries matching the search pattern are returned. In the URL, the
    %
    must be encoded as
    %25
    .
    To see examples of ways to use wildcards in your request, see Examples for Specifying Patterns.
  • Parameter values are case sensitive.
By default, the Schemas endpoint returns only schemas that are accessible to the current user. To display all schemas when the endpoint is run, use the following SQL statement:
DROP VIEW SYSCA.ACCESSIBLE_SCHEMAS; CREATE VIEW SYSCA.ACCESSIBLE_SCHEMAS ( SCHEMA ) AS SELECT NAME FROM SYSTEM.SCHEMA;
Example: Returns all schemas accessible to the user (no schema pattern used)
https://zoshost.domain.com:10010/api/v1/sql/schemas/SYSDEMO
Response:
{ "schemas": [ { "tableCatalog": null, "tableSchema": "DEMOEMPL" }, { "tableCatalog": null, "tableSchema": "DEMOPROJ" }, { "tableCatalog": null, "tableSchema": "DUCMP00V" }, { "tableCatalog": null, "tableSchema": "LKYS" }, { "tableCatalog": null, "tableSchema": "NET" }, { "tableCatalog": null, "tableSchema": "REL" }, { "tableCatalog": null, "tableSchema": "R162SNET" }, { "tableCatalog": null, "tableSchema": "R162SSQL" }, { "tableCatalog": null, "tableSchema": "SYSCA" }, { "tableCatalog": null, "tableSchema": "SYSTEM" }, { "tableCatalog": null, "tableSchema": "SYSVNTWK5" }, { "tableCatalog": null, "tableSchema": "SYSVSYST5" }, { "tableCatalog": null, "tableSchema": "VSMSCHMC" }, { "tableCatalog": null, "tableSchema": "WWDBLAB" } ], "errors": [] }
Example:
Returns the schema named "DEMOEMPL"
https://zoshost.domain.com:10010/api/v1/sql/schemas/SYSDEMO?schemaPattern=DEMOEMPL%25
Response:
{ "schemas": [ { "tableCatalog": null, "tableSchema": "DEMOEMPL" } ], "errors": [] }