Troubleshooting · Developer docs

Troubleshooting

Grouped by symptom, never by module, because the person with the problem does not know which module has it. One hundred questions across ten pages, each answered with the causes in the order they usually turn out to be true.

Answer API requests

"414 Request-URI Too Long", or my long properties selector stops working

The URL is longer than the servers in front of the site accept. On this documentation site a URL of about 4,000 characters was answered and one of about 8,400 got an HTML 414 page, not a JSON error; much longer ones had the connection closed. A properties selector that reads a page with its sections and their components is the usual way to get there, since every character is percent-encoded.

Send the selector in the body of the GET instead, raw and wrapped in braces, with the header X-Body-Has-Parameters: 1. Filters, limit and offset stay in the query string.

Shell
curl -X GET 'https://www.example.com/cdna-api/pages/pages?parent.id=72&limit=20' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Accept: application/json' \
  --header 'X-Body-Has-Parameters: 1' \
  --data '{id,name,fullPath,activeRevision{id,areasContent}}'

See Send a long properties selector in a GET body and Query string or request body.

In the API reference: Request bodies.

More in API requests

  1. The selector in my GET body was ignored, and the full record came back
  2. My filter returned every record
  3. A custom entity list answers a totalCount but no rows
  4. The API answers 404 for a record that exists
  5. My edit saved, but the site did not change

Was this page helpful?

Your answer goes to the docs team.