This document (partially) describes the API interface of the 3DM Publisher.
Server Root Location.
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:
ready- File is ready for use.missing - File was not found on the filesystem.
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:
file set to file.omp (for Mapping Resource) or file.ogp (for all other types).type set to omp (for Mapping Resource) or ogp (for all other types).group_child_type metadata field set to the child resource typegroup_child_content_type metadata field set to the child resource content_type| 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). |
The information required for a basic request can be summarized as:
The default way to make a request is:
Content-Type: application/json;[HTTP Method] [Server URL]/[API Route]?[Query arguments][Request body]The access token is provided using the “access_token” query argument.
Content-Type: plain/text;POST [Server URL]/<API Route>{ "_http_envelope_": true, "access_token": "xxx", "method": [HTTP Method], "query": { [Query arguments] }, "body": { [Request body] } }
The access token is provided in the post body “access_token” field.
This method has the advantage of:
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>.
POST /api/3/login
{ "username": "xxx", "password": "xxx", "publicationName": "xxx", }
Fields:
username - The usernamepassword - The passwordpublicationName - For a non-admin login, this must be an existing publication name.{ "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 }
{ "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 }
No content
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.
{ "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" } ] }
POST /api/3/resource/[resourceId]
{ "resource_link": [ { "child_resource": { "id": 15 } }, { "child_resource": { "id": 157 } } ] }
No content
This operation will check if a resource exists on disk and update dynamic fields and metadata.
num_bytesstatusresource_metadata when the file exists.resource_metadata by merging metadata of the child resources.
GET /api/3/resource/[resourceId]/refresh
No content
This operation will instruct the server to reload the following configuration files from disk :
configuration.iniconfig/resource.xmlconfig/user.xmlconfig/usergroup.xmlpublications/*bookmarks/*accessprovider/*
GET /api/3/reload
No content