DELETE InputFields -> Deleting input fields

Explains how to use the DELETE method to delete input fields from the repository.

Calling this method allows to delete input fields from the repository.

To delete, the key values of the object to be deleted must be saved in a file in JSON format, and this file is then sent in the request data. The names of the field values correspond to the field names in repository table “InputFields”, and are not case sensitive.

The individual input field objects are embedded within the JSON array “InputFields”, this identifier is also not case sensitive.

Note: Input fields have a position (sequence number) within a table. If a field is deleted, a gap will be created in the numbering of the fields within the table, which should not be the case. As a standard, the position numbers of the fields following the deleted field are automatically reduced, so that a consistent, ascending order of the field positions is guaranteed again. If this behavior is not desired, this can be achieved by setting the parameter “updatesequencenumbers=n” in the query data.
A field is to be deleted from the repository table InputFields. To do this, a JSON file “data.json” with the following content is created.
{
"InputFields": [
{"GroupId": "DEFAULT",
"SourceType": "ADABAS",
"SourceName": "00010.00010",
"FieldSequence": 1,
"FieldName": "ISN",
"ValidFrom": "0000-00-00-00.00.00.000000",
"ValidUntil": "9999-99-99-99.99.99.999999"
}
]
}

This file is then passed in the call.

{"UpdateSequenceNumbers":true,"Input fields deleted":[
{"GroupId":"DEFAULT","SourceType":"ADABAS","SourceName":"00010.00010","FieldSequence":1,"FieldName":"ISN","ValidFrom":"0000-00-00-00.00.00.000000","ValidUntil":"9999-99-99-99.99.99.999999"}
]}curl -d @data.json -H "@auth" -iX DELETE "http://127.0.0.1:8080/InputFields"
Two fields are to be deleted from the repository table InputFields. To do this, a JSON file “data.json” with the following content is created.
Important: In order to ensure the correct numbering of the remaining fields in the table, the position numbers of the fields following the field to be deleted are corrected. Therefore, when deleting multiple fields within a table, it is important to specify the fields in descending order. Otherwise, after deleting position 1, position 2 to be deleted would itself be position 1 and deleting the second field would fail due to an object not being found in the repository.
{
"InputFields": [
{"GroupId": "DEFAULT",
"SourceType": "ADABAS",
"SourceName": "00010.00010",
"FieldSequence": 2,
"FieldName": "ADABAS_AA",
"ValidFrom": "0000-00-00-00.00.00.000000",
"ValidUntil": "9999-99-99-99.99.99.999999"
},
{"GroupId": "DEFAULT",
"SourceType": "ADABAS",
"SourceName": "00010.00010",
"FieldSequence": 1,
"FieldName": "ISN",
"ValidFrom": "0000-00-00-00.00.00.000000",
"ValidUntil": "9999-99-99-99.99.99.999999"
}
]
}

This file is then passed in the call.

curl -d @data.json -H "@auth" -iX DELETE "http://127.0.0.1:8080/InputFields"
HTTP/1.1 200 OK

{"UpdateSequenceNumbers":true,"Input fields deleted":[
{"GroupId":"DEFAULT","SourceType":"ADABAS","SourceName":"00010.00010","FieldSequence":2,"FieldName":"ADABAS_AA","ValidFrom":"0000-00-00-00.00.00.000000","ValidUntil":"9999-99-99-99.99.99.999999"},
{"GroupId":"DEFAULT","SourceType":"ADABAS","SourceName":"00010.00010","FieldSequence":1,"FieldName":"ISN","ValidFrom":"0000-00-00-00.00.00.000000","ValidUntil":"9999-99-99-99.99.99.999999"}
]}