# rsc\_export

Source: https://zotonic.com/docs/2500/rsc_export

URI: https://zotonic.com/id/2500

Language: en



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:

```erlang
#{
    <<"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
-------------------------

| Method | Path pattern    | Description                                                   |
| ------ | --------------- | ------------------------------------------------------------- |
| `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.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2500?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2500?language=en>)
