Skip to content

Remove locations API #991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion content/developers/api-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ aliases:
<a href="/developers/api-reference/events-api/">Events API &rarr;</a><br>
<a href="/developers/api-reference/iam-policies-api/">IAM Policies API &rarr;</a><br>
<a href="/developers/api-reference/iam-subjects-api/">IAM Subjects API &rarr;</a><br>
<a href="/developers/api-reference/locations-api/">Locations API &rarr;</a><br>
<a href="/developers/api-reference/members-api/">Members API &rarr;</a></p>
<a href="/developers/api-reference/public-assets-api/">Public Assets API &rarr;</a><br>
<a href="/developers/api-reference/tenancies-api/">Tenancies API &rarr;</a><br>
Expand Down
1 change: 0 additions & 1 deletion content/developers/api-reference/caps-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ These are the available values for "**?service=**":
* applications
* assets
* blobs
* locations
* members


Expand Down
27 changes: 3 additions & 24 deletions content/developers/api-reference/iam-policies-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ menu:
parent: "api-reference"
weight: 115
toc: true
aliases:
aliases:
- /docs/api-reference/iam-policies-api/
---
{{< note >}}
**Note:** This page is primarily intended for developers who will be writing applications that will use DataTrails for provenance.
If you are looking for a simple way to test our API you might prefer our [Postman collection](https://www.postman.com/datatrails-inc/workspace/datatrails-public/overview), the [YAML runner](/developers/yaml-reference/story-runner-components/) or the [Developers](https://app.datatrails.ai) section of the web UI.
**Note:** This page is primarily intended for developers who will be writing applications that will use DataTrails for provenance.
If you are looking for a simple way to test our API you might prefer our [Postman collection](https://www.postman.com/datatrails-inc/workspace/datatrails-public/overview), the [YAML runner](/developers/yaml-reference/story-runner-components/) or the [Developers](https://app.datatrails.ai) section of the web UI.

Additional YAML examples can be found in the articles in the [Overview](/platform/overview/introduction/) section.
{{< /note >}}
Expand Down Expand Up @@ -103,10 +103,6 @@ The response is:
"display_name": "Friendly name of the policy",
"description": "Description of the policy",
"filters": [
{"or": [
"attributes.arc_home_location_identity=locations/5ea815f0-4de1-4a84-9377-701e880fe8ae",
"attributes.arc_home_location_identity=locations/27eed70b-9e2b-4db1-b8c4-e36505350dcc"
]},
{"or": [
"attributes.arc_display_type=Valve",
"attributes.arc_display_type=Pump"
Expand Down Expand Up @@ -187,10 +183,6 @@ Each of these calls returns a list of matching IAM Access Policies records in th
"display_name": "Name to display",
"description": "Description of the policy",
"filters": [
{"or": [
"attributes.arc_home_location_identity=locations/5ea815f0-4de1-4a84-9377-701e880fe8ae",
"attributes.arc_home_location_identity=locations/27eed70b-9e2b-4db1-b8c4-e36505350dcc"
]},
{"or": [
"attributes.arc_display_type=Valve",
"attributes.arc_display_type=Pump"
Expand Down Expand Up @@ -269,10 +261,6 @@ Define the Access Policy parameters to be changed and store in `/path/to/jsonfil
```json
{
"filters": [
{"or": [
"attributes.arc_home_location_identity=locations/5ea815f0-4de1-4a84-9377-701e880fe8ae",
"attributes.arc_home_location_identity=locations/27eed70b-9e2b-4db1-b8c4-e36505350dcc"
]},
{"or": [
"attributes.arc_display_type=Valve",
"attributes.arc_display_type=Pump"
Expand Down Expand Up @@ -319,10 +307,6 @@ The response is:
"display_name": "Friendly name of the policy",
"description": "Description of the policy",
"filters": [
{"or": [
"attributes.arc_home_location_identity=locations/5ea815f0-4de1-4a84-9377-701e880fe8ae",
"attributes.arc_home_location_identity=locations/27eed70b-9e2b-4db1-b8c4-e36505350dcc"
]},
{"or": [
"attributes.arc_display_type=Valve",
"attributes.arc_display_type=Pump"
Expand Down Expand Up @@ -384,7 +368,6 @@ Each of these calls returns a list of matching Asset records in the form:
"attributes": {
"arc_display_type": "Pump",
"arc_firmware_version": "1.0",
"arc_home_location_identity": "locations/866790d8-4ed6-4cc9-8f60-07672609b331",
"arc_serial_number": "vtl-x4-07",
"arc_description": "Pump at A603 North East",
"arc_display_name": "tcl.ccj.003",
Expand Down Expand Up @@ -424,10 +407,6 @@ Each of these calls returns a list of matching IAM `access_policies` records in
"identity": "access_policies/6a951b62-0a26-4c22-a886-1082297b063b",
"display_name": "Some description",
"filters": [
{ "or": [
"attributes.arc_home_location_identity=locations/5ea815f0-4de1-4a84-9377-701e880fe8ae",
"attributes.arc_home_location_identity=locations/27eed70b-9e2b-4db1-b8c4-e36505350dcc",
]},
{ "or": [
"attributes.arc_display_type=Valve",
"attributes.arc_display_type=Pump"
Expand Down
137 changes: 0 additions & 137 deletions content/developers/api-reference/locations-api/index.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ date: 2021-06-16T11:12:25+01:00
lastmod: 2023-09-27T11:12:25+01:00
draft: false
images: []
menu:
menu:
developers:
parent: "developer-patterns"
weight: 31
Expand All @@ -17,7 +17,7 @@ aliases:
---

Non-interactive access to the DataTrails platform is managed by creating `Integrations` with either a Custom Integration or one of the built-in Integrations. This is done from the `Integrations` page in the DataTrails UI (reachable
from the `Settings` page or the `Integrations` shortcut in the sidebar.) You can also do this via
from the `Settings` page or the `Integrations` shortcut in the sidebar.) You can also do this via
the App Registrations REST API.

{{< note >}}
Expand All @@ -40,7 +40,7 @@ The high level steps are:
If you have already saved a `CLIENT_ID` and a `SECRET`, with the correct [permissions applied](#grant-permissions-to-custom-integration), skip to [Getting a Token With the Custom Integration](#getting-a-token-with-the-custom-integration)

{{< note >}}
**Note:** Creating App Registrations requires **Owner** privileges.
**Note:** Creating App Registrations requires **Owner** privileges.
If `Settings` or `Integrations` does not appear in the navigation, see your DataTrails Administrator for access.
{{< /note >}}

Expand All @@ -57,17 +57,17 @@ If `Settings` or `Integrations` does not appear in the navigation, see your Data
**Note:** Optionally add any `Custom claims` at this step by clicking the `+ Add` button.<br>In this context, claims are pieces of information that are asserted in a JSON Web Token (JWT). *Registered* claims are name/value pairs that are defined by the JWT standard, *Custom* claims are not defined and can have any name/value combination.

Ensure the `Name` *does not start* with `jit_` or `arc_` (DataTrails reserved names) or use any other well-known reserved claims.

See [here](https://auth0.com/docs/security/tokens/json-web-tokens/json-web-token-claims#reserved-claims) for more information on JWT Claims
{{< /note >}}
1. If this Custom Integration should have administrator privileges, assign it the `Owner` role by
{{< /note >}}
1. If this Custom Integration should have administrator privileges, assign it the `Owner` role by
checking that option. If you do this, ensure the client credentials are securely protected.
1. Once complete, click `Confirm` to complete the custom integration
1. You will then be presented with the `CLIENT_ID` and `SECRET` required by the archivist token endpoint
{{< img src="RecordClientIDandSecret.png" alt="Rectangle" caption="<em>Record your Client ID and Secret</em>" class="border-0" >}}
{{< caution >}}
**Caution:** Save the `CLIENT_ID` and `SECRET` to a password manager or secret management service as the `SECRET` can **not** be viewed again. A new `SECRET` can be regenerated in the Integration configuration screen but this replaces and invalidates the previous `SECRET`.
{{< /caution >}}
{{< /caution >}}

### Grant Access Permissions to your Custom Integration

Expand Down Expand Up @@ -133,7 +133,7 @@ Having completed the steps to create a [custom integration](./#creating-a-custom
# in an `./datatrails/` directory
mkdir -p $HOME/.datatrails
chmod 0700 $HOME/.datatrails

# Create the Bearer Token
echo Authorization: Bearer $TOKEN > $HOME/.datatrails/bearer-token.txt
cat $HOME/.datatrails/bearer-token.txt
Expand Down Expand Up @@ -178,7 +178,6 @@ If you have existing assets, the output will be similar to:
"arc_description": "A shipping container being tracked",
"arc_display_name": "New Shipping Container #1",
"arc_display_type": "Shipping Container",
"arc_home_location_identity": "locations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"height": "8'"
},
"confirmation_status": "COMMITTED",
Expand Down
1 change: 0 additions & 1 deletion content/developers/yaml-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ aliases:
<p><a href="/developers/yaml-reference/story-runner-components/">YAML Runner Components &rarr;</a><br>
<a href="/developers/yaml-reference/assets/">Assets YAML Runner &rarr;</a><br>
<a href="/developers/yaml-reference/events/">Events YAML Runner &rarr;</a><br>
<a href="/developers/yaml-reference/locations/">Locations YAML Runner &rarr;</a><br>
<a href="/developers/yaml-reference/subjects/">Subjects YAML Runner &rarr;</a><br>
<a href="/developers/yaml-reference/estate-info/">Estate Information YAML Runner &rarr;</a></p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion content/developers/yaml-reference/assets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ aliases:
Adding an `asset_label` allows your Asset to be referenced in later steps of the story.
For example, when you want to add an Event to the Asset after it is created.

The `arc_namespace` (for the Asset) and the `namespace` (for the location) are used to distinguish between Assets and Locations created between runs of the story. Usually, these field values are derived from an environment variable `ARCHIVIST_NAMESPACE` (default value is namespace).
The `arc_namespace` is used to distinguish between Assets created between runs of the story. Usually, these field values are derived from an environment variable `ARCHIVIST_NAMESPACE` (default value is namespace).

The optional `confirm: true` entry means that the YAML Runner will wait for the Asset to be committed before moving on to the next step. This is beneficial if the Asset will be referenced in later steps.

Expand Down
6 changes: 3 additions & 3 deletions content/developers/yaml-reference/estate-info/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ date: 2021-06-09T11:39:03+01:00
lastmod: 2021-06-09T11:39:03+01:00
draft: false
images: []
menu:
menu:
developers:
parent: "yaml-reference"
weight: 207
toc: true
aliases:
aliases:
- /docs/yaml-reference/estate-info/
---

Expand All @@ -23,7 +23,7 @@ aliases:

## Composite Estate Info

This action returns a report on the current number of Assets, Events, and locations in your DataTrails estate.
This action returns a report on the current number of Assets and Events in your DataTrails estate.

```yaml
---
Expand Down
17 changes: 2 additions & 15 deletions content/developers/yaml-reference/events/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ aliases:

The `asset_label` must match the setting when the Asset was created in an earlier step. The `asset_label` may also be specified as the Asset ID of an existing Asset, in the form `assets/<asset-id>`.

There are a few optional settings that can be used when creating Events. `attachments` uploads the attachment to DataTrails and the response is added to the Event before posting. `location` creates the location if it does not exist and adds it to the Event. The `sbom` setting uploads the SBOM to DataTrails and adds the response to the Event before posting.
There are a few optional settings that can be used when creating Events. `attachments` uploads the attachment to DataTrails and the response is added to the Event before posting. The `sbom` setting uploads the SBOM to DataTrails and adds the response to the Event before posting.

`confirm: true` tells the YAML Runner to wait for the Event to be committed before moving to the next step.
This is optional and only necessary if your workflow requires 3rd parties (public or other DataTrails tenancies) to immediately view the Event.
Expand All @@ -49,26 +49,13 @@ steps:
arc_evidence: ARQC 0x12345678
wavestone_door_name: Courts of Justice Paris Front Door
wavestone_evt_type: door_open
location:
selector:
- display_name
- attributes:
- namespace
display_name: Paris Courts of Justice
description: Public museum in the former Palais de Justice
latitude: 48.855722
longitude: 2.345051
attributes:
namespace: door entry
address: 10 Boulevard du Palais, 75001 Paris, France
wavestone_ext: managed
attachments:
- filename: functests/test_resources/doors/events/door_open.png
content_type: image/png
confirm: false
```

This example creates an Event with custom Event attributes, creates and adds a location, and adds an image attachment.
This example creates an Event with custom Event attributes, and adds an image attachment.

Events may also be used to release a software package as an SBOM, such as the example below:

Expand Down
Loading