Skip to main content

histories

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

Overview

Namehistories
TypeResource
Idfirebase.toolresults.histories

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringA name to uniquely identify a history within a project. Maximum of 200 characters. - In response always set - In create request: always set
displayNamestringA short human-readable (plain text) name to display in the UI. Maximum of 100 characters. - In response: present if set during create. - In create request: optional
historyIdstringA unique identifier within a project for this History. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response always set - In create request: never set
testPlatformstringThe platform of the test history. - In response: always set. Returns the platform of the last execution if unknown.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectId, historyIdGets a History. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist
listselectprojectIdpageToken, pageSize, filterByNameLists Histories for a given Project. The histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist
createinsertprojectIdrequestIdCreates a History. The returned History will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist

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
historyIdstring
projectIdstring
filterByNamestring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets a History. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist

SELECT
name,
displayName,
historyId,
testPlatform
FROM firebase.toolresults.histories
WHERE projectId = '{{ projectId }}' -- required
AND historyId = '{{ historyId }}' -- required;

INSERT examples

Creates a History. The returned History will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist

INSERT INTO firebase.toolresults.histories (
data__historyId,
data__name,
data__displayName,
data__testPlatform,
projectId,
requestId
)
SELECT
'{{ historyId }}',
'{{ name }}',
'{{ displayName }}',
'{{ testPlatform }}',
'{{ projectId }}',
'{{ requestId }}'
RETURNING
name,
displayName,
historyId,
testPlatform
;