commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RequestBuilder

In order to be able to build request objects you can use the RequestBuilder. The following methods return a HTTP request instance of Guzzle PSR-7.

<tt>withProjectKeyValue("projectKey")->get()</tt>

The view_audit_log:{projectKey} scope is required, and depending on the [resource type](ctp:history:type:ChangeHistoryResourceType) queried, their respective scopes must be granted.

Example

$builder = new HistoryRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->get();

<tt>withProjectKeyValue("projectKey")->withResourceTypeValue("resourceType")->get()</tt>

The view_audit_log:{projectKey} scope is required, and depending on the [resource type](ctp:history:type:ChangeHistoryResourceType) queried, their respective scopes must be granted.

Example

$builder = new HistoryRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->withResourceTypeValue("resourceType")
->get();

<tt>withProjectKeyValue("projectKey")->withResourceTypeValue("resourceType")->withIDValue("ID")->get()</tt>

The view_audit_log:{projectKey} scope is required, and depending on the [resource type](ctp:history:type:ChangeHistoryResourceType) queried, their respective scopes must be granted.

Example

$builder = new HistoryRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->withResourceTypeValue("resourceType")
->withIDValue("ID")
->get();

<tt>withProjectKeyValue("projectKey")->graphql()->post(null)</tt>

Execute a GraphQL request.

Example

$builder = new HistoryRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->graphql()
->post(null);