Skip to main content

definitions

Creates, updates, deletes, gets or lists a definitions resource.

Overview

Namedefinitions
TypeResource
Idgoogle.apihub.definitions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the definition. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}
attributesobjectOptional. The list of user defined attributes associated with the definition resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.
createTimestring (google-datetime)Output only. The time at which the definition was created.
schemaobjectOutput only. The value of a schema definition. (id: GoogleCloudApihubV1Schema)
specstringOutput only. The name of the spec from where the definition was parsed. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
typestringOutput only. The type of the definition.
updateTimestring (google-datetime)Output only. The time at which the definition was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, apisId, versionsId, definitionsIdGet details about a definition in an API version.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
apisIdstring
definitionsIdstring
locationsIdstring
projectsIdstring
versionsIdstring

SELECT examples

Get details about a definition in an API version.

SELECT
name,
attributes,
createTime,
schema,
spec,
type,
updateTime
FROM google.apihub.definitions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
AND definitionsId = '{{ definitionsId }}' -- required;