Certain pre defined attributes are already created by the API hub. These attributes will have type as SYSTEM_DEFINED and can be listed via attributes.list method. Allowed values for the same can be updated via attributes.patch method.
HTTP request
POST https://apihub.googleapis.com/v1/{parent=projects/*/locations/*}/attributes
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eThis page details how to create a user-defined attribute within the API hub, contrasting it with the existing \u003ccode\u003eSYSTEM_DEFINED\u003c/code\u003e attributes.\u003c/p\u003e\n"],["\u003cp\u003eCreating an attribute involves sending a POST request to the specified URL, \u003ccode\u003ehttps://apihub.googleapis.com/v1/{parent=projects/*/locations/*}/attributes\u003c/code\u003e, utilizing gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe attribute ID can be either user-specified or system-generated, with the ID having specific character constraints if the user decides to provide it themselves.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should include an instance of the \u003ccode\u003eAttribute\u003c/code\u003e, and upon success, the response body returns the newly created \u003ccode\u003eAttribute\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eTo create an attribute, you must have the necessary OAuth scope (\u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e) and the \u003ccode\u003eapihub.attributes.create\u003c/code\u003e IAM permission on the parent resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.attributes.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nCreate a user defined attribute.\n\nCertain pre defined attributes are already created by the API hub. These attributes will have type as `SYSTEM_DEFINED` and can be listed via [attributes.list](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes/list#google.cloud.apihub.v1.ApiHub.ListAttributes) method. Allowed values for the same can be updated via [attributes.patch](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes/patch#google.cloud.apihub.v1.ApiHub.UpdateAttribute) method.\n\n### HTTP request\n\n`POST https://apihub.googleapis.com/v1/{parent=projects/*/locations/*}/attributes`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Attribute](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Attribute](/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.attributes#Attribute).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `apihub.attributes.create`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]