fwConfig

Use the fwConfig resource to configure column widths for flat file source, lookup, and target objects.

GET Request

To request all of the fixed-width formats, use the following URI:

/api/v2/fwConfig

To request the details of a particular fixed-width format, you can include the fixed-width format ID or fixed-width format name in the URI. Use one of the following URIs:

/api/v2/fwConfig/<id>
/api/v2/fwConfig/name/<name>

If you use the fixed-width format name in the URI and the fixed-width format name includes a space, replace the space with %20. For example:

/api/v2/fwConfig/name/my%20fixedwidth%20format

GET Response

The fwConfig object returns the following attributes:

FieldTypeDescription
idFixed-width format ID.
nameFixed-width format name.
descriptionDescription of the fixed-width format.
createTimeTime that the fixed-width format was created.
updateTimeLast time that the fixed-width format was updated.
createdByUser who created the fixed-width format.
updatedByUser who last updated the fixed-width format.
lineSequentialWhether each row ends with a newline character.
True. Line sequential is enabled.
False. Line sequential is not enabled.
padBytesNumber of bytes between the last column of one row and the first column of the next.
skipRowsNumber of rows to skip. You can skip blank or header rows.
nullCharThe character to represent a null value.
dateFormatDefault date format to use when a date format is not specified in the flat file connection.
nullCharTypeDetermines if the null character is single-byte or multibyte.
repeatNullCharDetermines how to treat null characters in a single field.
True. Read repeat null characters as a single null value.
False. does not read repeat null characters as a single null value.
stripTrailingBlankDetermines how to treat trailing blanks in string values.
True. Removes trailing blanks from string values.
False. Does not remove trailing blanks in string values.
columnsIncludes the following attributes for each column:
name. Name of the column.
nativeType. Native data type.
precision. Length of the field in bytes.
scale. Number of digits after the decimal point for numeric values.

GET Example

The following example shows a request to get details for a fixed-width format using the fixed-width format ID:

GET <serverUrl>/api/v2/fwConfig/00001R29000000000002
Accept:application/json
icSessionId: <icSessionId>

The following text is a sample response:

"@type": "fwConfig",
  "id": "00001R29000000000002",
  "orgId": "00001R",
  "name": "item",
  "description": "",
  "createTime": "2016-10-06T17:08:09.000Z",
  "updateTime": "2016-10-06T17:08:09.000Z",
  "createdBy": "[email protected]",
  "updatedBy": "[email protected]",
  "lineSequential": true,
  "padBytes": 0,
  "skipRows": 0,
  "nullChar": "*",
  "nullCharType": "ASCII",
  "repeatNullChar": false,
  "stripTrailingBlank": false,
  "dateFormat": "",
  "columns": [
    {
      "@type": "fwColumn",
      "name": "COLUMN_0",
      "nativeType": "string",
      "precision": 1,
      "physicalLength": 0,
      "scale": 0
    },
    {
      "@type": "fwColumn",
      "name": "COLUMN_1",
      "nativeType": "string",
      "precision": 9,
      "physicalLength": 0,
      "scale": 0
    },
    {
      "@type": "fwColumn",
      "name": "COLUMN_2",
      "nativeType": "string",
      "precision": 10,
      "physicalLength": 0,
      "scale": 0
    }
  ]
}

POST Request

To update a fixed-width format, use the fixed-width format ID in the following URI. To create a fixed-width format, omit the optional ID.

/api/v2/fwConfig/<id>

You can submit a partial update using partial mode. If you want to update a field in the fwColumn object using partial mode, you must include the name. To submit a request using partial mode, use a JSON request and include the following line in the header:

Update-Mode=PARTIAL

You can use the following attributes in a fwConfig POST request:

FieldTypeRequiredDescription
idFixed-width format ID.
nameFixed-width format name.
descriptionDescription of the fixed-width format.
lineSequentialWhether each row ends with a newline character.
True. Line sequential is enabled.
False. Line sequential is not enabled.
padBytesNumber of bytes between the last column of one row and the first column of the next
skipRowsNumber of rows to skip. You can skip blank or header rows.
nullCharThe character to represent a null value.
dateFormatDefault date format to use when a date format is not specified in the flat file connection
nullCharTypeDetermines if the null character is single-byte or multibyte.
repeatNullCharDetermines how to treat null characters in a single field.
True. Read repeat null characters as a single null value.
False. does not read repeat null characters as a single null value.
stripTrailingBlankDetermines how to treat trailing blanks in string values.
True. Removes trailing blanks from string values.
False. Does not remove trailing blanks in string values.
columnsIncludes the following attributes for each column:
name. Name of the column.
nativeType. Native data type.
precision. Length of the field in bytes.
scale. Number of digits after the decimal point for numeric values.

POST Response

If successful, returns the fwConfig object that you created or updated. Returns the error object if errors occur.

POST Example

POST /api/v2/fwConfig/00000103000000000004
Content-Type: application/json
Accept: application/json
{
"@type": "fwConfig",
"name": "FW_FILE_CONFIG_1",
"description": "Test description",
"lineSequential": false,
"padBytes": 1,
"skipRows": 2,
"nullChar": "*",
"nullCharType": "ASCII",
"repeatNullChar": false,
"stripTrailingBlank": false,
"columns": [
{
"@type": "fwColumn",
"name": "ASCII",
"nativeType": "string",
"precision": 10
}
]
}

DELETE Request

/api/v2/fwConfig/<id>

To delete a fixed-width format, use the fixed-width format ID in the following URI:

DELETE Response

Returns the 200 response code if the request is successful.
Returns the error object if errors occu