neontribe / Linked_Development

Linked Development
1 stars 1 forks source link

Ability to fetch documents by IATI ID via API #35

Open practicalparticipation opened 11 years ago

practicalparticipation commented 11 years ago

It should be possible to fetch documents, which are attached to a given IATI project from the API.

This is a custom method, not implemented by the IDS API.

Tim to check what the query would be, and what the API call should be.

practicalparticipation commented 11 years ago

@tobybatch The API should implement and additional query parameter of ?related-activity=

This will be used to find resources which are related to some project or activity, identified by the ID given.

I will work on identifying the query filters that this should trigger.

practicalparticipation commented 11 years ago

In R4D data:

Resources are attached to projects by dcterms:isPartOf

Projects have a dcterms:identifier the relates to an IATI activity

Right now this is the URL of the activity in the DFID projects database. We will ask for this to be altered to include the ID in IATI format (e.g. GB-1-102580).

practicalparticipation commented 11 years ago

The fragment for implementing this filter will be:

   ?article <http://purl.org/dc/terms/isPartOf> ?project.
   ?project <http://purl.org/dc/terms/identifier> ?projectID. 
   FILTER(regex(?projectID,"^GB-1-112069$","i"))

Where GB-1-112069 is the IATI identifier.

This will only work on simple selects right now - as there is some missing data from R4D articles that mean the example construct queries I've prepared fail on them until we can do optional clauses properly.

practicalparticipation commented 11 years ago

The updated data to support this query will be live on the DFID site from 3rd June.