curl --request PUT \
--url https://{FUSION HOST}/api/parsers/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"detectMediaTypeBasedOnExtension": true,
"enableMediaTypeDetection": true,
"id": "<string>",
"idField": "<string>",
"maxFieldLength": 123,
"maxParserDepth": 123,
"parserStages": [
{
"enabled": true,
"errorHandling": "fail",
"id": "<string>",
"ignoredMediaTypes": [
"<string>"
],
"inheritMediaTypes": true,
"label": "<string>",
"mediaTypes": [
"<string>"
],
"outputFieldPrefix": "<string>",
"pathPatterns": [
{
"pattern": "<string>",
"syntax": "glob"
}
]
}
]
}'
{
"detectMediaTypeBasedOnExtension": true,
"enableMediaTypeDetection": true,
"id": "<string>",
"idField": "<string>",
"maxFieldLength": 123,
"maxParserDepth": 123,
"parserStages": [
{
"enabled": true,
"errorHandling": "fail",
"id": "<string>",
"ignoredMediaTypes": [
"<string>"
],
"inheritMediaTypes": true,
"label": "<string>",
"mediaTypes": [
"<string>"
],
"outputFieldPrefix": "<string>",
"pathPatterns": [
{
"pattern": "<string>",
"syntax": "glob"
}
]
}
]
}
The request is a JSON body containing the parser’s new attributes. The parser id
must be included in the JSON body. Use GET to fetch the current attributes.
curl --request PUT \
--url https://{FUSION HOST}/api/parsers/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"detectMediaTypeBasedOnExtension": true,
"enableMediaTypeDetection": true,
"id": "<string>",
"idField": "<string>",
"maxFieldLength": 123,
"maxParserDepth": 123,
"parserStages": [
{
"enabled": true,
"errorHandling": "fail",
"id": "<string>",
"ignoredMediaTypes": [
"<string>"
],
"inheritMediaTypes": true,
"label": "<string>",
"mediaTypes": [
"<string>"
],
"outputFieldPrefix": "<string>",
"pathPatterns": [
{
"pattern": "<string>",
"syntax": "glob"
}
]
}
]
}'
{
"detectMediaTypeBasedOnExtension": true,
"enableMediaTypeDetection": true,
"id": "<string>",
"idField": "<string>",
"maxFieldLength": 123,
"maxParserDepth": 123,
"parserStages": [
{
"enabled": true,
"errorHandling": "fail",
"id": "<string>",
"ignoredMediaTypes": [
"<string>"
],
"inheritMediaTypes": true,
"label": "<string>",
"mediaTypes": [
"<string>"
],
"outputFieldPrefix": "<string>",
"pathPatterns": [
{
"pattern": "<string>",
"syntax": "glob"
}
]
}
]
}
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
The entity ID
The app to which this object belongs, as app:SomeApp
. If the app doesn't exist, the request fails. Other comma-separated contexts in the context
parameter are allowed but ignored.
OK
The response is of type object
.
Was this page helpful?