Server

Server information is used to configure the server settings and is used to retrieve information about the server.

The Server Model

A server model contains the properties that are used to configure the server settings.

Scheme

  • Name
    id
    Type
    integer
    Description
    The server ID
  • Name
    registration
    Type
    boolean
    Description
    Whether the server allows users to register
  • Name
    readonly
    Type
    boolean
    Description
    Whether the new user is automatically asigned a read-only access if not defined upon registration
  • Name
    deviceReadonly
    Type
    boolean
    Description
    Whether the new user is automatically asigned a device-readonly access if not defined upon registration
  • Name
    limitCommands
    Type
    boolean
    Description
    Whether the new user is automatically asigned a limit-commands access if not defined upon registration
  • Name
    map
    Type
    string
    Description
    The map to use for the new user if not defined upon registration
  • Name
    bingKey
    Type
    string
    Description
    The Bing Maps key to use for the new user if not defined upon registration
  • Name
    mapUrl
    Type
    string
    Description
    The map URL to use for the new user if not defined upon registration
  • Name
    poiLayer
    Type
    string
    Description
    The POI layer to use for the new user if not defined upon registration
  • Name
    latitude
    Type
    number
    Description
    The default location's latitude to use if not defined
  • Name
    longitude
    Type
    number
    Description
    The default location's longitude to use if not defined
  • Name
    zoom
    Type
    integer
    Description
    The default zoom level to use if not defined
  • Name
    version
    Type
    string
    Description
    The version of the server
  • Name
    forceSettings
    Type
    boolean
    Description
    Whether to force the server settings to be applied to users
  • Name
    coordinateFormat
    Type
    string
    Description
    The coordinate format to use for the new user if not defined upon registration
  • Name
    openIdEnabled
    Type
    boolean
    Description
    Whether OpenId Connect is enabled to be used
  • Name
    openIdForce
    Type
    boolean
    Description
    Whether OpenId Connect is forced to be used
  • Name
    attributes
    Type
    object
    Description
    A key-value pair object to store any additional information about the server

GET/server

Retrieve server information

This endpoint allows you to retrieve a server information by providing proper authorization. This endpoint is limited based on the permissions of the user. Refer to the list at the top of this page to see which properties are included with server object.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description

    Server

Request

GET
/server
curl --location 'https://gw.onemap8.com/api/server' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

{
    "id": 0,
    "registration": true,
    "readonly": true,
    "deviceReadonly": true,
    "limitCommands": true,
    "map": "string",
    "bingKey": "string",
    "mapUrl": "string",
    "poiLayer": "string",
    "latitude": 0,
    "longitude": 0,
    "zoom": 0,
    "version": "string",
    "forceSettings": true,
    "coordinateFormat": "string",
    "openIdEnabled": true,
    "openIdForce": true,
    "attributes": { }
}

PUT/server

Update server information

This endpoint allows you to update server information. Successful execution is subject to permissions.

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
    The server ID
  • Name
    registration
    Type
    boolean
    Description
    Whether the server allows users to register
  • Name
    readonly
    Type
    boolean
    Description
    Whether the new user is automatically asigned a read-only access if not defined upon registration
  • Name
    deviceReadonly
    Type
    boolean
    Description
    Whether the new user is automatically asigned a device-readonly access if not defined upon registration
  • Name
    limitCommands
    Type
    boolean
    Description
    Whether the new user is automatically asigned a limit-commands access if not defined upon registration
  • Name
    map
    Type
    string
    Description
    The map to use for the new user if not defined upon registration
  • Name
    bingKey
    Type
    string
    Description
    The Bing Maps key to use for the new user if not defined upon registration
  • Name
    mapUrl
    Type
    string
    Description
    The map URL to use for the new user if not defined upon registration
  • Name
    poiLayer
    Type
    string
    Description
    The POI layer to use for the new user if not defined upon registration
  • Name
    latitude
    Type
    number
    Description
    The default location's latitude to use if not defined
  • Name
    longitude
    Type
    number
    Description
    The default location's longitude to use if not defined
  • Name
    zoom
    Type
    integer
    Description
    The default zoom level to use if not defined
  • Name
    version
    Type
    string
    Description
    The version of the server
  • Name
    forceSettings
    Type
    boolean
    Description
    Whether to force the server settings to be applied to users
  • Name
    coordinateFormat
    Type
    string
    Description
    The coordinate format to use for the new user if not defined upon registration
  • Name
    openIdEnabled
    Type
    boolean
    Description
    Whether OpenId Connect is enabled to be used
  • Name
    openIdForce
    Type
    boolean
    Description
    Whether OpenId Connect is forced to be used
  • Name
    attributes
    Type
    object
    Description
    A key-value pair object to store any additional information about the server

Response schema

  • Name
    application/json
    Type
    schema
    Description

Responses

  • Name
    200
    Type
    success
    Description

    Server

  • Name
    400
    Type
    error
    Description

    Bad Request

  • Name
    401
    Type
    error
    Description

    Not authorized

Request

PUT
/server
  curl --location --request PUT 'https://gw.onemap8.com/api/server' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"registration": "<boolean>",
"readonly": "<boolean>",
"deviceReadonly": "<boolean>",
"limitCommands": "<boolean>",
"map": "<string>",
"bingKey": "<string>",
"mapUrl": "<string>",
"poiLayer": "<string>",
"latitude": "<number>",
"longitude": "<number>",
"zoom": "<integer>",
"version": "<string>",
"forceSettings": "<boolean>",
"coordinateFormat": "<string>",
"openIdEnabled": "<boolean>",
"openIdForce": "<boolean>",
"attributes": {}
}'

Response

{
"id": 0,
"registration": true,
"readonly": true,
"deviceReadonly": true,
"limitCommands": true,
"map": "string",
"bingKey": "string",
"mapUrl": "string",
"poiLayer": "string",
"latitude": 0,
"longitude": 0,
"zoom": 0,
"version": "string",
"forceSettings": true,
"coordinateFormat": "string",
"openIdEnabled": true,
"openIdForce": true,
"attributes": { }
}