Inventory Schema

Create Attribute

Use this API to create an attribute for the inventory schema.

post/api/inventory/v2/schemas/{schemaName}/attributes/

Request

  • Base URL
    https://hostname
  • URL
    https://hostname/api/inventory/v2/schemas/{schemaName}/attributes/
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://{hostname}/api/access/v1/oauth/token scopes: INVENTORY, INVENTORY_WRITE

Path parameters

schemaName'processing-activities' | 'vendors' | 'assets' | 'entities' required

Type of the inventory or schema. The supporting types are 'processing-activities', 'vendors', 'assets', and 'entities'.

Request body

namestring required

Name of the attribute

descriptionstring required

Description of the attribute

responseType'text' | 'date' | 'single-select' | 'multi-select' | 'numerical-text' | 'numerical-single-select' | 'score' | 'formula' required

Response type of the attribute

allowOtherboolean
formulastring

Formula expression for formula-type attributes

intakeQuestionKeystring

Key for the intake question

questionstring

Question for Attribute

questionDescriptionstring

Question Description for Attribute

fieldNamestring

Field name of the attribute (system-generated if not provided)

attributeType'none' | 'users' | 'locations' | 'organizations' | 'vendors' | 'assets' | 'entities' | 'processing-activities' | 'statuses'

Type of the attribute

trackedAtRelatedInventoryTypestring

Related inventory type where this attribute is tracked

responseSubType'Standard' | 'Formula' | 'Matrix' | 'RollUp'

Response sub-type for the attribute

allowLabelsboolean

Flag indicating if the attribute allows labels

Example request

{
  "name": "Vendor Rating",
  "description": "Rating assigned to the vendor",
  "responseType": "single-select",
  "formula": "sum(Assets:customField1044,Entities:customField1001)",
  "intakeQuestionKey": "VendorsIntakeQuestion1",
  "fieldName": "vendorRating",
  "attributeType": "none",
  "trackedAtRelatedInventoryType": "vendors",
  "responseSubType": "Standard",
  "associatedAttributeRequest": {
    "associatedAttributes": [
      {
        "options": [
          {
            "option": "Example Option",
            "optionKey": "example_option",
            "optionSelectionValue": "value1",
            "colorCode": "#FFFFFF"
          }
        ]
      }
    ]
  },
  "abacBasicAssignmentInfo": {
    "assignments": [
      {
        "assignmentId": "550e8400-e29b-41d4-a716-446655440000",
        "assignmentName": "Assignment1",
        "policyStatus": "ACTIVE"
      }
    ]
  }
}

Response

Created

idstring uuid
namestring
fieldNamestring
nameKeystring

Key used for name translation

descriptionstring

Description of the attribute

descriptionKeystring

Key used for description translation

requiredboolean

Flag indicating if the attribute is required

status'enabled' | 'disabled'

Status of the attribute

attributeType'none' | 'users' | 'locations' | 'organizations' | 'vendors' | 'assets' | 'entities' | 'processing-activities' | 'statuses'

Type of the attribute

responseType'text' | 'date' | 'single-select' | 'multi-select' | 'numerical-text' | 'numerical-single-select' | 'score' | 'formula'

Response type of the attribute

readOnlyboolean

Flag indicating if the attribute is read-only

seededboolean

Flag indicating if the attribute is seeded (system-provided)

hiddenAtInventoryboolean

Flag indicating if the attribute is hidden at inventory detail view

trackedAtRelatedInventoryTypestring

Related inventory type where this attribute is tracked

source'System' | 'Custom' | 'Vendorpedia'

Source of the attribute

formulastring

Formula expression for formula-type attributes

schemaNamestring

Name of the schema this attribute belongs to

hiddenboolean

Flag indicating if the attribute is hidden

allowLabelsboolean

Flag indicating if the attribute allows labels

intakeQuestionKeystring

Key for the intake question

validationRuleIdstring

ID of the validation rule applied to this attribute

systemManagedboolean

Flag indicating if the attribute is system-managed and cannot be modified

responseSubType'Standard' | 'Formula' | 'Matrix' | 'RollUp'

Sub-type of the response

Example response

{
  "nameKey": "VendorsName",
  "description": "Name of the vendor",
  "descriptionKey": "VendorsNameDesc",
  "required": true,
  "status": "enabled",
  "attributeType": "none",
  "responseType": "single-select",
  "seeded": true,
  "trackedAtRelatedInventoryType": "vendors",
  "source": "System",
  "formula": "sum(Assets:customField1044,Entities:customField1001)",
  "schemaName": "Vendors",
  "intakeQuestionKey": "VendorsIntakeQuestion1",
  "intakeQuestion": {
    "nameKey": "VendorsIntakeQuestionName",
    "name": "What is your preferred vendor category?",
    "descriptionKey": "VendorsIntakeQuestionDesc",
    "description": "Please select the category that best describes your vendor"
  },
  "validationRuleId": "f17a3b03-62da-4448-b3bb-e56d4a2291c2",
  "abacBasicAssignmentInfo": {
    "assignments": [
      {
        "assignmentId": "550e8400-e29b-41d4-a716-446655440000",
        "assignmentName": "Assignment1",
        "policyStatus": "ACTIVE"
      }
    ]
  },
  "responseSubType": "Standard",
  "associatedAttributes": [
    {
      "Attribute options": [
        {
          "id": "91e37a36-ca61-499b-b3c3-7d556aef5cde",
          "value": "Option 1",
          "valueKey": "VendorsOption1",
          "hint": "Select this option if...",
          "hintKey": "VendorsOption1Hint",
          "status": "enabled",
          "seeded": true,
          "sequence": 1,
          "colorCode": "#FF5733"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.