Skip to main content

mr resource from-url

Create a Resource by having the server fetch a remote URL. Useful when you have a public asset that shouldn't be proxied through your local machine. The --url flag is required; the server downloads, stores, and indexes the file. Optional --tags / --groups attach relationships at creation.

Usage

mr resource from-url

Examples

Create from a URL

mr resource from-url --url https://example.com/photo.jpg

With metadata and groups

mr resource from-url --url https://example.com/doc.pdf --name "Paper" --meta '{"source":"arxiv"}' --groups 5

Flags

FlagTypeDefaultDescription
--urlstring``Remote URL (required) (required)
--namestring``Resource name
--descriptionstring``Resource description
--tagsstring``Comma-separated tag IDs
--groupsstring``Comma-separated group IDs
--owner-iduint0Owner group ID
--metastring``Meta JSON string
--file-namestring``Override file name

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Resource object with id

Exit Codes

0 on success; 1 on any error

See Also