host
The host
keyword returns the host name of the server to which the request was sent.
It is the value of the part before “:” in the Host
header value, if any, or the resolved server name, or the server IP address.
You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.
The host
keyword returns the host name of the server to which the request was sent.
It is the value of the part before “:” in the Host
header value, if any, or the resolved server name, or the server IP address.
The host
keyword returns the host name of the server to which the request was sent.
It is the value of the part before “:” in the Host header value, if any, or the resolved server name, or the server IP address.
The About Structr section lists the information about the current Structr system and the installed license.
Version | The installed version of the Structr software. The format is release build-commit build-time. |
Edition | The installed edition of Structr (Community or Enterprise). |
Modules | The available modules of the installed license. When the edition is Community the base modules core, rest and ui are enabled by default. |
Licensee | The licensee of the active license. |
Host ID | The unique ID of the hardware system the Structr software runs on. The host ID is used to restrict a license to one system. It is calculated by different hardware-specific information like the enabled network interfaces. The host ID will change if the hardware configuration changes and invalidate the license. In this case, you need to obtain a new license for the new host ID. |
License Start Date | Start date of the active license. |
License End Date | End date of the active license. |
Database Driver | Currently supported databases include Neo4j Bolt , In-Memory and Memgraph . |
application.host | The listen address of the Structr HTTP server. If you set the listen address to 127.0.0.1 , Structr will only be accessible for applications that run on the local host. This value essentially binds the HTTP server to the local loopback interface. The other option is 0.0.0.0 which makes Structr accessible from all networks. |
application.http.port | The HTTP port that Structr listens on. If you want to be able to access Structr under a simple http:// URL, you need to set this value to 80 . |
application.https.port | The HTTPS port that Structr listens on. If you want to be able to access Structr under a simple https:// URL, you need to set this value to 443 . |
application.ssh.port | The port that the SSHService listens on. |
application.ftp.port | The port that the FTPService listens on. |
application.https.enabled | If enabled, the internal HTTP server will be configured to allow HTTPS connections to the application.https.port. |
application.keystore.path | The path to a JKS keystore file that contains the certificate chain and private key for the SSL configuration needed for HTTPS. The keystore must be in PCK12 format. |
application.keystore.password | The password for the JKS keystore used in application.keystore.path. |
application.baseurl.override | Overrides baseUrl value that is originally assembled dynamically from the protocol, hostname and port of the server instance Structr is running on. |
ldap.host | Address of the LDAP host. |
ldap.port | Port of the LDAP host. |
ldap.connectiontimeout | Connection timeout in milliseconds. |
ldap.binddn | DN that is used to authenticate synchronization. |
ldap.secret | Used in conjunction with bind DN to handle authentication. |
ldap.usessl | Enables SSL for the LDAP connection. |
ldap.scope | Specifies the LDAP scope. Defaults to “SUBTREE”. |
ldap.primarykey | Name of primary identification property of LDAP objects, must uniquely identify users and groups. |
ldap.propertymapping | Mapping from LDAP properties to Structr properties. |
ldap.groupnames | LDAP objectclass tuples for group and member identification. |
ldap.updateinterval | Update interval for group synchronization in seconds. |
$ curl -s -HX-User:admin -HX-Password:admin http://localhost:8082/structr/rest/Project?createdDate=[2020-01-01T00:00:00Z TO 2020-01-31T23:59:59Z]"
$ curl -s -HX-User:admin -HX-Password:admin http://localhost:8082/structr/rest/Project?createdDate=[ TO 2020-01-31T23:59:59Z]"
$ curl -s -HX-User:admin -HX-Password:admin http://localhost:8082/structr/rest/Project?createdDate=[2020-01-01T00:00:00Z TO ]"
$ curl -s -HX-User:admin -HX-Password:admin "http://localhost:8082/structr/rest/Project?priority=[1 TO 2]"
$ curl -s -HX-User:admin -HX-Password:admin "http://localhost:8082/structr/rest/Project?priority=[0 TO ]"
$ curl -s -HX-User:admin -HX-Password:admin "http://localhost:8082/structr/rest/Project?priority=[ TO 2]"
GET http://localhost:8082/structr/rest/User
GET http://localhost:8082/structr/rest/Project
GET http://localhost:8082/structr/rest/Project/c0546a30a79749aeaf364925388e8b60/tasks
$ curl -s -HX-User:admin -HX-Password:admin http://localhost:8082/structr/rest/Project?_sort=name
$ curl -s -HX-User:admin -HX-Password:admin http://localhost:8082/structr/rest/Project?_sort=name&_order=desc
$ curl -s -HX-User:admin -HX-Password:admin "http://localhost:8082/structr/rest/Project?_sort=status&_sort=name&_order=desc&_order=asc"
$ lftp -p 8021 -u admin localhost
Password: *****
lftp admin@localhost:~> DIR
drwx------ 1 admin 0 Jun 30 15:22 testFolder
-rw------- 1 user1 347 Jun 30 09:24 test1.txt
-rw------- 1 admin 25 Jun 30 09:24 test2.txt
-rw------- 1 user2 5 Jun 30 09:24 test3.txt
-rw------- 1 user1 5 Jun 30 09:24 test4.txt
lftp admin@localhost:/>
The Configuration Tool is a web application that allows you to manage configuration settings in structr.conf. It is the preferred way to edit the configuration, because the config file only stores the difference to the default, and you can apply the changes immediately. In a default setup, the tool is available at http://localhost:8082/structr/config.
The user interface of a Structr App consists of Structr pages that are served by the built-in HTTP server (Jetty) under a specific URL. To access the application, you simply point your browser to the location of your Structr server, which is usually at http://localhost:8082/structr if Structr is running.
Structr provides a scriptable XMPP Client Implementation based on the XMPPClient entity.
XMPPClient is a base type that provides a Scriptable XMPP Client Implementation.
XMPPClient extends AbstractNode and provides the following additional properties.
Name | Type | Description |
---|---|---|
xmppUsername | String | The username of this XMPPClient |
xmppPassword | String | The password for this XMPPClient |
xmppService | String | The service name to connect to |
xmppHost | String | The host name to connect to |
xmppPort | Integer | The port to connect to |
isEnabled | Boolean | A boolean value that indicates whether this XMPPClient is enabled (should connect to a server and receive messages) |
isConnected | Boolean | A boolean value that indicates whether this XMPPClient is connected to a server |
Example:
let xmppClient = $.this;
xmppClient.doJoinChat('chatRoom@conference.server.org', 'nickname', 'password');
httpservice.gzip.enabled | Enables GZIP compression for HTTP transfers. |
httpservice.async | Enables asynchronous request handling for the HttpService. Disable this option, if you encounter problems with HTTP responses. |
httpservice.sni.required | Enables strict SNI enforcement for the HttpService. |
httpservice.sni.hostcheck | Enables SNI host check. |
json.indentation | Whether JSON ouput should be indented (beautified) or compacted. |
html.indentation | Whether the page source should be indented (beautified) or compacted. Note: Does not work for template/content nodes which contain raw HTML. |
ws.indentation | Whether websocket responses should be beautified. |
application.session.timeout | The session timeout in seconds for HTTP sessions. |
application.session.max.number | Maximum number of session per user. Defaults to -1 (unlimited). |
application.session.clear.onstartup | If set to true, all sessions will be cleared during startup. |
application.session.clear.onshutdown | If set to true, all sessions will be cleared during shutdown. |
GET http://localhost:8082/structr/rest/c0546a30a79749aeaf364925388e8b60
GET http://localhost:8082/structr/rest/Project/c0546a30a79749aeaf364925388e8b60
GET http://localhost:8082/structr/rest/c0546a30a79749aeaf364925388e8b60/example
GET http://localhost:8082/structr/rest/Project/c0546a30a79749aeaf364925388e8b60/example
POST http://localhost:8082/structr/rest/maintenance/letsencrypt
POST http://localhost:8082/structr/rest//maintenance/globalSchemaMethods/updateProjects