Resources Endpoints
How Target Resources are gathered and formatted.
Resource Collection Endpoint
Targets that integrate with the Resources Collection API Endpoint must have a function that returns a specifically structured dataset. This structure allows us to recreate the hierarchy of the file structure on the front end. The endpoint is expecting a list of objects with the following structure:
Structure definitions:
kind : Type of resource
options:
container
item
kind_name : Target specific name for that kind
For example OSF kind_names are:
node
folder
file
container : id of the container for the resource
For example if the resource is an file in a folder then the container value would be the id of the folder
id : id of the resource
title : title of the resource
Resource Detail Endpoint
When hitting the endpoint for details of a specific resource the payload, there is an extra
field which allows for target specific data that might not be universal for all targets to be passed. The content ofextra
will change depending on the type of the resource. For instance in OSF the following are the payloads for Project and File. You'll notice the extra
field holds entirely different fields.
Resource API Endpoints
pageResource EndpointsLast updated