code
stringlengths 17
296k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
protected function getReplicationsRequest($org_id, $zap_trace_span = null, $name = null, $remote_id = null, $local_bucket_id = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getReplications'
);
}
$resourcePath = '/api/v2/replications';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($name !== null) {
$queryParams['name'] = ObjectSerializer::toQueryValue($name);
}
// query params
if ($remote_id !== null) {
$queryParams['remoteID'] = ObjectSerializer::toQueryValue($remote_id);
}
// query params
if ($local_bucket_id !== null) {
$queryParams['localBucketID'] = ObjectSerializer::toQueryValue($local_bucket_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getReplications'
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $name (optional)
@param string $remote_id (optional)
@param string $local_bucket_id (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getReplicationsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function patchReplicationByID($replication_id, $replication_update_request, $zap_trace_span = null, $validate = false)
{
list($response) = $this->patchReplicationByIDWithHttpInfo($replication_id, $replication_update_request, $zap_trace_span, $validate);
return $response;
} | Operation patchReplicationByID
Update a replication
@param string $replication_id replication_id (required)
@param \InfluxDB2\Model\ReplicationUpdateRequest $replication_update_request replication_update_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param bool $validate If true, validate the updated information, but don't save it. (optional, default to false)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Replication|string|string|string | patchReplicationByID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function patchReplicationByIDWithHttpInfo($replication_id, $replication_update_request, $zap_trace_span = null, $validate = false)
{
$request = $this->patchReplicationByIDRequest($replication_id, $replication_update_request, $zap_trace_span, $validate);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Replication';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation patchReplicationByIDWithHttpInfo
Update a replication
@param string $replication_id (required)
@param \InfluxDB2\Model\ReplicationUpdateRequest $replication_update_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param bool $validate If true, validate the updated information, but don't save it. (optional, default to false)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Replication|string|string|string, HTTP status code, HTTP response headers (array of strings) | patchReplicationByIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
protected function patchReplicationByIDRequest($replication_id, $replication_update_request, $zap_trace_span = null, $validate = false)
{
// verify the required parameter 'replication_id' is set
if ($replication_id === null || (is_array($replication_id) && count($replication_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $replication_id when calling patchReplicationByID'
);
}
// verify the required parameter 'replication_update_request' is set
if ($replication_update_request === null || (is_array($replication_update_request) && count($replication_update_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $replication_update_request when calling patchReplicationByID'
);
}
$resourcePath = '/api/v2/replications/{replicationID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($validate !== null) {
$queryParams['validate'] = ObjectSerializer::toQueryValue($validate);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($replication_id !== null) {
$resourcePath = str_replace(
'{' . 'replicationID' . '}',
ObjectSerializer::toPathValue($replication_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($replication_update_request)) {
$_tempBody = $replication_update_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PATCH', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'patchReplicationByID'
@param string $replication_id (required)
@param \InfluxDB2\Model\ReplicationUpdateRequest $replication_update_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param bool $validate If true, validate the updated information, but don't save it. (optional, default to false)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchReplicationByIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function postReplication($replication_creation_request, $zap_trace_span = null, $validate = false)
{
list($response) = $this->postReplicationWithHttpInfo($replication_creation_request, $zap_trace_span, $validate);
return $response;
} | Operation postReplication
Register a new replication
@param \InfluxDB2\Model\ReplicationCreationRequest $replication_creation_request replication_creation_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param bool $validate If true, validate the replication, but don't save it. (optional, default to false)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Replication|string|string | postReplication | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function postReplicationWithHttpInfo($replication_creation_request, $zap_trace_span = null, $validate = false)
{
$request = $this->postReplicationRequest($replication_creation_request, $zap_trace_span, $validate);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Replication';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postReplicationWithHttpInfo
Register a new replication
@param \InfluxDB2\Model\ReplicationCreationRequest $replication_creation_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param bool $validate If true, validate the replication, but don't save it. (optional, default to false)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Replication|string|string, HTTP status code, HTTP response headers (array of strings) | postReplicationWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
protected function postReplicationRequest($replication_creation_request, $zap_trace_span = null, $validate = false)
{
// verify the required parameter 'replication_creation_request' is set
if ($replication_creation_request === null || (is_array($replication_creation_request) && count($replication_creation_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $replication_creation_request when calling postReplication'
);
}
$resourcePath = '/api/v2/replications';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($validate !== null) {
$queryParams['validate'] = ObjectSerializer::toQueryValue($validate);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if (isset($replication_creation_request)) {
$_tempBody = $replication_creation_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postReplication'
@param \InfluxDB2\Model\ReplicationCreationRequest $replication_creation_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param bool $validate If true, validate the replication, but don't save it. (optional, default to false)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postReplicationRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function postValidateReplicationByID($replication_id, $zap_trace_span = null)
{
$this->postValidateReplicationByIDWithHttpInfo($replication_id, $zap_trace_span);
} | Operation postValidateReplicationByID
Validate a replication
@param string $replication_id replication_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | postValidateReplicationByID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function postValidateReplicationByIDWithHttpInfo($replication_id, $zap_trace_span = null)
{
$request = $this->postValidateReplicationByIDRequest($replication_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation postValidateReplicationByIDWithHttpInfo
Validate a replication
@param string $replication_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | postValidateReplicationByIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
protected function postValidateReplicationByIDRequest($replication_id, $zap_trace_span = null)
{
// verify the required parameter 'replication_id' is set
if ($replication_id === null || (is_array($replication_id) && count($replication_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $replication_id when calling postValidateReplicationByID'
);
}
$resourcePath = '/api/v2/replications/{replicationID}/validate';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($replication_id !== null) {
$resourcePath = str_replace(
'{' . 'replicationID' . '}',
ObjectSerializer::toPathValue($replication_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postValidateReplicationByID'
@param string $replication_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postValidateReplicationByIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ReplicationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ReplicationsService.php | MIT |
public function getTelegrafPlugins($zap_trace_span = null, $type = null)
{
list($response) = $this->getTelegrafPluginsWithHttpInfo($zap_trace_span, $type);
return $response;
} | Operation getTelegrafPlugins
List all Telegraf plugins
@param string $zap_trace_span OpenTracing span context (optional)
@param string $type The type of plugin desired. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\TelegrafPlugins|\InfluxDB2\Model\Error | getTelegrafPlugins | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TelegrafPluginsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafPluginsService.php | MIT |
public function getTelegrafPluginsWithHttpInfo($zap_trace_span = null, $type = null)
{
$request = $this->getTelegrafPluginsRequest($zap_trace_span, $type);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\TelegrafPlugins';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getTelegrafPluginsWithHttpInfo
List all Telegraf plugins
@param string $zap_trace_span OpenTracing span context (optional)
@param string $type The type of plugin desired. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\TelegrafPlugins|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getTelegrafPluginsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TelegrafPluginsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafPluginsService.php | MIT |
protected function getTelegrafPluginsRequest($zap_trace_span = null, $type = null)
{
$resourcePath = '/api/v2/telegraf/plugins';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($type !== null) {
$queryParams['type'] = ObjectSerializer::toQueryValue($type);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getTelegrafPlugins'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $type The type of plugin desired. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTelegrafPluginsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TelegrafPluginsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafPluginsService.php | MIT |
public function deleteRemoteConnectionByID($remote_id, $zap_trace_span = null)
{
$this->deleteRemoteConnectionByIDWithHttpInfo($remote_id, $zap_trace_span);
} | Operation deleteRemoteConnectionByID
Delete a remote connection
@param string $remote_id remote_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteRemoteConnectionByID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function deleteRemoteConnectionByIDWithHttpInfo($remote_id, $zap_trace_span = null)
{
$request = $this->deleteRemoteConnectionByIDRequest($remote_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteRemoteConnectionByIDWithHttpInfo
Delete a remote connection
@param string $remote_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteRemoteConnectionByIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
protected function deleteRemoteConnectionByIDRequest($remote_id, $zap_trace_span = null)
{
// verify the required parameter 'remote_id' is set
if ($remote_id === null || (is_array($remote_id) && count($remote_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $remote_id when calling deleteRemoteConnectionByID'
);
}
$resourcePath = '/api/v2/remotes/{remoteID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($remote_id !== null) {
$resourcePath = str_replace(
'{' . 'remoteID' . '}',
ObjectSerializer::toPathValue($remote_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteRemoteConnectionByID'
@param string $remote_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteRemoteConnectionByIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function getRemoteConnectionByID($remote_id, $zap_trace_span = null)
{
list($response) = $this->getRemoteConnectionByIDWithHttpInfo($remote_id, $zap_trace_span);
return $response;
} | Operation getRemoteConnectionByID
Retrieve a remote connection
@param string $remote_id remote_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\RemoteConnection|string|string | getRemoteConnectionByID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function getRemoteConnectionByIDWithHttpInfo($remote_id, $zap_trace_span = null)
{
$request = $this->getRemoteConnectionByIDRequest($remote_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\RemoteConnection';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getRemoteConnectionByIDWithHttpInfo
Retrieve a remote connection
@param string $remote_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\RemoteConnection|string|string, HTTP status code, HTTP response headers (array of strings) | getRemoteConnectionByIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
protected function getRemoteConnectionByIDRequest($remote_id, $zap_trace_span = null)
{
// verify the required parameter 'remote_id' is set
if ($remote_id === null || (is_array($remote_id) && count($remote_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $remote_id when calling getRemoteConnectionByID'
);
}
$resourcePath = '/api/v2/remotes/{remoteID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($remote_id !== null) {
$resourcePath = str_replace(
'{' . 'remoteID' . '}',
ObjectSerializer::toPathValue($remote_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getRemoteConnectionByID'
@param string $remote_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getRemoteConnectionByIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function getRemoteConnections($org_id, $zap_trace_span = null, $name = null, $remote_url = null)
{
list($response) = $this->getRemoteConnectionsWithHttpInfo($org_id, $zap_trace_span, $name, $remote_url);
return $response;
} | Operation getRemoteConnections
List all remote connections
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $name name (optional)
@param string $remote_url remote_url (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\RemoteConnections|string|string | getRemoteConnections | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function getRemoteConnectionsWithHttpInfo($org_id, $zap_trace_span = null, $name = null, $remote_url = null)
{
$request = $this->getRemoteConnectionsRequest($org_id, $zap_trace_span, $name, $remote_url);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\RemoteConnections';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getRemoteConnectionsWithHttpInfo
List all remote connections
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $name (optional)
@param string $remote_url (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\RemoteConnections|string|string, HTTP status code, HTTP response headers (array of strings) | getRemoteConnectionsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
protected function getRemoteConnectionsRequest($org_id, $zap_trace_span = null, $name = null, $remote_url = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getRemoteConnections'
);
}
$resourcePath = '/api/v2/remotes';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($name !== null) {
$queryParams['name'] = ObjectSerializer::toQueryValue($name);
}
// query params
if ($remote_url !== null) {
$queryParams['remoteURL'] = ObjectSerializer::toQueryValue($remote_url);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getRemoteConnections'
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $name (optional)
@param string $remote_url (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getRemoteConnectionsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function patchRemoteConnectionByID($remote_id, $remote_connection_update_request, $zap_trace_span = null)
{
list($response) = $this->patchRemoteConnectionByIDWithHttpInfo($remote_id, $remote_connection_update_request, $zap_trace_span);
return $response;
} | Operation patchRemoteConnectionByID
Update a remote connection
@param string $remote_id remote_id (required)
@param \InfluxDB2\Model\RemoteConnectionUpdateRequest $remote_connection_update_request remote_connection_update_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\RemoteConnection|string|string|string | patchRemoteConnectionByID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function patchRemoteConnectionByIDWithHttpInfo($remote_id, $remote_connection_update_request, $zap_trace_span = null)
{
$request = $this->patchRemoteConnectionByIDRequest($remote_id, $remote_connection_update_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\RemoteConnection';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation patchRemoteConnectionByIDWithHttpInfo
Update a remote connection
@param string $remote_id (required)
@param \InfluxDB2\Model\RemoteConnectionUpdateRequest $remote_connection_update_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\RemoteConnection|string|string|string, HTTP status code, HTTP response headers (array of strings) | patchRemoteConnectionByIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
protected function patchRemoteConnectionByIDRequest($remote_id, $remote_connection_update_request, $zap_trace_span = null)
{
// verify the required parameter 'remote_id' is set
if ($remote_id === null || (is_array($remote_id) && count($remote_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $remote_id when calling patchRemoteConnectionByID'
);
}
// verify the required parameter 'remote_connection_update_request' is set
if ($remote_connection_update_request === null || (is_array($remote_connection_update_request) && count($remote_connection_update_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $remote_connection_update_request when calling patchRemoteConnectionByID'
);
}
$resourcePath = '/api/v2/remotes/{remoteID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($remote_id !== null) {
$resourcePath = str_replace(
'{' . 'remoteID' . '}',
ObjectSerializer::toPathValue($remote_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($remote_connection_update_request)) {
$_tempBody = $remote_connection_update_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PATCH', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'patchRemoteConnectionByID'
@param string $remote_id (required)
@param \InfluxDB2\Model\RemoteConnectionUpdateRequest $remote_connection_update_request (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchRemoteConnectionByIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function postRemoteConnection($remote_connection_creation_request)
{
list($response) = $this->postRemoteConnectionWithHttpInfo($remote_connection_creation_request);
return $response;
} | Operation postRemoteConnection
Register a new remote connection
@param \InfluxDB2\Model\RemoteConnectionCreationRequest $remote_connection_creation_request remote_connection_creation_request (required)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\RemoteConnection|string|string | postRemoteConnection | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function postRemoteConnectionWithHttpInfo($remote_connection_creation_request)
{
$request = $this->postRemoteConnectionRequest($remote_connection_creation_request);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\RemoteConnection';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postRemoteConnectionWithHttpInfo
Register a new remote connection
@param \InfluxDB2\Model\RemoteConnectionCreationRequest $remote_connection_creation_request (required)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\RemoteConnection|string|string, HTTP status code, HTTP response headers (array of strings) | postRemoteConnectionWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
protected function postRemoteConnectionRequest($remote_connection_creation_request)
{
// verify the required parameter 'remote_connection_creation_request' is set
if ($remote_connection_creation_request === null || (is_array($remote_connection_creation_request) && count($remote_connection_creation_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $remote_connection_creation_request when calling postRemoteConnection'
);
}
$resourcePath = '/api/v2/remotes';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// body params
$_tempBody = null;
if (isset($remote_connection_creation_request)) {
$_tempBody = $remote_connection_creation_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postRemoteConnection'
@param \InfluxDB2\Model\RemoteConnectionCreationRequest $remote_connection_creation_request (required)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postRemoteConnectionRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RemoteConnectionsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RemoteConnectionsService.php | MIT |
public function getConfig($zap_trace_span = null)
{
list($response) = $this->getConfigWithHttpInfo($zap_trace_span);
return $response;
} | Operation getConfig
Retrieve runtime configuration
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Config|string|string | getConfig | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ConfigService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ConfigService.php | MIT |
public function getConfigWithHttpInfo($zap_trace_span = null)
{
$request = $this->getConfigRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Config';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getConfigWithHttpInfo
Retrieve runtime configuration
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Config|string|string, HTTP status code, HTTP response headers (array of strings) | getConfigWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ConfigService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ConfigService.php | MIT |
protected function getConfigRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/config';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getConfig'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getConfigRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ConfigService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ConfigService.php | MIT |
public function getBackupKV($zap_trace_span = null)
{
list($response) = $this->getBackupKVWithHttpInfo($zap_trace_span);
return $response;
} | Operation getBackupKV
Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getBackupKV | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
public function getBackupKVWithHttpInfo($zap_trace_span = null)
{
$request = $this->getBackupKVRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getBackupKVWithHttpInfo
Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getBackupKVWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
protected function getBackupKVRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/backup/kv';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getBackupKV'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBackupKVRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
public function getBackupMetadata($zap_trace_span = null, $accept_encoding = 'identity')
{
list($response) = $this->getBackupMetadataWithHttpInfo($zap_trace_span, $accept_encoding);
return $response;
} | Operation getBackupMetadata
Download snapshot of all metadata in the server
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept_encoding Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to 'identity')
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\MetadataBackup|string | getBackupMetadata | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
public function getBackupMetadataWithHttpInfo($zap_trace_span = null, $accept_encoding = 'identity')
{
$request = $this->getBackupMetadataRequest($zap_trace_span, $accept_encoding);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\MetadataBackup';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getBackupMetadataWithHttpInfo
Download snapshot of all metadata in the server
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept_encoding Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to 'identity')
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\MetadataBackup|string, HTTP status code, HTTP response headers (array of strings) | getBackupMetadataWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
protected function getBackupMetadataRequest($zap_trace_span = null, $accept_encoding = 'identity')
{
$resourcePath = '/api/v2/backup/metadata';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// header params
if ($accept_encoding !== null) {
$headerParams['Accept-Encoding'] = ObjectSerializer::toHeaderValue($accept_encoding);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['multipart/mixed', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['multipart/mixed', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getBackupMetadata'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept_encoding Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to 'identity')
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBackupMetadataRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
public function getBackupShardId($shard_id, $zap_trace_span = null, $accept_encoding = 'identity', $since = null)
{
list($response) = $this->getBackupShardIdWithHttpInfo($shard_id, $zap_trace_span, $accept_encoding, $since);
return $response;
} | Operation getBackupShardId
Download snapshot of all TSM data in a shard
@param int $shard_id The shard ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept_encoding Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to 'identity')
@param \DateTime $since The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp) to include in the snapshot. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|\InfluxDB2\Model\Error|string | getBackupShardId | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
public function getBackupShardIdWithHttpInfo($shard_id, $zap_trace_span = null, $accept_encoding = 'identity', $since = null)
{
$request = $this->getBackupShardIdRequest($shard_id, $zap_trace_span, $accept_encoding, $since);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getBackupShardIdWithHttpInfo
Download snapshot of all TSM data in a shard
@param int $shard_id The shard ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept_encoding Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to 'identity')
@param \DateTime $since The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp) to include in the snapshot. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getBackupShardIdWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
protected function getBackupShardIdRequest($shard_id, $zap_trace_span = null, $accept_encoding = 'identity', $since = null)
{
// verify the required parameter 'shard_id' is set
if ($shard_id === null || (is_array($shard_id) && count($shard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $shard_id when calling getBackupShardId'
);
}
$resourcePath = '/api/v2/backup/shards/{shardID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($since !== null) {
$queryParams['since'] = ObjectSerializer::toQueryValue($since);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// header params
if ($accept_encoding !== null) {
$headerParams['Accept-Encoding'] = ObjectSerializer::toHeaderValue($accept_encoding);
}
// path params
if ($shard_id !== null) {
$resourcePath = str_replace(
'{' . 'shardID' . '}',
ObjectSerializer::toPathValue($shard_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getBackupShardId'
@param int $shard_id The shard ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept_encoding Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to 'identity')
@param \DateTime $since The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp) to include in the snapshot. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBackupShardIdRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/BackupService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BackupService.php | MIT |
public function deleteVariablesID($variable_id, $zap_trace_span = null)
{
$this->deleteVariablesIDWithHttpInfo($variable_id, $zap_trace_span);
} | Operation deleteVariablesID
Delete a variable
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteVariablesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function deleteVariablesIDWithHttpInfo($variable_id, $zap_trace_span = null)
{
$request = $this->deleteVariablesIDRequest($variable_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteVariablesIDWithHttpInfo
Delete a variable
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteVariablesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function deleteVariablesIDRequest($variable_id, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling deleteVariablesID'
);
}
$resourcePath = '/api/v2/variables/{variableID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteVariablesID'
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteVariablesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function deleteVariablesIDLabelsID($variable_id, $label_id, $zap_trace_span = null)
{
$this->deleteVariablesIDLabelsIDWithHttpInfo($variable_id, $label_id, $zap_trace_span);
} | Operation deleteVariablesIDLabelsID
Delete a label from a variable
@param string $variable_id The variable ID. (required)
@param string $label_id The label ID to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteVariablesIDLabelsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function deleteVariablesIDLabelsIDWithHttpInfo($variable_id, $label_id, $zap_trace_span = null)
{
$request = $this->deleteVariablesIDLabelsIDRequest($variable_id, $label_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteVariablesIDLabelsIDWithHttpInfo
Delete a label from a variable
@param string $variable_id The variable ID. (required)
@param string $label_id The label ID to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteVariablesIDLabelsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function deleteVariablesIDLabelsIDRequest($variable_id, $label_id, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling deleteVariablesIDLabelsID'
);
}
// verify the required parameter 'label_id' is set
if ($label_id === null || (is_array($label_id) && count($label_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $label_id when calling deleteVariablesIDLabelsID'
);
}
$resourcePath = '/api/v2/variables/{variableID}/labels/{labelID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// path params
if ($label_id !== null) {
$resourcePath = str_replace(
'{' . 'labelID' . '}',
ObjectSerializer::toPathValue($label_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteVariablesIDLabelsID'
@param string $variable_id The variable ID. (required)
@param string $label_id The label ID to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteVariablesIDLabelsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function getVariables($zap_trace_span = null, $org = null, $org_id = null)
{
list($response) = $this->getVariablesWithHttpInfo($zap_trace_span, $org, $org_id);
return $response;
} | Operation getVariables
List all variables
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@param string $org_id The organization ID. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Variables|string|string | getVariables | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function getVariablesWithHttpInfo($zap_trace_span = null, $org = null, $org_id = null)
{
$request = $this->getVariablesRequest($zap_trace_span, $org, $org_id);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Variables';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getVariablesWithHttpInfo
List all variables
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@param string $org_id The organization ID. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Variables|string|string, HTTP status code, HTTP response headers (array of strings) | getVariablesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function getVariablesRequest($zap_trace_span = null, $org = null, $org_id = null)
{
$resourcePath = '/api/v2/variables';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getVariables'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@param string $org_id The organization ID. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getVariablesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function getVariablesID($variable_id, $zap_trace_span = null)
{
list($response) = $this->getVariablesIDWithHttpInfo($variable_id, $zap_trace_span);
return $response;
} | Operation getVariablesID
Retrieve a variable
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Variable|string|string | getVariablesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function getVariablesIDWithHttpInfo($variable_id, $zap_trace_span = null)
{
$request = $this->getVariablesIDRequest($variable_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Variable';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getVariablesIDWithHttpInfo
Retrieve a variable
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Variable|string|string, HTTP status code, HTTP response headers (array of strings) | getVariablesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function getVariablesIDRequest($variable_id, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling getVariablesID'
);
}
$resourcePath = '/api/v2/variables/{variableID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getVariablesID'
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getVariablesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function getVariablesIDLabels($variable_id, $zap_trace_span = null)
{
list($response) = $this->getVariablesIDLabelsWithHttpInfo($variable_id, $zap_trace_span);
return $response;
} | Operation getVariablesIDLabels
List all labels for a variable
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\LabelsResponse|\InfluxDB2\Model\Error | getVariablesIDLabels | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function getVariablesIDLabelsWithHttpInfo($variable_id, $zap_trace_span = null)
{
$request = $this->getVariablesIDLabelsRequest($variable_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\LabelsResponse';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getVariablesIDLabelsWithHttpInfo
List all labels for a variable
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\LabelsResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getVariablesIDLabelsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function getVariablesIDLabelsRequest($variable_id, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling getVariablesIDLabels'
);
}
$resourcePath = '/api/v2/variables/{variableID}/labels';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getVariablesIDLabels'
@param string $variable_id The variable ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getVariablesIDLabelsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function patchVariablesID($variable_id, $variable, $zap_trace_span = null)
{
list($response) = $this->patchVariablesIDWithHttpInfo($variable_id, $variable, $zap_trace_span);
return $response;
} | Operation patchVariablesID
Update a variable
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\Variable $variable Variable update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Variable|string | patchVariablesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function patchVariablesIDWithHttpInfo($variable_id, $variable, $zap_trace_span = null)
{
$request = $this->patchVariablesIDRequest($variable_id, $variable, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Variable';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation patchVariablesIDWithHttpInfo
Update a variable
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\Variable $variable Variable update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Variable|string, HTTP status code, HTTP response headers (array of strings) | patchVariablesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function patchVariablesIDRequest($variable_id, $variable, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling patchVariablesID'
);
}
// verify the required parameter 'variable' is set
if ($variable === null || (is_array($variable) && count($variable) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable when calling patchVariablesID'
);
}
$resourcePath = '/api/v2/variables/{variableID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($variable)) {
$_tempBody = $variable;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PATCH', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'patchVariablesID'
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\Variable $variable Variable update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchVariablesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function postVariables($variable, $zap_trace_span = null)
{
list($response) = $this->postVariablesWithHttpInfo($variable, $zap_trace_span);
return $response;
} | Operation postVariables
Create a variable
@param \InfluxDB2\Model\Variable $variable Variable to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Variable|string | postVariables | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function postVariablesWithHttpInfo($variable, $zap_trace_span = null)
{
$request = $this->postVariablesRequest($variable, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Variable';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postVariablesWithHttpInfo
Create a variable
@param \InfluxDB2\Model\Variable $variable Variable to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Variable|string, HTTP status code, HTTP response headers (array of strings) | postVariablesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function postVariablesRequest($variable, $zap_trace_span = null)
{
// verify the required parameter 'variable' is set
if ($variable === null || (is_array($variable) && count($variable) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable when calling postVariables'
);
}
$resourcePath = '/api/v2/variables';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if (isset($variable)) {
$_tempBody = $variable;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postVariables'
@param \InfluxDB2\Model\Variable $variable Variable to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postVariablesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function postVariablesIDLabels($variable_id, $label_mapping, $zap_trace_span = null)
{
list($response) = $this->postVariablesIDLabelsWithHttpInfo($variable_id, $label_mapping, $zap_trace_span);
return $response;
} | Operation postVariablesIDLabels
Add a label to a variable
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping Label to add (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\LabelResponse|\InfluxDB2\Model\Error | postVariablesIDLabels | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function postVariablesIDLabelsWithHttpInfo($variable_id, $label_mapping, $zap_trace_span = null)
{
$request = $this->postVariablesIDLabelsRequest($variable_id, $label_mapping, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\LabelResponse';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postVariablesIDLabelsWithHttpInfo
Add a label to a variable
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping Label to add (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\LabelResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postVariablesIDLabelsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function postVariablesIDLabelsRequest($variable_id, $label_mapping, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling postVariablesIDLabels'
);
}
// verify the required parameter 'label_mapping' is set
if ($label_mapping === null || (is_array($label_mapping) && count($label_mapping) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $label_mapping when calling postVariablesIDLabels'
);
}
$resourcePath = '/api/v2/variables/{variableID}/labels';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($label_mapping)) {
$_tempBody = $label_mapping;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postVariablesIDLabels'
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping Label to add (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postVariablesIDLabelsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function putVariablesID($variable_id, $variable, $zap_trace_span = null)
{
list($response) = $this->putVariablesIDWithHttpInfo($variable_id, $variable, $zap_trace_span);
return $response;
} | Operation putVariablesID
Replace a variable
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\Variable $variable Variable to replace (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Variable|string | putVariablesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function putVariablesIDWithHttpInfo($variable_id, $variable, $zap_trace_span = null)
{
$request = $this->putVariablesIDRequest($variable_id, $variable, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Variable';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation putVariablesIDWithHttpInfo
Replace a variable
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\Variable $variable Variable to replace (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Variable|string, HTTP status code, HTTP response headers (array of strings) | putVariablesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
protected function putVariablesIDRequest($variable_id, $variable, $zap_trace_span = null)
{
// verify the required parameter 'variable_id' is set
if ($variable_id === null || (is_array($variable_id) && count($variable_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable_id when calling putVariablesID'
);
}
// verify the required parameter 'variable' is set
if ($variable === null || (is_array($variable) && count($variable) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $variable when calling putVariablesID'
);
}
$resourcePath = '/api/v2/variables/{variableID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($variable_id !== null) {
$resourcePath = str_replace(
'{' . 'variableID' . '}',
ObjectSerializer::toPathValue($variable_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($variable)) {
$_tempBody = $variable;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PUT', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'putVariablesID'
@param string $variable_id The variable ID. (required)
@param \InfluxDB2\Model\Variable $variable Variable to replace (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | putVariablesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/VariablesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/VariablesService.php | MIT |
public function postDelete($delete_predicate_request, $zap_trace_span = null, $org = null, $bucket = null, $org_id = null, $bucket_id = null)
{
$this->postDeleteWithHttpInfo($delete_predicate_request, $zap_trace_span, $org, $bucket, $org_id, $bucket_id);
} | Operation postDelete
Delete data
@param \InfluxDB2\Model\DeletePredicateRequest $delete_predicate_request Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/). (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. (optional)
@param string $bucket The name or ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. (optional)
@param string $org_id The ID of the organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. (optional)
@param string $bucket_id The ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | postDelete | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DeleteService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DeleteService.php | MIT |
public function postDeleteWithHttpInfo($delete_predicate_request, $zap_trace_span = null, $org = null, $bucket = null, $org_id = null, $bucket_id = null)
{
$request = $this->postDeleteRequest($delete_predicate_request, $zap_trace_span, $org, $bucket, $org_id, $bucket_id);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation postDeleteWithHttpInfo
Delete data
@param \InfluxDB2\Model\DeletePredicateRequest $delete_predicate_request Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/). (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. (optional)
@param string $bucket The name or ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. (optional)
@param string $org_id The ID of the organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. (optional)
@param string $bucket_id The ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | postDeleteWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DeleteService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DeleteService.php | MIT |
protected function postDeleteRequest($delete_predicate_request, $zap_trace_span = null, $org = null, $bucket = null, $org_id = null, $bucket_id = null)
{
// verify the required parameter 'delete_predicate_request' is set
if ($delete_predicate_request === null || (is_array($delete_predicate_request) && count($delete_predicate_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $delete_predicate_request when calling postDelete'
);
}
$resourcePath = '/api/v2/delete';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// query params
if ($bucket !== null) {
$queryParams['bucket'] = ObjectSerializer::toQueryValue($bucket);
}
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($bucket_id !== null) {
$queryParams['bucketID'] = ObjectSerializer::toQueryValue($bucket_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if (isset($delete_predicate_request)) {
$_tempBody = $delete_predicate_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postDelete'
@param \InfluxDB2\Model\DeletePredicateRequest $delete_predicate_request Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/v2.3/write-data/delete-data/). - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/v2.3/reference/syntax/delete-predicate/). (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. (optional)
@param string $bucket The name or ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. (optional)
@param string $org_id The ID of the organization to delete data from. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. (optional)
@param string $bucket_id The ID of the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postDeleteRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DeleteService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DeleteService.php | MIT |
public function getConfig($zap_trace_span = null)
{
list($response) = $this->getConfigWithHttpInfo($zap_trace_span);
return $response;
} | Operation getConfig
Retrieve runtime configuration
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Config|string|string | getConfig | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getConfigWithHttpInfo($zap_trace_span = null)
{
$request = $this->getConfigRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Config';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getConfigWithHttpInfo
Retrieve runtime configuration
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Config|string|string, HTTP status code, HTTP response headers (array of strings) | getConfigWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getConfigRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/config';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getConfig'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getConfigRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofAllProfiles($zap_trace_span = null, $cpu = null)
{
list($response) = $this->getDebugPprofAllProfilesWithHttpInfo($zap_trace_span, $cpu);
return $response;
} | Operation getDebugPprofAllProfiles
Retrieve all runtime profiles
@param string $zap_trace_span OpenTracing span context (optional)
@param string $cpu Collects and returns CPU profiling data for the specified [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration). (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofAllProfiles | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofAllProfilesWithHttpInfo($zap_trace_span = null, $cpu = null)
{
$request = $this->getDebugPprofAllProfilesRequest($zap_trace_span, $cpu);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofAllProfilesWithHttpInfo
Retrieve all runtime profiles
@param string $zap_trace_span OpenTracing span context (optional)
@param string $cpu Collects and returns CPU profiling data for the specified [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration). (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofAllProfilesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofAllProfilesRequest($zap_trace_span = null, $cpu = null)
{
$resourcePath = '/debug/pprof/all';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($cpu !== null) {
$queryParams['cpu'] = ObjectSerializer::toQueryValue($cpu);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofAllProfiles'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $cpu Collects and returns CPU profiling data for the specified [duration](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#duration). (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofAllProfilesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofAllocs($zap_trace_span = null, $debug = null, $seconds = null)
{
list($response) = $this->getDebugPprofAllocsWithHttpInfo($zap_trace_span, $debug, $seconds);
return $response;
} | Operation getDebugPprofAllocs
Retrieve the memory allocations runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofAllocs | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofAllocsWithHttpInfo($zap_trace_span = null, $debug = null, $seconds = null)
{
$request = $this->getDebugPprofAllocsRequest($zap_trace_span, $debug, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofAllocsWithHttpInfo
Retrieve the memory allocations runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofAllocsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofAllocsRequest($zap_trace_span = null, $debug = null, $seconds = null)
{
$resourcePath = '/debug/pprof/allocs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($debug !== null) {
$queryParams['debug'] = ObjectSerializer::toQueryValue($debug);
}
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofAllocs'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofAllocsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofBlock($zap_trace_span = null, $debug = null, $seconds = null)
{
list($response) = $this->getDebugPprofBlockWithHttpInfo($zap_trace_span, $debug, $seconds);
return $response;
} | Operation getDebugPprofBlock
Retrieve the block runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofBlock | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofBlockWithHttpInfo($zap_trace_span = null, $debug = null, $seconds = null)
{
$request = $this->getDebugPprofBlockRequest($zap_trace_span, $debug, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofBlockWithHttpInfo
Retrieve the block runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofBlockWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofBlockRequest($zap_trace_span = null, $debug = null, $seconds = null)
{
$resourcePath = '/debug/pprof/block';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($debug !== null) {
$queryParams['debug'] = ObjectSerializer::toQueryValue($debug);
}
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofBlock'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofBlockRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofCmdline($zap_trace_span = null)
{
list($response) = $this->getDebugPprofCmdlineWithHttpInfo($zap_trace_span);
return $response;
} | Operation getDebugPprofCmdline
Retrieve the command line invocation
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return string|string | getDebugPprofCmdline | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofCmdlineWithHttpInfo($zap_trace_span = null)
{
$request = $this->getDebugPprofCmdlineRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = 'string';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofCmdlineWithHttpInfo
Retrieve the command line invocation
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of string|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofCmdlineWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofCmdlineRequest($zap_trace_span = null)
{
$resourcePath = '/debug/pprof/cmdline';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofCmdline'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofCmdlineRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofGoroutine($zap_trace_span = null, $debug = null, $seconds = null)
{
list($response) = $this->getDebugPprofGoroutineWithHttpInfo($zap_trace_span, $debug, $seconds);
return $response;
} | Operation getDebugPprofGoroutine
Retrieve the goroutines runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text with comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofGoroutine | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofGoroutineWithHttpInfo($zap_trace_span = null, $debug = null, $seconds = null)
{
$request = $this->getDebugPprofGoroutineRequest($zap_trace_span, $debug, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofGoroutineWithHttpInfo
Retrieve the goroutines runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text with comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofGoroutineWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofGoroutineRequest($zap_trace_span = null, $debug = null, $seconds = null)
{
$resourcePath = '/debug/pprof/goroutine';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($debug !== null) {
$queryParams['debug'] = ObjectSerializer::toQueryValue($debug);
}
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofGoroutine'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text with comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofGoroutineRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofHeap($zap_trace_span = null, $debug = null, $seconds = null, $gc = null)
{
list($response) = $this->getDebugPprofHeapWithHttpInfo($zap_trace_span, $debug, $seconds, $gc);
return $response;
} | Operation getDebugPprofHeap
Retrieve the heap runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@param int $gc - `0`: (Default) don't force garbage collection before sampling. - `1`: Force garbage collection before sampling. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofHeap | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofHeapWithHttpInfo($zap_trace_span = null, $debug = null, $seconds = null, $gc = null)
{
$request = $this->getDebugPprofHeapRequest($zap_trace_span, $debug, $seconds, $gc);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofHeapWithHttpInfo
Retrieve the heap runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@param int $gc - `0`: (Default) don't force garbage collection before sampling. - `1`: Force garbage collection before sampling. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofHeapWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofHeapRequest($zap_trace_span = null, $debug = null, $seconds = null, $gc = null)
{
$resourcePath = '/debug/pprof/heap';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($debug !== null) {
$queryParams['debug'] = ObjectSerializer::toQueryValue($debug);
}
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// query params
if ($gc !== null) {
$queryParams['gc'] = ObjectSerializer::toQueryValue($gc);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofHeap'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@param int $gc - `0`: (Default) don't force garbage collection before sampling. - `1`: Force garbage collection before sampling. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofHeapRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofMutex($zap_trace_span = null, $debug = null, $seconds = null)
{
list($response) = $this->getDebugPprofMutexWithHttpInfo($zap_trace_span, $debug, $seconds);
return $response;
} | Operation getDebugPprofMutex
Retrieve the mutual exclusion (mutex) runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofMutex | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofMutexWithHttpInfo($zap_trace_span = null, $debug = null, $seconds = null)
{
$request = $this->getDebugPprofMutexRequest($zap_trace_span, $debug, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofMutexWithHttpInfo
Retrieve the mutual exclusion (mutex) runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofMutexWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofMutexRequest($zap_trace_span = null, $debug = null, $seconds = null)
{
$resourcePath = '/debug/pprof/mutex';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($debug !== null) {
$queryParams['debug'] = ObjectSerializer::toQueryValue($debug);
}
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofMutex'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofMutexRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofProfile($zap_trace_span = null, $seconds = null)
{
list($response) = $this->getDebugPprofProfileWithHttpInfo($zap_trace_span, $seconds);
return $response;
} | Operation getDebugPprofProfile
Retrieve the CPU runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param string $seconds Number of seconds to collect profile data. Default is `30` seconds. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofProfile | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofProfileWithHttpInfo($zap_trace_span = null, $seconds = null)
{
$request = $this->getDebugPprofProfileRequest($zap_trace_span, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofProfileWithHttpInfo
Retrieve the CPU runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param string $seconds Number of seconds to collect profile data. Default is `30` seconds. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofProfileWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofProfileRequest($zap_trace_span = null, $seconds = null)
{
$resourcePath = '/debug/pprof/profile';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofProfile'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $seconds Number of seconds to collect profile data. Default is `30` seconds. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofProfileRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofThreadCreate($zap_trace_span = null, $debug = null, $seconds = null)
{
list($response) = $this->getDebugPprofThreadCreateWithHttpInfo($zap_trace_span, $debug, $seconds);
return $response;
} | Operation getDebugPprofThreadCreate
Retrieve the threadcreate runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofThreadCreate | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofThreadCreateWithHttpInfo($zap_trace_span = null, $debug = null, $seconds = null)
{
$request = $this->getDebugPprofThreadCreateRequest($zap_trace_span, $debug, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofThreadCreateWithHttpInfo
Retrieve the threadcreate runtime profile
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofThreadCreateWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofThreadCreateRequest($zap_trace_span = null, $debug = null, $seconds = null)
{
$resourcePath = '/debug/pprof/threadcreate';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($debug !== null) {
$queryParams['debug'] = ObjectSerializer::toQueryValue($debug);
}
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofThreadCreate'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $debug - `0`: (Default) Return the report as a gzip-compressed protocol buffer. - `1`: Return a response body with the report formatted as human-readable text. The report contains comments that translate addresses to function names and line numbers for debugging. `debug=1` is mutually exclusive with the `seconds` query parameter. (optional)
@param string $seconds Number of seconds to collect statistics. `seconds` is mutually exclusive with `debug=1`. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofThreadCreateRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.