Resource Names (LRNs)
Background
Normally in RESTful APIs resources are identified via HTTP URLs:
- i.e. a specific file:
https://api.us.lifeomic.com/v1/files/184c6b61-128f-46ef-ac38-97b8e72cuuid
This HTTPS URI includes information like API version and host name that could change over time, and an protocol that is irrelevant. To disambiguate a resource reference our platform uses an LRN URI scheme that globally identifies a resource independent of how it is accessed.
LRN scheme
The LRN scheme follows this format:
lrn:<product>:<region>:<account>:<resourceType>:<resource>
lrn:<product>:<region>:<account>:<resourceType>:<resource>/<qualifier>
where product = lo|j1
where region = us|dev
Examples
Below are examples of how resources can be represented:
product: lo
region: us
account: demo-account
// LifeOmic Platform File
lrn:lo:us:demo-account:file:184c6b61-128f-46ef-ac38-97b8e72cuuid
// LifeOmic Platform Project
lrn:lo:us:demo-account:project:d80a2af5-f902-4dd5-8710-3d9ffe84uuid
// All files that start with /data in a project
lrn:lo:us:demo-account:project:d80a2af5-f902-4dd5-8710-3d9ffe84uuid/file/data/*
// All subjects in a project
lrn:lo:us:demo-account:project:d80a2af5-f902-4dd5-8710-3d9ffe84uuid/subject/*
// Global resources not tied to an account
lrn:lo:us::user:joe.user
lrn:j1:us::user:joe.user
LRN support are currently only supported on the following resources:
- tasks, files, and projects within the LifeOmic Platform product
LRN support will be added to other areas of the products over time. The product
segment is used to denote which product a resource belongs to (lo
- LifeOmic, j1
- JupiterOne).
Use Cases
In Task Service, one can specify an input by HTTPS URI. This URI could be a file or project in the LifeOmic Platform.
{
"path": "/tmp/input.xml",
"url": "https://api.us.lifeomic.com/v1/files/c8ef7300-1373-4e51-8eb9-ff333600uuid",
"type": "FILE"
}
Instead of an HTTPS URI and LRN URI can be provided:
{
"path": "/tmp/input.xml",
"url": "lrn:lo:us:demo-account:file:c8ef7300-1373-4e51-8eb9-ff333600uuid",
"type": "FILE"
}