Skip to main content

mr note create

Create a new Note. Only --name is required; every other field is optional. Use --tags, --groups, and --resources (comma-separated unsigned integer IDs) to link the new Note to existing entities at creation time. Use --meta to attach free-form JSON metadata, and --owner-id / --note-type-id to set the owner group and note type respectively. The created record is returned; capture .ID from JSON output for use in follow-up commands.

Usage

mr note create

Examples

Create a minimal note

mr note create --name "shopping list"

Create with description

mr note create --name "meeting-notes" --description "Q2 planning" --tags 5,6 --owner-id 42

Flags

FlagTypeDefaultDescription
--namestring``Note name (required) (required)
--descriptionstring``Note description
--tagsstring``Comma-separated tag IDs
--groupsstring``Comma-separated group IDs
--resourcesstring``Comma-separated resource IDs
--metastring``Meta JSON string
--owner-iduint0Owner group ID
--note-type-iduint0Note type ID

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

Created Note object with ID (uint), Name (string), Description (string), Meta (object), Tags ([]Tag), Groups ([]Group), Resources ([]Resource)

Exit Codes

0 on success; 1 on any error

See Also