pixiMetadata
Returns the input parameters of a Pixi API call with their names, data types and maximum lengths.
Looks up the input parameters of an API call in the SQL Server catalog view INFORMATION_SCHEMA.PARAMETERS of the current database.
- Every occurrence of
pixiinprocedureis replaced bypipi. The SOAP name (pixiItemSearch) and the SQL name (pipiItemSearch) can therefore both be passed. - If the resulting name does not start with
pipi, a status row withErrNr=403andErrMessage=No such API callis returned. - Then the parameters of the object are always returned:
- only objects in the current database (
SPECIFIC_CATALOG = DB_NAME()), - only parameters with
PARAMETER_MODE = 'IN', - the leading
@is removed from the parameter name, - sorted by the declared parameter position.
- only objects in the current database (
If the call does not exist, the parameter result set is empty.
Notes
- After the error row the procedure does not stop. In that case two result sets are returned: the error row in
SqlRowSet1and the (usually empty) parameter list inSqlRowSet2. Without an error the parameter list isSqlRowSet1. - Because execution continues, the parameters of a non-
pipiobject are still returned if an object with that name exists. REPLACEaffects every occurrence ofpixiin the name, not only the prefix. Case sensitivity of the replacement and the prefix check depends on the database collation.OUTPUTparameters (modeINOUT) and the return value of scalar functions are not listed. Default values and whether a parameter is required are not returned.CHARACTER_MAXIMUM_LENGTHisNULLfor non-character types and-1for(max)types.- Visibility in
INFORMATION_SCHEMAdepends on the permissions of the database user. - The catalog view is read with
NOLOCK.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
procedure
Required
|
varchar(50) string |
– |
Name of the API call whose parameters are requested. Either the SOAP name ( Example: |
Result set 1 · Only if the name (after replacing pixi with pipi) does not start with pipi.
Error status row.
| Column | Type | Description |
|---|---|---|
ErrNr
|
int |
Error number, always |
ErrMessage
|
varchar(16) string |
Error text |
Result set 2 · Always; empty if no matching object exists in the current database.
One row per input parameter of the call, ordered by declared position.
| Column | Type | Description |
|---|---|---|
CallName
Nullable |
nvarchar(128) string |
SQL name of the object ( |
ParameterName
Nullable |
nvarchar(128) string |
Parameter name without the leading |
DataType
Nullable |
nvarchar(128) string |
SQL data type of the parameter, e.g. |
DataTypeLength
Nullable |
int |
Maximum length in characters for character types; |
Response example
<SqlRowSet1>
<row>
<CallName>pipiMetadata</CallName>
<ParameterName>procedure</ParameterName>
<DataType>varchar</DataType>
<DataTypeLength>50</DataTypeLength>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| 403 | No such API call | The passed name does not start with `pixi` or `pipi`. Pass the SOAP or SQL name of an API call. The parameter result set follows anyway. |
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiMetadata>
<procedure>pixiGetItemInfo</procedure>
</ns1:pixiMetadata>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiMetadata>
<procedure>pixiGetItemInfo</procedure>
</ns1:pixiMetadata>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
'procedure' => 'pixiGetItemInfo',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiMetadata', $soapArguments);
- SQL object:
- dbo.pipiMetadata