Loading TOC...

POST /manage/v2/packages/{pkgname}/databases/{name}

Summary

This resource address adds a database configuration to the named package (pkgname). The name of the database in the payload body is ignored and name is used as the name.

URL Parameters
format The format of the output. This can be either xml or json. By default, the format is xml.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header.
Content-type The MIME type of the data in the request body, either application/zip, application/xml, or application/json.
Response Headers
Content-type The MIME type of the payload data. Depending upon the value of the format parameter or Accept header, either application/xml or application/json.

Response

Upon success, MarkLogic Server returns status code 200 (OK).

Required Privileges

This operation requires the manage-admin role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Example

 
      curl -o MyData.xml --digest -u admin:admin \
      http://localhost:8002/manage/v2/databases/MyData?view=package

      ==> Download the configuration of the 'MyData' database to the MyData.xml file.
 
      curl -X POST --digest -u admin:admin -H "Content-type: application/xml" -d @MyData.xml \
      "http://localhost:8002/manage/v2/packages/test-package/databases/NewData" 

      ==> Add the 'MyData' database configuration, as 'NewData.xml', to the "test-package" package.

    

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy