XPGEO API (Beta)
AerialSphere XPGEO REST API
The XPGEO REST API automatically loads images, processes them into an Oriented Imagery (OI) layer, and outputs the OI layer to the Esri Enterprise user's content.
See here for documentation on our reference client, written in Python, that consumes this REST API.
See here for how to set up an API key within your ESRI Enterprise server.
Authentication
The API supports two primary methods for authentication: API Key and Username/Password (Esri ArcGIS Online (AGOL) or Esri Enterprise account credentials).
API Key can be set using the
ESRI_API_KEYconfig option. SetUSE_API_KEY_AUTHtotrue.Account credentials can be used by setting
USERNAMEandPASSWORDoptions in the config.Accounts will need to be set to either the Creator or above User Type and Publisher or above Role.
If USE_API_KEY_AUTH is true, the username is resolved automatically from the API key. Otherwise, USERNAME and PASSWORD are pulled from the config.
App Health Check
GET /
Description
Basic liveness check. Confirms the Express server is running.
Request Example
GET {REST_URL}/Response Example
The app is running...Validate Enterprise Server Credentials
GET /enterprise-server-health-check
Description
Validates that the configured credentials can successfully reach the Esri Enterprise server.
Request Example
GET {REST_URL}/enterprise-server-health-checkResponse Example
Validation response: {
"currentVersion": "CURRENT_VERSION",
"enterpriseVersion": "ENTERPRISE_VERSION",
"enterpriseBuild": "BUILD"
}Create Layer
GET /create-oi-layer
Description
Creates a feature service with an attached OI layer definition, updates the item's OIL keywords, and shares the item with the organization.
Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | query | The name of the feature service. If duplicated, a timestamp will be added. |
| string | query | The type of imagery. Defaults to |
Request Example
GET {REST_URL}/create-oi-layer?name=FEATURE_SERVICE_NAME&imageryType=standardResponse Example
{
"serviceName": "FEATURE_SERVICE_NAME",
"serviceItemId": "ITEM_ID",
"serviceType": "Feature Service",
"layer": { "name": "FEATURE_SERVICE_NAME", "id": 0 }
}Append Images
Append a single image
GET /append-image
Description
Adds a single image to an existing Oriented Imagery Layer.
Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | query | The name of the feature service that already exists. |
| string | query | URL-encoded path of the image to append. |
| string | query | The item ID of the feature service. Required if |
| string | query | The type of imagery. Defaults to |
| boolean | query | Whether to update the layer extent after appending. Requires |
Request Example
GET {REST_URL}/append-image?layerName=FEATURE_SERVICE_NAME&imageUrl=URL_ENCODED_URL_PATHResponse Example
response: trueError Codes
Code | Description |
|---|---|
400 | Missing layer name or image URL |
400 | Item ID is required when updating the extent |
422 | Malformed image URL string |
Append an image list
POST /append-image-list
Description
Adds a list of images to an existing Oriented Imagery Layer.
Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | body | The name of the feature service that already exists. |
| array | body | Array of URL-encoded image paths to append. |
| string | body | The item ID of the feature service. Required if |
| string | body | The type of imagery. Defaults to |
| boolean | body | Whether to update the layer extent after appending. Requires |
Request Example
POST {REST_URL}/append-image-list{
"layerName": "FEATURE_SERVICE_NAME",
"imageList": [
"URL_ENCODED_URL_PATH"
],
"imageryType": "standard",
"itemId": "ITEM_ID",
"doUpdateExtent": false
}Response Example
trueError Codes
Code | Description |
|---|---|
400 | Missing JSON body |
400 | Missing layer name or image list |
400 | Item ID is required when updating the extent |
422 | Malformed image URL string in the list |
422 | Image list is either not an array or exceeds maximum size. Maximum size is set using the |
Configuration Options
Option | Description |
|---|---|
| The port the server listens on (bound to |
| Set to |
| The Esri API key for authentication. |
| Esri account username (used when |
| Esri account password (used when |
| Maximum number of images allowed in a single |