apidocs
Creates, updates, deletes, gets or lists an apidocs
resource.
Overview
Name | apidocs |
Type | Resource |
Id | google.apigee.apidocs |
Fields
The following fields are returned by SELECT
queries:
- organizations_sites_apidocs_get
- organizations_sites_apidocs_list
Successful response
Name | Datatype | Description |
---|---|---|
data | object | The catalog item resource. (id: GoogleCloudApigeeV1ApiDoc) |
errorCode | string | Unique error code for the request, if any. |
message | string | Description of the operation. |
requestId | string | Unique ID of the request. |
status | string | Status of the operation. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string (int64) | Output only. The ID of the catalog item. |
anonAllowed | boolean | Optional. Boolean flag that manages user access to the catalog item. When true, the catalog item has public visibility and can be viewed anonymously; otherwise, only registered users may view it. Note: when the parent portal is enrolled in the audience management feature, and this flag is set to false, visibility is set to an indeterminate state and must be explicitly specified in the management UI (see Manage the visibility of an API in your portal). Additionally, when enrolled in the audience management feature, updates to this flag will be ignored as visibility permissions must be updated in the management UI. |
apiProductName | string | Required. Immutable. The name field of the associated API product. A portal may have only one catalog item associated with a given API product. |
categoryIds | array | Optional. The IDs of the API categories to which this catalog item belongs. |
description | string | Optional. Description of the catalog item. Max length is 10,000 characters. |
edgeAPIProductName | string | Optional. Immutable. DEPRECATED: use the apiProductName field instead |
graphqlEndpointUrl | string | Optional. DEPRECATED: manage documentation through the getDocumentation and updateDocumentation methods |
graphqlSchema | string | Optional. DEPRECATED: manage documentation through the getDocumentation and updateDocumentation methods |
graphqlSchemaDisplayName | string | Optional. DEPRECATED: manage documentation through the getDocumentation and updateDocumentation methods |
imageUrl | string | Optional. Location of the image used for the catalog item in the catalog. This can be either an image with an external URL or a file path for image files stored in the portal, for example, /files/book-tree.jpg . When specifying the URL of an external image, the image won't be uploaded to your assets; additionally, loading the image in the integrated portal will be subject to its availability, which may be blocked or restricted by content security policies. Max length of file path is 2,083 characters. |
modified | string (int64) | Output only. Time the catalog item was last modified in milliseconds since epoch. |
published | boolean | Optional. Denotes whether the catalog item is published to the portal or is in a draft state. When the parent portal is enrolled in the audience management feature, the visibility can be set to public on creation by setting the anonAllowed flag to true or further managed in the management UI (see Manage the visibility of an API in your portal) before it can be visible to any users. If not enrolled in the audience management feature, the visibility is managed by the anonAllowed flag. |
requireCallbackUrl | boolean | Optional. Whether a callback URL is required when this catalog item's API product is enabled in a developer app. When true, a portal user will be required to input a URL when managing the app (this is typically used for the app's OAuth flow). |
siteId | string | Output only. The ID of the parent portal. |
specId | string | Optional. DEPRECATED: DO NOT USE |
title | string | Required. The user-facing name of the catalog item. title must be a non-empty string with a max length of 255 characters. |
visibility | boolean | Optional. DEPRECATED: use the published field instead |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
organizations_sites_apidocs_get | select | organizationsId , sitesId , apidocsId | Gets a catalog item. | |
organizations_sites_apidocs_list | select | organizationsId , sitesId | pageSize , pageToken | Returns the catalog items associated with a portal. |
organizations_sites_apidocs_create | insert | organizationsId , sitesId | Creates a new catalog item. | |
organizations_sites_apidocs_update | replace | organizationsId , sitesId , apidocsId | Updates a catalog item. | |
organizations_sites_apidocs_delete | delete | organizationsId , sitesId , apidocsId | Deletes a catalog item. |
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.
Name | Datatype | Description |
---|---|---|
apidocsId | string | |
organizationsId | string | |
sitesId | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- organizations_sites_apidocs_get
- organizations_sites_apidocs_list
Gets a catalog item.
SELECT
data,
errorCode,
message,
requestId,
status
FROM google.apigee.apidocs
WHERE organizationsId = '{{ organizationsId }}' -- required
AND sitesId = '{{ sitesId }}' -- required
AND apidocsId = '{{ apidocsId }}' -- required;
Returns the catalog items associated with a portal.
SELECT
id,
anonAllowed,
apiProductName,
categoryIds,
description,
edgeAPIProductName,
graphqlEndpointUrl,
graphqlSchema,
graphqlSchemaDisplayName,
imageUrl,
modified,
published,
requireCallbackUrl,
siteId,
specId,
title,
visibility
FROM google.apigee.apidocs
WHERE organizationsId = '{{ organizationsId }}' -- required
AND sitesId = '{{ sitesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- organizations_sites_apidocs_create
- Manifest
Creates a new catalog item.
INSERT INTO google.apigee.apidocs (
data__title,
data__description,
data__published,
data__anonAllowed,
data__apiProductName,
data__requireCallbackUrl,
data__imageUrl,
data__categoryIds,
data__visibility,
data__edgeAPIProductName,
data__specId,
data__graphqlSchema,
data__graphqlEndpointUrl,
data__graphqlSchemaDisplayName,
organizationsId,
sitesId
)
SELECT
'{{ title }}',
'{{ description }}',
{{ published }},
{{ anonAllowed }},
'{{ apiProductName }}',
{{ requireCallbackUrl }},
'{{ imageUrl }}',
'{{ categoryIds }}',
{{ visibility }},
'{{ edgeAPIProductName }}',
'{{ specId }}',
'{{ graphqlSchema }}',
'{{ graphqlEndpointUrl }}',
'{{ graphqlSchemaDisplayName }}',
'{{ organizationsId }}',
'{{ sitesId }}'
RETURNING
data,
errorCode,
message,
requestId,
status
;
# Description fields are for documentation purposes
- name: apidocs
props:
- name: organizationsId
value: string
description: Required parameter for the apidocs resource.
- name: sitesId
value: string
description: Required parameter for the apidocs resource.
- name: title
value: string
description: >
Required. The user-facing name of the catalog item. `title` must be a non-empty string with a max length of 255 characters.
- name: description
value: string
description: >
Optional. Description of the catalog item. Max length is 10,000 characters.
- name: published
value: boolean
description: >
Optional. Denotes whether the catalog item is published to the portal or is in a draft state. When the parent portal is enrolled in the [audience management feature](https://cloud.google.com/apigee/docs/api-platform/publish/portal/portal-audience#enrolling_in_the_beta_release_of_the_audience_management_feature), the visibility can be set to public on creation by setting the anonAllowed flag to true or further managed in the management UI (see [Manage the visibility of an API in your portal](https://cloud.google.com/apigee/docs/api-platform/publish/portal/publish-apis#visibility)) before it can be visible to any users. If not enrolled in the audience management feature, the visibility is managed by the `anonAllowed` flag.
- name: anonAllowed
value: boolean
description: >
Optional. Boolean flag that manages user access to the catalog item. When true, the catalog item has public visibility and can be viewed anonymously; otherwise, only registered users may view it. Note: when the parent portal is enrolled in the [audience management feature](https://cloud.google.com/apigee/docs/api-platform/publish/portal/portal-audience#enrolling_in_the_beta_release_of_the_audience_management_feature), and this flag is set to false, visibility is set to an indeterminate state and must be explicitly specified in the management UI (see [Manage the visibility of an API in your portal](https://cloud.google.com/apigee/docs/api-platform/publish/portal/publish-apis#visibility)). Additionally, when enrolled in the audience management feature, updates to this flag will be ignored as visibility permissions must be updated in the management UI.
- name: apiProductName
value: string
description: >
Required. Immutable. The `name` field of the associated [API product](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.apiproducts). A portal may have only one catalog item associated with a given API product.
- name: requireCallbackUrl
value: boolean
description: >
Optional. Whether a callback URL is required when this catalog item's API product is enabled in a developer app. When true, a portal user will be required to input a URL when managing the app (this is typically used for the app's OAuth flow).
- name: imageUrl
value: string
description: >
Optional. Location of the image used for the catalog item in the catalog. This can be either an image with an external URL or a file path for [image files stored in the portal](https://cloud.google.com/apigee/docs/api-platform/publish/portal/portal-files), for example, `/files/book-tree.jpg`. When specifying the URL of an external image, the image won't be uploaded to your assets; additionally, loading the image in the integrated portal will be subject to its availability, which may be blocked or restricted by [content security policies](https://cloud.google.com/apigee/docs/api-platform/publish/portal/csp). Max length of file path is 2,083 characters.
- name: categoryIds
value: array
description: >
Optional. The IDs of the API categories to which this catalog item belongs.
- name: visibility
value: boolean
description: >
Optional. DEPRECATED: use the `published` field instead
- name: edgeAPIProductName
value: string
description: >
Optional. Immutable. DEPRECATED: use the `apiProductName` field instead
- name: specId
value: string
description: >
Optional. DEPRECATED: DO NOT USE
- name: graphqlSchema
value: string
description: >
Optional. DEPRECATED: manage documentation through the `getDocumentation` and `updateDocumentation` methods
- name: graphqlEndpointUrl
value: string
description: >
Optional. DEPRECATED: manage documentation through the `getDocumentation` and `updateDocumentation` methods
- name: graphqlSchemaDisplayName
value: string
description: >
Optional. DEPRECATED: manage documentation through the `getDocumentation` and `updateDocumentation` methods
REPLACE
examples
- organizations_sites_apidocs_update
Updates a catalog item.
REPLACE google.apigee.apidocs
SET
data__title = '{{ title }}',
data__description = '{{ description }}',
data__published = {{ published }},
data__anonAllowed = {{ anonAllowed }},
data__apiProductName = '{{ apiProductName }}',
data__requireCallbackUrl = {{ requireCallbackUrl }},
data__imageUrl = '{{ imageUrl }}',
data__categoryIds = '{{ categoryIds }}',
data__visibility = {{ visibility }},
data__edgeAPIProductName = '{{ edgeAPIProductName }}',
data__specId = '{{ specId }}',
data__graphqlSchema = '{{ graphqlSchema }}',
data__graphqlEndpointUrl = '{{ graphqlEndpointUrl }}',
data__graphqlSchemaDisplayName = '{{ graphqlSchemaDisplayName }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND sitesId = '{{ sitesId }}' --required
AND apidocsId = '{{ apidocsId }}' --required
RETURNING
data,
errorCode,
message,
requestId,
status;
DELETE
examples
- organizations_sites_apidocs_delete
Deletes a catalog item.
DELETE FROM google.apigee.apidocs
WHERE organizationsId = '{{ organizationsId }}' --required
AND sitesId = '{{ sitesId }}' --required
AND apidocsId = '{{ apidocsId }}' --required;