Request

Response

    Renders parameters for display.
    POST

    v1/parameters:render

    Renders the parameters from the source unit or symbol to the target unit or symbol with the number format and precision. The maximum number of parameters per chunk is 50.

    Resource Information

    Method and URI
    POST
    https://developer.api.autodesk.com/parameters/v1/parameters:render
    Authentication Context
    user context required
    Required OAuth Scopes
    data:read
    Data Format
    JSON

    Request

    Headers

    Authorization*
    string
    Must be Bearer <token>, where <token> is obtained via a three-legged OAuth flow.
    Content-Type*
    string
    Must be application/json
    Region
    string
    The region the hub’s data is provisioned in. Currently supports US, EMEA, AUS, IND, DEU, JPN, CAN, and GBR. Default is US.
    * Required

    Request

    Body Structure

    Object:Array

    sourceParameterValue*
    number
    The parameter value of the source unit or symbol.
    sourceUnitOrSymbolId*
    string
    The source unit or symbol ID. Look up detailed information in the response of the GET /units API.
    targetUnitOrSymbolId*
    string
    The target unit or symbol ID. Look up detailed information in the response of the GET /units API. There will be no symbol in the target value string if this value is set to a unit.
    numberFormat
    string
    The number format of the target parameter value string. It is optional and the value could be FIXED_POINT or FRACTION. The default value is FIXED_POINT.
    precision
    int
    The precision of the target parameter value string. It is optional and the default value is 4. Number from 0 to 12 indicating how many decimal places to render. Or from 0 to 9 indicating how precisely to round the fraction.
    * Required

    Response

    HTTP Status Code Summary

    200
    OK
    Successful retrieval of the rendered parameters.
    207
    Partial Success
    Partially successful retrieval of the rendered parameters.
    400
    Bad Request
    The request could not be understood by the server due to malformed syntax.
    401
    Unauthorized
    Request has not been applied because it lacks valid authentication credentials for the target resource.
    403
    Forbidden
    The server understood the request but refuses to authorize it.
    404
    Not Found
    The resource cannot be found.
    406
    Not Acceptable
    The server cannot produce a response matching the list of acceptable values defined in the request.
    410
    Access to the target resource is no longer available.
    429
    Too Many Requests
    User has sent too many requests in a given amount of time.
    500
    Internal Server Error
    An unexpected error occurred on the server.
    503
    Service Unavailable
    Server is not ready to handle the request.

    Response

    Body Structure (200)

    Expand all
    results
    array: object
    The parameters render results.
    sourceParameterValue
    number
    The parameter value of the source unit or symbol.
    sourceUnitOrSymbolId
    string
    The source unit or symbol Id. Look up detailed information in the response of the GET /units API.
    targetUnitOrSymbolId
    string
    The target unit or symbol Id. Look up detailed information in the response of the GET /units API.
    numberFormat
    string
    The number format of the target parameter value string.
    precision
    int
    The precision of the target parameter value string.
    targetParameterValue
    number
    The parameter value of the target unit or symbol.
    targetParameterValueString
    string
    The parameter value string of the target unit or symbol with the number format and precision.

    Body Structure (207)

    Expand all
    results
    array: object
    The parameters render results.
    sourceParameterValue
    number
    The parameter value of the source unit or symbol.
    sourceUnitOrSymbolId
    string
    The source unit or symbol Id.
    targetUnitOrSymbolId
    string
    The target unit or symbol Id. Look up detailed information in the response of the GET /units API.
    numberFormat
    string
    The number format of the target parameter value string.
    precision
    int
    The precision of the target parameter value string.
    targetParameterValue
    number
    The parameter value of the target unit or symbol.
    targetParameterValueString
    string
    The parameter value string of the target unit or symbol with the number format and precision.
    errors
    array: object
    The errors.
    sourceParameterValue
    number
    The parameter value of the source unit or symbol.
    sourceUnitOrSymbolId
    string
    The source unit or symbol Id.
    targetUnitOrSymbolId
    string
    The target unit or symbol Id. Look up detailed information in the response of the GET /units API.
    numberFormat
    string
    The number format of the target parameter value string.
    precision
    int
    The precision of the target parameter value string.
    errors
    array: object
    title
    string
    The error title.
    detail
    string
    The error detail.

    Example

    Successful retrieval of the rendered parameters (200).

    Request

    curl -v 'https://developer.api.autodesk.com/parameters/v1/parameters:render' \
      -X 'POST' \
      -H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
      -H 'Content-Type: application/json' \
      -d '[
            {
              "sourceParameterValue": 100,
              "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
              "numberFormat": "FIXED_POINT",
              "precision": 14
            },
            {
              "sourceParameterValue": 100,
              "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
              "numberFormat": "FRACTION",
              "precision": 10
            },
            {
              "sourceParameterValue": 100,
              "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.unit:1ToRatio-1.0.1",
              "numberFormat": "FRACTION",
              "precision": 4
            },
            {
              "sourceParameterValue": 188,
              "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
              "numberFormat": "FIXED_POINT",
              "precision": 4
            },
            {
              "sourceParameterValue": 188,
              "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
              "numberFormat": "FIXED_POINT",
              "precision": 4
            },
            {
              "sourceParameterValue": 188,
              "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.unit:inches-1.0.1",
              "numberFormat": "FIXED_POINT",
              "precision": 4
            },
            {
              "sourceParameterValue": 188,
              "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.symbol:metersAndCentimeters-1.0.0",
              "numberFormat": "FIXED_POINT",
              "precision": 4
            },
            {
              "sourceParameterValue": 188,
              "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.symbol:inchDoubleQuote-1.0.1",
              "numberFormat": "FIXED_POINT",
              "precision": 4
            },
            {
              "sourceParameterValue": 188,
              "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
              "targetUnitOrSymbolId": "autodesk.unit.unit:feet-1.0.1",
              "numberFormat": "FRACTION",
              "precision": 4
            }
          ]'
    
    Show More

    Response

    {
      "results": [
        {
          "sourceParameterValue": 188,
          "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
          "numberFormat": "FIXED_POINT",
          "precision": 4,
          "targetParameterValue": 6.167979002624672,
          "targetParameterValueString": "6.1680 ft"
        },
        {
          "sourceParameterValue": 188,
          "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
          "numberFormat": "FIXED_POINT",
          "precision": 4,
          "targetParameterValue": 6.167979002624672,
          "targetParameterValueString": "6.1680 ft"
        },
        {
          "sourceParameterValue": 188,
          "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.unit:inches-1.0.1",
          "numberFormat": "FIXED_POINT",
          "precision": 4,
          "targetParameterValue": 74.01574803149606,
          "targetParameterValueString": "74.0157"
        },
        {
          "sourceParameterValue": 188,
          "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.symbol:metersAndCentimeters-1.0.0",
          "numberFormat": "FIXED_POINT",
          "precision": 4,
          "targetParameterValue": 1.8800000000000001,
          "targetParameterValueString": "1m 88.0000cm"
        },
        {
          "sourceParameterValue": 188,
          "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.symbol:inchDoubleQuote-1.0.1",
          "numberFormat": "FIXED_POINT",
          "precision": 4,
          "targetParameterValue": 74.01574803149606,
          "targetParameterValueString": "74.0157\""
        },
        {
          "sourceParameterValue": 188,
          "sourceUnitOrSymbolId": "autodesk.unit.unit:centimeters-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.unit:feet-1.0.1",
          "numberFormat": "FRACTION",
          "precision": 4,
          "targetParameterValue": 6.167979002624672,
          "targetParameterValueString": "6 3/16"
        }
      ],
      "errors": [
        {
          "sourceParameterValue": 100,
          "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
          "numberFormat": "FIXED_POINT",
          "precision": 14,
          "errors": [
            {
              "title": "Bad request",
              "detail": "The precision must be from 0 to 12 indicating how many decimal places to render"
            }
          ]
        },
        {
          "sourceParameterValue": 100,
          "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.symbol:ft-1.0.1",
          "numberFormat": "FRACTION",
          "precision": 10,
          "errors": [
            {
              "title": "Bad request",
              "detail": "The precision must be from 0 to 9 indicating how precisely to round the fraction"
            }
          ]
        },
        {
          "sourceParameterValue": 100,
          "sourceUnitOrSymbolId": "autodesk.unit.symbol:cm-1.0.1",
          "targetUnitOrSymbolId": "autodesk.unit.unit:1ToRatio-1.0.1",
          "numberFormat": "FRACTION",
          "precision": 4,
          "errors": [
            {
              "title": "Bad request",
              "detail": "Cannot convert between units autodesk.unit.unit:centimeters-1.0.1 and autodesk.unit.unit:1ToRatio-1.0.1."
            }
          ]
        }
      ]
    }
    
    Show More