v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1351142229.7 KB
projects

Create a user defined attribute. Certain pre defined attributes are already created by the API hub. These attributes will have type as SYSTEM_DEFINED and can be listed via ListAttributes method. Allowed values for the same can be updated via UpdateAttribute method.

post/v1/{+parent}/attributes

Path parameters

parentstring required

Required. The parent resource for Attribute. Format: projects/{project}/locations/{location}

Query parameters

attributeIdstring

Optional. The ID to use for the attribute, which will become the final component of the attribute's resource name. This field is optional. * If provided, the same will be used. The service will throw an error if the specified id is already used by another attribute resource in the API hub. * If not provided, a system generated id will be used. This value should be 4-500 characters, and valid characters are /a-z[0-9]-_/.

Request body

displayNamestring

Required. The display name of the attribute.

scope'SCOPE_UNSPECIFIED' | 'API' | 'VERSION' | 'SPEC' | 'API_OPERATION' | 'DEPLOYMENT' | 'DEPENDENCY' | 'DEFINITION' | 'EXTERNAL_API' | 'PLUGIN'

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

cardinalityinteger

Optional. The maximum number of values that the attribute can have when associated with an API Hub resource. Cardinality 1 would represent a single-valued attribute. It must not be less than 1 or greater than 20. If not specified, the cardinality would be set to 1 by default and represent a single-valued attribute.

createTimestring google-datetime

Output only. The time at which the attribute was created.

updateTimestring google-datetime

Output only. The time at which the attribute was last updated.

definitionType'DEFINITION_TYPE_UNSPECIFIED' | 'SYSTEM_DEFINED' | 'USER_DEFINED'

Output only. The definition type of the attribute.

descriptionstring

Optional. The description of the attribute.

mandatoryboolean

Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.

namestring

Identifier. The name of the attribute in the API Hub. Format: projects/{project}/locations/{location}/attributes/{attribute}

dataType'DATA_TYPE_UNSPECIFIED' | 'ENUM' | 'JSON' | 'STRING' | 'URI'

Required. The type of the data of the attribute.

Response

Successful response