curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/customFileTypes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"filenamePattern": "<string>",
"name": "<string>",
"fileImportSettings": {
"android": {
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"asciidoc": {
"extractBtnMenuLabels": true,
"extractCustomDocumentAttributeNameRegexp": "<string>",
"htmlInPassthrough": true,
"nontranslatableMonospaceCustomStylesRegexp": "<string>",
"tagRegexp": "<string>"
},
"autodetectMultilingualFiles": true,
"csv": {
"contextKeyColumn": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importColumns": "<string>",
"importRows": "<string>",
"maxLenColumn": "<string>",
"tagRegexp": "<string>"
},
"dita": {
"excludeTags": "<string>",
"extractSeparateSegmentsXpath": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"doc": {
"altText": true,
"applyTrackChanges": true,
"comments": true,
"headerFooter": true,
"hidden": true,
"hyperlinkTarget": true,
"index": true,
"joinSimilarRuns": true,
"ocrImageText": true,
"other": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"docBook": {
"excludeTags": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"html": {
"breakTagCreatesSegment": true,
"charEntitiesToTags": "<string>",
"escapeDisabled": true,
"excludeElements": "<string>",
"importComments": true,
"importDefaultAttributes": true,
"importDefaultMetaTags": true,
"nonTranslatableInlineElements": "<string>",
"preserveWhitespace": true,
"segmentationBeginTagPlaceholder": "<string>",
"segmentationEndTagPlaceholder": "<string>",
"segmentationSingleTagPlaceholder": "<string>",
"tagRegexp": "<string>",
"translatableAttributes": "<string>",
"translatableInlineElements": "<string>",
"translateMetaTagRegexp": "<string>",
"unknownTagCreatesTag": true,
"updateLang": true
},
"idml": {
"extractCrossReferenceFormats": true,
"extractHiddenConditionalText": true,
"extractHyperlinks": true,
"extractInvisibleLayers": true,
"extractLockedLayers": true,
"extractMasterSpreads": true,
"extractNotes": true,
"extractVariables": true,
"keepKerning": true,
"keepTracking": true,
"removeXmlElements": true,
"replaceFont": true,
"simplifyCodes": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"inputCharset": "<string>",
"json": {
"contextKeyPath": "<string>",
"contextNotePath": "<string>",
"excludeKeyRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"maxLenPath": "<string>",
"tagRegexp": "<string>"
},
"mac": {
"htmlSubfilter": true,
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"md": {
"customElements": "<string>",
"excludeCodeElements": true,
"extractCodeBlocks": true,
"hardLineBreaksSegments": true,
"ignoredBlockPrefixes": "<string>",
"notEscapedCharacters": "<string>",
"preserveWhiteSpaces": true,
"processJekyllFrontMatter": true,
"tagRegexp": "<string>"
},
"mif": {
"extractBodyPages": true,
"extractCustomReferencePages": true,
"extractDefaultReferencePages": true,
"extractHiddenCondText": true,
"extractHiddenPages": true,
"extractIndexMarkers": true,
"extractLinks": true,
"extractMasterPages": true,
"extractPgfNumFormat": true,
"extractReferencePages": true,
"extractUsedPgfNumFormat": true,
"extractUsedVariables": true,
"extractUsedXRefDef": true,
"extractVariables": true,
"extractXRefDef": true,
"tagRegexp": "<string>"
},
"multilingualCsv": {
"allTargetColumns": {},
"contextKeyColumns": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumns": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumns": "<string>",
"tagRegexp": "<string>",
"targetColumns": "<string>"
},
"multilingualXls": {
"contextKeyColumn": "<string>",
"contextNoteColumn": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumn": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumn": "<string>",
"tagRegexp": "<string>",
"targetColumns": {}
},
"multilingualXml": {
"contextKeyXPath": "<string>",
"contextNoteXPath": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"inlineElementsNonTranslatableXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceElementsXPath": "<string>",
"tagRegexp": "<string>",
"targetElementsXPaths": {},
"translatableElementsXPath": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"outputCharset": "<string>",
"pdf": {
"ocrMode": "<string>",
"wysiwyg": true
},
"php": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"po": {
"exportMultiline": true,
"htmlSubFilter": true,
"icuSubFilter": true,
"markupSubFilterNonTranslatable": "<string>",
"markupSubFilterTranslatable": "<string>",
"saveConfirmedSegments": true,
"segment": true,
"tagRegexp": "<string>",
"updateHeader": true
},
"ppt": {
"altText": true,
"hiddenSlides": true,
"masterSlides": true,
"notes": true,
"other": true
},
"properties": {
"tagRegexp": "<string>"
},
"psd": {
"extractHiddenLayers": true,
"extractLockedLayers": true,
"tagRegexp": "<string>"
},
"quarkTag": {
"removeKerningTrackingTags": true,
"tagRegexp": "<string>"
},
"resx": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"sdlXlf": {
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"saveConfirmedSegments": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>"
},
"segmentationRuleId": 123,
"targetLength": true,
"targetLengthMax": 123,
"targetLengthPercent": true,
"targetLengthPercentValue": 123,
"targetSegmentationRuleId": 123,
"tmMatch": {
"ignoreTagMetadata": true,
"penalizeMultiContextMatch": true,
"prevOrNextSegment": true
},
"ttx": {
"saveConfirmedSegments": true
},
"txt": {
"contextKey": "<string>",
"regexpCapturingGroups": true,
"tagRegexp": "<string>",
"translatableTextRegexp": "<string>"
},
"xlf": {
"contextType": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsConfirmedXPath": "<string>",
"importAsLockedRules": "<string>",
"importAsLockedXPath": "<string>",
"importNotes": true,
"importXPath": "<string>",
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xlf2": {
"contextKeyXPath": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"importNotes": true,
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"respectTranslateAttr": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xls": {
"comments": true,
"hidden": true,
"htmlSubfilter": true,
"other": true,
"sheetNames": true,
"specifiedColumns": "<string>",
"tagRegexp": "<string>"
},
"xml": {
"assistantProfile": "<string>",
"contextKeyXPath": "<string>",
"contextNoteXpath": "<string>",
"entities": true,
"excludeAttributesPlain": "<string>",
"excludeElementsPlain": "<string>",
"expandEntities": true,
"htmlSubfilterElementsPlain": "<string>",
"htmlSubfilterElementsXpath": "<string>",
"icuSubFilter": true,
"importComments": true,
"includeAttributesPlain": "<string>",
"includeElementsPlain": "<string>",
"includeXPath": "<string>",
"inlineElementsAutoPlain": true,
"inlineElementsAutoXPath": true,
"inlineElementsNonTranslatablePlain": "<string>",
"inlineElementsNonTranslatableXPath": "<string>",
"inlineElementsPlain": "<string>",
"inlineElementsXpath": "<string>",
"lockAttributesPlain": "<string>",
"lockElementsPlain": "<string>",
"lockXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespaceXPath": "<string>",
"segmentation": true,
"segmentationExclude": true,
"segmentationExcludedElementsXpath": "<string>",
"tagRegexp": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"yaml": {
"contextKeyPath": "<string>",
"contextPath": "<string>",
"excludeValueRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"indentEmptyLinesInString": true,
"markdownSubfilter": true,
"tagRegexp": "<string>",
"updateRootElementLang": true
},
"zipCharset": "<string>"
}
}
'import requests
url = "https://cloud.memsource.com/web/api2/v1/customFileTypes"
payload = {
"filenamePattern": "<string>",
"name": "<string>",
"fileImportSettings": {
"android": {
"icuSubFilter": True,
"tagRegexp": "<string>"
},
"asciidoc": {
"extractBtnMenuLabels": True,
"extractCustomDocumentAttributeNameRegexp": "<string>",
"htmlInPassthrough": True,
"nontranslatableMonospaceCustomStylesRegexp": "<string>",
"tagRegexp": "<string>"
},
"autodetectMultilingualFiles": True,
"csv": {
"contextKeyColumn": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": True,
"importColumns": "<string>",
"importRows": "<string>",
"maxLenColumn": "<string>",
"tagRegexp": "<string>"
},
"dita": {
"excludeTags": "<string>",
"extractSeparateSegmentsXpath": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"doc": {
"altText": True,
"applyTrackChanges": True,
"comments": True,
"headerFooter": True,
"hidden": True,
"hyperlinkTarget": True,
"index": True,
"joinSimilarRuns": True,
"ocrImageText": True,
"other": True,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"docBook": {
"excludeTags": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"html": {
"breakTagCreatesSegment": True,
"charEntitiesToTags": "<string>",
"escapeDisabled": True,
"excludeElements": "<string>",
"importComments": True,
"importDefaultAttributes": True,
"importDefaultMetaTags": True,
"nonTranslatableInlineElements": "<string>",
"preserveWhitespace": True,
"segmentationBeginTagPlaceholder": "<string>",
"segmentationEndTagPlaceholder": "<string>",
"segmentationSingleTagPlaceholder": "<string>",
"tagRegexp": "<string>",
"translatableAttributes": "<string>",
"translatableInlineElements": "<string>",
"translateMetaTagRegexp": "<string>",
"unknownTagCreatesTag": True,
"updateLang": True
},
"idml": {
"extractCrossReferenceFormats": True,
"extractHiddenConditionalText": True,
"extractHyperlinks": True,
"extractInvisibleLayers": True,
"extractLockedLayers": True,
"extractMasterSpreads": True,
"extractNotes": True,
"extractVariables": True,
"keepKerning": True,
"keepTracking": True,
"removeXmlElements": True,
"replaceFont": True,
"simplifyCodes": True,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"inputCharset": "<string>",
"json": {
"contextKeyPath": "<string>",
"contextNotePath": "<string>",
"excludeKeyRegexp": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"includeKeyRegexp": "<string>",
"maxLenPath": "<string>",
"tagRegexp": "<string>"
},
"mac": {
"htmlSubfilter": True,
"icuSubFilter": True,
"tagRegexp": "<string>"
},
"md": {
"customElements": "<string>",
"excludeCodeElements": True,
"extractCodeBlocks": True,
"hardLineBreaksSegments": True,
"ignoredBlockPrefixes": "<string>",
"notEscapedCharacters": "<string>",
"preserveWhiteSpaces": True,
"processJekyllFrontMatter": True,
"tagRegexp": "<string>"
},
"mif": {
"extractBodyPages": True,
"extractCustomReferencePages": True,
"extractDefaultReferencePages": True,
"extractHiddenCondText": True,
"extractHiddenPages": True,
"extractIndexMarkers": True,
"extractLinks": True,
"extractMasterPages": True,
"extractPgfNumFormat": True,
"extractReferencePages": True,
"extractUsedPgfNumFormat": True,
"extractUsedVariables": True,
"extractUsedXRefDef": True,
"extractVariables": True,
"extractXRefDef": True,
"tagRegexp": "<string>"
},
"multilingualCsv": {
"allTargetColumns": {},
"contextKeyColumns": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": True,
"importRows": "<string>",
"maxLenColumns": "<string>",
"saveConfirmedSegmentsToTm": True,
"segmentation": True,
"sourceColumns": "<string>",
"tagRegexp": "<string>",
"targetColumns": "<string>"
},
"multilingualXls": {
"contextKeyColumn": "<string>",
"contextNoteColumn": "<string>",
"htmlSubFilter": True,
"importRows": "<string>",
"maxLenColumn": "<string>",
"saveConfirmedSegmentsToTm": True,
"segmentation": True,
"sourceColumn": "<string>",
"tagRegexp": "<string>",
"targetColumns": {}
},
"multilingualXml": {
"contextKeyXPath": "<string>",
"contextNoteXPath": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"inlineElementsNonTranslatableXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespace": True,
"saveConfirmedSegmentsToTm": True,
"segmentation": True,
"sourceElementsXPath": "<string>",
"tagRegexp": "<string>",
"targetElementsXPaths": {},
"translatableElementsXPath": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"outputCharset": "<string>",
"pdf": {
"ocrMode": "<string>",
"wysiwyg": True
},
"php": {
"htmlSubFilter": True,
"tagRegexp": "<string>"
},
"po": {
"exportMultiline": True,
"htmlSubFilter": True,
"icuSubFilter": True,
"markupSubFilterNonTranslatable": "<string>",
"markupSubFilterTranslatable": "<string>",
"saveConfirmedSegments": True,
"segment": True,
"tagRegexp": "<string>",
"updateHeader": True
},
"ppt": {
"altText": True,
"hiddenSlides": True,
"masterSlides": True,
"notes": True,
"other": True
},
"properties": { "tagRegexp": "<string>" },
"psd": {
"extractHiddenLayers": True,
"extractLockedLayers": True,
"tagRegexp": "<string>"
},
"quarkTag": {
"removeKerningTrackingTags": True,
"tagRegexp": "<string>"
},
"resx": {
"htmlSubFilter": True,
"tagRegexp": "<string>"
},
"sdlXlf": {
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"icuSubFilter": True,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"saveConfirmedSegments": True,
"skipImportRules": "<string>",
"tagRegexp": "<string>"
},
"segmentationRuleId": 123,
"targetLength": True,
"targetLengthMax": 123,
"targetLengthPercent": True,
"targetLengthPercentValue": 123,
"targetSegmentationRuleId": 123,
"tmMatch": {
"ignoreTagMetadata": True,
"penalizeMultiContextMatch": True,
"prevOrNextSegment": True
},
"ttx": { "saveConfirmedSegments": True },
"txt": {
"contextKey": "<string>",
"regexpCapturingGroups": True,
"tagRegexp": "<string>",
"translatableTextRegexp": "<string>"
},
"xlf": {
"contextType": "<string>",
"copySourceToTargetIfNotImported": True,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"importAsConfirmedRules": "<string>",
"importAsConfirmedXPath": "<string>",
"importAsLockedRules": "<string>",
"importAsLockedXPath": "<string>",
"importNotes": True,
"importXPath": "<string>",
"lineBreakTags": True,
"preserveCharEntities": "<string>",
"preserveWhitespace": True,
"saveConfirmedSegments": True,
"segmentation": True,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": True,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xlf2": {
"contextKeyXPath": "<string>",
"copySourceToTargetIfNotImported": True,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"importNotes": True,
"lineBreakTags": True,
"preserveCharEntities": "<string>",
"preserveWhitespace": True,
"respectTranslateAttr": True,
"saveConfirmedSegments": True,
"segmentation": True,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": True,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xls": {
"comments": True,
"hidden": True,
"htmlSubfilter": True,
"other": True,
"sheetNames": True,
"specifiedColumns": "<string>",
"tagRegexp": "<string>"
},
"xml": {
"assistantProfile": "<string>",
"contextKeyXPath": "<string>",
"contextNoteXpath": "<string>",
"entities": True,
"excludeAttributesPlain": "<string>",
"excludeElementsPlain": "<string>",
"expandEntities": True,
"htmlSubfilterElementsPlain": "<string>",
"htmlSubfilterElementsXpath": "<string>",
"icuSubFilter": True,
"importComments": True,
"includeAttributesPlain": "<string>",
"includeElementsPlain": "<string>",
"includeXPath": "<string>",
"inlineElementsAutoPlain": True,
"inlineElementsAutoXPath": True,
"inlineElementsNonTranslatablePlain": "<string>",
"inlineElementsNonTranslatableXPath": "<string>",
"inlineElementsPlain": "<string>",
"inlineElementsXpath": "<string>",
"lockAttributesPlain": "<string>",
"lockElementsPlain": "<string>",
"lockXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespaceXPath": "<string>",
"segmentation": True,
"segmentationExclude": True,
"segmentationExcludedElementsXpath": "<string>",
"tagRegexp": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"yaml": {
"contextKeyPath": "<string>",
"contextPath": "<string>",
"excludeValueRegexp": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"includeKeyRegexp": "<string>",
"indentEmptyLinesInString": True,
"markdownSubfilter": True,
"tagRegexp": "<string>",
"updateRootElementLang": True
},
"zipCharset": "<string>"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filenamePattern: '<string>',
name: '<string>',
fileImportSettings: {
android: {icuSubFilter: true, tagRegexp: '<string>'},
asciidoc: {
extractBtnMenuLabels: true,
extractCustomDocumentAttributeNameRegexp: '<string>',
htmlInPassthrough: true,
nontranslatableMonospaceCustomStylesRegexp: '<string>',
tagRegexp: '<string>'
},
autodetectMultilingualFiles: true,
csv: {
contextKeyColumn: '<string>',
contextNoteColumns: '<string>',
delimiter: '<string>',
htmlSubFilter: true,
importColumns: '<string>',
importRows: '<string>',
maxLenColumn: '<string>',
tagRegexp: '<string>'
},
dita: {
excludeTags: '<string>',
extractSeparateSegmentsXpath: '<string>',
includeTags: '<string>',
inlineTags: '<string>',
inlineTagsNonTranslatable: '<string>',
tagRegexp: '<string>'
},
doc: {
altText: true,
applyTrackChanges: true,
comments: true,
headerFooter: true,
hidden: true,
hyperlinkTarget: true,
index: true,
joinSimilarRuns: true,
ocrImageText: true,
other: true,
tagRegexp: '<string>',
targetFont: '<string>'
},
docBook: {
excludeTags: '<string>',
includeTags: '<string>',
inlineTags: '<string>',
inlineTagsNonTranslatable: '<string>',
tagRegexp: '<string>'
},
html: {
breakTagCreatesSegment: true,
charEntitiesToTags: '<string>',
escapeDisabled: true,
excludeElements: '<string>',
importComments: true,
importDefaultAttributes: true,
importDefaultMetaTags: true,
nonTranslatableInlineElements: '<string>',
preserveWhitespace: true,
segmentationBeginTagPlaceholder: '<string>',
segmentationEndTagPlaceholder: '<string>',
segmentationSingleTagPlaceholder: '<string>',
tagRegexp: '<string>',
translatableAttributes: '<string>',
translatableInlineElements: '<string>',
translateMetaTagRegexp: '<string>',
unknownTagCreatesTag: true,
updateLang: true
},
idml: {
extractCrossReferenceFormats: true,
extractHiddenConditionalText: true,
extractHyperlinks: true,
extractInvisibleLayers: true,
extractLockedLayers: true,
extractMasterSpreads: true,
extractNotes: true,
extractVariables: true,
keepKerning: true,
keepTracking: true,
removeXmlElements: true,
replaceFont: true,
simplifyCodes: true,
tagRegexp: '<string>',
targetFont: '<string>'
},
inputCharset: '<string>',
json: {
contextKeyPath: '<string>',
contextNotePath: '<string>',
excludeKeyRegexp: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
includeKeyRegexp: '<string>',
maxLenPath: '<string>',
tagRegexp: '<string>'
},
mac: {htmlSubfilter: true, icuSubFilter: true, tagRegexp: '<string>'},
md: {
customElements: '<string>',
excludeCodeElements: true,
extractCodeBlocks: true,
hardLineBreaksSegments: true,
ignoredBlockPrefixes: '<string>',
notEscapedCharacters: '<string>',
preserveWhiteSpaces: true,
processJekyllFrontMatter: true,
tagRegexp: '<string>'
},
mif: {
extractBodyPages: true,
extractCustomReferencePages: true,
extractDefaultReferencePages: true,
extractHiddenCondText: true,
extractHiddenPages: true,
extractIndexMarkers: true,
extractLinks: true,
extractMasterPages: true,
extractPgfNumFormat: true,
extractReferencePages: true,
extractUsedPgfNumFormat: true,
extractUsedVariables: true,
extractUsedXRefDef: true,
extractVariables: true,
extractXRefDef: true,
tagRegexp: '<string>'
},
multilingualCsv: {
allTargetColumns: {},
contextKeyColumns: '<string>',
contextNoteColumns: '<string>',
delimiter: '<string>',
htmlSubFilter: true,
importRows: '<string>',
maxLenColumns: '<string>',
saveConfirmedSegmentsToTm: true,
segmentation: true,
sourceColumns: '<string>',
tagRegexp: '<string>',
targetColumns: '<string>'
},
multilingualXls: {
contextKeyColumn: '<string>',
contextNoteColumn: '<string>',
htmlSubFilter: true,
importRows: '<string>',
maxLenColumn: '<string>',
saveConfirmedSegmentsToTm: true,
segmentation: true,
sourceColumn: '<string>',
tagRegexp: '<string>',
targetColumns: {}
},
multilingualXml: {
contextKeyXPath: '<string>',
contextNoteXPath: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
inlineElementsNonTranslatableXPath: '<string>',
maxLenXPath: '<string>',
preserveCharEntities: '<string>',
preserveWhitespace: true,
saveConfirmedSegmentsToTm: true,
segmentation: true,
sourceElementsXPath: '<string>',
tagRegexp: '<string>',
targetElementsXPaths: {},
translatableElementsXPath: '<string>',
xslFile: '<string>',
xslUrl: '<string>'
},
outputCharset: '<string>',
pdf: {ocrMode: '<string>', wysiwyg: true},
php: {htmlSubFilter: true, tagRegexp: '<string>'},
po: {
exportMultiline: true,
htmlSubFilter: true,
icuSubFilter: true,
markupSubFilterNonTranslatable: '<string>',
markupSubFilterTranslatable: '<string>',
saveConfirmedSegments: true,
segment: true,
tagRegexp: '<string>',
updateHeader: true
},
ppt: {
altText: true,
hiddenSlides: true,
masterSlides: true,
notes: true,
other: true
},
properties: {tagRegexp: '<string>'},
psd: {extractHiddenLayers: true, extractLockedLayers: true, tagRegexp: '<string>'},
quarkTag: {removeKerningTrackingTags: true, tagRegexp: '<string>'},
resx: {htmlSubFilter: true, tagRegexp: '<string>'},
sdlXlf: {
exportAttrsWhenConfirmedAndLocked: '<string>',
exportAttrsWhenConfirmedAndNotLocked: '<string>',
exportAttrsWhenNotConfirmedAndLocked: '<string>',
exportAttrsWhenNotConfirmedAndNotLocked: '<string>',
icuSubFilter: true,
importAsConfirmedRules: '<string>',
importAsLockedRules: '<string>',
saveConfirmedSegments: true,
skipImportRules: '<string>',
tagRegexp: '<string>'
},
segmentationRuleId: 123,
targetLength: true,
targetLengthMax: 123,
targetLengthPercent: true,
targetLengthPercentValue: 123,
targetSegmentationRuleId: 123,
tmMatch: {
ignoreTagMetadata: true,
penalizeMultiContextMatch: true,
prevOrNextSegment: true
},
ttx: {saveConfirmedSegments: true},
txt: {
contextKey: '<string>',
regexpCapturingGroups: true,
tagRegexp: '<string>',
translatableTextRegexp: '<string>'
},
xlf: {
contextType: '<string>',
copySourceToTargetIfNotImported: true,
exportAttrsWhenConfirmedAndLocked: '<string>',
exportAttrsWhenConfirmedAndNotLocked: '<string>',
exportAttrsWhenNotConfirmedAndLocked: '<string>',
exportAttrsWhenNotConfirmedAndNotLocked: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
importAsConfirmedRules: '<string>',
importAsConfirmedXPath: '<string>',
importAsLockedRules: '<string>',
importAsLockedXPath: '<string>',
importNotes: true,
importXPath: '<string>',
lineBreakTags: true,
preserveCharEntities: '<string>',
preserveWhitespace: true,
saveConfirmedSegments: true,
segmentation: true,
skipImportRules: '<string>',
tagRegexp: '<string>',
updateTargetLanguage: true,
xslFile: '<string>',
xslUrl: '<string>'
},
xlf2: {
contextKeyXPath: '<string>',
copySourceToTargetIfNotImported: true,
exportAttrsWhenConfirmedAndLocked: '<string>',
exportAttrsWhenConfirmedAndNotLocked: '<string>',
exportAttrsWhenNotConfirmedAndLocked: '<string>',
exportAttrsWhenNotConfirmedAndNotLocked: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
importAsConfirmedRules: '<string>',
importAsLockedRules: '<string>',
importNotes: true,
lineBreakTags: true,
preserveCharEntities: '<string>',
preserveWhitespace: true,
respectTranslateAttr: true,
saveConfirmedSegments: true,
segmentation: true,
skipImportRules: '<string>',
tagRegexp: '<string>',
updateTargetLanguage: true,
xslFile: '<string>',
xslUrl: '<string>'
},
xls: {
comments: true,
hidden: true,
htmlSubfilter: true,
other: true,
sheetNames: true,
specifiedColumns: '<string>',
tagRegexp: '<string>'
},
xml: {
assistantProfile: '<string>',
contextKeyXPath: '<string>',
contextNoteXpath: '<string>',
entities: true,
excludeAttributesPlain: '<string>',
excludeElementsPlain: '<string>',
expandEntities: true,
htmlSubfilterElementsPlain: '<string>',
htmlSubfilterElementsXpath: '<string>',
icuSubFilter: true,
importComments: true,
includeAttributesPlain: '<string>',
includeElementsPlain: '<string>',
includeXPath: '<string>',
inlineElementsAutoPlain: true,
inlineElementsAutoXPath: true,
inlineElementsNonTranslatablePlain: '<string>',
inlineElementsNonTranslatableXPath: '<string>',
inlineElementsPlain: '<string>',
inlineElementsXpath: '<string>',
lockAttributesPlain: '<string>',
lockElementsPlain: '<string>',
lockXPath: '<string>',
maxLenXPath: '<string>',
preserveCharEntities: '<string>',
preserveWhitespaceXPath: '<string>',
segmentation: true,
segmentationExclude: true,
segmentationExcludedElementsXpath: '<string>',
tagRegexp: '<string>',
xslFile: '<string>',
xslUrl: '<string>'
},
yaml: {
contextKeyPath: '<string>',
contextPath: '<string>',
excludeValueRegexp: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
includeKeyRegexp: '<string>',
indentEmptyLinesInString: true,
markdownSubfilter: true,
tagRegexp: '<string>',
updateRootElementLang: true
},
zipCharset: '<string>'
}
})
};
fetch('https://cloud.memsource.com/web/api2/v1/customFileTypes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v1/customFileTypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filenamePattern' => '<string>',
'name' => '<string>',
'fileImportSettings' => [
'android' => [
'icuSubFilter' => true,
'tagRegexp' => '<string>'
],
'asciidoc' => [
'extractBtnMenuLabels' => true,
'extractCustomDocumentAttributeNameRegexp' => '<string>',
'htmlInPassthrough' => true,
'nontranslatableMonospaceCustomStylesRegexp' => '<string>',
'tagRegexp' => '<string>'
],
'autodetectMultilingualFiles' => true,
'csv' => [
'contextKeyColumn' => '<string>',
'contextNoteColumns' => '<string>',
'delimiter' => '<string>',
'htmlSubFilter' => true,
'importColumns' => '<string>',
'importRows' => '<string>',
'maxLenColumn' => '<string>',
'tagRegexp' => '<string>'
],
'dita' => [
'excludeTags' => '<string>',
'extractSeparateSegmentsXpath' => '<string>',
'includeTags' => '<string>',
'inlineTags' => '<string>',
'inlineTagsNonTranslatable' => '<string>',
'tagRegexp' => '<string>'
],
'doc' => [
'altText' => true,
'applyTrackChanges' => true,
'comments' => true,
'headerFooter' => true,
'hidden' => true,
'hyperlinkTarget' => true,
'index' => true,
'joinSimilarRuns' => true,
'ocrImageText' => true,
'other' => true,
'tagRegexp' => '<string>',
'targetFont' => '<string>'
],
'docBook' => [
'excludeTags' => '<string>',
'includeTags' => '<string>',
'inlineTags' => '<string>',
'inlineTagsNonTranslatable' => '<string>',
'tagRegexp' => '<string>'
],
'html' => [
'breakTagCreatesSegment' => true,
'charEntitiesToTags' => '<string>',
'escapeDisabled' => true,
'excludeElements' => '<string>',
'importComments' => true,
'importDefaultAttributes' => true,
'importDefaultMetaTags' => true,
'nonTranslatableInlineElements' => '<string>',
'preserveWhitespace' => true,
'segmentationBeginTagPlaceholder' => '<string>',
'segmentationEndTagPlaceholder' => '<string>',
'segmentationSingleTagPlaceholder' => '<string>',
'tagRegexp' => '<string>',
'translatableAttributes' => '<string>',
'translatableInlineElements' => '<string>',
'translateMetaTagRegexp' => '<string>',
'unknownTagCreatesTag' => true,
'updateLang' => true
],
'idml' => [
'extractCrossReferenceFormats' => true,
'extractHiddenConditionalText' => true,
'extractHyperlinks' => true,
'extractInvisibleLayers' => true,
'extractLockedLayers' => true,
'extractMasterSpreads' => true,
'extractNotes' => true,
'extractVariables' => true,
'keepKerning' => true,
'keepTracking' => true,
'removeXmlElements' => true,
'replaceFont' => true,
'simplifyCodes' => true,
'tagRegexp' => '<string>',
'targetFont' => '<string>'
],
'inputCharset' => '<string>',
'json' => [
'contextKeyPath' => '<string>',
'contextNotePath' => '<string>',
'excludeKeyRegexp' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'includeKeyRegexp' => '<string>',
'maxLenPath' => '<string>',
'tagRegexp' => '<string>'
],
'mac' => [
'htmlSubfilter' => true,
'icuSubFilter' => true,
'tagRegexp' => '<string>'
],
'md' => [
'customElements' => '<string>',
'excludeCodeElements' => true,
'extractCodeBlocks' => true,
'hardLineBreaksSegments' => true,
'ignoredBlockPrefixes' => '<string>',
'notEscapedCharacters' => '<string>',
'preserveWhiteSpaces' => true,
'processJekyllFrontMatter' => true,
'tagRegexp' => '<string>'
],
'mif' => [
'extractBodyPages' => true,
'extractCustomReferencePages' => true,
'extractDefaultReferencePages' => true,
'extractHiddenCondText' => true,
'extractHiddenPages' => true,
'extractIndexMarkers' => true,
'extractLinks' => true,
'extractMasterPages' => true,
'extractPgfNumFormat' => true,
'extractReferencePages' => true,
'extractUsedPgfNumFormat' => true,
'extractUsedVariables' => true,
'extractUsedXRefDef' => true,
'extractVariables' => true,
'extractXRefDef' => true,
'tagRegexp' => '<string>'
],
'multilingualCsv' => [
'allTargetColumns' => [
],
'contextKeyColumns' => '<string>',
'contextNoteColumns' => '<string>',
'delimiter' => '<string>',
'htmlSubFilter' => true,
'importRows' => '<string>',
'maxLenColumns' => '<string>',
'saveConfirmedSegmentsToTm' => true,
'segmentation' => true,
'sourceColumns' => '<string>',
'tagRegexp' => '<string>',
'targetColumns' => '<string>'
],
'multilingualXls' => [
'contextKeyColumn' => '<string>',
'contextNoteColumn' => '<string>',
'htmlSubFilter' => true,
'importRows' => '<string>',
'maxLenColumn' => '<string>',
'saveConfirmedSegmentsToTm' => true,
'segmentation' => true,
'sourceColumn' => '<string>',
'tagRegexp' => '<string>',
'targetColumns' => [
]
],
'multilingualXml' => [
'contextKeyXPath' => '<string>',
'contextNoteXPath' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'inlineElementsNonTranslatableXPath' => '<string>',
'maxLenXPath' => '<string>',
'preserveCharEntities' => '<string>',
'preserveWhitespace' => true,
'saveConfirmedSegmentsToTm' => true,
'segmentation' => true,
'sourceElementsXPath' => '<string>',
'tagRegexp' => '<string>',
'targetElementsXPaths' => [
],
'translatableElementsXPath' => '<string>',
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'outputCharset' => '<string>',
'pdf' => [
'ocrMode' => '<string>',
'wysiwyg' => true
],
'php' => [
'htmlSubFilter' => true,
'tagRegexp' => '<string>'
],
'po' => [
'exportMultiline' => true,
'htmlSubFilter' => true,
'icuSubFilter' => true,
'markupSubFilterNonTranslatable' => '<string>',
'markupSubFilterTranslatable' => '<string>',
'saveConfirmedSegments' => true,
'segment' => true,
'tagRegexp' => '<string>',
'updateHeader' => true
],
'ppt' => [
'altText' => true,
'hiddenSlides' => true,
'masterSlides' => true,
'notes' => true,
'other' => true
],
'properties' => [
'tagRegexp' => '<string>'
],
'psd' => [
'extractHiddenLayers' => true,
'extractLockedLayers' => true,
'tagRegexp' => '<string>'
],
'quarkTag' => [
'removeKerningTrackingTags' => true,
'tagRegexp' => '<string>'
],
'resx' => [
'htmlSubFilter' => true,
'tagRegexp' => '<string>'
],
'sdlXlf' => [
'exportAttrsWhenConfirmedAndLocked' => '<string>',
'exportAttrsWhenConfirmedAndNotLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndNotLocked' => '<string>',
'icuSubFilter' => true,
'importAsConfirmedRules' => '<string>',
'importAsLockedRules' => '<string>',
'saveConfirmedSegments' => true,
'skipImportRules' => '<string>',
'tagRegexp' => '<string>'
],
'segmentationRuleId' => 123,
'targetLength' => true,
'targetLengthMax' => 123,
'targetLengthPercent' => true,
'targetLengthPercentValue' => 123,
'targetSegmentationRuleId' => 123,
'tmMatch' => [
'ignoreTagMetadata' => true,
'penalizeMultiContextMatch' => true,
'prevOrNextSegment' => true
],
'ttx' => [
'saveConfirmedSegments' => true
],
'txt' => [
'contextKey' => '<string>',
'regexpCapturingGroups' => true,
'tagRegexp' => '<string>',
'translatableTextRegexp' => '<string>'
],
'xlf' => [
'contextType' => '<string>',
'copySourceToTargetIfNotImported' => true,
'exportAttrsWhenConfirmedAndLocked' => '<string>',
'exportAttrsWhenConfirmedAndNotLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndNotLocked' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'importAsConfirmedRules' => '<string>',
'importAsConfirmedXPath' => '<string>',
'importAsLockedRules' => '<string>',
'importAsLockedXPath' => '<string>',
'importNotes' => true,
'importXPath' => '<string>',
'lineBreakTags' => true,
'preserveCharEntities' => '<string>',
'preserveWhitespace' => true,
'saveConfirmedSegments' => true,
'segmentation' => true,
'skipImportRules' => '<string>',
'tagRegexp' => '<string>',
'updateTargetLanguage' => true,
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'xlf2' => [
'contextKeyXPath' => '<string>',
'copySourceToTargetIfNotImported' => true,
'exportAttrsWhenConfirmedAndLocked' => '<string>',
'exportAttrsWhenConfirmedAndNotLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndNotLocked' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'importAsConfirmedRules' => '<string>',
'importAsLockedRules' => '<string>',
'importNotes' => true,
'lineBreakTags' => true,
'preserveCharEntities' => '<string>',
'preserveWhitespace' => true,
'respectTranslateAttr' => true,
'saveConfirmedSegments' => true,
'segmentation' => true,
'skipImportRules' => '<string>',
'tagRegexp' => '<string>',
'updateTargetLanguage' => true,
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'xls' => [
'comments' => true,
'hidden' => true,
'htmlSubfilter' => true,
'other' => true,
'sheetNames' => true,
'specifiedColumns' => '<string>',
'tagRegexp' => '<string>'
],
'xml' => [
'assistantProfile' => '<string>',
'contextKeyXPath' => '<string>',
'contextNoteXpath' => '<string>',
'entities' => true,
'excludeAttributesPlain' => '<string>',
'excludeElementsPlain' => '<string>',
'expandEntities' => true,
'htmlSubfilterElementsPlain' => '<string>',
'htmlSubfilterElementsXpath' => '<string>',
'icuSubFilter' => true,
'importComments' => true,
'includeAttributesPlain' => '<string>',
'includeElementsPlain' => '<string>',
'includeXPath' => '<string>',
'inlineElementsAutoPlain' => true,
'inlineElementsAutoXPath' => true,
'inlineElementsNonTranslatablePlain' => '<string>',
'inlineElementsNonTranslatableXPath' => '<string>',
'inlineElementsPlain' => '<string>',
'inlineElementsXpath' => '<string>',
'lockAttributesPlain' => '<string>',
'lockElementsPlain' => '<string>',
'lockXPath' => '<string>',
'maxLenXPath' => '<string>',
'preserveCharEntities' => '<string>',
'preserveWhitespaceXPath' => '<string>',
'segmentation' => true,
'segmentationExclude' => true,
'segmentationExcludedElementsXpath' => '<string>',
'tagRegexp' => '<string>',
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'yaml' => [
'contextKeyPath' => '<string>',
'contextPath' => '<string>',
'excludeValueRegexp' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'includeKeyRegexp' => '<string>',
'indentEmptyLinesInString' => true,
'markdownSubfilter' => true,
'tagRegexp' => '<string>',
'updateRootElementLang' => true
],
'zipCharset' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v1/customFileTypes"
payload := strings.NewReader("{\n \"filenamePattern\": \"<string>\",\n \"name\": \"<string>\",\n \"fileImportSettings\": {\n \"android\": {\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"asciidoc\": {\n \"extractBtnMenuLabels\": true,\n \"extractCustomDocumentAttributeNameRegexp\": \"<string>\",\n \"htmlInPassthrough\": true,\n \"nontranslatableMonospaceCustomStylesRegexp\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"autodetectMultilingualFiles\": true,\n \"csv\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importColumns\": \"<string>\",\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"dita\": {\n \"excludeTags\": \"<string>\",\n \"extractSeparateSegmentsXpath\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"doc\": {\n \"altText\": true,\n \"applyTrackChanges\": true,\n \"comments\": true,\n \"headerFooter\": true,\n \"hidden\": true,\n \"hyperlinkTarget\": true,\n \"index\": true,\n \"joinSimilarRuns\": true,\n \"ocrImageText\": true,\n \"other\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"docBook\": {\n \"excludeTags\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"html\": {\n \"breakTagCreatesSegment\": true,\n \"charEntitiesToTags\": \"<string>\",\n \"escapeDisabled\": true,\n \"excludeElements\": \"<string>\",\n \"importComments\": true,\n \"importDefaultAttributes\": true,\n \"importDefaultMetaTags\": true,\n \"nonTranslatableInlineElements\": \"<string>\",\n \"preserveWhitespace\": true,\n \"segmentationBeginTagPlaceholder\": \"<string>\",\n \"segmentationEndTagPlaceholder\": \"<string>\",\n \"segmentationSingleTagPlaceholder\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"translatableAttributes\": \"<string>\",\n \"translatableInlineElements\": \"<string>\",\n \"translateMetaTagRegexp\": \"<string>\",\n \"unknownTagCreatesTag\": true,\n \"updateLang\": true\n },\n \"idml\": {\n \"extractCrossReferenceFormats\": true,\n \"extractHiddenConditionalText\": true,\n \"extractHyperlinks\": true,\n \"extractInvisibleLayers\": true,\n \"extractLockedLayers\": true,\n \"extractMasterSpreads\": true,\n \"extractNotes\": true,\n \"extractVariables\": true,\n \"keepKerning\": true,\n \"keepTracking\": true,\n \"removeXmlElements\": true,\n \"replaceFont\": true,\n \"simplifyCodes\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"inputCharset\": \"<string>\",\n \"json\": {\n \"contextKeyPath\": \"<string>\",\n \"contextNotePath\": \"<string>\",\n \"excludeKeyRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"maxLenPath\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"mac\": {\n \"htmlSubfilter\": true,\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"md\": {\n \"customElements\": \"<string>\",\n \"excludeCodeElements\": true,\n \"extractCodeBlocks\": true,\n \"hardLineBreaksSegments\": true,\n \"ignoredBlockPrefixes\": \"<string>\",\n \"notEscapedCharacters\": \"<string>\",\n \"preserveWhiteSpaces\": true,\n \"processJekyllFrontMatter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"mif\": {\n \"extractBodyPages\": true,\n \"extractCustomReferencePages\": true,\n \"extractDefaultReferencePages\": true,\n \"extractHiddenCondText\": true,\n \"extractHiddenPages\": true,\n \"extractIndexMarkers\": true,\n \"extractLinks\": true,\n \"extractMasterPages\": true,\n \"extractPgfNumFormat\": true,\n \"extractReferencePages\": true,\n \"extractUsedPgfNumFormat\": true,\n \"extractUsedVariables\": true,\n \"extractUsedXRefDef\": true,\n \"extractVariables\": true,\n \"extractXRefDef\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"multilingualCsv\": {\n \"allTargetColumns\": {},\n \"contextKeyColumns\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumns\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": \"<string>\"\n },\n \"multilingualXls\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumn\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": {}\n },\n \"multilingualXml\": {\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXPath\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceElementsXPath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetElementsXPaths\": {},\n \"translatableElementsXPath\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"outputCharset\": \"<string>\",\n \"pdf\": {\n \"ocrMode\": \"<string>\",\n \"wysiwyg\": true\n },\n \"php\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"po\": {\n \"exportMultiline\": true,\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"markupSubFilterNonTranslatable\": \"<string>\",\n \"markupSubFilterTranslatable\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"segment\": true,\n \"tagRegexp\": \"<string>\",\n \"updateHeader\": true\n },\n \"ppt\": {\n \"altText\": true,\n \"hiddenSlides\": true,\n \"masterSlides\": true,\n \"notes\": true,\n \"other\": true\n },\n \"properties\": {\n \"tagRegexp\": \"<string>\"\n },\n \"psd\": {\n \"extractHiddenLayers\": true,\n \"extractLockedLayers\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"quarkTag\": {\n \"removeKerningTrackingTags\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"resx\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"sdlXlf\": {\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"segmentationRuleId\": 123,\n \"targetLength\": true,\n \"targetLengthMax\": 123,\n \"targetLengthPercent\": true,\n \"targetLengthPercentValue\": 123,\n \"targetSegmentationRuleId\": 123,\n \"tmMatch\": {\n \"ignoreTagMetadata\": true,\n \"penalizeMultiContextMatch\": true,\n \"prevOrNextSegment\": true\n },\n \"ttx\": {\n \"saveConfirmedSegments\": true\n },\n \"txt\": {\n \"contextKey\": \"<string>\",\n \"regexpCapturingGroups\": true,\n \"tagRegexp\": \"<string>\",\n \"translatableTextRegexp\": \"<string>\"\n },\n \"xlf\": {\n \"contextType\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsConfirmedXPath\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importAsLockedXPath\": \"<string>\",\n \"importNotes\": true,\n \"importXPath\": \"<string>\",\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xlf2\": {\n \"contextKeyXPath\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importNotes\": true,\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"respectTranslateAttr\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xls\": {\n \"comments\": true,\n \"hidden\": true,\n \"htmlSubfilter\": true,\n \"other\": true,\n \"sheetNames\": true,\n \"specifiedColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"xml\": {\n \"assistantProfile\": \"<string>\",\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXpath\": \"<string>\",\n \"entities\": true,\n \"excludeAttributesPlain\": \"<string>\",\n \"excludeElementsPlain\": \"<string>\",\n \"expandEntities\": true,\n \"htmlSubfilterElementsPlain\": \"<string>\",\n \"htmlSubfilterElementsXpath\": \"<string>\",\n \"icuSubFilter\": true,\n \"importComments\": true,\n \"includeAttributesPlain\": \"<string>\",\n \"includeElementsPlain\": \"<string>\",\n \"includeXPath\": \"<string>\",\n \"inlineElementsAutoPlain\": true,\n \"inlineElementsAutoXPath\": true,\n \"inlineElementsNonTranslatablePlain\": \"<string>\",\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"inlineElementsPlain\": \"<string>\",\n \"inlineElementsXpath\": \"<string>\",\n \"lockAttributesPlain\": \"<string>\",\n \"lockElementsPlain\": \"<string>\",\n \"lockXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespaceXPath\": \"<string>\",\n \"segmentation\": true,\n \"segmentationExclude\": true,\n \"segmentationExcludedElementsXpath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"yaml\": {\n \"contextKeyPath\": \"<string>\",\n \"contextPath\": \"<string>\",\n \"excludeValueRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"indentEmptyLinesInString\": true,\n \"markdownSubfilter\": true,\n \"tagRegexp\": \"<string>\",\n \"updateRootElementLang\": true\n },\n \"zipCharset\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v1/customFileTypes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filenamePattern\": \"<string>\",\n \"name\": \"<string>\",\n \"fileImportSettings\": {\n \"android\": {\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"asciidoc\": {\n \"extractBtnMenuLabels\": true,\n \"extractCustomDocumentAttributeNameRegexp\": \"<string>\",\n \"htmlInPassthrough\": true,\n \"nontranslatableMonospaceCustomStylesRegexp\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"autodetectMultilingualFiles\": true,\n \"csv\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importColumns\": \"<string>\",\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"dita\": {\n \"excludeTags\": \"<string>\",\n \"extractSeparateSegmentsXpath\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"doc\": {\n \"altText\": true,\n \"applyTrackChanges\": true,\n \"comments\": true,\n \"headerFooter\": true,\n \"hidden\": true,\n \"hyperlinkTarget\": true,\n \"index\": true,\n \"joinSimilarRuns\": true,\n \"ocrImageText\": true,\n \"other\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"docBook\": {\n \"excludeTags\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"html\": {\n \"breakTagCreatesSegment\": true,\n \"charEntitiesToTags\": \"<string>\",\n \"escapeDisabled\": true,\n \"excludeElements\": \"<string>\",\n \"importComments\": true,\n \"importDefaultAttributes\": true,\n \"importDefaultMetaTags\": true,\n \"nonTranslatableInlineElements\": \"<string>\",\n \"preserveWhitespace\": true,\n \"segmentationBeginTagPlaceholder\": \"<string>\",\n \"segmentationEndTagPlaceholder\": \"<string>\",\n \"segmentationSingleTagPlaceholder\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"translatableAttributes\": \"<string>\",\n \"translatableInlineElements\": \"<string>\",\n \"translateMetaTagRegexp\": \"<string>\",\n \"unknownTagCreatesTag\": true,\n \"updateLang\": true\n },\n \"idml\": {\n \"extractCrossReferenceFormats\": true,\n \"extractHiddenConditionalText\": true,\n \"extractHyperlinks\": true,\n \"extractInvisibleLayers\": true,\n \"extractLockedLayers\": true,\n \"extractMasterSpreads\": true,\n \"extractNotes\": true,\n \"extractVariables\": true,\n \"keepKerning\": true,\n \"keepTracking\": true,\n \"removeXmlElements\": true,\n \"replaceFont\": true,\n \"simplifyCodes\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"inputCharset\": \"<string>\",\n \"json\": {\n \"contextKeyPath\": \"<string>\",\n \"contextNotePath\": \"<string>\",\n \"excludeKeyRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"maxLenPath\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"mac\": {\n \"htmlSubfilter\": true,\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"md\": {\n \"customElements\": \"<string>\",\n \"excludeCodeElements\": true,\n \"extractCodeBlocks\": true,\n \"hardLineBreaksSegments\": true,\n \"ignoredBlockPrefixes\": \"<string>\",\n \"notEscapedCharacters\": \"<string>\",\n \"preserveWhiteSpaces\": true,\n \"processJekyllFrontMatter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"mif\": {\n \"extractBodyPages\": true,\n \"extractCustomReferencePages\": true,\n \"extractDefaultReferencePages\": true,\n \"extractHiddenCondText\": true,\n \"extractHiddenPages\": true,\n \"extractIndexMarkers\": true,\n \"extractLinks\": true,\n \"extractMasterPages\": true,\n \"extractPgfNumFormat\": true,\n \"extractReferencePages\": true,\n \"extractUsedPgfNumFormat\": true,\n \"extractUsedVariables\": true,\n \"extractUsedXRefDef\": true,\n \"extractVariables\": true,\n \"extractXRefDef\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"multilingualCsv\": {\n \"allTargetColumns\": {},\n \"contextKeyColumns\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumns\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": \"<string>\"\n },\n \"multilingualXls\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumn\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": {}\n },\n \"multilingualXml\": {\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXPath\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceElementsXPath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetElementsXPaths\": {},\n \"translatableElementsXPath\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"outputCharset\": \"<string>\",\n \"pdf\": {\n \"ocrMode\": \"<string>\",\n \"wysiwyg\": true\n },\n \"php\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"po\": {\n \"exportMultiline\": true,\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"markupSubFilterNonTranslatable\": \"<string>\",\n \"markupSubFilterTranslatable\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"segment\": true,\n \"tagRegexp\": \"<string>\",\n \"updateHeader\": true\n },\n \"ppt\": {\n \"altText\": true,\n \"hiddenSlides\": true,\n \"masterSlides\": true,\n \"notes\": true,\n \"other\": true\n },\n \"properties\": {\n \"tagRegexp\": \"<string>\"\n },\n \"psd\": {\n \"extractHiddenLayers\": true,\n \"extractLockedLayers\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"quarkTag\": {\n \"removeKerningTrackingTags\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"resx\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"sdlXlf\": {\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"segmentationRuleId\": 123,\n \"targetLength\": true,\n \"targetLengthMax\": 123,\n \"targetLengthPercent\": true,\n \"targetLengthPercentValue\": 123,\n \"targetSegmentationRuleId\": 123,\n \"tmMatch\": {\n \"ignoreTagMetadata\": true,\n \"penalizeMultiContextMatch\": true,\n \"prevOrNextSegment\": true\n },\n \"ttx\": {\n \"saveConfirmedSegments\": true\n },\n \"txt\": {\n \"contextKey\": \"<string>\",\n \"regexpCapturingGroups\": true,\n \"tagRegexp\": \"<string>\",\n \"translatableTextRegexp\": \"<string>\"\n },\n \"xlf\": {\n \"contextType\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsConfirmedXPath\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importAsLockedXPath\": \"<string>\",\n \"importNotes\": true,\n \"importXPath\": \"<string>\",\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xlf2\": {\n \"contextKeyXPath\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importNotes\": true,\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"respectTranslateAttr\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xls\": {\n \"comments\": true,\n \"hidden\": true,\n \"htmlSubfilter\": true,\n \"other\": true,\n \"sheetNames\": true,\n \"specifiedColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"xml\": {\n \"assistantProfile\": \"<string>\",\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXpath\": \"<string>\",\n \"entities\": true,\n \"excludeAttributesPlain\": \"<string>\",\n \"excludeElementsPlain\": \"<string>\",\n \"expandEntities\": true,\n \"htmlSubfilterElementsPlain\": \"<string>\",\n \"htmlSubfilterElementsXpath\": \"<string>\",\n \"icuSubFilter\": true,\n \"importComments\": true,\n \"includeAttributesPlain\": \"<string>\",\n \"includeElementsPlain\": \"<string>\",\n \"includeXPath\": \"<string>\",\n \"inlineElementsAutoPlain\": true,\n \"inlineElementsAutoXPath\": true,\n \"inlineElementsNonTranslatablePlain\": \"<string>\",\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"inlineElementsPlain\": \"<string>\",\n \"inlineElementsXpath\": \"<string>\",\n \"lockAttributesPlain\": \"<string>\",\n \"lockElementsPlain\": \"<string>\",\n \"lockXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespaceXPath\": \"<string>\",\n \"segmentation\": true,\n \"segmentationExclude\": true,\n \"segmentationExcludedElementsXpath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"yaml\": {\n \"contextKeyPath\": \"<string>\",\n \"contextPath\": \"<string>\",\n \"excludeValueRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"indentEmptyLinesInString\": true,\n \"markdownSubfilter\": true,\n \"tagRegexp\": \"<string>\",\n \"updateRootElementLang\": true\n },\n \"zipCharset\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/customFileTypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filenamePattern\": \"<string>\",\n \"name\": \"<string>\",\n \"fileImportSettings\": {\n \"android\": {\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"asciidoc\": {\n \"extractBtnMenuLabels\": true,\n \"extractCustomDocumentAttributeNameRegexp\": \"<string>\",\n \"htmlInPassthrough\": true,\n \"nontranslatableMonospaceCustomStylesRegexp\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"autodetectMultilingualFiles\": true,\n \"csv\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importColumns\": \"<string>\",\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"dita\": {\n \"excludeTags\": \"<string>\",\n \"extractSeparateSegmentsXpath\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"doc\": {\n \"altText\": true,\n \"applyTrackChanges\": true,\n \"comments\": true,\n \"headerFooter\": true,\n \"hidden\": true,\n \"hyperlinkTarget\": true,\n \"index\": true,\n \"joinSimilarRuns\": true,\n \"ocrImageText\": true,\n \"other\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"docBook\": {\n \"excludeTags\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"html\": {\n \"breakTagCreatesSegment\": true,\n \"charEntitiesToTags\": \"<string>\",\n \"escapeDisabled\": true,\n \"excludeElements\": \"<string>\",\n \"importComments\": true,\n \"importDefaultAttributes\": true,\n \"importDefaultMetaTags\": true,\n \"nonTranslatableInlineElements\": \"<string>\",\n \"preserveWhitespace\": true,\n \"segmentationBeginTagPlaceholder\": \"<string>\",\n \"segmentationEndTagPlaceholder\": \"<string>\",\n \"segmentationSingleTagPlaceholder\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"translatableAttributes\": \"<string>\",\n \"translatableInlineElements\": \"<string>\",\n \"translateMetaTagRegexp\": \"<string>\",\n \"unknownTagCreatesTag\": true,\n \"updateLang\": true\n },\n \"idml\": {\n \"extractCrossReferenceFormats\": true,\n \"extractHiddenConditionalText\": true,\n \"extractHyperlinks\": true,\n \"extractInvisibleLayers\": true,\n \"extractLockedLayers\": true,\n \"extractMasterSpreads\": true,\n \"extractNotes\": true,\n \"extractVariables\": true,\n \"keepKerning\": true,\n \"keepTracking\": true,\n \"removeXmlElements\": true,\n \"replaceFont\": true,\n \"simplifyCodes\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"inputCharset\": \"<string>\",\n \"json\": {\n \"contextKeyPath\": \"<string>\",\n \"contextNotePath\": \"<string>\",\n \"excludeKeyRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"maxLenPath\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"mac\": {\n \"htmlSubfilter\": true,\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"md\": {\n \"customElements\": \"<string>\",\n \"excludeCodeElements\": true,\n \"extractCodeBlocks\": true,\n \"hardLineBreaksSegments\": true,\n \"ignoredBlockPrefixes\": \"<string>\",\n \"notEscapedCharacters\": \"<string>\",\n \"preserveWhiteSpaces\": true,\n \"processJekyllFrontMatter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"mif\": {\n \"extractBodyPages\": true,\n \"extractCustomReferencePages\": true,\n \"extractDefaultReferencePages\": true,\n \"extractHiddenCondText\": true,\n \"extractHiddenPages\": true,\n \"extractIndexMarkers\": true,\n \"extractLinks\": true,\n \"extractMasterPages\": true,\n \"extractPgfNumFormat\": true,\n \"extractReferencePages\": true,\n \"extractUsedPgfNumFormat\": true,\n \"extractUsedVariables\": true,\n \"extractUsedXRefDef\": true,\n \"extractVariables\": true,\n \"extractXRefDef\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"multilingualCsv\": {\n \"allTargetColumns\": {},\n \"contextKeyColumns\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumns\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": \"<string>\"\n },\n \"multilingualXls\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumn\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": {}\n },\n \"multilingualXml\": {\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXPath\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceElementsXPath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetElementsXPaths\": {},\n \"translatableElementsXPath\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"outputCharset\": \"<string>\",\n \"pdf\": {\n \"ocrMode\": \"<string>\",\n \"wysiwyg\": true\n },\n \"php\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"po\": {\n \"exportMultiline\": true,\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"markupSubFilterNonTranslatable\": \"<string>\",\n \"markupSubFilterTranslatable\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"segment\": true,\n \"tagRegexp\": \"<string>\",\n \"updateHeader\": true\n },\n \"ppt\": {\n \"altText\": true,\n \"hiddenSlides\": true,\n \"masterSlides\": true,\n \"notes\": true,\n \"other\": true\n },\n \"properties\": {\n \"tagRegexp\": \"<string>\"\n },\n \"psd\": {\n \"extractHiddenLayers\": true,\n \"extractLockedLayers\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"quarkTag\": {\n \"removeKerningTrackingTags\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"resx\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"sdlXlf\": {\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"segmentationRuleId\": 123,\n \"targetLength\": true,\n \"targetLengthMax\": 123,\n \"targetLengthPercent\": true,\n \"targetLengthPercentValue\": 123,\n \"targetSegmentationRuleId\": 123,\n \"tmMatch\": {\n \"ignoreTagMetadata\": true,\n \"penalizeMultiContextMatch\": true,\n \"prevOrNextSegment\": true\n },\n \"ttx\": {\n \"saveConfirmedSegments\": true\n },\n \"txt\": {\n \"contextKey\": \"<string>\",\n \"regexpCapturingGroups\": true,\n \"tagRegexp\": \"<string>\",\n \"translatableTextRegexp\": \"<string>\"\n },\n \"xlf\": {\n \"contextType\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsConfirmedXPath\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importAsLockedXPath\": \"<string>\",\n \"importNotes\": true,\n \"importXPath\": \"<string>\",\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xlf2\": {\n \"contextKeyXPath\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importNotes\": true,\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"respectTranslateAttr\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xls\": {\n \"comments\": true,\n \"hidden\": true,\n \"htmlSubfilter\": true,\n \"other\": true,\n \"sheetNames\": true,\n \"specifiedColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"xml\": {\n \"assistantProfile\": \"<string>\",\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXpath\": \"<string>\",\n \"entities\": true,\n \"excludeAttributesPlain\": \"<string>\",\n \"excludeElementsPlain\": \"<string>\",\n \"expandEntities\": true,\n \"htmlSubfilterElementsPlain\": \"<string>\",\n \"htmlSubfilterElementsXpath\": \"<string>\",\n \"icuSubFilter\": true,\n \"importComments\": true,\n \"includeAttributesPlain\": \"<string>\",\n \"includeElementsPlain\": \"<string>\",\n \"includeXPath\": \"<string>\",\n \"inlineElementsAutoPlain\": true,\n \"inlineElementsAutoXPath\": true,\n \"inlineElementsNonTranslatablePlain\": \"<string>\",\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"inlineElementsPlain\": \"<string>\",\n \"inlineElementsXpath\": \"<string>\",\n \"lockAttributesPlain\": \"<string>\",\n \"lockElementsPlain\": \"<string>\",\n \"lockXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespaceXPath\": \"<string>\",\n \"segmentation\": true,\n \"segmentationExclude\": true,\n \"segmentationExcludedElementsXpath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"yaml\": {\n \"contextKeyPath\": \"<string>\",\n \"contextPath\": \"<string>\",\n \"excludeValueRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"indentEmptyLinesInString\": true,\n \"markdownSubfilter\": true,\n \"tagRegexp\": \"<string>\",\n \"updateRootElementLang\": true\n },\n \"zipCharset\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"dateCreated": "2023-11-07T05:31:56Z",
"fileImportSettings": {
"android": {
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"asciidoc": {
"extractBtnMenuLabels": true,
"extractCustomDocumentAttributeNameRegexp": "<string>",
"htmlInPassthrough": true,
"nontranslatableMonospaceCustomStylesRegexp": "<string>",
"tagRegexp": "<string>"
},
"autodetectMultilingualFiles": true,
"csv": {
"contextKeyColumn": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importColumns": "<string>",
"importRows": "<string>",
"maxLenColumn": "<string>",
"tagRegexp": "<string>"
},
"dita": {
"excludeTags": "<string>",
"extractSeparateSegmentsXpath": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"doc": {
"altText": true,
"applyTrackChanges": true,
"comments": true,
"headerFooter": true,
"hidden": true,
"hyperlinkTarget": true,
"index": true,
"joinSimilarRuns": true,
"ocrImageText": true,
"other": true,
"properties": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"docBook": {
"excludeTags": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"fileFormat": "<string>",
"html": {
"breakTagCreatesSegment": true,
"charEntitiesToTags": "<string>",
"escapeDisabled": true,
"excludeElements": "<string>",
"importComments": true,
"importDefaultAttributes": true,
"importDefaultMetaTags": true,
"nonTranslatableInlineElements": "<string>",
"preserveWhitespace": true,
"segmentationBeginTagPlaceholder": "<string>",
"segmentationEndTagPlaceholder": "<string>",
"segmentationSingleTagPlaceholder": "<string>",
"tagRegexp": "<string>",
"translatableAttributes": "<string>",
"translatableInlineElements": "<string>",
"translateMetaTagRegexp": "<string>",
"unknownTagCreatesTag": true,
"updateLang": true
},
"idml": {
"extractCrossReferenceFormats": true,
"extractHiddenConditionalText": true,
"extractHyperlinks": true,
"extractInvisibleLayers": true,
"extractLockedLayers": true,
"extractMasterSpreads": true,
"extractNotes": true,
"extractVariables": true,
"keepKerning": true,
"keepTracking": true,
"removeXmlElements": true,
"replaceFont": true,
"simplifyCodes": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"inputCharset": "<string>",
"json": {
"contextKeyPath": "<string>",
"contextNotePath": "<string>",
"excludeKeyRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"maxLenPath": "<string>",
"tagRegexp": "<string>"
},
"mac": {
"htmlSubfilter": true,
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"md": {
"customElements": "<string>",
"excludeCodeElements": true,
"extractCodeBlocks": true,
"hardLineBreaksSegments": true,
"ignoredBlockPrefixes": "<string>",
"notEscapedCharacters": "<string>",
"preserveWhiteSpaces": true,
"processJekyllFrontMatter": true,
"tagRegexp": "<string>"
},
"mif": {
"extractBodyPages": true,
"extractCustomReferencePages": true,
"extractDefaultReferencePages": true,
"extractHiddenCondText": true,
"extractHiddenPages": true,
"extractIndexMarkers": true,
"extractLinks": true,
"extractMasterPages": true,
"extractPgfNumFormat": true,
"extractReferencePages": true,
"extractUsedPgfNumFormat": true,
"extractUsedVariables": true,
"extractUsedXRefDef": true,
"extractVariables": true,
"extractXRefDef": true,
"tagRegexp": "<string>"
},
"multilingualCsv": {
"allTargetColumns": {},
"contextKeyColumns": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumns": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumns": "<string>",
"tagRegexp": "<string>",
"targetColumns": "<string>"
},
"multilingualXls": {
"contextKeyColumn": "<string>",
"contextNoteColumn": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumn": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumn": "<string>",
"tagRegexp": "<string>",
"targetColumns": {}
},
"multilingualXml": {
"contextKeyXPath": "<string>",
"contextNoteXPath": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"inlineElementsNonTranslatableXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceElementsXPath": "<string>",
"tagRegexp": "<string>",
"targetElementsXPaths": {},
"translatableElementsXPath": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"outputCharset": "<string>",
"pdf": {
"ocrMode": "<string>",
"wysiwyg": true
},
"php": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"po": {
"exportMultiline": true,
"htmlSubFilter": true,
"icuSubFilter": true,
"markupSubFilterNonTranslatable": "<string>",
"markupSubFilterTranslatable": "<string>",
"saveConfirmedSegments": true,
"segment": true,
"tagRegexp": "<string>",
"updateHeader": true
},
"ppt": {
"altText": true,
"hiddenSlides": true,
"masterSlides": true,
"notes": true,
"other": true
},
"properties": {
"tagRegexp": "<string>"
},
"psd": {
"extractHiddenLayers": true,
"extractLockedLayers": true,
"tagRegexp": "<string>"
},
"quarkTag": {
"removeKerningTrackingTags": true,
"tagRegexp": "<string>"
},
"resx": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"sdlXlf": {
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"saveConfirmedSegments": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>"
},
"segRule": {
"filename": "<string>",
"id": "<string>",
"language": "<string>",
"name": "<string>",
"primary": true,
"uid": "<string>"
},
"targetLength": true,
"targetLengthMax": 123,
"targetLengthPercent": true,
"targetLengthPercentValue": 123,
"targetSegRule": {
"filename": "<string>",
"id": "<string>",
"language": "<string>",
"name": "<string>",
"primary": true,
"uid": "<string>"
},
"tmMatch": {
"ignoreTagMetadata": true,
"metadataPriority": {
"prioritizedFields": [
{}
]
},
"penalizeMultiContextMatch": true,
"prevOrNextSegment": true
},
"ttx": {
"saveConfirmedSegments": true
},
"txt": {
"contextKey": "<string>",
"regexpCapturingGroups": true,
"tagRegexp": "<string>",
"translatableTextRegexp": "<string>"
},
"xlf": {
"contextType": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsConfirmedXPath": "<string>",
"importAsLockedRules": "<string>",
"importAsLockedXPath": "<string>",
"importNotes": true,
"importXPath": "<string>",
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xlf2": {
"contextKeyXPath": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"importNotes": true,
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"respectTranslateAttr": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xls": {
"comments": true,
"hidden": true,
"htmlSubfilter": true,
"other": true,
"sheetNames": true,
"specifiedColumns": "<string>",
"tagRegexp": "<string>"
},
"xml": {
"assistantProfile": "<string>",
"contextKeyXPath": "<string>",
"contextNoteXpath": "<string>",
"entities": true,
"excludeAttributesPlain": "<string>",
"excludeElementsPlain": "<string>",
"expandEntities": true,
"htmlSubfilterElementsPlain": "<string>",
"htmlSubfilterElementsXpath": "<string>",
"icuSubFilter": true,
"importComments": true,
"includeAttributesPlain": "<string>",
"includeElementsPlain": "<string>",
"includeXPath": "<string>",
"inlineElementsAutoPlain": true,
"inlineElementsAutoXPath": true,
"inlineElementsNonTranslatablePlain": "<string>",
"inlineElementsNonTranslatableXPath": "<string>",
"inlineElementsPlain": "<string>",
"inlineElementsXpath": "<string>",
"lockAttributesPlain": "<string>",
"lockElementsPlain": "<string>",
"lockXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespaceXPath": "<string>",
"segmentation": true,
"segmentationExclude": true,
"segmentationExcludedElementsXpath": "<string>",
"tagRegexp": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"yaml": {
"contextKeyPath": "<string>",
"contextPath": "<string>",
"excludeValueRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"indentEmptyLinesInString": true,
"markdownSubfilter": true,
"tagRegexp": "<string>",
"updateRootElementLang": true
},
"zipCharset": "<string>"
},
"filenamePattern": "<string>",
"name": "<string>",
"supportsContinuousJob": true,
"uid": "<string>"
}Create custom file type
The type field accepts only the following values: html, json, xml, multiling_xml, txt.
The response supportsContinuousJob flag is derived from the file type.
Returns 501 Not Implemented when custom file types are not enabled for the organization.
curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/customFileTypes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"filenamePattern": "<string>",
"name": "<string>",
"fileImportSettings": {
"android": {
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"asciidoc": {
"extractBtnMenuLabels": true,
"extractCustomDocumentAttributeNameRegexp": "<string>",
"htmlInPassthrough": true,
"nontranslatableMonospaceCustomStylesRegexp": "<string>",
"tagRegexp": "<string>"
},
"autodetectMultilingualFiles": true,
"csv": {
"contextKeyColumn": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importColumns": "<string>",
"importRows": "<string>",
"maxLenColumn": "<string>",
"tagRegexp": "<string>"
},
"dita": {
"excludeTags": "<string>",
"extractSeparateSegmentsXpath": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"doc": {
"altText": true,
"applyTrackChanges": true,
"comments": true,
"headerFooter": true,
"hidden": true,
"hyperlinkTarget": true,
"index": true,
"joinSimilarRuns": true,
"ocrImageText": true,
"other": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"docBook": {
"excludeTags": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"html": {
"breakTagCreatesSegment": true,
"charEntitiesToTags": "<string>",
"escapeDisabled": true,
"excludeElements": "<string>",
"importComments": true,
"importDefaultAttributes": true,
"importDefaultMetaTags": true,
"nonTranslatableInlineElements": "<string>",
"preserveWhitespace": true,
"segmentationBeginTagPlaceholder": "<string>",
"segmentationEndTagPlaceholder": "<string>",
"segmentationSingleTagPlaceholder": "<string>",
"tagRegexp": "<string>",
"translatableAttributes": "<string>",
"translatableInlineElements": "<string>",
"translateMetaTagRegexp": "<string>",
"unknownTagCreatesTag": true,
"updateLang": true
},
"idml": {
"extractCrossReferenceFormats": true,
"extractHiddenConditionalText": true,
"extractHyperlinks": true,
"extractInvisibleLayers": true,
"extractLockedLayers": true,
"extractMasterSpreads": true,
"extractNotes": true,
"extractVariables": true,
"keepKerning": true,
"keepTracking": true,
"removeXmlElements": true,
"replaceFont": true,
"simplifyCodes": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"inputCharset": "<string>",
"json": {
"contextKeyPath": "<string>",
"contextNotePath": "<string>",
"excludeKeyRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"maxLenPath": "<string>",
"tagRegexp": "<string>"
},
"mac": {
"htmlSubfilter": true,
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"md": {
"customElements": "<string>",
"excludeCodeElements": true,
"extractCodeBlocks": true,
"hardLineBreaksSegments": true,
"ignoredBlockPrefixes": "<string>",
"notEscapedCharacters": "<string>",
"preserveWhiteSpaces": true,
"processJekyllFrontMatter": true,
"tagRegexp": "<string>"
},
"mif": {
"extractBodyPages": true,
"extractCustomReferencePages": true,
"extractDefaultReferencePages": true,
"extractHiddenCondText": true,
"extractHiddenPages": true,
"extractIndexMarkers": true,
"extractLinks": true,
"extractMasterPages": true,
"extractPgfNumFormat": true,
"extractReferencePages": true,
"extractUsedPgfNumFormat": true,
"extractUsedVariables": true,
"extractUsedXRefDef": true,
"extractVariables": true,
"extractXRefDef": true,
"tagRegexp": "<string>"
},
"multilingualCsv": {
"allTargetColumns": {},
"contextKeyColumns": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumns": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumns": "<string>",
"tagRegexp": "<string>",
"targetColumns": "<string>"
},
"multilingualXls": {
"contextKeyColumn": "<string>",
"contextNoteColumn": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumn": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumn": "<string>",
"tagRegexp": "<string>",
"targetColumns": {}
},
"multilingualXml": {
"contextKeyXPath": "<string>",
"contextNoteXPath": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"inlineElementsNonTranslatableXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceElementsXPath": "<string>",
"tagRegexp": "<string>",
"targetElementsXPaths": {},
"translatableElementsXPath": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"outputCharset": "<string>",
"pdf": {
"ocrMode": "<string>",
"wysiwyg": true
},
"php": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"po": {
"exportMultiline": true,
"htmlSubFilter": true,
"icuSubFilter": true,
"markupSubFilterNonTranslatable": "<string>",
"markupSubFilterTranslatable": "<string>",
"saveConfirmedSegments": true,
"segment": true,
"tagRegexp": "<string>",
"updateHeader": true
},
"ppt": {
"altText": true,
"hiddenSlides": true,
"masterSlides": true,
"notes": true,
"other": true
},
"properties": {
"tagRegexp": "<string>"
},
"psd": {
"extractHiddenLayers": true,
"extractLockedLayers": true,
"tagRegexp": "<string>"
},
"quarkTag": {
"removeKerningTrackingTags": true,
"tagRegexp": "<string>"
},
"resx": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"sdlXlf": {
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"saveConfirmedSegments": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>"
},
"segmentationRuleId": 123,
"targetLength": true,
"targetLengthMax": 123,
"targetLengthPercent": true,
"targetLengthPercentValue": 123,
"targetSegmentationRuleId": 123,
"tmMatch": {
"ignoreTagMetadata": true,
"penalizeMultiContextMatch": true,
"prevOrNextSegment": true
},
"ttx": {
"saveConfirmedSegments": true
},
"txt": {
"contextKey": "<string>",
"regexpCapturingGroups": true,
"tagRegexp": "<string>",
"translatableTextRegexp": "<string>"
},
"xlf": {
"contextType": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsConfirmedXPath": "<string>",
"importAsLockedRules": "<string>",
"importAsLockedXPath": "<string>",
"importNotes": true,
"importXPath": "<string>",
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xlf2": {
"contextKeyXPath": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"importNotes": true,
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"respectTranslateAttr": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xls": {
"comments": true,
"hidden": true,
"htmlSubfilter": true,
"other": true,
"sheetNames": true,
"specifiedColumns": "<string>",
"tagRegexp": "<string>"
},
"xml": {
"assistantProfile": "<string>",
"contextKeyXPath": "<string>",
"contextNoteXpath": "<string>",
"entities": true,
"excludeAttributesPlain": "<string>",
"excludeElementsPlain": "<string>",
"expandEntities": true,
"htmlSubfilterElementsPlain": "<string>",
"htmlSubfilterElementsXpath": "<string>",
"icuSubFilter": true,
"importComments": true,
"includeAttributesPlain": "<string>",
"includeElementsPlain": "<string>",
"includeXPath": "<string>",
"inlineElementsAutoPlain": true,
"inlineElementsAutoXPath": true,
"inlineElementsNonTranslatablePlain": "<string>",
"inlineElementsNonTranslatableXPath": "<string>",
"inlineElementsPlain": "<string>",
"inlineElementsXpath": "<string>",
"lockAttributesPlain": "<string>",
"lockElementsPlain": "<string>",
"lockXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespaceXPath": "<string>",
"segmentation": true,
"segmentationExclude": true,
"segmentationExcludedElementsXpath": "<string>",
"tagRegexp": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"yaml": {
"contextKeyPath": "<string>",
"contextPath": "<string>",
"excludeValueRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"indentEmptyLinesInString": true,
"markdownSubfilter": true,
"tagRegexp": "<string>",
"updateRootElementLang": true
},
"zipCharset": "<string>"
}
}
'import requests
url = "https://cloud.memsource.com/web/api2/v1/customFileTypes"
payload = {
"filenamePattern": "<string>",
"name": "<string>",
"fileImportSettings": {
"android": {
"icuSubFilter": True,
"tagRegexp": "<string>"
},
"asciidoc": {
"extractBtnMenuLabels": True,
"extractCustomDocumentAttributeNameRegexp": "<string>",
"htmlInPassthrough": True,
"nontranslatableMonospaceCustomStylesRegexp": "<string>",
"tagRegexp": "<string>"
},
"autodetectMultilingualFiles": True,
"csv": {
"contextKeyColumn": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": True,
"importColumns": "<string>",
"importRows": "<string>",
"maxLenColumn": "<string>",
"tagRegexp": "<string>"
},
"dita": {
"excludeTags": "<string>",
"extractSeparateSegmentsXpath": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"doc": {
"altText": True,
"applyTrackChanges": True,
"comments": True,
"headerFooter": True,
"hidden": True,
"hyperlinkTarget": True,
"index": True,
"joinSimilarRuns": True,
"ocrImageText": True,
"other": True,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"docBook": {
"excludeTags": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"html": {
"breakTagCreatesSegment": True,
"charEntitiesToTags": "<string>",
"escapeDisabled": True,
"excludeElements": "<string>",
"importComments": True,
"importDefaultAttributes": True,
"importDefaultMetaTags": True,
"nonTranslatableInlineElements": "<string>",
"preserveWhitespace": True,
"segmentationBeginTagPlaceholder": "<string>",
"segmentationEndTagPlaceholder": "<string>",
"segmentationSingleTagPlaceholder": "<string>",
"tagRegexp": "<string>",
"translatableAttributes": "<string>",
"translatableInlineElements": "<string>",
"translateMetaTagRegexp": "<string>",
"unknownTagCreatesTag": True,
"updateLang": True
},
"idml": {
"extractCrossReferenceFormats": True,
"extractHiddenConditionalText": True,
"extractHyperlinks": True,
"extractInvisibleLayers": True,
"extractLockedLayers": True,
"extractMasterSpreads": True,
"extractNotes": True,
"extractVariables": True,
"keepKerning": True,
"keepTracking": True,
"removeXmlElements": True,
"replaceFont": True,
"simplifyCodes": True,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"inputCharset": "<string>",
"json": {
"contextKeyPath": "<string>",
"contextNotePath": "<string>",
"excludeKeyRegexp": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"includeKeyRegexp": "<string>",
"maxLenPath": "<string>",
"tagRegexp": "<string>"
},
"mac": {
"htmlSubfilter": True,
"icuSubFilter": True,
"tagRegexp": "<string>"
},
"md": {
"customElements": "<string>",
"excludeCodeElements": True,
"extractCodeBlocks": True,
"hardLineBreaksSegments": True,
"ignoredBlockPrefixes": "<string>",
"notEscapedCharacters": "<string>",
"preserveWhiteSpaces": True,
"processJekyllFrontMatter": True,
"tagRegexp": "<string>"
},
"mif": {
"extractBodyPages": True,
"extractCustomReferencePages": True,
"extractDefaultReferencePages": True,
"extractHiddenCondText": True,
"extractHiddenPages": True,
"extractIndexMarkers": True,
"extractLinks": True,
"extractMasterPages": True,
"extractPgfNumFormat": True,
"extractReferencePages": True,
"extractUsedPgfNumFormat": True,
"extractUsedVariables": True,
"extractUsedXRefDef": True,
"extractVariables": True,
"extractXRefDef": True,
"tagRegexp": "<string>"
},
"multilingualCsv": {
"allTargetColumns": {},
"contextKeyColumns": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": True,
"importRows": "<string>",
"maxLenColumns": "<string>",
"saveConfirmedSegmentsToTm": True,
"segmentation": True,
"sourceColumns": "<string>",
"tagRegexp": "<string>",
"targetColumns": "<string>"
},
"multilingualXls": {
"contextKeyColumn": "<string>",
"contextNoteColumn": "<string>",
"htmlSubFilter": True,
"importRows": "<string>",
"maxLenColumn": "<string>",
"saveConfirmedSegmentsToTm": True,
"segmentation": True,
"sourceColumn": "<string>",
"tagRegexp": "<string>",
"targetColumns": {}
},
"multilingualXml": {
"contextKeyXPath": "<string>",
"contextNoteXPath": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"inlineElementsNonTranslatableXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespace": True,
"saveConfirmedSegmentsToTm": True,
"segmentation": True,
"sourceElementsXPath": "<string>",
"tagRegexp": "<string>",
"targetElementsXPaths": {},
"translatableElementsXPath": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"outputCharset": "<string>",
"pdf": {
"ocrMode": "<string>",
"wysiwyg": True
},
"php": {
"htmlSubFilter": True,
"tagRegexp": "<string>"
},
"po": {
"exportMultiline": True,
"htmlSubFilter": True,
"icuSubFilter": True,
"markupSubFilterNonTranslatable": "<string>",
"markupSubFilterTranslatable": "<string>",
"saveConfirmedSegments": True,
"segment": True,
"tagRegexp": "<string>",
"updateHeader": True
},
"ppt": {
"altText": True,
"hiddenSlides": True,
"masterSlides": True,
"notes": True,
"other": True
},
"properties": { "tagRegexp": "<string>" },
"psd": {
"extractHiddenLayers": True,
"extractLockedLayers": True,
"tagRegexp": "<string>"
},
"quarkTag": {
"removeKerningTrackingTags": True,
"tagRegexp": "<string>"
},
"resx": {
"htmlSubFilter": True,
"tagRegexp": "<string>"
},
"sdlXlf": {
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"icuSubFilter": True,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"saveConfirmedSegments": True,
"skipImportRules": "<string>",
"tagRegexp": "<string>"
},
"segmentationRuleId": 123,
"targetLength": True,
"targetLengthMax": 123,
"targetLengthPercent": True,
"targetLengthPercentValue": 123,
"targetSegmentationRuleId": 123,
"tmMatch": {
"ignoreTagMetadata": True,
"penalizeMultiContextMatch": True,
"prevOrNextSegment": True
},
"ttx": { "saveConfirmedSegments": True },
"txt": {
"contextKey": "<string>",
"regexpCapturingGroups": True,
"tagRegexp": "<string>",
"translatableTextRegexp": "<string>"
},
"xlf": {
"contextType": "<string>",
"copySourceToTargetIfNotImported": True,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"importAsConfirmedRules": "<string>",
"importAsConfirmedXPath": "<string>",
"importAsLockedRules": "<string>",
"importAsLockedXPath": "<string>",
"importNotes": True,
"importXPath": "<string>",
"lineBreakTags": True,
"preserveCharEntities": "<string>",
"preserveWhitespace": True,
"saveConfirmedSegments": True,
"segmentation": True,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": True,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xlf2": {
"contextKeyXPath": "<string>",
"copySourceToTargetIfNotImported": True,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"importNotes": True,
"lineBreakTags": True,
"preserveCharEntities": "<string>",
"preserveWhitespace": True,
"respectTranslateAttr": True,
"saveConfirmedSegments": True,
"segmentation": True,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": True,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xls": {
"comments": True,
"hidden": True,
"htmlSubfilter": True,
"other": True,
"sheetNames": True,
"specifiedColumns": "<string>",
"tagRegexp": "<string>"
},
"xml": {
"assistantProfile": "<string>",
"contextKeyXPath": "<string>",
"contextNoteXpath": "<string>",
"entities": True,
"excludeAttributesPlain": "<string>",
"excludeElementsPlain": "<string>",
"expandEntities": True,
"htmlSubfilterElementsPlain": "<string>",
"htmlSubfilterElementsXpath": "<string>",
"icuSubFilter": True,
"importComments": True,
"includeAttributesPlain": "<string>",
"includeElementsPlain": "<string>",
"includeXPath": "<string>",
"inlineElementsAutoPlain": True,
"inlineElementsAutoXPath": True,
"inlineElementsNonTranslatablePlain": "<string>",
"inlineElementsNonTranslatableXPath": "<string>",
"inlineElementsPlain": "<string>",
"inlineElementsXpath": "<string>",
"lockAttributesPlain": "<string>",
"lockElementsPlain": "<string>",
"lockXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespaceXPath": "<string>",
"segmentation": True,
"segmentationExclude": True,
"segmentationExcludedElementsXpath": "<string>",
"tagRegexp": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"yaml": {
"contextKeyPath": "<string>",
"contextPath": "<string>",
"excludeValueRegexp": "<string>",
"htmlSubFilter": True,
"icuSubFilter": True,
"includeKeyRegexp": "<string>",
"indentEmptyLinesInString": True,
"markdownSubfilter": True,
"tagRegexp": "<string>",
"updateRootElementLang": True
},
"zipCharset": "<string>"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filenamePattern: '<string>',
name: '<string>',
fileImportSettings: {
android: {icuSubFilter: true, tagRegexp: '<string>'},
asciidoc: {
extractBtnMenuLabels: true,
extractCustomDocumentAttributeNameRegexp: '<string>',
htmlInPassthrough: true,
nontranslatableMonospaceCustomStylesRegexp: '<string>',
tagRegexp: '<string>'
},
autodetectMultilingualFiles: true,
csv: {
contextKeyColumn: '<string>',
contextNoteColumns: '<string>',
delimiter: '<string>',
htmlSubFilter: true,
importColumns: '<string>',
importRows: '<string>',
maxLenColumn: '<string>',
tagRegexp: '<string>'
},
dita: {
excludeTags: '<string>',
extractSeparateSegmentsXpath: '<string>',
includeTags: '<string>',
inlineTags: '<string>',
inlineTagsNonTranslatable: '<string>',
tagRegexp: '<string>'
},
doc: {
altText: true,
applyTrackChanges: true,
comments: true,
headerFooter: true,
hidden: true,
hyperlinkTarget: true,
index: true,
joinSimilarRuns: true,
ocrImageText: true,
other: true,
tagRegexp: '<string>',
targetFont: '<string>'
},
docBook: {
excludeTags: '<string>',
includeTags: '<string>',
inlineTags: '<string>',
inlineTagsNonTranslatable: '<string>',
tagRegexp: '<string>'
},
html: {
breakTagCreatesSegment: true,
charEntitiesToTags: '<string>',
escapeDisabled: true,
excludeElements: '<string>',
importComments: true,
importDefaultAttributes: true,
importDefaultMetaTags: true,
nonTranslatableInlineElements: '<string>',
preserveWhitespace: true,
segmentationBeginTagPlaceholder: '<string>',
segmentationEndTagPlaceholder: '<string>',
segmentationSingleTagPlaceholder: '<string>',
tagRegexp: '<string>',
translatableAttributes: '<string>',
translatableInlineElements: '<string>',
translateMetaTagRegexp: '<string>',
unknownTagCreatesTag: true,
updateLang: true
},
idml: {
extractCrossReferenceFormats: true,
extractHiddenConditionalText: true,
extractHyperlinks: true,
extractInvisibleLayers: true,
extractLockedLayers: true,
extractMasterSpreads: true,
extractNotes: true,
extractVariables: true,
keepKerning: true,
keepTracking: true,
removeXmlElements: true,
replaceFont: true,
simplifyCodes: true,
tagRegexp: '<string>',
targetFont: '<string>'
},
inputCharset: '<string>',
json: {
contextKeyPath: '<string>',
contextNotePath: '<string>',
excludeKeyRegexp: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
includeKeyRegexp: '<string>',
maxLenPath: '<string>',
tagRegexp: '<string>'
},
mac: {htmlSubfilter: true, icuSubFilter: true, tagRegexp: '<string>'},
md: {
customElements: '<string>',
excludeCodeElements: true,
extractCodeBlocks: true,
hardLineBreaksSegments: true,
ignoredBlockPrefixes: '<string>',
notEscapedCharacters: '<string>',
preserveWhiteSpaces: true,
processJekyllFrontMatter: true,
tagRegexp: '<string>'
},
mif: {
extractBodyPages: true,
extractCustomReferencePages: true,
extractDefaultReferencePages: true,
extractHiddenCondText: true,
extractHiddenPages: true,
extractIndexMarkers: true,
extractLinks: true,
extractMasterPages: true,
extractPgfNumFormat: true,
extractReferencePages: true,
extractUsedPgfNumFormat: true,
extractUsedVariables: true,
extractUsedXRefDef: true,
extractVariables: true,
extractXRefDef: true,
tagRegexp: '<string>'
},
multilingualCsv: {
allTargetColumns: {},
contextKeyColumns: '<string>',
contextNoteColumns: '<string>',
delimiter: '<string>',
htmlSubFilter: true,
importRows: '<string>',
maxLenColumns: '<string>',
saveConfirmedSegmentsToTm: true,
segmentation: true,
sourceColumns: '<string>',
tagRegexp: '<string>',
targetColumns: '<string>'
},
multilingualXls: {
contextKeyColumn: '<string>',
contextNoteColumn: '<string>',
htmlSubFilter: true,
importRows: '<string>',
maxLenColumn: '<string>',
saveConfirmedSegmentsToTm: true,
segmentation: true,
sourceColumn: '<string>',
tagRegexp: '<string>',
targetColumns: {}
},
multilingualXml: {
contextKeyXPath: '<string>',
contextNoteXPath: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
inlineElementsNonTranslatableXPath: '<string>',
maxLenXPath: '<string>',
preserveCharEntities: '<string>',
preserveWhitespace: true,
saveConfirmedSegmentsToTm: true,
segmentation: true,
sourceElementsXPath: '<string>',
tagRegexp: '<string>',
targetElementsXPaths: {},
translatableElementsXPath: '<string>',
xslFile: '<string>',
xslUrl: '<string>'
},
outputCharset: '<string>',
pdf: {ocrMode: '<string>', wysiwyg: true},
php: {htmlSubFilter: true, tagRegexp: '<string>'},
po: {
exportMultiline: true,
htmlSubFilter: true,
icuSubFilter: true,
markupSubFilterNonTranslatable: '<string>',
markupSubFilterTranslatable: '<string>',
saveConfirmedSegments: true,
segment: true,
tagRegexp: '<string>',
updateHeader: true
},
ppt: {
altText: true,
hiddenSlides: true,
masterSlides: true,
notes: true,
other: true
},
properties: {tagRegexp: '<string>'},
psd: {extractHiddenLayers: true, extractLockedLayers: true, tagRegexp: '<string>'},
quarkTag: {removeKerningTrackingTags: true, tagRegexp: '<string>'},
resx: {htmlSubFilter: true, tagRegexp: '<string>'},
sdlXlf: {
exportAttrsWhenConfirmedAndLocked: '<string>',
exportAttrsWhenConfirmedAndNotLocked: '<string>',
exportAttrsWhenNotConfirmedAndLocked: '<string>',
exportAttrsWhenNotConfirmedAndNotLocked: '<string>',
icuSubFilter: true,
importAsConfirmedRules: '<string>',
importAsLockedRules: '<string>',
saveConfirmedSegments: true,
skipImportRules: '<string>',
tagRegexp: '<string>'
},
segmentationRuleId: 123,
targetLength: true,
targetLengthMax: 123,
targetLengthPercent: true,
targetLengthPercentValue: 123,
targetSegmentationRuleId: 123,
tmMatch: {
ignoreTagMetadata: true,
penalizeMultiContextMatch: true,
prevOrNextSegment: true
},
ttx: {saveConfirmedSegments: true},
txt: {
contextKey: '<string>',
regexpCapturingGroups: true,
tagRegexp: '<string>',
translatableTextRegexp: '<string>'
},
xlf: {
contextType: '<string>',
copySourceToTargetIfNotImported: true,
exportAttrsWhenConfirmedAndLocked: '<string>',
exportAttrsWhenConfirmedAndNotLocked: '<string>',
exportAttrsWhenNotConfirmedAndLocked: '<string>',
exportAttrsWhenNotConfirmedAndNotLocked: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
importAsConfirmedRules: '<string>',
importAsConfirmedXPath: '<string>',
importAsLockedRules: '<string>',
importAsLockedXPath: '<string>',
importNotes: true,
importXPath: '<string>',
lineBreakTags: true,
preserveCharEntities: '<string>',
preserveWhitespace: true,
saveConfirmedSegments: true,
segmentation: true,
skipImportRules: '<string>',
tagRegexp: '<string>',
updateTargetLanguage: true,
xslFile: '<string>',
xslUrl: '<string>'
},
xlf2: {
contextKeyXPath: '<string>',
copySourceToTargetIfNotImported: true,
exportAttrsWhenConfirmedAndLocked: '<string>',
exportAttrsWhenConfirmedAndNotLocked: '<string>',
exportAttrsWhenNotConfirmedAndLocked: '<string>',
exportAttrsWhenNotConfirmedAndNotLocked: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
importAsConfirmedRules: '<string>',
importAsLockedRules: '<string>',
importNotes: true,
lineBreakTags: true,
preserveCharEntities: '<string>',
preserveWhitespace: true,
respectTranslateAttr: true,
saveConfirmedSegments: true,
segmentation: true,
skipImportRules: '<string>',
tagRegexp: '<string>',
updateTargetLanguage: true,
xslFile: '<string>',
xslUrl: '<string>'
},
xls: {
comments: true,
hidden: true,
htmlSubfilter: true,
other: true,
sheetNames: true,
specifiedColumns: '<string>',
tagRegexp: '<string>'
},
xml: {
assistantProfile: '<string>',
contextKeyXPath: '<string>',
contextNoteXpath: '<string>',
entities: true,
excludeAttributesPlain: '<string>',
excludeElementsPlain: '<string>',
expandEntities: true,
htmlSubfilterElementsPlain: '<string>',
htmlSubfilterElementsXpath: '<string>',
icuSubFilter: true,
importComments: true,
includeAttributesPlain: '<string>',
includeElementsPlain: '<string>',
includeXPath: '<string>',
inlineElementsAutoPlain: true,
inlineElementsAutoXPath: true,
inlineElementsNonTranslatablePlain: '<string>',
inlineElementsNonTranslatableXPath: '<string>',
inlineElementsPlain: '<string>',
inlineElementsXpath: '<string>',
lockAttributesPlain: '<string>',
lockElementsPlain: '<string>',
lockXPath: '<string>',
maxLenXPath: '<string>',
preserveCharEntities: '<string>',
preserveWhitespaceXPath: '<string>',
segmentation: true,
segmentationExclude: true,
segmentationExcludedElementsXpath: '<string>',
tagRegexp: '<string>',
xslFile: '<string>',
xslUrl: '<string>'
},
yaml: {
contextKeyPath: '<string>',
contextPath: '<string>',
excludeValueRegexp: '<string>',
htmlSubFilter: true,
icuSubFilter: true,
includeKeyRegexp: '<string>',
indentEmptyLinesInString: true,
markdownSubfilter: true,
tagRegexp: '<string>',
updateRootElementLang: true
},
zipCharset: '<string>'
}
})
};
fetch('https://cloud.memsource.com/web/api2/v1/customFileTypes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v1/customFileTypes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filenamePattern' => '<string>',
'name' => '<string>',
'fileImportSettings' => [
'android' => [
'icuSubFilter' => true,
'tagRegexp' => '<string>'
],
'asciidoc' => [
'extractBtnMenuLabels' => true,
'extractCustomDocumentAttributeNameRegexp' => '<string>',
'htmlInPassthrough' => true,
'nontranslatableMonospaceCustomStylesRegexp' => '<string>',
'tagRegexp' => '<string>'
],
'autodetectMultilingualFiles' => true,
'csv' => [
'contextKeyColumn' => '<string>',
'contextNoteColumns' => '<string>',
'delimiter' => '<string>',
'htmlSubFilter' => true,
'importColumns' => '<string>',
'importRows' => '<string>',
'maxLenColumn' => '<string>',
'tagRegexp' => '<string>'
],
'dita' => [
'excludeTags' => '<string>',
'extractSeparateSegmentsXpath' => '<string>',
'includeTags' => '<string>',
'inlineTags' => '<string>',
'inlineTagsNonTranslatable' => '<string>',
'tagRegexp' => '<string>'
],
'doc' => [
'altText' => true,
'applyTrackChanges' => true,
'comments' => true,
'headerFooter' => true,
'hidden' => true,
'hyperlinkTarget' => true,
'index' => true,
'joinSimilarRuns' => true,
'ocrImageText' => true,
'other' => true,
'tagRegexp' => '<string>',
'targetFont' => '<string>'
],
'docBook' => [
'excludeTags' => '<string>',
'includeTags' => '<string>',
'inlineTags' => '<string>',
'inlineTagsNonTranslatable' => '<string>',
'tagRegexp' => '<string>'
],
'html' => [
'breakTagCreatesSegment' => true,
'charEntitiesToTags' => '<string>',
'escapeDisabled' => true,
'excludeElements' => '<string>',
'importComments' => true,
'importDefaultAttributes' => true,
'importDefaultMetaTags' => true,
'nonTranslatableInlineElements' => '<string>',
'preserveWhitespace' => true,
'segmentationBeginTagPlaceholder' => '<string>',
'segmentationEndTagPlaceholder' => '<string>',
'segmentationSingleTagPlaceholder' => '<string>',
'tagRegexp' => '<string>',
'translatableAttributes' => '<string>',
'translatableInlineElements' => '<string>',
'translateMetaTagRegexp' => '<string>',
'unknownTagCreatesTag' => true,
'updateLang' => true
],
'idml' => [
'extractCrossReferenceFormats' => true,
'extractHiddenConditionalText' => true,
'extractHyperlinks' => true,
'extractInvisibleLayers' => true,
'extractLockedLayers' => true,
'extractMasterSpreads' => true,
'extractNotes' => true,
'extractVariables' => true,
'keepKerning' => true,
'keepTracking' => true,
'removeXmlElements' => true,
'replaceFont' => true,
'simplifyCodes' => true,
'tagRegexp' => '<string>',
'targetFont' => '<string>'
],
'inputCharset' => '<string>',
'json' => [
'contextKeyPath' => '<string>',
'contextNotePath' => '<string>',
'excludeKeyRegexp' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'includeKeyRegexp' => '<string>',
'maxLenPath' => '<string>',
'tagRegexp' => '<string>'
],
'mac' => [
'htmlSubfilter' => true,
'icuSubFilter' => true,
'tagRegexp' => '<string>'
],
'md' => [
'customElements' => '<string>',
'excludeCodeElements' => true,
'extractCodeBlocks' => true,
'hardLineBreaksSegments' => true,
'ignoredBlockPrefixes' => '<string>',
'notEscapedCharacters' => '<string>',
'preserveWhiteSpaces' => true,
'processJekyllFrontMatter' => true,
'tagRegexp' => '<string>'
],
'mif' => [
'extractBodyPages' => true,
'extractCustomReferencePages' => true,
'extractDefaultReferencePages' => true,
'extractHiddenCondText' => true,
'extractHiddenPages' => true,
'extractIndexMarkers' => true,
'extractLinks' => true,
'extractMasterPages' => true,
'extractPgfNumFormat' => true,
'extractReferencePages' => true,
'extractUsedPgfNumFormat' => true,
'extractUsedVariables' => true,
'extractUsedXRefDef' => true,
'extractVariables' => true,
'extractXRefDef' => true,
'tagRegexp' => '<string>'
],
'multilingualCsv' => [
'allTargetColumns' => [
],
'contextKeyColumns' => '<string>',
'contextNoteColumns' => '<string>',
'delimiter' => '<string>',
'htmlSubFilter' => true,
'importRows' => '<string>',
'maxLenColumns' => '<string>',
'saveConfirmedSegmentsToTm' => true,
'segmentation' => true,
'sourceColumns' => '<string>',
'tagRegexp' => '<string>',
'targetColumns' => '<string>'
],
'multilingualXls' => [
'contextKeyColumn' => '<string>',
'contextNoteColumn' => '<string>',
'htmlSubFilter' => true,
'importRows' => '<string>',
'maxLenColumn' => '<string>',
'saveConfirmedSegmentsToTm' => true,
'segmentation' => true,
'sourceColumn' => '<string>',
'tagRegexp' => '<string>',
'targetColumns' => [
]
],
'multilingualXml' => [
'contextKeyXPath' => '<string>',
'contextNoteXPath' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'inlineElementsNonTranslatableXPath' => '<string>',
'maxLenXPath' => '<string>',
'preserveCharEntities' => '<string>',
'preserveWhitespace' => true,
'saveConfirmedSegmentsToTm' => true,
'segmentation' => true,
'sourceElementsXPath' => '<string>',
'tagRegexp' => '<string>',
'targetElementsXPaths' => [
],
'translatableElementsXPath' => '<string>',
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'outputCharset' => '<string>',
'pdf' => [
'ocrMode' => '<string>',
'wysiwyg' => true
],
'php' => [
'htmlSubFilter' => true,
'tagRegexp' => '<string>'
],
'po' => [
'exportMultiline' => true,
'htmlSubFilter' => true,
'icuSubFilter' => true,
'markupSubFilterNonTranslatable' => '<string>',
'markupSubFilterTranslatable' => '<string>',
'saveConfirmedSegments' => true,
'segment' => true,
'tagRegexp' => '<string>',
'updateHeader' => true
],
'ppt' => [
'altText' => true,
'hiddenSlides' => true,
'masterSlides' => true,
'notes' => true,
'other' => true
],
'properties' => [
'tagRegexp' => '<string>'
],
'psd' => [
'extractHiddenLayers' => true,
'extractLockedLayers' => true,
'tagRegexp' => '<string>'
],
'quarkTag' => [
'removeKerningTrackingTags' => true,
'tagRegexp' => '<string>'
],
'resx' => [
'htmlSubFilter' => true,
'tagRegexp' => '<string>'
],
'sdlXlf' => [
'exportAttrsWhenConfirmedAndLocked' => '<string>',
'exportAttrsWhenConfirmedAndNotLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndNotLocked' => '<string>',
'icuSubFilter' => true,
'importAsConfirmedRules' => '<string>',
'importAsLockedRules' => '<string>',
'saveConfirmedSegments' => true,
'skipImportRules' => '<string>',
'tagRegexp' => '<string>'
],
'segmentationRuleId' => 123,
'targetLength' => true,
'targetLengthMax' => 123,
'targetLengthPercent' => true,
'targetLengthPercentValue' => 123,
'targetSegmentationRuleId' => 123,
'tmMatch' => [
'ignoreTagMetadata' => true,
'penalizeMultiContextMatch' => true,
'prevOrNextSegment' => true
],
'ttx' => [
'saveConfirmedSegments' => true
],
'txt' => [
'contextKey' => '<string>',
'regexpCapturingGroups' => true,
'tagRegexp' => '<string>',
'translatableTextRegexp' => '<string>'
],
'xlf' => [
'contextType' => '<string>',
'copySourceToTargetIfNotImported' => true,
'exportAttrsWhenConfirmedAndLocked' => '<string>',
'exportAttrsWhenConfirmedAndNotLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndNotLocked' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'importAsConfirmedRules' => '<string>',
'importAsConfirmedXPath' => '<string>',
'importAsLockedRules' => '<string>',
'importAsLockedXPath' => '<string>',
'importNotes' => true,
'importXPath' => '<string>',
'lineBreakTags' => true,
'preserveCharEntities' => '<string>',
'preserveWhitespace' => true,
'saveConfirmedSegments' => true,
'segmentation' => true,
'skipImportRules' => '<string>',
'tagRegexp' => '<string>',
'updateTargetLanguage' => true,
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'xlf2' => [
'contextKeyXPath' => '<string>',
'copySourceToTargetIfNotImported' => true,
'exportAttrsWhenConfirmedAndLocked' => '<string>',
'exportAttrsWhenConfirmedAndNotLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndLocked' => '<string>',
'exportAttrsWhenNotConfirmedAndNotLocked' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'importAsConfirmedRules' => '<string>',
'importAsLockedRules' => '<string>',
'importNotes' => true,
'lineBreakTags' => true,
'preserveCharEntities' => '<string>',
'preserveWhitespace' => true,
'respectTranslateAttr' => true,
'saveConfirmedSegments' => true,
'segmentation' => true,
'skipImportRules' => '<string>',
'tagRegexp' => '<string>',
'updateTargetLanguage' => true,
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'xls' => [
'comments' => true,
'hidden' => true,
'htmlSubfilter' => true,
'other' => true,
'sheetNames' => true,
'specifiedColumns' => '<string>',
'tagRegexp' => '<string>'
],
'xml' => [
'assistantProfile' => '<string>',
'contextKeyXPath' => '<string>',
'contextNoteXpath' => '<string>',
'entities' => true,
'excludeAttributesPlain' => '<string>',
'excludeElementsPlain' => '<string>',
'expandEntities' => true,
'htmlSubfilterElementsPlain' => '<string>',
'htmlSubfilterElementsXpath' => '<string>',
'icuSubFilter' => true,
'importComments' => true,
'includeAttributesPlain' => '<string>',
'includeElementsPlain' => '<string>',
'includeXPath' => '<string>',
'inlineElementsAutoPlain' => true,
'inlineElementsAutoXPath' => true,
'inlineElementsNonTranslatablePlain' => '<string>',
'inlineElementsNonTranslatableXPath' => '<string>',
'inlineElementsPlain' => '<string>',
'inlineElementsXpath' => '<string>',
'lockAttributesPlain' => '<string>',
'lockElementsPlain' => '<string>',
'lockXPath' => '<string>',
'maxLenXPath' => '<string>',
'preserveCharEntities' => '<string>',
'preserveWhitespaceXPath' => '<string>',
'segmentation' => true,
'segmentationExclude' => true,
'segmentationExcludedElementsXpath' => '<string>',
'tagRegexp' => '<string>',
'xslFile' => '<string>',
'xslUrl' => '<string>'
],
'yaml' => [
'contextKeyPath' => '<string>',
'contextPath' => '<string>',
'excludeValueRegexp' => '<string>',
'htmlSubFilter' => true,
'icuSubFilter' => true,
'includeKeyRegexp' => '<string>',
'indentEmptyLinesInString' => true,
'markdownSubfilter' => true,
'tagRegexp' => '<string>',
'updateRootElementLang' => true
],
'zipCharset' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v1/customFileTypes"
payload := strings.NewReader("{\n \"filenamePattern\": \"<string>\",\n \"name\": \"<string>\",\n \"fileImportSettings\": {\n \"android\": {\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"asciidoc\": {\n \"extractBtnMenuLabels\": true,\n \"extractCustomDocumentAttributeNameRegexp\": \"<string>\",\n \"htmlInPassthrough\": true,\n \"nontranslatableMonospaceCustomStylesRegexp\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"autodetectMultilingualFiles\": true,\n \"csv\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importColumns\": \"<string>\",\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"dita\": {\n \"excludeTags\": \"<string>\",\n \"extractSeparateSegmentsXpath\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"doc\": {\n \"altText\": true,\n \"applyTrackChanges\": true,\n \"comments\": true,\n \"headerFooter\": true,\n \"hidden\": true,\n \"hyperlinkTarget\": true,\n \"index\": true,\n \"joinSimilarRuns\": true,\n \"ocrImageText\": true,\n \"other\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"docBook\": {\n \"excludeTags\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"html\": {\n \"breakTagCreatesSegment\": true,\n \"charEntitiesToTags\": \"<string>\",\n \"escapeDisabled\": true,\n \"excludeElements\": \"<string>\",\n \"importComments\": true,\n \"importDefaultAttributes\": true,\n \"importDefaultMetaTags\": true,\n \"nonTranslatableInlineElements\": \"<string>\",\n \"preserveWhitespace\": true,\n \"segmentationBeginTagPlaceholder\": \"<string>\",\n \"segmentationEndTagPlaceholder\": \"<string>\",\n \"segmentationSingleTagPlaceholder\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"translatableAttributes\": \"<string>\",\n \"translatableInlineElements\": \"<string>\",\n \"translateMetaTagRegexp\": \"<string>\",\n \"unknownTagCreatesTag\": true,\n \"updateLang\": true\n },\n \"idml\": {\n \"extractCrossReferenceFormats\": true,\n \"extractHiddenConditionalText\": true,\n \"extractHyperlinks\": true,\n \"extractInvisibleLayers\": true,\n \"extractLockedLayers\": true,\n \"extractMasterSpreads\": true,\n \"extractNotes\": true,\n \"extractVariables\": true,\n \"keepKerning\": true,\n \"keepTracking\": true,\n \"removeXmlElements\": true,\n \"replaceFont\": true,\n \"simplifyCodes\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"inputCharset\": \"<string>\",\n \"json\": {\n \"contextKeyPath\": \"<string>\",\n \"contextNotePath\": \"<string>\",\n \"excludeKeyRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"maxLenPath\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"mac\": {\n \"htmlSubfilter\": true,\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"md\": {\n \"customElements\": \"<string>\",\n \"excludeCodeElements\": true,\n \"extractCodeBlocks\": true,\n \"hardLineBreaksSegments\": true,\n \"ignoredBlockPrefixes\": \"<string>\",\n \"notEscapedCharacters\": \"<string>\",\n \"preserveWhiteSpaces\": true,\n \"processJekyllFrontMatter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"mif\": {\n \"extractBodyPages\": true,\n \"extractCustomReferencePages\": true,\n \"extractDefaultReferencePages\": true,\n \"extractHiddenCondText\": true,\n \"extractHiddenPages\": true,\n \"extractIndexMarkers\": true,\n \"extractLinks\": true,\n \"extractMasterPages\": true,\n \"extractPgfNumFormat\": true,\n \"extractReferencePages\": true,\n \"extractUsedPgfNumFormat\": true,\n \"extractUsedVariables\": true,\n \"extractUsedXRefDef\": true,\n \"extractVariables\": true,\n \"extractXRefDef\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"multilingualCsv\": {\n \"allTargetColumns\": {},\n \"contextKeyColumns\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumns\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": \"<string>\"\n },\n \"multilingualXls\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumn\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": {}\n },\n \"multilingualXml\": {\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXPath\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceElementsXPath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetElementsXPaths\": {},\n \"translatableElementsXPath\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"outputCharset\": \"<string>\",\n \"pdf\": {\n \"ocrMode\": \"<string>\",\n \"wysiwyg\": true\n },\n \"php\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"po\": {\n \"exportMultiline\": true,\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"markupSubFilterNonTranslatable\": \"<string>\",\n \"markupSubFilterTranslatable\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"segment\": true,\n \"tagRegexp\": \"<string>\",\n \"updateHeader\": true\n },\n \"ppt\": {\n \"altText\": true,\n \"hiddenSlides\": true,\n \"masterSlides\": true,\n \"notes\": true,\n \"other\": true\n },\n \"properties\": {\n \"tagRegexp\": \"<string>\"\n },\n \"psd\": {\n \"extractHiddenLayers\": true,\n \"extractLockedLayers\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"quarkTag\": {\n \"removeKerningTrackingTags\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"resx\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"sdlXlf\": {\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"segmentationRuleId\": 123,\n \"targetLength\": true,\n \"targetLengthMax\": 123,\n \"targetLengthPercent\": true,\n \"targetLengthPercentValue\": 123,\n \"targetSegmentationRuleId\": 123,\n \"tmMatch\": {\n \"ignoreTagMetadata\": true,\n \"penalizeMultiContextMatch\": true,\n \"prevOrNextSegment\": true\n },\n \"ttx\": {\n \"saveConfirmedSegments\": true\n },\n \"txt\": {\n \"contextKey\": \"<string>\",\n \"regexpCapturingGroups\": true,\n \"tagRegexp\": \"<string>\",\n \"translatableTextRegexp\": \"<string>\"\n },\n \"xlf\": {\n \"contextType\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsConfirmedXPath\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importAsLockedXPath\": \"<string>\",\n \"importNotes\": true,\n \"importXPath\": \"<string>\",\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xlf2\": {\n \"contextKeyXPath\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importNotes\": true,\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"respectTranslateAttr\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xls\": {\n \"comments\": true,\n \"hidden\": true,\n \"htmlSubfilter\": true,\n \"other\": true,\n \"sheetNames\": true,\n \"specifiedColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"xml\": {\n \"assistantProfile\": \"<string>\",\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXpath\": \"<string>\",\n \"entities\": true,\n \"excludeAttributesPlain\": \"<string>\",\n \"excludeElementsPlain\": \"<string>\",\n \"expandEntities\": true,\n \"htmlSubfilterElementsPlain\": \"<string>\",\n \"htmlSubfilterElementsXpath\": \"<string>\",\n \"icuSubFilter\": true,\n \"importComments\": true,\n \"includeAttributesPlain\": \"<string>\",\n \"includeElementsPlain\": \"<string>\",\n \"includeXPath\": \"<string>\",\n \"inlineElementsAutoPlain\": true,\n \"inlineElementsAutoXPath\": true,\n \"inlineElementsNonTranslatablePlain\": \"<string>\",\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"inlineElementsPlain\": \"<string>\",\n \"inlineElementsXpath\": \"<string>\",\n \"lockAttributesPlain\": \"<string>\",\n \"lockElementsPlain\": \"<string>\",\n \"lockXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespaceXPath\": \"<string>\",\n \"segmentation\": true,\n \"segmentationExclude\": true,\n \"segmentationExcludedElementsXpath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"yaml\": {\n \"contextKeyPath\": \"<string>\",\n \"contextPath\": \"<string>\",\n \"excludeValueRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"indentEmptyLinesInString\": true,\n \"markdownSubfilter\": true,\n \"tagRegexp\": \"<string>\",\n \"updateRootElementLang\": true\n },\n \"zipCharset\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v1/customFileTypes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filenamePattern\": \"<string>\",\n \"name\": \"<string>\",\n \"fileImportSettings\": {\n \"android\": {\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"asciidoc\": {\n \"extractBtnMenuLabels\": true,\n \"extractCustomDocumentAttributeNameRegexp\": \"<string>\",\n \"htmlInPassthrough\": true,\n \"nontranslatableMonospaceCustomStylesRegexp\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"autodetectMultilingualFiles\": true,\n \"csv\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importColumns\": \"<string>\",\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"dita\": {\n \"excludeTags\": \"<string>\",\n \"extractSeparateSegmentsXpath\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"doc\": {\n \"altText\": true,\n \"applyTrackChanges\": true,\n \"comments\": true,\n \"headerFooter\": true,\n \"hidden\": true,\n \"hyperlinkTarget\": true,\n \"index\": true,\n \"joinSimilarRuns\": true,\n \"ocrImageText\": true,\n \"other\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"docBook\": {\n \"excludeTags\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"html\": {\n \"breakTagCreatesSegment\": true,\n \"charEntitiesToTags\": \"<string>\",\n \"escapeDisabled\": true,\n \"excludeElements\": \"<string>\",\n \"importComments\": true,\n \"importDefaultAttributes\": true,\n \"importDefaultMetaTags\": true,\n \"nonTranslatableInlineElements\": \"<string>\",\n \"preserveWhitespace\": true,\n \"segmentationBeginTagPlaceholder\": \"<string>\",\n \"segmentationEndTagPlaceholder\": \"<string>\",\n \"segmentationSingleTagPlaceholder\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"translatableAttributes\": \"<string>\",\n \"translatableInlineElements\": \"<string>\",\n \"translateMetaTagRegexp\": \"<string>\",\n \"unknownTagCreatesTag\": true,\n \"updateLang\": true\n },\n \"idml\": {\n \"extractCrossReferenceFormats\": true,\n \"extractHiddenConditionalText\": true,\n \"extractHyperlinks\": true,\n \"extractInvisibleLayers\": true,\n \"extractLockedLayers\": true,\n \"extractMasterSpreads\": true,\n \"extractNotes\": true,\n \"extractVariables\": true,\n \"keepKerning\": true,\n \"keepTracking\": true,\n \"removeXmlElements\": true,\n \"replaceFont\": true,\n \"simplifyCodes\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"inputCharset\": \"<string>\",\n \"json\": {\n \"contextKeyPath\": \"<string>\",\n \"contextNotePath\": \"<string>\",\n \"excludeKeyRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"maxLenPath\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"mac\": {\n \"htmlSubfilter\": true,\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"md\": {\n \"customElements\": \"<string>\",\n \"excludeCodeElements\": true,\n \"extractCodeBlocks\": true,\n \"hardLineBreaksSegments\": true,\n \"ignoredBlockPrefixes\": \"<string>\",\n \"notEscapedCharacters\": \"<string>\",\n \"preserveWhiteSpaces\": true,\n \"processJekyllFrontMatter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"mif\": {\n \"extractBodyPages\": true,\n \"extractCustomReferencePages\": true,\n \"extractDefaultReferencePages\": true,\n \"extractHiddenCondText\": true,\n \"extractHiddenPages\": true,\n \"extractIndexMarkers\": true,\n \"extractLinks\": true,\n \"extractMasterPages\": true,\n \"extractPgfNumFormat\": true,\n \"extractReferencePages\": true,\n \"extractUsedPgfNumFormat\": true,\n \"extractUsedVariables\": true,\n \"extractUsedXRefDef\": true,\n \"extractVariables\": true,\n \"extractXRefDef\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"multilingualCsv\": {\n \"allTargetColumns\": {},\n \"contextKeyColumns\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumns\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": \"<string>\"\n },\n \"multilingualXls\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumn\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": {}\n },\n \"multilingualXml\": {\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXPath\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceElementsXPath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetElementsXPaths\": {},\n \"translatableElementsXPath\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"outputCharset\": \"<string>\",\n \"pdf\": {\n \"ocrMode\": \"<string>\",\n \"wysiwyg\": true\n },\n \"php\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"po\": {\n \"exportMultiline\": true,\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"markupSubFilterNonTranslatable\": \"<string>\",\n \"markupSubFilterTranslatable\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"segment\": true,\n \"tagRegexp\": \"<string>\",\n \"updateHeader\": true\n },\n \"ppt\": {\n \"altText\": true,\n \"hiddenSlides\": true,\n \"masterSlides\": true,\n \"notes\": true,\n \"other\": true\n },\n \"properties\": {\n \"tagRegexp\": \"<string>\"\n },\n \"psd\": {\n \"extractHiddenLayers\": true,\n \"extractLockedLayers\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"quarkTag\": {\n \"removeKerningTrackingTags\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"resx\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"sdlXlf\": {\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"segmentationRuleId\": 123,\n \"targetLength\": true,\n \"targetLengthMax\": 123,\n \"targetLengthPercent\": true,\n \"targetLengthPercentValue\": 123,\n \"targetSegmentationRuleId\": 123,\n \"tmMatch\": {\n \"ignoreTagMetadata\": true,\n \"penalizeMultiContextMatch\": true,\n \"prevOrNextSegment\": true\n },\n \"ttx\": {\n \"saveConfirmedSegments\": true\n },\n \"txt\": {\n \"contextKey\": \"<string>\",\n \"regexpCapturingGroups\": true,\n \"tagRegexp\": \"<string>\",\n \"translatableTextRegexp\": \"<string>\"\n },\n \"xlf\": {\n \"contextType\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsConfirmedXPath\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importAsLockedXPath\": \"<string>\",\n \"importNotes\": true,\n \"importXPath\": \"<string>\",\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xlf2\": {\n \"contextKeyXPath\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importNotes\": true,\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"respectTranslateAttr\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xls\": {\n \"comments\": true,\n \"hidden\": true,\n \"htmlSubfilter\": true,\n \"other\": true,\n \"sheetNames\": true,\n \"specifiedColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"xml\": {\n \"assistantProfile\": \"<string>\",\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXpath\": \"<string>\",\n \"entities\": true,\n \"excludeAttributesPlain\": \"<string>\",\n \"excludeElementsPlain\": \"<string>\",\n \"expandEntities\": true,\n \"htmlSubfilterElementsPlain\": \"<string>\",\n \"htmlSubfilterElementsXpath\": \"<string>\",\n \"icuSubFilter\": true,\n \"importComments\": true,\n \"includeAttributesPlain\": \"<string>\",\n \"includeElementsPlain\": \"<string>\",\n \"includeXPath\": \"<string>\",\n \"inlineElementsAutoPlain\": true,\n \"inlineElementsAutoXPath\": true,\n \"inlineElementsNonTranslatablePlain\": \"<string>\",\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"inlineElementsPlain\": \"<string>\",\n \"inlineElementsXpath\": \"<string>\",\n \"lockAttributesPlain\": \"<string>\",\n \"lockElementsPlain\": \"<string>\",\n \"lockXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespaceXPath\": \"<string>\",\n \"segmentation\": true,\n \"segmentationExclude\": true,\n \"segmentationExcludedElementsXpath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"yaml\": {\n \"contextKeyPath\": \"<string>\",\n \"contextPath\": \"<string>\",\n \"excludeValueRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"indentEmptyLinesInString\": true,\n \"markdownSubfilter\": true,\n \"tagRegexp\": \"<string>\",\n \"updateRootElementLang\": true\n },\n \"zipCharset\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/customFileTypes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filenamePattern\": \"<string>\",\n \"name\": \"<string>\",\n \"fileImportSettings\": {\n \"android\": {\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"asciidoc\": {\n \"extractBtnMenuLabels\": true,\n \"extractCustomDocumentAttributeNameRegexp\": \"<string>\",\n \"htmlInPassthrough\": true,\n \"nontranslatableMonospaceCustomStylesRegexp\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"autodetectMultilingualFiles\": true,\n \"csv\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importColumns\": \"<string>\",\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"dita\": {\n \"excludeTags\": \"<string>\",\n \"extractSeparateSegmentsXpath\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"doc\": {\n \"altText\": true,\n \"applyTrackChanges\": true,\n \"comments\": true,\n \"headerFooter\": true,\n \"hidden\": true,\n \"hyperlinkTarget\": true,\n \"index\": true,\n \"joinSimilarRuns\": true,\n \"ocrImageText\": true,\n \"other\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"docBook\": {\n \"excludeTags\": \"<string>\",\n \"includeTags\": \"<string>\",\n \"inlineTags\": \"<string>\",\n \"inlineTagsNonTranslatable\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"html\": {\n \"breakTagCreatesSegment\": true,\n \"charEntitiesToTags\": \"<string>\",\n \"escapeDisabled\": true,\n \"excludeElements\": \"<string>\",\n \"importComments\": true,\n \"importDefaultAttributes\": true,\n \"importDefaultMetaTags\": true,\n \"nonTranslatableInlineElements\": \"<string>\",\n \"preserveWhitespace\": true,\n \"segmentationBeginTagPlaceholder\": \"<string>\",\n \"segmentationEndTagPlaceholder\": \"<string>\",\n \"segmentationSingleTagPlaceholder\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"translatableAttributes\": \"<string>\",\n \"translatableInlineElements\": \"<string>\",\n \"translateMetaTagRegexp\": \"<string>\",\n \"unknownTagCreatesTag\": true,\n \"updateLang\": true\n },\n \"idml\": {\n \"extractCrossReferenceFormats\": true,\n \"extractHiddenConditionalText\": true,\n \"extractHyperlinks\": true,\n \"extractInvisibleLayers\": true,\n \"extractLockedLayers\": true,\n \"extractMasterSpreads\": true,\n \"extractNotes\": true,\n \"extractVariables\": true,\n \"keepKerning\": true,\n \"keepTracking\": true,\n \"removeXmlElements\": true,\n \"replaceFont\": true,\n \"simplifyCodes\": true,\n \"tagRegexp\": \"<string>\",\n \"targetFont\": \"<string>\"\n },\n \"inputCharset\": \"<string>\",\n \"json\": {\n \"contextKeyPath\": \"<string>\",\n \"contextNotePath\": \"<string>\",\n \"excludeKeyRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"maxLenPath\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"mac\": {\n \"htmlSubfilter\": true,\n \"icuSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"md\": {\n \"customElements\": \"<string>\",\n \"excludeCodeElements\": true,\n \"extractCodeBlocks\": true,\n \"hardLineBreaksSegments\": true,\n \"ignoredBlockPrefixes\": \"<string>\",\n \"notEscapedCharacters\": \"<string>\",\n \"preserveWhiteSpaces\": true,\n \"processJekyllFrontMatter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"mif\": {\n \"extractBodyPages\": true,\n \"extractCustomReferencePages\": true,\n \"extractDefaultReferencePages\": true,\n \"extractHiddenCondText\": true,\n \"extractHiddenPages\": true,\n \"extractIndexMarkers\": true,\n \"extractLinks\": true,\n \"extractMasterPages\": true,\n \"extractPgfNumFormat\": true,\n \"extractReferencePages\": true,\n \"extractUsedPgfNumFormat\": true,\n \"extractUsedVariables\": true,\n \"extractUsedXRefDef\": true,\n \"extractVariables\": true,\n \"extractXRefDef\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"multilingualCsv\": {\n \"allTargetColumns\": {},\n \"contextKeyColumns\": \"<string>\",\n \"contextNoteColumns\": \"<string>\",\n \"delimiter\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumns\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": \"<string>\"\n },\n \"multilingualXls\": {\n \"contextKeyColumn\": \"<string>\",\n \"contextNoteColumn\": \"<string>\",\n \"htmlSubFilter\": true,\n \"importRows\": \"<string>\",\n \"maxLenColumn\": \"<string>\",\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceColumn\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetColumns\": {}\n },\n \"multilingualXml\": {\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXPath\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegmentsToTm\": true,\n \"segmentation\": true,\n \"sourceElementsXPath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"targetElementsXPaths\": {},\n \"translatableElementsXPath\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"outputCharset\": \"<string>\",\n \"pdf\": {\n \"ocrMode\": \"<string>\",\n \"wysiwyg\": true\n },\n \"php\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"po\": {\n \"exportMultiline\": true,\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"markupSubFilterNonTranslatable\": \"<string>\",\n \"markupSubFilterTranslatable\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"segment\": true,\n \"tagRegexp\": \"<string>\",\n \"updateHeader\": true\n },\n \"ppt\": {\n \"altText\": true,\n \"hiddenSlides\": true,\n \"masterSlides\": true,\n \"notes\": true,\n \"other\": true\n },\n \"properties\": {\n \"tagRegexp\": \"<string>\"\n },\n \"psd\": {\n \"extractHiddenLayers\": true,\n \"extractLockedLayers\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"quarkTag\": {\n \"removeKerningTrackingTags\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"resx\": {\n \"htmlSubFilter\": true,\n \"tagRegexp\": \"<string>\"\n },\n \"sdlXlf\": {\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"saveConfirmedSegments\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"segmentationRuleId\": 123,\n \"targetLength\": true,\n \"targetLengthMax\": 123,\n \"targetLengthPercent\": true,\n \"targetLengthPercentValue\": 123,\n \"targetSegmentationRuleId\": 123,\n \"tmMatch\": {\n \"ignoreTagMetadata\": true,\n \"penalizeMultiContextMatch\": true,\n \"prevOrNextSegment\": true\n },\n \"ttx\": {\n \"saveConfirmedSegments\": true\n },\n \"txt\": {\n \"contextKey\": \"<string>\",\n \"regexpCapturingGroups\": true,\n \"tagRegexp\": \"<string>\",\n \"translatableTextRegexp\": \"<string>\"\n },\n \"xlf\": {\n \"contextType\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsConfirmedXPath\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importAsLockedXPath\": \"<string>\",\n \"importNotes\": true,\n \"importXPath\": \"<string>\",\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xlf2\": {\n \"contextKeyXPath\": \"<string>\",\n \"copySourceToTargetIfNotImported\": true,\n \"exportAttrsWhenConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenConfirmedAndNotLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndLocked\": \"<string>\",\n \"exportAttrsWhenNotConfirmedAndNotLocked\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"importAsConfirmedRules\": \"<string>\",\n \"importAsLockedRules\": \"<string>\",\n \"importNotes\": true,\n \"lineBreakTags\": true,\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespace\": true,\n \"respectTranslateAttr\": true,\n \"saveConfirmedSegments\": true,\n \"segmentation\": true,\n \"skipImportRules\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"updateTargetLanguage\": true,\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"xls\": {\n \"comments\": true,\n \"hidden\": true,\n \"htmlSubfilter\": true,\n \"other\": true,\n \"sheetNames\": true,\n \"specifiedColumns\": \"<string>\",\n \"tagRegexp\": \"<string>\"\n },\n \"xml\": {\n \"assistantProfile\": \"<string>\",\n \"contextKeyXPath\": \"<string>\",\n \"contextNoteXpath\": \"<string>\",\n \"entities\": true,\n \"excludeAttributesPlain\": \"<string>\",\n \"excludeElementsPlain\": \"<string>\",\n \"expandEntities\": true,\n \"htmlSubfilterElementsPlain\": \"<string>\",\n \"htmlSubfilterElementsXpath\": \"<string>\",\n \"icuSubFilter\": true,\n \"importComments\": true,\n \"includeAttributesPlain\": \"<string>\",\n \"includeElementsPlain\": \"<string>\",\n \"includeXPath\": \"<string>\",\n \"inlineElementsAutoPlain\": true,\n \"inlineElementsAutoXPath\": true,\n \"inlineElementsNonTranslatablePlain\": \"<string>\",\n \"inlineElementsNonTranslatableXPath\": \"<string>\",\n \"inlineElementsPlain\": \"<string>\",\n \"inlineElementsXpath\": \"<string>\",\n \"lockAttributesPlain\": \"<string>\",\n \"lockElementsPlain\": \"<string>\",\n \"lockXPath\": \"<string>\",\n \"maxLenXPath\": \"<string>\",\n \"preserveCharEntities\": \"<string>\",\n \"preserveWhitespaceXPath\": \"<string>\",\n \"segmentation\": true,\n \"segmentationExclude\": true,\n \"segmentationExcludedElementsXpath\": \"<string>\",\n \"tagRegexp\": \"<string>\",\n \"xslFile\": \"<string>\",\n \"xslUrl\": \"<string>\"\n },\n \"yaml\": {\n \"contextKeyPath\": \"<string>\",\n \"contextPath\": \"<string>\",\n \"excludeValueRegexp\": \"<string>\",\n \"htmlSubFilter\": true,\n \"icuSubFilter\": true,\n \"includeKeyRegexp\": \"<string>\",\n \"indentEmptyLinesInString\": true,\n \"markdownSubfilter\": true,\n \"tagRegexp\": \"<string>\",\n \"updateRootElementLang\": true\n },\n \"zipCharset\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>",
"uid": "<string>",
"userName": "<string>"
},
"dateCreated": "2023-11-07T05:31:56Z",
"fileImportSettings": {
"android": {
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"asciidoc": {
"extractBtnMenuLabels": true,
"extractCustomDocumentAttributeNameRegexp": "<string>",
"htmlInPassthrough": true,
"nontranslatableMonospaceCustomStylesRegexp": "<string>",
"tagRegexp": "<string>"
},
"autodetectMultilingualFiles": true,
"csv": {
"contextKeyColumn": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importColumns": "<string>",
"importRows": "<string>",
"maxLenColumn": "<string>",
"tagRegexp": "<string>"
},
"dita": {
"excludeTags": "<string>",
"extractSeparateSegmentsXpath": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"doc": {
"altText": true,
"applyTrackChanges": true,
"comments": true,
"headerFooter": true,
"hidden": true,
"hyperlinkTarget": true,
"index": true,
"joinSimilarRuns": true,
"ocrImageText": true,
"other": true,
"properties": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"docBook": {
"excludeTags": "<string>",
"includeTags": "<string>",
"inlineTags": "<string>",
"inlineTagsNonTranslatable": "<string>",
"tagRegexp": "<string>"
},
"fileFormat": "<string>",
"html": {
"breakTagCreatesSegment": true,
"charEntitiesToTags": "<string>",
"escapeDisabled": true,
"excludeElements": "<string>",
"importComments": true,
"importDefaultAttributes": true,
"importDefaultMetaTags": true,
"nonTranslatableInlineElements": "<string>",
"preserveWhitespace": true,
"segmentationBeginTagPlaceholder": "<string>",
"segmentationEndTagPlaceholder": "<string>",
"segmentationSingleTagPlaceholder": "<string>",
"tagRegexp": "<string>",
"translatableAttributes": "<string>",
"translatableInlineElements": "<string>",
"translateMetaTagRegexp": "<string>",
"unknownTagCreatesTag": true,
"updateLang": true
},
"idml": {
"extractCrossReferenceFormats": true,
"extractHiddenConditionalText": true,
"extractHyperlinks": true,
"extractInvisibleLayers": true,
"extractLockedLayers": true,
"extractMasterSpreads": true,
"extractNotes": true,
"extractVariables": true,
"keepKerning": true,
"keepTracking": true,
"removeXmlElements": true,
"replaceFont": true,
"simplifyCodes": true,
"tagRegexp": "<string>",
"targetFont": "<string>"
},
"inputCharset": "<string>",
"json": {
"contextKeyPath": "<string>",
"contextNotePath": "<string>",
"excludeKeyRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"maxLenPath": "<string>",
"tagRegexp": "<string>"
},
"mac": {
"htmlSubfilter": true,
"icuSubFilter": true,
"tagRegexp": "<string>"
},
"md": {
"customElements": "<string>",
"excludeCodeElements": true,
"extractCodeBlocks": true,
"hardLineBreaksSegments": true,
"ignoredBlockPrefixes": "<string>",
"notEscapedCharacters": "<string>",
"preserveWhiteSpaces": true,
"processJekyllFrontMatter": true,
"tagRegexp": "<string>"
},
"mif": {
"extractBodyPages": true,
"extractCustomReferencePages": true,
"extractDefaultReferencePages": true,
"extractHiddenCondText": true,
"extractHiddenPages": true,
"extractIndexMarkers": true,
"extractLinks": true,
"extractMasterPages": true,
"extractPgfNumFormat": true,
"extractReferencePages": true,
"extractUsedPgfNumFormat": true,
"extractUsedVariables": true,
"extractUsedXRefDef": true,
"extractVariables": true,
"extractXRefDef": true,
"tagRegexp": "<string>"
},
"multilingualCsv": {
"allTargetColumns": {},
"contextKeyColumns": "<string>",
"contextNoteColumns": "<string>",
"delimiter": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumns": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumns": "<string>",
"tagRegexp": "<string>",
"targetColumns": "<string>"
},
"multilingualXls": {
"contextKeyColumn": "<string>",
"contextNoteColumn": "<string>",
"htmlSubFilter": true,
"importRows": "<string>",
"maxLenColumn": "<string>",
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceColumn": "<string>",
"tagRegexp": "<string>",
"targetColumns": {}
},
"multilingualXml": {
"contextKeyXPath": "<string>",
"contextNoteXPath": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"inlineElementsNonTranslatableXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegmentsToTm": true,
"segmentation": true,
"sourceElementsXPath": "<string>",
"tagRegexp": "<string>",
"targetElementsXPaths": {},
"translatableElementsXPath": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"outputCharset": "<string>",
"pdf": {
"ocrMode": "<string>",
"wysiwyg": true
},
"php": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"po": {
"exportMultiline": true,
"htmlSubFilter": true,
"icuSubFilter": true,
"markupSubFilterNonTranslatable": "<string>",
"markupSubFilterTranslatable": "<string>",
"saveConfirmedSegments": true,
"segment": true,
"tagRegexp": "<string>",
"updateHeader": true
},
"ppt": {
"altText": true,
"hiddenSlides": true,
"masterSlides": true,
"notes": true,
"other": true
},
"properties": {
"tagRegexp": "<string>"
},
"psd": {
"extractHiddenLayers": true,
"extractLockedLayers": true,
"tagRegexp": "<string>"
},
"quarkTag": {
"removeKerningTrackingTags": true,
"tagRegexp": "<string>"
},
"resx": {
"htmlSubFilter": true,
"tagRegexp": "<string>"
},
"sdlXlf": {
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"saveConfirmedSegments": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>"
},
"segRule": {
"filename": "<string>",
"id": "<string>",
"language": "<string>",
"name": "<string>",
"primary": true,
"uid": "<string>"
},
"targetLength": true,
"targetLengthMax": 123,
"targetLengthPercent": true,
"targetLengthPercentValue": 123,
"targetSegRule": {
"filename": "<string>",
"id": "<string>",
"language": "<string>",
"name": "<string>",
"primary": true,
"uid": "<string>"
},
"tmMatch": {
"ignoreTagMetadata": true,
"metadataPriority": {
"prioritizedFields": [
{}
]
},
"penalizeMultiContextMatch": true,
"prevOrNextSegment": true
},
"ttx": {
"saveConfirmedSegments": true
},
"txt": {
"contextKey": "<string>",
"regexpCapturingGroups": true,
"tagRegexp": "<string>",
"translatableTextRegexp": "<string>"
},
"xlf": {
"contextType": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsConfirmedXPath": "<string>",
"importAsLockedRules": "<string>",
"importAsLockedXPath": "<string>",
"importNotes": true,
"importXPath": "<string>",
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xlf2": {
"contextKeyXPath": "<string>",
"copySourceToTargetIfNotImported": true,
"exportAttrsWhenConfirmedAndLocked": "<string>",
"exportAttrsWhenConfirmedAndNotLocked": "<string>",
"exportAttrsWhenNotConfirmedAndLocked": "<string>",
"exportAttrsWhenNotConfirmedAndNotLocked": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"importAsConfirmedRules": "<string>",
"importAsLockedRules": "<string>",
"importNotes": true,
"lineBreakTags": true,
"preserveCharEntities": "<string>",
"preserveWhitespace": true,
"respectTranslateAttr": true,
"saveConfirmedSegments": true,
"segmentation": true,
"skipImportRules": "<string>",
"tagRegexp": "<string>",
"updateTargetLanguage": true,
"xslFile": "<string>",
"xslUrl": "<string>"
},
"xls": {
"comments": true,
"hidden": true,
"htmlSubfilter": true,
"other": true,
"sheetNames": true,
"specifiedColumns": "<string>",
"tagRegexp": "<string>"
},
"xml": {
"assistantProfile": "<string>",
"contextKeyXPath": "<string>",
"contextNoteXpath": "<string>",
"entities": true,
"excludeAttributesPlain": "<string>",
"excludeElementsPlain": "<string>",
"expandEntities": true,
"htmlSubfilterElementsPlain": "<string>",
"htmlSubfilterElementsXpath": "<string>",
"icuSubFilter": true,
"importComments": true,
"includeAttributesPlain": "<string>",
"includeElementsPlain": "<string>",
"includeXPath": "<string>",
"inlineElementsAutoPlain": true,
"inlineElementsAutoXPath": true,
"inlineElementsNonTranslatablePlain": "<string>",
"inlineElementsNonTranslatableXPath": "<string>",
"inlineElementsPlain": "<string>",
"inlineElementsXpath": "<string>",
"lockAttributesPlain": "<string>",
"lockElementsPlain": "<string>",
"lockXPath": "<string>",
"maxLenXPath": "<string>",
"preserveCharEntities": "<string>",
"preserveWhitespaceXPath": "<string>",
"segmentation": true,
"segmentationExclude": true,
"segmentationExcludedElementsXpath": "<string>",
"tagRegexp": "<string>",
"xslFile": "<string>",
"xslUrl": "<string>"
},
"yaml": {
"contextKeyPath": "<string>",
"contextPath": "<string>",
"excludeValueRegexp": "<string>",
"htmlSubFilter": true,
"icuSubFilter": true,
"includeKeyRegexp": "<string>",
"indentEmptyLinesInString": true,
"markdownSubfilter": true,
"tagRegexp": "<string>",
"updateRootElementLang": true
},
"zipCharset": "<string>"
},
"filenamePattern": "<string>",
"name": "<string>",
"supportsContinuousJob": true,
"uid": "<string>"
}Authorizations
Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.
Body
Custom file type to create
Regular expression matched against file names to detect this custom file type
Name of the custom file type
Underlying file format
html, json, xml, multiling_xml, txt Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
Date and time the custom file type was created
Show child attributes
Show child attributes
Regular expression matched against file names to detect this custom file type
Name of the custom file type
Whether this custom file type supports continuous jobs. Derived from the underlying file type.
Underlying file format
html, json, xml, multiling_xml, txt Unique identifier used in API paths
Was this page helpful?