Pages

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 5.1

...

HeaderDescriptionExample value
Access-Control-Allow-HeadersHeaders allowed in a request.


Code Block
languagetext
themeRDark
Origin, X-Requested-With, Content-Type, Accept


Access-Control-Allow-Methods

HTTP methods allowed for sending a request. The allowed methods vary based on resource and resource type.

For more information about which methods the different resource types support, see Reference.


Code Block
languagetext
themeRDark
POST, GET, PATCH, DELETE, OPTIONS, PUT


Access-Control-Allow-OriginDomains from which requests are accepted in cross-origin resource sharing (CORS).


Code Block
languagetext
themeRDark
*


Cache-ControlCaching behavior that client applications and other caching mechanisms along the request/response chain must follow.no-cacheConnectionControl options for the current connection.


keep-alive
Code Block
languagetext
themeRDark
no-cache, private


Content-EncodingContent encoding (compression) applied to the response body.


Code Block
languagetext
themeRDark
gzip


Content-TypeMedia type of the response body.


Code Block
languagetext
themeRDark
application/json


DateDate and time at which the response was sent.


Code Block
languagetext
themeRDark
Wed, 21 Sep
2016
 2018 10:00:00 GMT


ServerInformation about the server software that handled the request and sent the response.


nginx/1.10.1
Code Block
languagetext
themeRDark
nginx


Strict-Transport-SecurityHTTP Strict Transport Security (HSTS) policy specifying for how long (in seconds) the client application should access the server only through secure HTTPS connections.


Code Block
languagetext
themeRDark
max-age=31536000
Transfer-EncodingTransfer encoding applied to the response body to safely transmit it over the network to the client application.chunked


X-Content-Type-OptionsPrevents browsers from MIME-sniffing the response body away from the media type declared in the Content-Type header. 


Code Block
languagetext
themeRDark
nosniff


X-Frame-OptionsSpecifies whether the client application is allowed to render the response body in a frame (a <frame>, <iframe>, or <object> element).SAMEORIGINX-Powered-ByServer-side technology on which the service runs.


PHP/5.6.25
Code Block
languagetext
themeRDark
SAMEORIGIN


X-XSS-ProtectionSpecifies whether and what type of cross-site scripting (XSS) protection is enabled for the browser.


Code Block
languagetext
themeRDark
1; mode=block


For more information about the standard HTTP headers, see the header fields registry maintained by IANA.

Response body

All responses use the JSON format for the body.

A single resource is returned as an object. The following example shows a user object.

...

Status codeDescriptionSolution
200 OKThe server successfully processed the request. The response includes the associated resource data.
204 No ContentThe server successfully deleted the target resource. The response does not include any resource data.
400 Bad RequestThe server could not process the request due to an error in the request.Check that the request uses the correct URL, includes the necessary headers, and, in case of a POST or PUT request, contains a valid JSON body.
401 UnauthorizedThe server could not authenticate the request because the access token is invalid or missing.Check that the request includes a valid access token.
403 ForbiddenThe server successfully authenticated the request, but could not authorize access to the target resource because the access token does not grant sufficient permission.Check that you're targeting a resource or resources that you have access to.
404 Not FoundThe server could not find the requested resource.Check that you're using the correct resource IDs.
412 Precondition Failed

The server could not process the request because the target resource failed to fulfill one or more preconditions.

This status code only applies to DELETE requests to /sites/<site_id>/templates/<template_id>.

If you want to delete the content template, first remove it from all modifications.

...