Skip to main content

web_apps

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

Overview

Nameweb_apps
TypeResource
Idfirebase.firebase.web_apps

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe resource name of the WebApp, in the format: projects/PROJECT_IDENTIFIER /webApps/APP_ID * PROJECT_IDENTIFIER: the parent Project's ProjectNumber (recommended) or its ProjectId. Learn more about using project identifiers in Google's AIP 2510 standard. Note that the value for PROJECT_IDENTIFIER in any response body will be the ProjectId. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see appId).
apiKeyIdstringThe globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the WebApp. Be aware that this value is the UID of the API key, not the keyString of the API key. The keyString is the value that can be found in the App's configuration artifact. If api_key_id is not set in requests to webApps.Create, then Firebase automatically associates an api_key_id with the WebApp. This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned. In patch requests, api_key_id cannot be set to an empty value, and the new UID must have no restrictions or only have restrictions that are valid for the associated WebApp. We recommend using the Google Cloud Console to manage API keys.
appIdstringOutput only. Immutable. The globally unique, Firebase-assigned identifier for the WebApp. This identifier should be treated as an opaque token, as the data format is not specified.
appUrlsarrayThe URLs where the WebApp is hosted.
displayNamestringThe user-assigned display name for the WebApp.
etagstringThis checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about etag in Google's AIP-154 standard. This etag is strongly validated.
expireTimestring (google-datetime)Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the DELETED state.
projectIdstringOutput only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the WebApp.
statestringOutput only. The lifecycle state of the App.
webIdstringOutput only. Immutable. A unique, Firebase-assigned identifier for the WebApp. This identifier is only used to populate the namespace value for the WebApp. For most use cases, use appId to identify or reference the App. The webId value is only unique within a FirebaseProject and its associated Apps.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, webAppsIdGets the specified WebApp.
listselectprojectsIdpageToken, pageSize, showDeletedLists each WebApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests are made with a pageToken.
createinsertprojectsIdRequests the creation of a new WebApp in the specified FirebaseProject. The result of this call is an Operation which can be used to track the provisioning process. The Operation is automatically deleted after completion, so there is no need to call DeleteOperation.
patchupdateprojectsId, webAppsIdupdateMaskUpdates the attributes of the specified WebApp.
removedeleteprojectsId, webAppsIdRemoves the specified WebApp from the FirebaseProject.
undeleteexecprojectsId, webAppsIdRestores the specified WebApp to the FirebaseProject.

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
projectsIdstring
webAppsIdstring
pageSizeinteger (int32)
pageTokenstring
showDeletedboolean
updateMaskstring (google-fieldmask)

SELECT examples

Gets the specified WebApp.

SELECT
name,
apiKeyId,
appId,
appUrls,
displayName,
etag,
expireTime,
projectId,
state,
webId
FROM firebase.firebase.web_apps
WHERE projectsId = '{{ projectsId }}' -- required
AND webAppsId = '{{ webAppsId }}' -- required;

INSERT examples

Requests the creation of a new WebApp in the specified FirebaseProject. The result of this call is an Operation which can be used to track the provisioning process. The Operation is automatically deleted after completion, so there is no need to call DeleteOperation.

INSERT INTO firebase.firebase.web_apps (
data__name,
data__displayName,
data__appUrls,
data__apiKeyId,
data__etag,
projectsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ appUrls }}',
'{{ apiKeyId }}',
'{{ etag }}',
'{{ projectsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the attributes of the specified WebApp.

UPDATE firebase.firebase.web_apps
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__appUrls = '{{ appUrls }}',
data__apiKeyId = '{{ apiKeyId }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND webAppsId = '{{ webAppsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
apiKeyId,
appId,
appUrls,
displayName,
etag,
expireTime,
projectId,
state,
webId;

DELETE examples

Removes the specified WebApp from the FirebaseProject.

DELETE FROM firebase.firebase.web_apps
WHERE projectsId = '{{ projectsId }}' --required
AND webAppsId = '{{ webAppsId }}' --required;

Lifecycle Methods

Restores the specified WebApp to the FirebaseProject.

EXEC firebase.firebase.web_apps.undelete 
@projectsId='{{ projectsId }}' --required,
@webAppsId='{{ webAppsId }}' --required
@@json=
'{
"validateOnly": {{ validateOnly }},
"etag": "{{ etag }}"
}';