openapi: 3.1.0
info:
title: USDA NRCS Soil Data Access Query API
description: OpenAPI description of the USDA Natural Resources Conservation Service Soil Data Access (SDA) web services. SDA exposes a public REST POST endpoint that accepts SQL queries against the Soil Data Mart database and returns tabular data in XML, JSON or plain text. SDA additionally provides SOAP, WFS and WMS endpoints which are referenced here but not fully modeled in this specification. The REST endpoint is open and does not require authentication.
version: 1.0.0
contact:
name: API Evangelist
email: kin@apievangelist.com
servers:
- url: https://SDMDataAccess.sc.egov.usda.gov
description: USDA NRCS Soil Data Access
tags:
- name: Query
paths:
/Tabular/post.rest:
post:
summary: Run a Soil Data Access query
description: Submit a SQL query against the Soil Data Mart database and receive results in the requested format. The request is form-encoded with a SQL query and a desired output format.
operationId: runQuery
tags:
- Query
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
required:
- query
properties:
query:
type: string
description: SQL query to execute against the SDA database.
format:
type: string
description: Output format for the response.
enum:
- xml
- json
- json+columnname
- json+columnname+metadata
- plain
responses:
'200':
description: Query results.
content:
application/json:
schema:
type: object
application/xml:
schema:
type: object
text/plain:
schema:
type: string
'400':
description: Invalid request or SQL error.