You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ In general, we try to follow these principles in dealing with encrypted and sens
98
98
99
99
Here is an overview of the directory structure inside of `lib/`:
100
100
101
-
*`bin/` contains all the executable scripts. These include `run-server.js`, which actually starts the ODK Central Backend server, but also the `cli.js` command line administration utility, and scripts like the `backup.js` executable which runs the configured backup.
101
+
*`bin/` contains all the executable scripts. These include `run-server.js`, which actually starts the ODK Central Backend server, but also the `cli.js` command line administration utility, and scripts like the `restore.js` executable which restores the database from a backup file.
102
102
*`data/` files deal with Submission row data in various ways. They are very independent, callable from any context (they don't rely on any database code, for example), and so they are separated out here. The `schema.js` file contains a lot of utilities for understanding and using XForms XML schema definitions, while the other files deal with Submission row data.
103
103
*`http/` defines a lot of core functionality for how we use Express, the Node.js server framework we rely on. The `endpoint.js` Endpoints are wrapper functions we use on most endpoints in our code (see `resources/`), `middleware.js` are middleware layers that catch the requests as they come in and decorate various common information onto them, and `service.js` is the glue code that actually ties together the middleware and resources to form an Express service.
104
104
*`model/` is the most complex area of code; it defines all the Things (Users, Forms, etc) in the server and how they are stored and retrieved from the database. It also contains our database migrations. For a deeper understanding of the structure, please see this explanation of our [Database Design](./docs/database.md).
@@ -108,6 +108,6 @@ Here is an overview of the directory structure inside of `lib/`:
108
108
*`model/container.js` is an important file; all the code in `model/frames` and `model/query` rely on dependency injection, and this package file is where they are all declared so that the server knows about them. If you are adding any `Frames`s or `query` modules, you'll need to visit this file and add a line or two at the bottom.
109
109
*`outbound/` contains various utilities for templating and sending messages of various kinds: `mail.js`, for example, contains all the email messages we might send as well as the machinery to do so, and `openrosa.js` contains templates for different OpenRosa XML responses.
110
110
*`resources/` is where all the HTTP API endpoints are declared; they are the REST Resources of the server (hence the name). This is, in the layers we describe above, the outermost layer. Most of our resources are wrapped in an `endpoint()` function of some sort, declared in `http/`. The `endpoint()` functions help process the final output of each endpoint, performing useful operations like resolving `Promise`s, managing output `Stream`s, and handling some errors.
111
-
*`task/` contains many utility operations that we use to construct the scripts in `bin/`, like `cli.js` and the backup/restore scripts. They are native `Promise`s and can be easily composed with `.then()`, like any other `Promise`. In `task.js`, there are various helpers to help print meaningful output for these operations and log audit logs on operations. There is also a `task.withContainer()` method which helps if you need any `model`/`Instance` code in a task (see `task/account.js` for usage).
111
+
*`task/` contains many utility operations that we use to construct the scripts in `bin/`, like `cli.js` and the restore script. They are native `Promise`s and can be easily composed with `.then()`, like any other `Promise`. In `task.js`, there are various helpers to help print meaningful output for these operations and log audit logs on operations. There is also a `task.withContainer()` method which helps if you need any `model`/`Instance` code in a task (see `task/account.js` for usage).
112
112
*`util/` defines a large number of really tiny helper functions and data structures that are used all over the application, as well as some generic tasks like cryptography. Of note is `option.js`, which defines the `Option[T]` class we use when a return type might be empty.
Copy file name to clipboardExpand all lines: docs/api.md
+38-86Lines changed: 38 additions & 86 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,12 @@ Finally, **system information and configuration** is available via a set of spec
32
32
33
33
Here major and breaking changes to the API are listed by version.
34
34
35
+
### ODK Central v2023.1
36
+
37
+
**Removed**:
38
+
39
+
- Scheduled backups to Google Drive are no longer supported. As a result, backups are no longer configurable. It is no longer possible to get or terminate a backups configuration or to use a backups configuration to GET a Direct Backup. For more information about these changes, please see [this topic](https://forum.getodk.org/t/backups-to-google-drive-from-central-will-stop-working-after-jan-31st/38895) in the ODK Forum.
40
+
35
41
### ODK Central v2022.3
36
42
37
43
**Added**:
@@ -3770,91 +3776,7 @@ Identical to [the non-Draft version](/reference/odata-endpoints/odata-form-servi
3770
3776
3771
3777
# Group System Endpoints
3772
3778
3773
-
There are some resources available for getting or setting system information and configuration. You can [set the Usage Reporting configuration](/reference/system-endpoints/usage-reporting-configuration) for the server, or you can [retrieve the Server Audit Logs](/reference/system-endpoints/server-audit-logs). If backups were configured using an earlier version of ODK Central, you can also [get the current configuration](/reference/system-endpoints/backups-configuration) or terminate it.
3774
-
3775
-
## Backups Configuration [/v1/config/backups]
3776
-
3777
-
Earlier versions of ODK Central allowed users to configure backups to Google Drive, but it is no longer possible to do so. If backups were configured using an earlier version of ODK Central, you can get the current configuration or terminate it. On January 31, 2023, backups to Google Drive will stop working entirely, and we will remove the endpoints to get the current configuration or terminate it. Although backups to Google Drive will stop working, it will still be possible to download a [Direct Backup](/reference/system-endpoints/direct-backup). For more information about these changes, please see [this topic](https://forum.getodk.org/t/backups-to-google-drive-from-central-will-stop-working-after-jan-31st/38895) in the ODK Forum.
3778
-
3779
-
The backups configuration is essentially a singleton object: there can be only one backups configuration at a time.
3780
-
3781
-
### Getting the current configuration [GET]
3782
-
3783
-
If configured, this endpoint will return the present backups configuration type. For security reasons, none of the actual internal authentication and encryption information is returned.
3784
-
3785
-
If no backups are configured, this endpoint will return a `404`.
3786
-
3787
-
+ Response 200 (application/json)
3788
-
+ Body
3789
-
3790
-
{
3791
-
"type": "google",
3792
-
"setAt": "2018-01-06T00:32:52.787Z"
3793
-
}
3794
-
3795
-
+ Response 403 (application/json)
3796
-
+ Attributes (Error 403)
3797
-
3798
-
+ Response 404 (application/json)
3799
-
+ Attributes (Error 404)
3800
-
3801
-
### Terminating the current configuration [DELETE]
3802
-
3803
-
Deleting the backups configuration will permanently remove it, stopping it from running as scheduled.
3804
-
3805
-
+ Response 200 (application/json)
3806
-
+ Attributes (Success)
3807
-
3808
-
+ Response 403 (application/json)
3809
-
+ Attributes (Error 403)
3810
-
3811
-
## Direct Backup [/v1/backup]
3812
-
3813
-
_(introduced: version 1.1)_
3814
-
3815
-
ODK Central offers HTTP endpoints that will immediately perform a backup on the system database and send that encrypted backup as the response. You can `POST` with an encryption passphrase. If backups to Google Drive were [configured](/reference/system-endpoints/backups-configuration) using an earlier version of ODK Central, you can also `GET` to use the passphrase you configured then.
3816
-
3817
-
Note that performing the backup takes a great deal of time, during which the request will be held open. Both of these endpoints trickle junk data every five seconds while that processing is occurring to prevent the request from timing out. Depending on how much data you have, it can take many minutes for the data stream to speed up to a full transfer rate.
3818
-
3819
-
### Using an Ad-Hoc Passphrase [POST]
3820
-
3821
-
A `POST` verb will start an direct download ad-hoc backup. You will want to supply a `passphrase` with your chosen encryption passphrase. It is possible to omit this, in which case the backup will still be encrypted, but it will decrypt given an empty passphrase.
3822
-
3823
-
Please see the section notes above about the long-running nature of this endpoint.
3824
-
3825
-
+ Request (application/json)
3826
-
+ Attributes
3827
-
+ passphrase: `my-password` (string, optional) - The passphrase with which to encrypt the backup.
### Using the Configured Scheduled Backups Passphrase [GET]
3842
-
3843
-
A `GET` verb will start an direct download backup, but using the configured scheduled backups passphrase. If no scheduled backup has been configured, the endpoint will return not found.
3844
-
3845
-
Please see the section notes above about the long-running nature of this endpoint.
There are some resources available for getting or setting system information and configuration. You can set the [Usage Reporting configuration](/reference/system-endpoints/usage-reporting-configuration) for the server, retrieve the [Server Audit Logs](/reference/system-endpoints/server-audit-logs), or perform a [Direct Backup](/reference/system-endpoints/direct-backup).
@@ -4025,6 +3947,36 @@ This endpoint supports retrieving extended metadata; provide a header `X-Extende
4025
3947
+ Response 403 (application/json)
4026
3948
+ Attributes (Error 403)
4027
3949
3950
+
## Direct Backup [/v1/backup]
3951
+
3952
+
_(introduced: version 1.1)_
3953
+
3954
+
ODK Central offers an HTTP endpoint that will immediately perform a backup on the system database and send that encrypted backup as the response. To use it, `POST` with an encryption passphrase.
3955
+
3956
+
Note that performing the backup takes a great deal of time, during which the request will be held open. As a result, the endpoint will trickle junk data every five seconds while that processing is occurring to prevent the request from timing out. Depending on how much data you have, it can take many minutes for the data stream to speed up to a full transfer rate.
3957
+
3958
+
### Using an Encryption Passphrase [POST]
3959
+
3960
+
Use the `POST` verb to start a direct download ad-hoc backup. You will want to supply a `passphrase` with your chosen encryption passphrase. It is possible to omit this, in which case the backup will still be encrypted, but it will decrypt given an empty passphrase.
3961
+
3962
+
Please see the section notes above about the long-running nature of this endpoint.
3963
+
3964
+
+ Request (application/json)
3965
+
+ Attributes
3966
+
+ passphrase: `my-password` (string, optional) - The passphrase with which to encrypt the backup.
Copy file name to clipboardExpand all lines: lib/formats/mail.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -45,9 +45,7 @@ const messages = {
45
45
accountResetDeleted: message('ODK Central account password reset','<html>Hello!<p>A password reset has been requested for this email address, but the account has been deleted.</p><p>If this message is unexpected, simply ignore it. Otherwise, please double check the email address given for your account, and try contacting your ODK system administrator.</p></html>'),
46
46
47
47
// Notifies a user that their password has been changed
48
-
accountPasswordChanged: message('ODK Central account password change','<html>Hello!<p>We are emailing because you have an ODK Central data collection account, and somebody has just changed its password.</p><p>If this was you, please feel free to ignore this email.</p><p>Otherwise, please contact your local ODK system administrator immediately.</p></html>'),
49
-
50
-
backupFailed: message('ODK Central backup failed','<html>Hello:<p>This is an automated system message to the listed ODK Central system administrator. ODK Central just attempted to perform a backup, but was unable to. Please visit <a href="{{{domain}}}/#/system/backups">the Backups settings page</a> on the administration website for more information.</p></html>')
48
+
accountPasswordChanged: message('ODK Central account password change','<html>Hello!<p>We are emailing because you have an ODK Central data collection account, and somebody has just changed its password.</p><p>If this was you, please feel free to ignore this email.</p><p>Otherwise, please contact your local ODK system administrator immediately.</p></html>')
0 commit comments