Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/developers/applications/define-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By default, route URLs are configured to be:

However, you can specify the path to be `/` if you wish to have your routes handling the root path of incoming URLs.

- The route below, using the default config, within the **dogs** project, with a route of **breeds** would be available at **http:/localhost:9926/dogs/breeds**.
- The route below, using the default config, within the **dogs** project, with a route of **breeds** would be available at **[http://localhost:9926/dogs/breeds](http://localhost:9926/dogs/breeds)**.

In effect, this route is just a pass-through to Harper. The same result could have been achieved by hitting the core Harper API, since it uses **hdbCore.preValidation** and **hdbCore.request**, which are defined in the "helper methods" section, below.

Expand Down
6 changes: 3 additions & 3 deletions docs/developers/operations-api/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ HarperDB/application-template#semver:v1.0.0
You can also install from private repository if you have installed SSH keys on the server. Ensure the `host` portion of the url exactly matches the `host` used when adding ssh keys to ensure proper authentication.

```
git+ssh:/[email protected]:my-org/my-app.git#semver:v1.0.0
git+ssh://[email protected]:my-org/my-app.git#semver:v1.0.0
```

Or you can use a Github token:
Expand Down Expand Up @@ -369,9 +369,9 @@ Host harperdb-private-component.github.com
```

```
"package": "git+ssh:/git@<host>:<github-repo-path>.git#semver:v1.2.3"
"package": "git+ssh://git@<host>:<github-repo-path>.git#semver:v1.2.3"

"package": "git+ssh:/[email protected]:HarperDB/harperdb-private-component.git#semver:v1.2.3"
"package": "git+ssh://[email protected]:HarperDB/harperdb-private-component.git#semver:v1.2.3"
```

Note that `deploy_component` with a package uses `npm install` so the url must be a valid npm format url. The above is an example of a url using a tag in the repo to install.
Expand Down
6 changes: 3 additions & 3 deletions docs/developers/security/jwt-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Users must initially create tokens using their Harper credentials. The following
A full cURL example can be seen here:

```bash
curl --location --request POST 'http:/localhost:9925' \
curl --location --request POST 'http://localhost:9925' \
--header 'Content-Type: application/json' \
--data-raw '{
"operation": "create_authentication_tokens",
Expand All @@ -51,7 +51,7 @@ An example expected return object is:
The `operation_token` value is used to authenticate all operations in place of our standard Basic auth. In order to pass the token you will need to create an Bearer Token Authorization Header like the following request:

```bash
curl --location --request POST 'http:/localhost:9925' \
curl --location --request POST 'http://localhost:9925' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDUwNjQ2MDAsInN1YiI6Im9wZXJhdGlvbiJ9.MpQA-9CMjA-mn-7mHyUXSuSC_-kqMqJXp_NDiKLFtbtMRbodCuY3DzH401rvy_4vb0yCELf0B5EapLVY1545sv80nxSl6FoZFxQaDWYXycoia6zHpiveR8hKlmA6_XTWHJbY2FM1HAFrdtt3yUTiF-ylkdNbPG7u7fRjTmHfsZ78gd2MNWIDkHoqWuFxIyqk8XydQpsjULf2Uacirt9FmHfkMZ-Jr_rRpcIEW0FZyLInbm6uxLfseFt87wA0TbZ0ofImjAuaW_3mYs-3H48CxP152UJ0jByPb0kHsk1QKP7YHWx1-Wce9NgNADfG5rfgMHANL85zvkv8sJmIGZIoSpMuU3CIqD2rgYnMY-L5dQN1fgfROrPMuAtlYCRK7r-IpjvMDQtRmCiNG45nGsM4DTzsa5GyDrkGssd5OBhl9gr9z9Bb5HQVYhSKIOiy72dK5dQNBklD4eGLMmo-u322zBITmE0lKaBcwYGJw2mmkYcrjDOmsDseU6Bf_zVUd9WF3FqwNkhg4D7nrfNSC_flalkxPHckU5EC_79cqoUIX2ogufBW5XgYbU4WfLloKcIpb51YTZlZfwBHlHPSyaq_guaXFaeCUXKq39_i1n0HRF_mRaxNru0cNDFT9Fm3eD7V8axFijSVAMDyQs_JR7SY483YDKUfN4l-vw-EVynImr4' \
--data-raw '{
Expand All @@ -68,7 +68,7 @@ curl --location --request POST 'http:/localhost:9925' \
`operation_token` expires at a set interval. Once it expires it will no longer be accepted by Harper. This duration defaults to one day, and is configurable in [harperdb-config.yaml](../../deployments/configuration). To generate a new `operation_token`, the `refresh_operation_token` operation is used, passing the `refresh_token` in the Bearer Token Authorization Header. A full cURL example can be seen here:

```bash
curl --location --request POST 'http:/localhost:9925' \
curl --location --request POST 'http://localhost:9925' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDc1NzAyMDAsInN1YiI6InJlZnJlc2gifQ.acaCsk-CJWIMLGDZdGnsthyZsJfQ8ihXLyE8mTji8PgGkpbwhs7e1O0uitMgP_pGjHq2tey1BHSwoeCL49b18WyMIB10hK-q2BXGKQkykltjTrQbg7VsdFi0h57mGfO0IqAwYd55_hzHZNnyJMh4b0iPQFDwU7iTD7x9doHhZAvzElpkWbc_NKVw5_Mw3znjntSzbuPN105zlp4Niurin-_5BnukwvoJWLEJ-ZlF6hE4wKhaMB1pWTJjMvJQJE8khTTvlUN8tGxmzoaDYoe1aCGNxmDEQnx8Y5gKzVd89sylhqi54d2nQrJ2-ElfEDsMoXpR01Ps6fNDFtLTuPTp7ixj8LvgL2nCjAg996Ga3PtdvXJAZPDYCqqvaBkZZcsiqOgqLV0vGo3VVlfrcgJXQImMYRr_Inu0FCe47A93IAWuQTs-KplM1KdGJsHSnNBV6oe6QEkROJT5qZME-8xhvBYvOXqp9Znwg39bmiBCMxk26Ce66_vw06MNgoa3D5AlXPWemfdVKPZDnj_aLVjZSs0gAfFElcVn7l9yjWJOaT2Muk26U8bJl-2BEq_DSclqKHODuYM5kkPKIdE4NFrsqsDYuGxcA25rlNETFyl0q-UXj1aoz_joy5Hdnr4mFELmjnoo4jYQuakufP9xeGPsj1skaodKl0mmoGcCD6v1F60' \
--data-raw '{
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/first-harper-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ type Dog @table @export {
Now we can start querying. Again, we just simply access the endpoint with query parameters (basic GET requests), like:

```
http:/localhost:9926/Dog/?name=Harper
http:/localhost:9926/Dog/?breed=Labrador
http:/localhost:9926/Dog/?breed=Husky&name=Balto&select(id,name,breed)
http://localhost:9926/Dog/?name=Harper
http://localhost:9926/Dog/?breed=Labrador
http://localhost:9926/Dog/?breed=Husky&name=Balto&select(id,name,breed)
```

Congratulations, you now have created a secure database application backend with a table, a well-defined structure, access controls, and a functional REST endpoint with query capabilities! See the [REST documentation for more information on HTTP access](../developers/rest) and see the [Schema reference](../developers/applications/defining-schemas) for more options for defining schemas.
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/install-harper.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ These defaults allow you to quickly start an instance, though you can customize
Containers created from this image store all data and Harper configuration at `/home/harperdb/hdb`. To ensure that your data persists beyond the lifecycle of a container, you should mount this directory to a directory on the container host using a Docker volume. This ensures that your database remains available and your settings are not lost when the container is stopped or removed.

:::info
Test your Harper instance is up and running by querying `curl http:/localhost:9925/health`
Test your Harper instance is up and running by querying `curl http://localhost:9925/health`
:::

### Example Deployments
Expand Down Expand Up @@ -123,7 +123,7 @@ If you want to inspect the logs to ensure that Harper has started correctly, use
docker logs <container_id>
```

Once verified, you can access your Harper instance by opening your web browser and navigating to http:/localhost:9925 (or the appropriate port based on your configuration).
Once verified, you can access your Harper instance by opening your web browser and navigating to [http://localhost:9925](http://localhost:9925) (or the appropriate port based on your configuration).

### Raw binary installation

Expand Down
4 changes: 2 additions & 2 deletions docs/technical-details/reference/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Harper collects statistics for all operations, URL endpoints, and messaging topi
There are two "levels" of analytics in the Harper analytics table: the first is the immediate level of raw direct logging of real-time statistics. These analytics entries are recorded once a second (when there is activity) by each thread, and include all recorded activity in the last second, along with system resource information. The records have a primary key that is the timestamp in milliseconds since epoch. This can be queried (with `superuser` permission) using the search_by_conditions operation (this will search for 10 seconds worth of analytics) on the `hdb_raw_analytics` table:

```
POST http:/localhost:9925
POST http://localhost:9925
Content-Type: application/json

{
Expand Down Expand Up @@ -69,7 +69,7 @@ And a typical response looks like:
The second level of analytics recording is aggregate data. The aggregate records are recorded once a minute, and aggregate the results from all the per-second entries from all the threads, creating a summary of statistics once a minute. The ids for these milliseconds since epoch can be queried from the `hdb_analytics` table. You can query these with an operation like:

```
POST http:/localhost:9925
POST http://localhost:9925
Content-Type: application/json

{
Expand Down
8 changes: 4 additions & 4 deletions docs/technical-details/reference/components/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Furthermore, the `package` field can be set to any valid [npm dependency value](

- For applications deployed to npm, specify the package name: `package="@harperdb/status-check"`
- For applications on GitHub, specify the URL: `package="https://github.com/HarperDB/status-check"`, or the shorthand `package=HarperDB/status-check`
- Private repositories also work if the correct SSH keys are on the server: `package="git+ssh:/[email protected]:HarperDB/secret-applications.git"`
- Private repositories also work if the correct SSH keys are on the server: `package="git+ssh://[email protected]:HarperDB/secret-applications.git"`
- Reference the [SSH Key](../../../developers/operations-api/components#add-ssh-key) operations for more information on managing SSH keys on a remote instance
- Even tarball URLs are supported: `package="https://example.com/application.tar.gz"`

Expand Down Expand Up @@ -164,8 +164,8 @@ Harper will generate a `package.json` like:
"dependencies": {
"myGithubComponent": "github:HarperDB-Add-Ons/package#v2.2.0",
"myNPMComponent": "npm:harperdb",
"myTarBall": "file:/Users/harper/cool-component.tar",
"myLocal": "file:/Users/harper/local",
"myTarBall": "file://Users/harper/cool-component.tar",
"myLocal": "file://Users/harper/local",
"myWebsite": "https://harperdb-component"
}
}
Expand All @@ -177,7 +177,7 @@ The package prefix is automatically added, however you can manually set it in yo

```yaml
myCoolComponent:
package: file:/Users/harper/cool-component.tar
package: file://Users/harper/cool-component.tar
```

By specifying a file path, npm will generate a symlink and then changes will be automatically picked up between restarts.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Route URLs are resolved in the following manner:

- [**Instance URL**]:[**Custom Functions Port**]/[**Project Name**]/[**Route URL**]

- The route below, within the **dogs** project, with a route of **breeds** would be available at **http:/localhost:9926/dogs/breeds**.
- The route below, within the **dogs** project, with a route of **breeds** would be available at **[http://localhost:9926/dogs/breeds](http://localhost:9926/dogs/breeds)**.

In effect, this route is just a pass-through to HarperDB. The same result could have been achieved by hitting the core HarperDB API, since it uses **hdbCore.preValidation** and **hdbCore.request**, which are defined in the "helper methods" section, below.

Expand Down
6 changes: 3 additions & 3 deletions versioned_docs/version-4.1/security/jwt-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Users must initially create tokens using their HarperDB credentials. The followi
A full cURL example can be seen here:

```bash
curl --location --request POST 'http:/localhost:9925' \
curl --location --request POST 'http://localhost:9925' \
--header 'Content-Type: application/json' \
--data-raw '{
"operation": "create_authentication_tokens",
Expand All @@ -52,7 +52,7 @@ An example expected return object is:
The `operation_token` value is used to authenticate all operations in place of our standard Basic auth. In order to pass the token you will need to create an Bearer Token Authorization Header like the following request:

```bash
curl --location --request POST 'http:/localhost:9925' \
curl --location --request POST 'http://localhost:9925' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDUwNjQ2MDAsInN1YiI6Im9wZXJhdGlvbiJ9.MpQA-9CMjA-mn-7mHyUXSuSC_-kqMqJXp_NDiKLFtbtMRbodCuY3DzH401rvy_4vb0yCELf0B5EapLVY1545sv80nxSl6FoZFxQaDWYXycoia6zHpiveR8hKlmA6_XTWHJbY2FM1HAFrdtt3yUTiF-ylkdNbPG7u7fRjTmHfsZ78gd2MNWIDkHoqWuFxIyqk8XydQpsjULf2Uacirt9FmHfkMZ-Jr_rRpcIEW0FZyLInbm6uxLfseFt87wA0TbZ0ofImjAuaW_3mYs-3H48CxP152UJ0jByPb0kHsk1QKP7YHWx1-Wce9NgNADfG5rfgMHANL85zvkv8sJmIGZIoSpMuU3CIqD2rgYnMY-L5dQN1fgfROrPMuAtlYCRK7r-IpjvMDQtRmCiNG45nGsM4DTzsa5GyDrkGssd5OBhl9gr9z9Bb5HQVYhSKIOiy72dK5dQNBklD4eGLMmo-u322zBITmE0lKaBcwYGJw2mmkYcrjDOmsDseU6Bf_zVUd9WF3FqwNkhg4D7nrfNSC_flalkxPHckU5EC_79cqoUIX2ogufBW5XgYbU4WfLloKcIpb51YTZlZfwBHlHPSyaq_guaXFaeCUXKq39_i1n0HRF_mRaxNru0cNDFT9Fm3eD7V8axFijSVAMDyQs_JR7SY483YDKUfN4l-vw-EVynImr4' \
--data-raw '{
Expand All @@ -69,7 +69,7 @@ curl --location --request POST 'http:/localhost:9925' \
`operation_token` expires at a set interval. Once it expires it will no longer be accepted by HarperDB. This duration defaults to one day, and is configurable in [harperdb-config.yaml](../configuration). To generate a new `operation_token`, the `refresh_operation_token` operation is used, passing the `refresh_token` in the Bearer Token Authorization Header. A full cURL example can be seen here:

```bash
curl --location --request POST 'http:/localhost:9925' \
curl --location --request POST 'http://localhost:9925' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InVzZXJuYW1lIiwiaWF0IjoxNjA0OTc4MjAwLCJleHAiOjE2MDc1NzAyMDAsInN1YiI6InJlZnJlc2gifQ.acaCsk-CJWIMLGDZdGnsthyZsJfQ8ihXLyE8mTji8PgGkpbwhs7e1O0uitMgP_pGjHq2tey1BHSwoeCL49b18WyMIB10hK-q2BXGKQkykltjTrQbg7VsdFi0h57mGfO0IqAwYd55_hzHZNnyJMh4b0iPQFDwU7iTD7x9doHhZAvzElpkWbc_NKVw5_Mw3znjntSzbuPN105zlp4Niurin-_5BnukwvoJWLEJ-ZlF6hE4wKhaMB1pWTJjMvJQJE8khTTvlUN8tGxmzoaDYoe1aCGNxmDEQnx8Y5gKzVd89sylhqi54d2nQrJ2-ElfEDsMoXpR01Ps6fNDFtLTuPTp7ixj8LvgL2nCjAg996Ga3PtdvXJAZPDYCqqvaBkZZcsiqOgqLV0vGo3VVlfrcgJXQImMYRr_Inu0FCe47A93IAWuQTs-KplM1KdGJsHSnNBV6oe6QEkROJT5qZME-8xhvBYvOXqp9Znwg39bmiBCMxk26Ce66_vw06MNgoa3D5AlXPWemfdVKPZDnj_aLVjZSs0gAfFElcVn7l9yjWJOaT2Muk26U8bJl-2BEq_DSclqKHODuYM5kkPKIdE4NFrsqsDYuGxcA25rlNETFyl0q-UXj1aoz_joy5Hdnr4mFELmjnoo4jYQuakufP9xeGPsj1skaodKl0mmoGcCD6v1F60' \
--data-raw '{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ By default, route URLs are configured to be:

However, you can specify the path to be `/` if you wish to have your routes handling the root path of incoming URLs.

- The route below, using the default config, within the **dogs** project, with a route of **breeds** would be available at **http:/localhost:9926/dogs/breeds**.
- The route below, using the default config, within the **dogs** project, with a route of **breeds** would be available at **[http://localhost:9926/dogs/breeds](http://localhost:9926/dogs/breeds)**.

In effect, this route is just a pass-through to HarperDB. The same result could have been achieved by hitting the core HarperDB API, since it uses **hdbCore.preValidation** and **hdbCore.request**, which are defined in the "helper methods" section, below.

Expand Down
10 changes: 5 additions & 5 deletions versioned_docs/version-4.2/developers/applications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ type Dog @table @export {
}
```

By default the application HTTP server port is `9926` (this can be [configured here](../deployments/configuration#http)), so the local URL would be [http:/localhost:9926/Dog/](http:/localhost:9926/Dog/) with a full REST API. We can PUT or POST data into this table using this new path, and then GET or DELETE from it as well (you can even view data directly from the browser). If you have not added any records yet, we could use a PUT or POST to add a record. PUT is appropriate if you know the id, and POST can be used to assign an id:
By default the application HTTP server port is `9926` (this can be [configured here](../deployments/configuration#http)), so the local URL would be [http://localhost:9926/Dog/](http://localhost:9926/Dog/) with a full REST API. We can PUT or POST data into this table using this new path, and then GET or DELETE from it as well (you can even view data directly from the browser). If you have not added any records yet, we could use a PUT or POST to add a record. PUT is appropriate if you know the id, and POST can be used to assign an id:

```http
POST /Dog/
Expand All @@ -164,7 +164,7 @@ Content-Type: application/json
}
```

With this a record will be created and the auto-assigned id will be available through the `Location` header. If you added a record, you can visit the path `/Dog/<id>` to view that record. Alternately, the curl command `curl http:/localhost:9926/Dog/<id>` will achieve the same thing.
With this a record will be created and the auto-assigned id will be available through the `Location` header. If you added a record, you can visit the path `/Dog/<id>` to view that record. Alternately, the curl command `curl http://localhost:9926/Dog/<id>` will achieve the same thing.

## Authenticating Endpoints

Expand Down Expand Up @@ -217,9 +217,9 @@ type Dog @table @export {
Now we can start querying. Again, we just simply access the endpoint with query parameters (basic GET requests), like:

```
http:/localhost:9926/Dog/?name=Harper
http:/localhost:9926/Dog/?breed=Labrador
http:/localhost:9926/Dog/?breed=Husky&name=Balto&select=id,name,breed
http://localhost:9926/Dog/?name=Harper
http://localhost:9926/Dog/?breed=Labrador
http://localhost:9926/Dog/?breed=Husky&name=Balto&select=id,name,breed
```

Congratulations, you now have created a secure database application backend with a table, a well-defined structure, access controls, and a functional REST endpoint with query capabilities! See the [REST documentation for more information on HTTP access](./rest) and see the [Schema reference](./applications/defining-schemas) for more options for defining schemas.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ The package.json file that is created will look something like this.
"dependencies": {
"myGithubComponent": "github:HarperDB-Add-Ons/package#v2.2.0",
"myNPMComponent": "npm:harperdb",
"myTarBall": "file:/Users/harper/cool-component.tar",
"myLocal": "file:/Users/harper/local",
"myTarBall": "file://Users/harper/cool-component.tar",
"myLocal": "file://Users/harper/local",
"myWebsite": "https://harperdb-component"
}
}
Expand All @@ -53,7 +53,7 @@ The package prefix is automatically added, however you can manually set it in yo

```yaml
myCoolComponent:
package: file:/Users/harper/cool-component.tar
package: file://Users/harper/cool-component.tar
```

## Installing components using the operations API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ HarperDB/application-template#semver:v1.0.0
You can also install from private repository if you have an installed SSH keys on the server:

```
git+ssh:/[email protected]:my-org/my-app.git#semver:v1.0.0
git+ssh://[email protected]:my-org/my-app.git#semver:v1.0.0
```

Or you can use a Github token:
Expand Down
Loading