I tried both, in first curl command I am getting status 500 error
<html>
<head>
<title>Error while processing /libs/wcm/core/content/sites/content/demo-content-pages</title>
</head>
<body>
<h1>Error while processing /libs/wcm/core/content/sites/content/demo-content-pages</h1>
<table>
<tbody>
<tr>
<td>Status</td>
<td><div id="Status">500</div></td>
</tr>
<tr>
<td>Message</td>
<td><div id="Message">org.apache.sling.api.resource.PersistenceException: Unable to commit changes to session.</div></td>
and for the second curl command, I am getting below error
curl -u jeeva-admin:mypassword –F cmd="createPage" -F label="" -F parentPath="/content/content/demo-content-pages/en/newpages" -F template="/apps/demo/templates/defaultpage" -F title="new page curl" https://author.dev.demo.adobecqms.net/bin/wcmcommand
curl: (6) Could not resolve host: –F
curl: (6) Could not resolve host: cmd=createPage
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>405 Method POST not supported</title></head>
<body>
<h1>Method POST not supported</h1>
<p>Cannot serve request to /bin/wcmcommand in com.day.cq.wcm.core.impl.commands.WCMCommandServlet</p>
<h3>Request Progress:</h3>
<pre>
0 TIMER_START{Request Processing}
1 COMMENT timer_end format is {<elapsed microseconds>,<timer name>} <optional message>
6 LOG Method=POST, PathInfo=null
7 TIMER_START{handleSecurity}
292179 TIMER_END{292171,handleSecurity} authenticator org.apache.sling.auth.core.impl.SlingAuthenticator@413fbfeb returns true
292526 TIMER_START{ResourceResolution}
292573 TIMER_END{46,ResourceResolution} URI=/bin/wcmcommand resolves to Resource=ServletResource, servlet=com.day.cq.wcm.core.impl.commands.WCMCommandServlet, path=/bin/wcmcommand
292579 LOG Resource Path Info: SlingRequestPathInfo: path='/bin/wcmcommand', selectorString='null', extension='null', suffix='null'
292579 TIMER_START{ServletResolution}
292582 TIMER_START{resolveServlet(/bin/wcmcommand)}
292592 TIMER_END{9,resolveServlet(/bin/wcmcommand)} Using servlet com.day.cq.wcm.core.impl.commands.WCMCommandServlet
292595 TIMER_END{15,ServletResolution} URI=/bin/wcmcommand handled by Servlet=com.day.cq.wcm.core.impl.commands.WCMCommandServlet
292597 LOG Applying Requestfilters
292602 LOG Calling filter: com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl
292609 LOG Calling filter: org.apache.sling.security.impl.ContentDispositionFilter
292612 LOG Calling filter: com.adobe.granite.csrf.impl.CSRFFilter
292620 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
292624 LOG Calling filter: com.adobe.granite.httpcache.impl.InnerCacheFilter
292628 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
292632 LOG Calling filter: com.adobe.cq.history.impl.HistoryRequestFilter
292806 LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
292814 LOG Calling filter: com.adobe.fd.core.security.internal.CurrentUserServiceImpl
293054 LOG Calling filter: com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet
293057 LOG Calling filter: com.adobe.granite.optout.impl.OptOutFilter
293064 LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
293067 LOG Calling filter: com.adobe.cq.social.commons.cors.CORSAuthenticationFilter
293070 LOG Calling filter: com.adobe.livecycle.dsc.clientsdk.internal.ResourceResolverHolderFilter
293073 LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
293076 LOG Calling filter: com.adobe.livecycle.content.appcontext.impl.AppContextFilter
293080 LOG Calling filter: org.demo.core.filters.LoggingFilter
293136 LOG Calling filter: org.demo.core.filters.LoggingFilter
293148 LOG Calling filter: org.demo.core.filters.LoggingFilter
293159 LOG Calling filter: org.demo.core.filters.LoggingFilter
293171 LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
293174 LOG Calling filter: com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl
293572 LOG Calling filter: com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter
293575 LOG Calling filter: com.adobe.granite.requests.logging.impl.RequestLoggerImpl
293579 LOG Calling filter: com.adobe.granite.rest.impl.servlet.ApiResourceFilter
293611 LOG Calling filter: com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler
293614 LOG Calling filter: com.day.cq.dam.core.impl.servlet.ActivityRecordHandler
293625 LOG Calling filter: com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet
293630 LOG Calling filter: com.day.cq.wcm.core.impl.warp.TimeWarpFilter
293637 LOG Applying Componentfilters
293639 LOG Calling filter: com.day.cq.personalization.impl.TargetComponentFilter
293643 LOG Calling filter: com.day.cq.wcm.core.impl.page.PageLockFilter
293647 LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
293766 LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
293770 TIMER_START{com.day.cq.wcm.core.impl.commands.WCMCommandServlet#0}
293797 LOG Applying Error filters
293800 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
293802 LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
293806 TIMER_START{handleError:status=405}
294527 TIMER_END{719,handleError:status=405} Using handler /apps/sling/servlet/errorhandler/default.jsp
306519 LOG Found processor for post processing ProcessorConfiguration: {contentTypes=[text/html], order=1, active=true, valid=true, processErrorResponse=true, pipeline=(generator=Config(type=htmlparser, config={}), transformers=(Config(type=linkchecker, config={}), Config(type=versioned-clientlibs, config={}), serializer=Config(type=htmlwriter, config={}))}
306709 TIMER_END{306708,Request Processing} Dumping SlingRequestProgressTracker Entries
</pre>
<hr>
<address>Apache Sling</address>
</body>
</html>
Can you please help in finding, what wrong I am doing?