Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a new page using the API

Jesus Fernandez July 13, 2022

I am trying to use the API for first time to automate some processes, but after trying to create a simple new page I keep getting the following error:  {"statusCode":500,"message":"java.io.EOFException: No content to map to Object due to end of input"}.

I am using windows 10 (not sure if that matters at all) this is my script:

 

$CurlArgument = '--user', <mail>:<token>',
'-X', 'POST''-H', 'Content-Type: application/json',
'-d', '{
    "type":"page",
    "title":"TEST Page",
    "space":{"key":"<mykey>"},
    "body":{
      "storage":{
        "value":"Some Updated Content",
        "representation":"storage"
      }
    }
  }'

$CURLEXE = 'C:\Program Files\Git\mingw64\bin\curl.exe'

& $CURLEXE @CurlArgument

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events