rsc_export

Export a full resource representation for API and model access.

This model returns a normalized export map for a resource id, name, or URI. The export includes:

  • essential identifiers (id, name, is_a, uri, uri_template, page_url)

  • resource properties (resource)

  • medium information and URLs (medium, medium_url, preview_url, depiction_url)

  • outgoing edges grouped by predicate (edges)

Access control is applied while building the export:

  • resources that are not visible return eacces or enoent

  • edge predicates and edge objects are only included when visible

  • hasusergroup edges are intentionally omitted

Example export shape:

#{
    <<"id">> => 112233,
    <<"uri">> => <<"http://www.example.com/id/112233">>,
    <<"is_a">> => [<<"text">>, <<"article">>],
    <<"resource">> => #{
        <<"title">> => <<"Foo">>
    },
    <<"medium">> => #{},
    <<"edges">> => #{
        <<"depiction">> => #{
            <<"predicate">> => #{ <<"name">> => <<"depiction">> },
            <<"objects">> => [
                #{
                    <<"object_id">> => #{ <<"id">> => 28992 },
                    <<"seq">> => 1
                }
            ]
        }
    }
}

Available Model API Paths

MethodPath patternDescription
get/full/+id/...Export full representation for resource +id using full/2.
get/+id/...Export full representation for resource +id using full/2.

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.