Skip to main content

debugsessions

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

Overview

Namedebugsessions
TypeResource
Idgoogle.apigee.debugsessions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringA unique ID for this DebugSession.
countinteger (int32)Optional. The number of request to be traced. Min = 1, Max = 15, Default = 10.
createTimestring (google-datetime)Output only. The first transaction creation timestamp, recorded by UAP.
filterstringOptional. A conditional statement which is evaluated against the request message to determine if it should be traced. Syntax matches that of on API Proxy bundle flow Condition.
timeoutstring (int64)Optional. The time in seconds after which this DebugSession should end. This value will override the value in query param, if both are provided.
tracesizeinteger (int32)Optional. The maximum number of bytes captured from the response payload. Min = 0, Max = 5120, Default = 5120.
validityinteger (int32)Optional. The length of time, in seconds, that this debug session is valid, starting from when it's received in the control plane. Min = 1, Max = 15, Default = 10.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_environments_apis_revisions_debugsessions_getselectorganizationsId, environmentsId, apisId, revisionsId, debugsessionsIdRetrieves a debug session.
organizations_environments_apis_revisions_debugsessions_listselectorganizationsId, environmentsId, apisId, revisionsIdpageSize, pageTokenLists debug sessions that are currently active in the given API Proxy revision.
organizations_apis_debugsessions_listselectorganizationsId, apisIdpageSize, pageTokenLists debug sessions that are currently active in the given API Proxy.
organizations_environments_apis_revisions_debugsessions_createinsertorganizationsId, environmentsId, apisId, revisionsIdtimeoutCreates a debug session for a deployed API Proxy revision.

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
debugsessionsIdstring
environmentsIdstring
organizationsIdstring
revisionsIdstring
pageSizeinteger (int32)
pageTokenstring
timeoutstring (int64)

SELECT examples

Retrieves a debug session.

SELECT
name,
count,
createTime,
filter,
timeout,
tracesize,
validity
FROM google.apigee.debugsessions
WHERE organizationsId = '{{ organizationsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND apisId = '{{ apisId }}' -- required
AND revisionsId = '{{ revisionsId }}' -- required
AND debugsessionsId = '{{ debugsessionsId }}' -- required;

INSERT examples

Creates a debug session for a deployed API Proxy revision.

INSERT INTO google.apigee.debugsessions (
data__name,
data__validity,
data__count,
data__tracesize,
data__filter,
data__timeout,
organizationsId,
environmentsId,
apisId,
revisionsId,
timeout
)
SELECT
'{{ name }}',
{{ validity }},
{{ count }},
{{ tracesize }},
'{{ filter }}',
'{{ timeout }}',
'{{ organizationsId }}',
'{{ environmentsId }}',
'{{ apisId }}',
'{{ revisionsId }}',
'{{ timeout }}'
RETURNING
name,
count,
createTime,
filter,
timeout,
tracesize,
validity
;