The zrayGetRequestEnvironment Web API Method

Get superglobal arrays for a particular request.

Version: 1.8

Required Permissions: Read-only

HTTP method: GET

Supported Editions: Zend Server

Request parameters:

Parameter

 Type

Required

Description

requestId

Integer

Yes

The request ID of the environment information to retrieve.

Expected Response Code: 200 OK. For more information see Response Format.

Response Format: requestEnvironment

Possible Action Specific Error Codes: This action has no specific error codes

Example

Usage Example

Request (headers removed for the purpose of clarity)

GET /ZendServer/Api/zrayGetRequestEnvironment?requestId=14

Response (not all headers are shown)

<?xml version="1.0" encoding="UTF-8"?>

<zendServerAPIResponse xmlns="http://www.zend.com/server/api/1.8">

<requestData>

<apiKeyName>angel.eyes</apiKeyName>

<method>zrayGetRequestEnvironment</method>

</requestData>

<responseData>

<requestEnvironment>

<requestId>14</requestId>

<server>

<parameters>

...

</parameters>

</server>

<get>

<parameters>

...

</parameters>

</get>

<post>

<parameters>

...

</parameters>

</post>

<request>

<parameters>

...

</parameters>

</request>

<session>

<parameters>

<parameter>

<name><![CDATA[userid]]></name>

<value><![CDATA[1234]]></value>

</parameter>

<parameterMap>

<name><![CDATA[tags]]></name>

<type>array</type>

<parameters>

<parameter>

<name/>

<value><![CDATA[1234]]></value>

</parameter>

<parameter>

<name><![CDATA[username]]></name>

<value><![CDATA[admin]]></value>

</parameter>

...

</parameters>

</parameterMap>

<parameterMap>

<name><![CDATA[identity]]></name>

<type>Users\Identity</type>

<parameters>

<parameter>

<name><![CDATA[userid]]></name>

<value><![CDATA[1234]]></value>

</parameter>

<parameter>

<name><![CDATA[username]]></name>

<value><![CDATA[admin]]></value>

</parameter>

...

</parameters>

</parameterMap>

...

</parameters>

<parameters>

...

</parameters>

...

</session>

<cookie>

<parameters>

...

</parameters>

</cookie>

<env>

<parameters>

...

</parameters>

</env>

<files>

<parameters>

...

</parameters>

</files>

</requestEnvironment>

<rawHeaders>...</rawHeaders>

<rawPostData>...</rawPostData>

<responseEnvironment>

<rawHeaders>...</rawHeaders>

<rawOutput>...</rawOutput>

</responseEnvironment>

</responseData>

</zendServerAPIResponse>

 

JSON:

 

{

"zendServerAPIResponse": "http://www.zend.com/server/api/1.8",

"requestData": {

"apiKeyName": "angel.eyes",

"method": "zrayGetRequestEnvironment"

},

"responseData": {

"requestEnvironment": {

"requestId": "14",

"sessions": [

{

"userid": "1234",

"tags": [

"1234",

"admin"

],

"identityMixed": {

“0”: “1234”,

"userid": "2134",

"username": "admin"

},

"identity": {

"__object_type": "Users\\Identity",

"userid": "2134",

"username": "admin"

},

...

},

...

]

}

}

}