{"openapi": "3.0.3", "info": {"title": "Regional Hub \u2014 Central Data Infrastructure API", "version": "1.0.0", "description": "The region's governed data-sharing gateway for West Africa & the Sahel. Discovery is open; data access is governed \u2014 you request a dataset, the hub team confirms a data-sharing agreement, and you then call the secured gateway with a personal API key that carries exactly your grants. The wider CGIAR/global commons is federated via GARDIAN, not re-hosted here.", "contact": {"name": "Regional Hub", "email": "regionalfsh@cgiar.org"}, "license": {"name": "Per-dataset (CC-BY-4.0 for open; agreement for restricted)"}}, "servers": [{"url": "https://data.rh-fsh-was.iita.org", "description": "This deployment"}], "tags": [{"name": "Discovery", "description": "Public \u2014 browse the catalogue, no auth."}, {"name": "Governed gateway", "description": "Governed data access \u2014 Bearer API key; enforces your agreement on every call."}, {"name": "Access requests", "description": "Request access and track it (signed in)."}, {"name": "API keys", "description": "Personal API keys for the gateway (signed in)."}], "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer", "description": "A personal API key: `Authorization: Bearer <key>`. Create one in the dashboard; it carries only the datasets you're granted."}, "cookieAuth": {"type": "apiKey", "in": "cookie", "name": "sessionid", "description": "Session cookie from signing in (Guardian SSO / CGIAR Entra ID)."}}}, "paths": {"/api/catalogue": {"get": {"summary": "Search the catalogue", "tags": ["Discovery"], "description": "Paginated, faceted search over data/knowledge/tools. Returns items + facet counts + pagination.", "parameters": [{"name": "q", "in": "query", "description": "Free-text search (name, description, theme, crop, country)", "schema": {"type": "string"}}, {"name": "type", "in": "query", "description": "Product type: data | knowledge | tool", "schema": {"type": "string"}}, {"name": "collection", "in": "query", "description": "Collection slug (national-soil, curated-research, advisory, tools, knowledge, federated)", "schema": {"type": "string"}}, {"name": "category", "in": "query", "description": "Data type (e.g. nutrient omission trial, survey, soil lab)", "schema": {"type": "string"}}, {"name": "access", "in": "query", "description": "open | restricted", "schema": {"type": "string"}}, {"name": "source", "in": "query", "description": "origin: national | produced | curated", "schema": {"type": "string"}}, {"name": "crop", "in": "query", "description": "Crop (e.g. Maize)", "schema": {"type": "string"}}, {"name": "country", "in": "query", "description": "Coverage (e.g. Nigeria)", "schema": {"type": "string"}}, {"name": "year", "in": "query", "description": "Year", "schema": {"type": "integer"}}, {"name": "fresh", "in": "query", "description": "fresh | due | overdue", "schema": {"type": "string"}}, {"name": "sort", "in": "query", "description": "new | name", "schema": {"type": "string"}}, {"name": "page", "in": "query", "description": "Page number", "schema": {"type": "integer"}}, {"name": "page_size", "in": "query", "description": "Results per page (6\u2013100)", "schema": {"type": "integer"}}], "security": [], "responses": {"200": {"description": "OK"}}}}, "/api/systems": {"get": {"summary": "List producing systems + roster", "tags": ["Discovery"], "description": "The full public roster of systems/products (small set).", "security": [], "responses": {"200": {"description": "OK"}}}}, "/data.json": {"get": {"summary": "DCAT catalogue", "tags": ["Discovery"], "description": "Project-Open-Data / DCAT-US JSON for harvesters (GARDIAN, CKAN, Google Dataset Search).", "security": [], "responses": {"200": {"description": "OK"}}}}, "/api/v1/whoami": {"get": {"summary": "Who am I", "tags": ["Governed gateway"], "description": "Identity + granted datasets behind the presented API key.", "security": [{"bearerAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/v1/systems": {"get": {"summary": "Systems you can reach", "tags": ["Governed gateway"], "description": "Datasets your key is entitled to.", "security": [{"bearerAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/v1/datasets/{code}": {"get": {"summary": "Dataset metadata + schema", "tags": ["Governed gateway"], "description": "Governed metadata + record schema. Open datasets are readable without a grant; restricted need one.", "parameters": [{"name": "code", "in": "path", "required": true, "description": "Dataset code, e.g. ADV", "schema": {"type": "string"}}], "security": [{"bearerAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/v1/datasets/{code}/records": {"get": {"summary": "Governed records", "tags": ["Governed gateway"], "description": "Row-level records, served under your agreement (field masking, max-record caps and mode rules enforced).", "parameters": [{"name": "code", "in": "path", "required": true, "description": "Dataset code", "schema": {"type": "string"}}, {"name": "limit", "in": "query", "description": "Max rows", "schema": {"type": "integer"}}], "security": [{"bearerAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/v1/datasets/{code}/export": {"get": {"summary": "Export CSV", "tags": ["Governed gateway"], "description": "Governed CSV export of the records you're entitled to.", "parameters": [{"name": "code", "in": "path", "required": true, "description": "Dataset code", "schema": {"type": "string"}}], "security": [{"bearerAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/requests": {"post": {"summary": "Submit an access request", "tags": ["Access requests"], "description": "Request access to a dataset under a data-sharing agreement. The hub team follows up with terms.", "security": [{"cookieAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/me/access": {"get": {"summary": "My grants", "tags": ["Access requests"], "description": "Datasets you're cleared to use.", "security": [{"cookieAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/me/requests": {"get": {"summary": "My requests", "tags": ["Access requests"], "description": "Track your access requests.", "security": [{"cookieAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/keys": {"get": {"summary": "List my API keys", "tags": ["API keys"], "security": [{"cookieAuth": []}], "responses": {"200": {"description": "OK"}}}, "post": {"summary": "Create an API key", "tags": ["API keys"], "description": "Shown once; scoped to your grants.", "security": [{"cookieAuth": []}], "responses": {"200": {"description": "OK"}}}}, "/api/keys/{key_id}/rotate": {"post": {"summary": "Rotate a key", "tags": ["API keys"], "parameters": [{"name": "key_id", "in": "path", "required": true, "description": "Key id", "schema": {"type": "string"}}], "security": [{"cookieAuth": []}], "responses": {"200": {"description": "OK"}}}}}}