Get Specified Data Type

Return a specific data type for the specified tenant.

Command

GET https://{server}/api/v1/{tenantId}/dataTypes/{id}

Parameters

Name

Required

Data Type

Description

Parameter Type

tenantId

Yes

String

Unique identifier of the tenant.

Path

id

Yes

String

Unique identifier of the data type.

Path

Responses

Status and Error Codes

See Common Status and Error Codes.

Successful Response Body

Field

Description

hostId

The identifier of the host instance that is returning the request.

status

The status of the request. Valid values:

  • SUCCESS - The operation was a success.

  • ERROR - A validation error occurred.

content

Returns a list of the available data types. See Using Data Types for more information.

Field

Description

name

Name of the data type.

parameterDefns

An array of parameter definitions.

Field

Description

name

The name of the parameter.

type

The type of parameter.

defaultValue

The default value, if any.

required

Indicates whether the parameter is required.

listEndPoint

The path and selection filters for the picklist values.

list

Used in the UI to list the API formats that are supported for API connection definitions.

dataTypeDefnId

The ID of the datatype definition.

messages

If the status is SUCCESS, this field is always blank. If the status is ERROR, a validation error occurred. For example, the data type ID in the URL is invalid.

count

The number of records returned.

Examples

Sample API Call

GET http://company.com/api/v1/pX3459712f8/dataTypes/DECIMAL.6
X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB=

Successful Responses

Response Body Sample

{
    "hostId": "74dc80f2340e21c8c930e59c50d06f7a",
    "status": "SUCCESS",
    "content": {
        "name": "Decimal (15, 6)",
        "parameterDefns": [
            {
                "name": "roundingMode",
                "type": "STRING",
                "defaultValue": "HALF_UP",
                "required": false,
                "listEndPoint": null,
                "list": [
                    "UP",
                    "DOWN",
                    "CEILING",
                    "FLOOR",
                    "HALF_UP",
                    "HALF_DOWN",
                    "HALF_EVEN"
                ]
            }
        ],
        "dataTypeDefnId": "DECIMAL.6"
    },
    "messages": [],
    "count": 1
}

Error Responses

Response Body Error Sample - Invalid Data Type ID in URL

{
    "hostId": "53c2c8e726442aea9b1ba3d3c1ba6a01",
    "status": "ERROR",
    "content": null,
    "messages": [
        {
            "type": "ERROR",
            "message": "Invalid value for dataTypeDefnId TXT",
            "code": "error.invalidDataTypeDefn",
            "arguments": {
                "dataTypeDefn": "TXT"
            },
            "key": "global"
        }
    ],
    "count": -1
}