Metadata Procedure Parameters


Metadata Procedure Parameters


This operation returns information about a stored procedure’s parameters.

Request

GET https://cloud.cdata.com/api/procedureParameters

Query String Parameters

Parameter Description Notes
catalogName Restricts results to the specified catalog. Optional
schemaName Restricts results to the specified schema. Optional
procedureName Restricts results to the specified procedure. Optional
paramName Restricts results to the specified procedure parameter. Optional

Response

HTTP 200 OK

{
    "results": [
        {
            "schema": [
                {
                    "ordinal": 0,
                    "catalogName": "CData",
                    "schemaName": "QueryFederation",
                    "tableName": "sys_procedureparameters",
                    "columnName": "PROCEDURE_CATALOG",
                    "columnLabel": "PROCEDURE_CATALOG",
                    "dataType": 5,
                    "dataTypeName": "VARCHAR",
                    "length": 255,
                    "precision": 255,
                    "scale": 0,
                    "nullable": true
                },
                {
                    "ordinal": 1,
                    "catalogName": "CData",
                    "schemaName": "QueryFederation",
                    "tableName": "sys_procedureparameters",
                    "columnName": "PROCEDURE_SCHEMA",
                    "columnLabel": "PROCEDURE_SCHEMA",
                    "dataType": 5,
                    "dataTypeName": "VARCHAR",
                    "length": 255,
                    "precision": 255,
                    "scale": 0,
                    "nullable": true
                },
                {
                    "ordinal": 2,
                    "catalogName": "CData",
                    "schemaName": "QueryFederation",
                    "tableName": "sys_procedureparameters",
                    "columnName": "PROCEDURE_NAME",
                    "columnLabel": "PROCEDURE_NAME",
                    "dataType": 5,
                    "dataTypeName": "VARCHAR",
                    "length": 512,
                    "precision": 512,
                    "scale": 0,
                    "nullable": true
                },
                
                (...)
                
            ],
            "rows": [
                [
                    "Salesforce1",
                    "Salesforce",
                    "CloseJob",
                    "JobId",
                    1,
                    5,
                    "varchar",
                    2000,
                    2000,
                    0,
                    "Id of the job being closed.",
                    true,
                    true,
                    1
                ]
            ],
            "affectedRows": -1
        }
    ]
}

Fields

Column Data Type Description
PROCEDURE_CATALOG String The catalog name.
PROCEDURE_SCHEMA String The schema name.
PROCEDURE_NAME String The procedure name.
PARAM_NAME String The procedure parameter name.
PARAM_TYPE Integer The parameter’s type. (See notes, below)
DATA_TYPE Integer The parameter’s data type.
TYPE_NAME String The name of the parameter’s data type. May be data-source-specific.
LENGTH Integer The parameter’s length.
PRECISION Integer; Nullable The parameter’s precision.
SCALE Integer; Nullable The parameter’s scale.
REMARKS String; Nullable A description of the parameter.
IS_NULLABLE Boolean; Nullable Whether the parameter is nullable.
IS_REQUIRED Boolean; Nullable Whether the parameter is required.
ORDINAL_POSITION Integer The parameter’s ordinal position. (See notes, below.)
  • Possible values for PARAM_TYPE are:
    • 1: Input parameter
    • 2: In/out parameter
    • 4: Output parameter
    • 5: Return value
  • ORDINAL_POSITION is a 1-based value for input, in/out, and output parameters. A value of 0 indicates a return value parameter.