Import Source
post
/serviceapi/logan.content/import
Import User Defined Source from a zip file.
If the zip file contains multiple sources, parsers, and fields, they will all be imported.
Request
Supported Media Types
- multipart/form-data
Query Parameters
-
overwrite(optional): boolean
If set to true, any parameter will be overwritten if it already exists.
Form Parameters
-
file(optional): file
Zip file created from the logan.content/export endpoint.
Response
Supported Media Types
- application/json
200 Response
Operation succeeded.
400 Response
Bad request. See response body for explanation.
Root Schema : InternalErrorResponse
Type:
Show Source
object
-
messages(optional):
array messages
-
type(optional):
string
Allowed Values:
[ "PARSERERROR", "INVALIDPARAMETER", "UNSUPPORTEDSUBSYSTEM", "UNSUPPORTEDFILTER", "UNSUPPORTEDVERSION", "INVALIDJOBID", "INVALIDQUERYID", "FORBIDDEN", "INTERNALERROR", "JSONERROR", "INTERRUPTEDERROR", "EXECUTIONERROR", "COMPILATIONERROR", "SERVICEAVAILABILITYERROR" ]
-
violations(optional):
array violations
403 Response
Forbidden. User does not have required privileges.
500 Response
Internal server error. See response body for explanation.
Root Schema : InternalErrorResponse
Type:
Show Source
object
-
messages(optional):
array messages
-
type(optional):
string
Allowed Values:
[ "PARSERERROR", "INVALIDPARAMETER", "UNSUPPORTEDSUBSYSTEM", "UNSUPPORTEDFILTER", "UNSUPPORTEDVERSION", "INVALIDJOBID", "INVALIDQUERYID", "FORBIDDEN", "INTERNALERROR", "JSONERROR", "INTERRUPTEDERROR", "EXECUTIONERROR", "COMPILATIONERROR", "SERVICEAVAILABILITYERROR" ]
-
violations(optional):
array violations
Examples
The following example shows how to import a ZIP file called response.zip by submitting a POST request on the REST resource using cURL. This call will import the two sources (DNAME=mgSrc and DNAME=mgSrc2) exported from the logan.content/export endpoint example and will overwrite the sources (if they exist) using the overwrite=true query parameter.
curl -u "OMC_USERNAME" -X POST -H "Content-Type:application/json" -F 'file=response.zip' "https://{OMC_URL}/serviceapi/logan.content/register?overwrite=true"
Example of Response
The following shows an example of the response body.
{ "contentName" : "the_content", "parserDnames" : [ ], "sourceDnames" : [ "mgSrc", "mgSrc2" ], "fieldNames" : [ ], "changeList" : { "createdParserDnames" : [ ], "updatedParserDnames" : [ ], "createdSourceDnames" : [ "mgSrc", "mgSrc2" ], "updatedSourceDnames" : [ ], "createdFieldDnames" : [ ], "updatedFieldDnames" : [ ], "conflictParserDnames" : [ ], "conflictSourceDnames" : [ ], "conflictFieldDnames" : [ ] }