Skip to content

5.9.2.2 Research

The Research domain of grant. The farmer's side of MooGrant (req 210 to 214): the research that owns everything a farmer leaves with us, the farm as the journey describes it, the results that match its comune and purposes, the count that follows the journey, and what the farmer did with each call. A farmer works as a guest, with a private credential that lasts 90 days from the last visit, or signed in through access. It is one API, with its own contract and its own version.

5.9.2.2.1 Versions

Version Status Prod URL Contract
v1 Proposed https://grant.moonitoring.com/research/v1 research/v1/openapi.yaml

The data model has no entities for this domain yet; its schemas are part of the proposal. Follows req 210 to 214. A guest research is identified by the farm-research cookie; a signed-in farmer by the token. A signed-in research is bound to a pending Farm Organization created at sign-up (req 212.8, D21).

5.9.2.2.2 Operations

Every operation names who calls it and the capability it checks (x-moonitoring-audience, x-moonitoring-capability in the contract); every capability is in the catalog of the data model (req 1002, 1006). Lists are paged by cursor, writes that create something carry an Idempotency-Key, errors are Problem Details.

Operation Request Who Capability
Read my research GET /research Organization users, staff or clients none: any member of the Organization
Delete my research DELETE /research Organization users, staff or clients none: any member of the Organization
Save the farm POST /research/farm Organization users, staff or clients none: any member of the Organization
Save the contact PATCH /research/contact Organization users, staff or clients none: any member of the Organization
Claim a guest research POST /research/claim Organization users, staff or clients none: any member of the Organization
List the matching calls GET /results Organization users, staff or clients none: any member of the Organization
Count the matching calls GET /results/count Anyone none
Prepare the adviser email GET /results/{call_id}/adviser-email Organization users, staff or clients none: any member of the Organization
List my actions on calls GET /actions Organization users grant.call_actions.manage
Record an action on a call POST /calls/{call_id}/actions Organization users grant.call_actions.manage

5.9.2.2.3 Contract v1

Proposed version

v1 is a proposal for review: its endpoints, errors and capabilities were designed from the requirements and the flows and are not confirmed. It leaves proposal with its first release; from then on it changes only as described in Every API Is Versioned.