REST API headers

Request

Host

Mandatory.

The Host header defines Altair SmartCore REST API server (where to connect). More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

Value: api.altairsmartcore.com

Example: Host: api.altairsmartcore.com

Apikey

Mandatory.

This header defines the request API key. This apikey will be used to fully determine privileges and visibility for the request within Altair SmartCore platform.
Example: Apikey: ed5620c5013d782fe2eeaf9fd03b7fc0a42fafb06f0608b58d5ab2f9027f955f

Accept

Mandatory.

Defines expected request MIME type. Altair SmartCore currently accepts 4 different MIME types:

  • application/json: Altair SmartCore will render the response in JSON format following the current REST API specifications
  • application/xml: Altair SmartCore will render the response in XML format following the current REST API specifications
  • application/vnd.altairsc.v2+json: Altair SmartCore will render the response in JSON format following the version 2 REST API specifications
  • application/vnd.altairsc.v2+xml: Altair SmartCore will render the response in XML format following the version 2 REST API specifications

Notes:

  • Default value: application/vnd.altairsc.v2
  • If no Accept header is present, Altair SmartCore will assume the default value
  • If no version is defined, Altair SmartCore will assume the most recent version available
  • If Altair SmartCore do not understand the Accept header value, default value will be assumed and no error will be returned
  • Several values may be defined separated by commas with priority specified by ;q=
  • More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1

Examples:

Accept: application/vnd.altairsc.v2 ? default (API v2 and JSON format)
Accept: application/vnd.altairsc.v2+xml ? API v2 and XML format
Accept: application/vnd.altairsc ? most recent API and JSON format
Accept: application/vnd.altairsc+xml ? most recent API and XML format
Accept: application/json;q=0.9,vnd.altairsc,application/xml;q=0.8

User-Agent

Mandatory.

Defines client software. More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43

Example: User-Agent: device A001

Content-Length

Mandatory.

Defines bodys data length in bytes. More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13

Example: Content-Length: 209

Content-Type

Mandatory.

Defines expected request MIME type. Altair SmartCore currently accepts 4 different MIME types:

  • application/json: Altair SmartCore will render the response in JSON format following the current REST API specifications
  • application/xml: Altair SmartCore will render the response in XML format following the current REST API specifications
  • application/vnd.altairsc.v2+json: Altair SmartCore will render the response in JSON format following the version 2 REST API specifications
  • application/vnd.altairsc.v2+xml: Altair SmartCore will render the response in JSON format following the version 2 REST API specifications

Notes:

  • Default value: application/vnd.altairsc.v2+json
  • If no Content-Type header is present, Altair SmartCore will assume default value
  • If no version is defined, Altair SmartCore will assume the most recent version available
  • If Altair SmartCore do not understand the Content-Type header value, default value will be assumed and no error will be returned
  • More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17

Example: Content-Type: application/vnd.altairsc.v2+xml

Response

Date

Defines message response date and hour. More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18

Server

Holds information about request software used by the server. Default value: Altair SmartCore REST API

Allow

List of allowed actions for the given resource. More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7

Connection

Defines connection options for the sender.
Altair SmartCore always closes connection after the response.

Cache-Control

Defines the directives for cache management. More details at: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

Content-Length

Defines bodys data length in bytes. More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13

Content-Type

Defines response body MIME type. More details at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17