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
Query Parameters
Form Parameters
Back to Top

Response

Supported Media Types

200 Response

Operation succeeded.

400 Response

Bad request. See response body for explanation.
Body ()
Root Schema : InternalErrorResponse
Type: object
Show Source
Nested Schema : messages
Type: array
Show Source
Nested Schema : violations
Type: array
Show Source
Nested Schema : ParserViolation
Type: object
Show Source

403 Response

Forbidden. User does not have required privileges.

500 Response

Internal server error. See response body for explanation.
Body ()
Root Schema : InternalErrorResponse
Type: object
Show Source
Nested Schema : messages
Type: array
Show Source
Nested Schema : violations
Type: array
Show Source
Nested Schema : ParserViolation
Type: object
Show Source
Back to Top

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" : [ ]
  }
Back to Top