Table of Contents

3DM Publisher Admin API

This document (partially) describes the API interface of the 3DM Publisher.

Model: Resource

A Resource models a physical resource, or a logical resource with children (a resource group).

Properties:

Property Required Type Description
id * number Unique identifier for this resource.
name * string User-friendly name of the resource.
description string Resource description
file * string File system path to the main file of the resource.
type * string Resource type (extension of the file).
thumbnail_image string Resource thumbnail.
tags string Resource tags (json array serialized to a string)
is_basemap number Resource is a basemap? (1 is true, 0 is false)
is_dem number Resource is a DEM? (1 is true, 0 is false)
is_lref number Resource is a Linear Reference? (1 is true, 0 is false)
resource_metadata Array<ResourceMetadata> Resource metadata fields
resource_link Array<ResourceLink> Child resource links

Resource Type is defined by:

The most-used Resource Types:

Resource Resource Type Resource Content Type
Vector Data (ovf) ovf -
Vector Data (ovt) ovt -
Vector Data (odb) odb -
Image (omi) omi -
Image (otm) otm -
Point cloud (opc) opc -
Point cloud (3dtiles) 3dtiles pointcloud
Mapping Resource (mobile) omr -
Mapping Resource (oblique) omr oblique
Mapping Resource (aerial) omr uas

Possible values for Resource status:

The thumbnail_image can be a base64-encoded JPEG image on Create or Update. On Read, the field will be provided as a URL relative to the Server Root Location.

A Resource Group is also just a Resource object.
It has the following defining characteristics:

Model: ResourceMetadata

Property Type Description
name string The metadata name
value string The metadata value
Property Type Description
child_resource Resource The child resource (only id field is required).

How to Send Requests

The information required for a basic request can be summarized as:

Default Interface

The default way to make a request is:

The access token is provided using the “access_token” query argument.

Post-only Interface

The access token is provided in the post body “access_token” field.

This method has the advantage of:

Operation: Login

Discussion

The Login operation creates a session that is valid for the next 900 seconds. Every time you send a request to the server, the session will again stay open for 900 seconds. When you are inactive for that duration, the session will be closed on the server side and be invalid from that point on.

If the server you are connecting to has “Access Providers” and you have a valid WKT access token for one of these providers, you can use that token for login as well. Leave the password field empty and format the username in the following way : [<code>]<accessToken>.

Request

POST /api/3/login

{
    "username": "xxx",
    "password": "xxx",
    "publicationName": "xxx",
}

Fields:

Response (http 200)

{
    "identifier": "6tOfZLBtPxP4xgA3",
    "created_at": "2024-11-25 15:44:48",
    "expires_at": "2024-11-25 15:59:48",
    "version": "24.4.0",
    "versionDate": "2024.11.22",
    "editingAllowed": false
}

Operation: Create Resource

Request

POST /api/3/resource

{
    "name": "test",
    "file": "test"
}

Fields: see Resource

Response (http 200)

{
    "id": 199,
    "name": "test",
    "storage_space": {
        "id": 1
    },
    "file": "test",
    "type": "",
    "created_at": "2024-11-27 09:29:37",
    "modified_at": "2024-11-27 09:29:37",
    "refreshed_at": "2024-11-27 09:29:37",
    "status": "missing",
    "tags": "[]",
    "is_basemap": 0,
    "is_dem": 0,
    "is_lref": 0
}

Operation: Update Resource

Request

POST /api/3/resource/151

{
    "name": "BEGE MM06 test"
}

Fields: see Resource

Response (http 204)

No content

Operation: Create Resource Group

Request

POST /api/3/resource

{
    "name": "Test",
    "file": "file.omp",
    "type": "omp",
    "tags": "[]",
    "resource_metadata": [
        {
            "name": "collection_start",
            "value": "2024-11-27"
        },
        {
            "name": "collection_stop",
            "value": "2024-11-28"
        },
        {
            "name": "group_child_type",
            "value": "omr"
        },
        {
            "name": "group_child_content_type",
            "value": "oblique"
        }
    ],
    "resource_link": [
        {
            "child_resource": {
                "id": 15
            }
        },
        {
            "child_resource": {
                "id": 157
            }
        }
    ]
}

Fields: see Resource

Resource Type of linked Child Resources must be compatible with the Resource Group Type.

Response (http 200)

{
    "id": 200,
    "name": "Test",
    "storage_space": {
        "id": 1
    },
    "file": "file.omp",
    "type": "omp",
    "created_at": "2024-11-27 09:32:57",
    "modified_at": "2024-11-27 09:32:57",
    "refreshed_at": "2024-11-27 09:32:57",
    "status": "ready",
    "tags": "[]",
    "is_basemap": 0,
    "is_dem": 0,
    "is_lref": 0,
    "is_wfs": 0,
    "is_wms": 0,
    "resource_metadata": [
        {
            "name": "group_child_type",
            "value": "omr"
        },
        {
            "name": "collection_stop",
            "value": "2024-11-28"
        },
        {
            "name": "group_child_content_type",
            "value": ""
        },
        {
            "name": "collection_start",
            "value": "2024-11-27"
        }
    ]
}

Operation: Update Resource Group

Request

POST /api/3/resource/[resourceId]

{
    "resource_link": [
        {
            "child_resource": {
                "id": 15
            }
        },
        {
            "child_resource": {
                "id": 157
            }
        }
    ]
}

Response (http 204)

No content

Operation: Resource Reload

Discussion

This operation will check if a resource exists on disk and update dynamic fields and metadata.

Request

GET /api/3/resource/[resourceId]/refresh

Response (http 204)

No content

Operation: Reload Server Configuration

Discussion

This operation will instruct the server to reload the following configuration files from disk :

Request

GET /api/3/reload

Response (http 204)

No content