Skip to main content

sha

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

Overview

Namesha
TypeResource
Idfirebase.firebase.sha

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
certificatesarrayThe list of each ShaCertificate associated with the AndroidApp.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectprojectsId, androidAppsIdLists the SHA-1 and SHA-256 certificates for the specified AndroidApp.
createinsertprojectsId, androidAppsIdAdds a ShaCertificate to the specified AndroidApp.
deletedeleteprojectsId, androidAppsId, shaIdRemoves a ShaCertificate from the specified AndroidApp.

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
androidAppsIdstring
projectsIdstring
shaIdstring

SELECT examples

Lists the SHA-1 and SHA-256 certificates for the specified AndroidApp.

SELECT
certificates
FROM firebase.firebase.sha
WHERE projectsId = '{{ projectsId }}' -- required
AND androidAppsId = '{{ androidAppsId }}' -- required;

INSERT examples

Adds a ShaCertificate to the specified AndroidApp.

INSERT INTO firebase.firebase.sha (
data__name,
data__shaHash,
data__certType,
projectsId,
androidAppsId
)
SELECT
'{{ name }}',
'{{ shaHash }}',
'{{ certType }}',
'{{ projectsId }}',
'{{ androidAppsId }}'
RETURNING
name,
certType,
shaHash
;

DELETE examples

Removes a ShaCertificate from the specified AndroidApp.

DELETE FROM firebase.firebase.sha
WHERE projectsId = '{{ projectsId }}' --required
AND androidAppsId = '{{ androidAppsId }}' --required
AND shaId = '{{ shaId }}' --required;