---
updatedAt: 2026-01-20T21:03:03.000Z
agentTools:
  projectIndex: https://developer.onetrust.com/onetrust/llms.txt
---

# Get Inventory Schema

Use this API to retrieve the schema (attribute definitions) for a specific inventory type. The schema defines all available attributes, their types, and validation rules for the specified inventory category.

This is useful for understanding the structure of inventory records before creating or updating them, or for dynamically building forms and validation logic.

### Example Request

`GET https://{hostname}/api/inventory/v2/schemas/{type}`

`GET https://trial.onetrust.com/api/inventory/v2/schemas/processing-activities`

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "2.0",
    "title": "Privacy Automation - Data Mapping Automation (Swagger)",
    "contact": {}
  },
  "tags": [
    {
      "name": "Inventory Schema"
    }
  ],
  "paths": {
    "/inventory/v2/schemas/{type}": {
      "get": {
        "tags": [
          "Inventory Schema"
        ],
        "summary": "Get Inventory Schema",
        "description": "Use this API to retrieve the schema (attribute definitions) for a specific inventory type. The schema defines all available attributes, their types, and validation rules for the specified inventory category.\n\nThis is useful for understanding the structure of inventory records before creating or updating them, or for dynamically building forms and validation logic.\n\n### Example Request\n\n`GET https://{hostname}/api/inventory/v2/schemas/{type}`\n\n`GET https://trial.onetrust.com/api/inventory/v2/schemas/processing-activities`",
        "operationId": "getSchemaUsingGET_1",
        "parameters": [
          {
            "$ref": "#/components/parameters/inventoryType"
          },
          {
            "name": "showAll",
            "in": "query",
            "description": "When set to `true`, returns the complete schema including all attribute details such as allowed values, validation rules, and metadata. When `false` or omitted, returns only basic attribute information.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "example": "true"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AttributeResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Too Many Requests\nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "description": "The number of seconds after which requests will be allowed again.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "ot-ratelimit-event-id": {
                "description": "The unique identifier for the rate-limiting event.",
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ot-requests-allowed": {
                "description": "The number of requests allowed within the specified period.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "ot-period": {
                "description": "The unit of time for which the rate limit applies.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-request-made": {
                "description": "The number of requests made within the specified period.",
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "metrics-enabled": false,
    "proxy-enabled": true
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "x-onetrust": {
    "spec-label": "Swagger 2",
    "links": {
      "Data Mapping Automation Knowledge Base": "https://my.onetrust.com/s/topic/0TO1Q000000ItRxWAK/data-mapping"
    }
  },
  "servers": [
    {
      "url": "https://customer.my.onetrust.com/api"
    }
  ],
  "components": {
    "parameters": {
      "inventoryType": {
        "name": "type",
        "in": "path",
        "description": "The type of inventory or schema to retrieve. Each type represents a different category of data mapping records:\n- **processing-activities**: Records describing how personal data is processed\n- **vendors**: Third-party organizations that process data on your behalf\n- **assets**: Systems, applications, or databases that store or process data\n- **entities**: Legal entities or business units within your organization",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "processing-activities",
            "vendors",
            "assets",
            "entities"
          ]
        },
        "example": "vendors"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{$$.env.host}/api/access/v1/oauth/token",
            "scopes": {
              "INVENTORY_READ": "Read inventory records",
              "INVENTORY_WRITE": "Create and delete inventory records"
            }
          }
        }
      }
    },
    "schemas": {
      "AttributeResponse": {
        "type": "object",
        "properties": {
          "attributeType": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionKey": {
            "type": "string"
          },
          "fieldName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameKey": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "responseType": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "title": "AttributeResponse"
      }
    }
  }
}
```