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
public function postTelegrafsIDMembersWithHttpInfo($telegraf_id, $add_resource_member_request_body, $zap_trace_span = null) { $request = $this->postTelegrafsIDMembersRequest($telegraf_id, $add_resource_member_request_body, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ResourceMember'; $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 postTelegrafsIDMembersWithHttpInfo Add a member to a Telegraf config @param string $telegraf_id The Telegraf config ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as member (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postTelegrafsIDMembersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
protected function postTelegrafsIDMembersRequest($telegraf_id, $add_resource_member_request_body, $zap_trace_span = null) { // verify the required parameter 'telegraf_id' is set if ($telegraf_id === null || (is_array($telegraf_id) && count($telegraf_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $telegraf_id when calling postTelegrafsIDMembers' ); } // verify the required parameter 'add_resource_member_request_body' is set if ($add_resource_member_request_body === null || (is_array($add_resource_member_request_body) && count($add_resource_member_request_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $add_resource_member_request_body when calling postTelegrafsIDMembers' ); } $resourcePath = '/api/v2/telegrafs/{telegrafID}/members'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($telegraf_id !== null) { $resourcePath = str_replace( '{' . 'telegrafID' . '}', ObjectSerializer::toPathValue($telegraf_id), $resourcePath ); } // body params $_tempBody = null; if (isset($add_resource_member_request_body)) { $_tempBody = $add_resource_member_request_body; } 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 'postTelegrafsIDMembers' @param string $telegraf_id The Telegraf config ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as member (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postTelegrafsIDMembersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
public function postTelegrafsIDOwners($telegraf_id, $add_resource_member_request_body, $zap_trace_span = null) { list($response) = $this->postTelegrafsIDOwnersWithHttpInfo($telegraf_id, $add_resource_member_request_body, $zap_trace_span); return $response; }
Operation postTelegrafsIDOwners Add an owner to a Telegraf configuration @param string $telegraf_id The Telegraf configuration ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ResourceOwner|\InfluxDB2\Model\Error
postTelegrafsIDOwners
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
public function postTelegrafsIDOwnersWithHttpInfo($telegraf_id, $add_resource_member_request_body, $zap_trace_span = null) { $request = $this->postTelegrafsIDOwnersRequest($telegraf_id, $add_resource_member_request_body, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ResourceOwner'; $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 postTelegrafsIDOwnersWithHttpInfo Add an owner to a Telegraf configuration @param string $telegraf_id The Telegraf configuration ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ResourceOwner|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postTelegrafsIDOwnersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
protected function postTelegrafsIDOwnersRequest($telegraf_id, $add_resource_member_request_body, $zap_trace_span = null) { // verify the required parameter 'telegraf_id' is set if ($telegraf_id === null || (is_array($telegraf_id) && count($telegraf_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $telegraf_id when calling postTelegrafsIDOwners' ); } // verify the required parameter 'add_resource_member_request_body' is set if ($add_resource_member_request_body === null || (is_array($add_resource_member_request_body) && count($add_resource_member_request_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $add_resource_member_request_body when calling postTelegrafsIDOwners' ); } $resourcePath = '/api/v2/telegrafs/{telegrafID}/owners'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($telegraf_id !== null) { $resourcePath = str_replace( '{' . 'telegrafID' . '}', ObjectSerializer::toPathValue($telegraf_id), $resourcePath ); } // body params $_tempBody = null; if (isset($add_resource_member_request_body)) { $_tempBody = $add_resource_member_request_body; } 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 'postTelegrafsIDOwners' @param string $telegraf_id The Telegraf configuration ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postTelegrafsIDOwnersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
public function putTelegrafsID($telegraf_id, $telegraf_plugin_request, $zap_trace_span = null) { list($response) = $this->putTelegrafsIDWithHttpInfo($telegraf_id, $telegraf_plugin_request, $zap_trace_span); return $response; }
Operation putTelegrafsID Update a Telegraf configuration @param string $telegraf_id The Telegraf config ID. (required) @param \InfluxDB2\Model\TelegrafPluginRequest $telegraf_plugin_request Telegraf configuration 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\Telegraf|\InfluxDB2\Model\Error
putTelegrafsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
public function putTelegrafsIDWithHttpInfo($telegraf_id, $telegraf_plugin_request, $zap_trace_span = null) { $request = $this->putTelegrafsIDRequest($telegraf_id, $telegraf_plugin_request, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Telegraf'; $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 putTelegrafsIDWithHttpInfo Update a Telegraf configuration @param string $telegraf_id The Telegraf config ID. (required) @param \InfluxDB2\Model\TelegrafPluginRequest $telegraf_plugin_request Telegraf configuration 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\Telegraf|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
putTelegrafsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
protected function putTelegrafsIDRequest($telegraf_id, $telegraf_plugin_request, $zap_trace_span = null) { // verify the required parameter 'telegraf_id' is set if ($telegraf_id === null || (is_array($telegraf_id) && count($telegraf_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $telegraf_id when calling putTelegrafsID' ); } // verify the required parameter 'telegraf_plugin_request' is set if ($telegraf_plugin_request === null || (is_array($telegraf_plugin_request) && count($telegraf_plugin_request) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $telegraf_plugin_request when calling putTelegrafsID' ); } $resourcePath = '/api/v2/telegrafs/{telegrafID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($telegraf_id !== null) { $resourcePath = str_replace( '{' . 'telegrafID' . '}', ObjectSerializer::toPathValue($telegraf_id), $resourcePath ); } // body params $_tempBody = null; if (isset($telegraf_plugin_request)) { $_tempBody = $telegraf_plugin_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('PUT', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'putTelegrafsID' @param string $telegraf_id The Telegraf config ID. (required) @param \InfluxDB2\Model\TelegrafPluginRequest $telegraf_plugin_request Telegraf configuration update to apply (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
putTelegrafsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TelegrafsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TelegrafsService.php
MIT
public function getPing() { $this->getPingWithHttpInfo(); }
Operation getPing Get the status of the instance @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
getPing
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/PingService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/PingService.php
MIT
public function getPingWithHttpInfo() { $request = $this->getPingRequest(); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation getPingWithHttpInfo Get the status of the instance @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
getPingWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/PingService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/PingService.php
MIT
protected function getPingRequest() { $resourcePath = '/ping'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( [] ); } else { $headers = $this->headerSelector->selectHeaders( [], [] ); } // 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 'getPing' @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getPingRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/PingService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/PingService.php
MIT
public function headPing() { $this->headPingWithHttpInfo(); }
Operation headPing Get the status of the instance @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
headPing
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/PingService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/PingService.php
MIT
public function headPingWithHttpInfo() { $request = $this->headPingRequest(); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation headPingWithHttpInfo Get the status of the instance @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
headPingWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/PingService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/PingService.php
MIT
protected function headPingRequest() { $resourcePath = '/ping'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( [] ); } else { $headers = $this->headerSelector->selectHeaders( [], [] ); } // 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('HEAD', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'headPing' @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
headPingRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/PingService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/PingService.php
MIT
public function postWrite($org, $bucket, $body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'text/plain; charset=utf-8', $content_length = null, $accept = 'application/json', $org_id = null, $precision = null) { $this->postWriteWithHttpInfo($org, $bucket, $body, $zap_trace_span, $content_encoding, $content_type, $content_length, $accept, $org_id, $precision); }
Operation postWrite Write data @param string $org The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (required) @param string $bucket The destination bucket for writes. InfluxDB writes all points in the batch to this bucket. (required) @param string $body Data in line protocol format. To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/). (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. (optional, default to 'identity') @param string $content_type The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. (optional, default to 'text/plain; charset=utf-8') @param int $content_length The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. (optional) @param string $accept The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/). (optional, default to 'application/json') @param string $org_id The ID of the destination organization for writes. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (optional) @param \InfluxDB2\Model\WritePrecision $precision The precision for unix timestamps in the line protocol batch. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
postWrite
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/WriteService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/WriteService.php
MIT
public function postWriteWithHttpInfo($org, $bucket, $body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'text/plain; charset=utf-8', $content_length = null, $accept = 'application/json', $org_id = null, $precision = null) { $request = $this->postWriteRequest($org, $bucket, $body, $zap_trace_span, $content_encoding, $content_type, $content_length, $accept, $org_id, $precision); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation postWriteWithHttpInfo Write data @param string $org The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (required) @param string $bucket The destination bucket for writes. InfluxDB writes all points in the batch to this bucket. (required) @param string $body Data in line protocol format. To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/). (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. (optional, default to 'identity') @param string $content_type The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. (optional, default to 'text/plain; charset=utf-8') @param int $content_length The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. (optional) @param string $accept The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/). (optional, default to 'application/json') @param string $org_id The ID of the destination organization for writes. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (optional) @param \InfluxDB2\Model\WritePrecision $precision The precision for unix timestamps in the line protocol batch. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
postWriteWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/WriteService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/WriteService.php
MIT
protected function postWriteRequest($org, $bucket, $body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'text/plain; charset=utf-8', $content_length = null, $accept = 'application/json', $org_id = null, $precision = null) { // verify the required parameter 'org' is set if ($org === null || (is_array($org) && count($org) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $org when calling postWrite' ); } // verify the required parameter 'bucket' is set if ($bucket === null || (is_array($bucket) && count($bucket) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $bucket when calling postWrite' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling postWrite' ); } $resourcePath = '/api/v2/write'; $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); } // query params if ($bucket !== null) { $queryParams['bucket'] = ObjectSerializer::toQueryValue($bucket); } // query params if ($precision !== null) { $queryParams['precision'] = ObjectSerializer::toQueryValue($precision); } // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($content_encoding !== null) { $headerParams['Content-Encoding'] = ObjectSerializer::toHeaderValue($content_encoding); } // header params if ($content_type !== null) { $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type); } // header params if ($content_length !== null) { $headerParams['Content-Length'] = ObjectSerializer::toHeaderValue($content_length); } // header params if ($accept !== null) { $headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept); } // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json', 'text/html', ] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json', 'text/html', ], ['text/plain'] ); } // 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 'postWrite' @param string $org The destination organization for writes. InfluxDB writes all points in the batch to this organization. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (required) @param string $bucket The destination bucket for writes. InfluxDB writes all points in the batch to this bucket. (required) @param string $body Data in line protocol format. To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/v2.3/write-data/best-practices/optimize-writes/). (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. (optional, default to 'identity') @param string $content_type The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. (optional, default to 'text/plain; charset=utf-8') @param int $content_length The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. (optional) @param string $accept The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/v2.3/write-data/troubleshoot/). (optional, default to 'application/json') @param string $org_id The ID of the destination organization for writes. If you pass both `orgID` and `org`, they must both be valid. #### InfluxDB Cloud - Doesn't require `org` or `orgID`. - Writes to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either `org` or `orgID`. - InfluxDB writes all points in the batch to this organization. (optional) @param \InfluxDB2\Model\WritePrecision $precision The precision for unix timestamps in the line protocol batch. (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postWriteRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/WriteService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/WriteService.php
MIT
public function postSignin($zap_trace_span = null, $authorization = null) { $this->postSigninWithHttpInfo($zap_trace_span, $authorization); }
Operation postSignin Create a user session. @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
postSignin
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SigninService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SigninService.php
MIT
public function postSigninWithHttpInfo($zap_trace_span = null, $authorization = null) { $request = $this->postSigninRequest($zap_trace_span, $authorization); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation postSigninWithHttpInfo Create a user session. @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
postSigninWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SigninService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SigninService.php
MIT
protected function postSigninRequest($zap_trace_span = null, $authorization = null) { $resourcePath = '/api/v2/signin'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($authorization !== null) { $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); } // 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; } } // this endpoint requires HTTP basic authentication if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'postSignin' @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postSigninRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SigninService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SigninService.php
MIT
public function postRestoreBucketID($bucket_id, $body, $zap_trace_span = null, $content_type = 'application/octet-stream') { list($response) = $this->postRestoreBucketIDWithHttpInfo($bucket_id, $body, $zap_trace_span, $content_type); return $response; }
Operation postRestoreBucketID Overwrite storage metadata for a bucket with shard info from a backup. @param string $bucket_id The bucket ID. (required) @param string $body Database info serialized as protobuf. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_type content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return string|string
postRestoreBucketID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreBucketIDWithHttpInfo($bucket_id, $body, $zap_trace_span = null, $content_type = 'application/octet-stream') { $request = $this->postRestoreBucketIDRequest($bucket_id, $body, $zap_trace_span, $content_type); $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 postRestoreBucketIDWithHttpInfo Overwrite storage metadata for a bucket with shard info from a backup. @param string $bucket_id The bucket ID. (required) @param string $body Database info serialized as protobuf. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of string|string, HTTP status code, HTTP response headers (array of strings)
postRestoreBucketIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
protected function postRestoreBucketIDRequest($bucket_id, $body, $zap_trace_span = null, $content_type = 'application/octet-stream') { // verify the required parameter 'bucket_id' is set if ($bucket_id === null || (is_array($bucket_id) && count($bucket_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $bucket_id when calling postRestoreBucketID' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling postRestoreBucketID' ); } $resourcePath = '/api/v2/restore/bucket/{bucketID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($content_type !== null) { $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type); } // path params if ($bucket_id !== null) { $resourcePath = str_replace( '{' . 'bucketID' . '}', ObjectSerializer::toPathValue($bucket_id), $resourcePath ); } // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], ['text/plain'] ); } // 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 'postRestoreBucketID' @param string $bucket_id The bucket ID. (required) @param string $body Database info serialized as protobuf. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_type (optional, default to 'application/octet-stream') @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postRestoreBucketIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreBucketMetadata($bucket_metadata_manifest, $zap_trace_span = null) { list($response) = $this->postRestoreBucketMetadataWithHttpInfo($bucket_metadata_manifest, $zap_trace_span); return $response; }
Operation postRestoreBucketMetadata Create a new bucket pre-seeded with shard info from a backup. @param \InfluxDB2\Model\BucketMetadataManifest $bucket_metadata_manifest Metadata manifest for a bucket. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\RestoredBucketMappings|string
postRestoreBucketMetadata
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreBucketMetadataWithHttpInfo($bucket_metadata_manifest, $zap_trace_span = null) { $request = $this->postRestoreBucketMetadataRequest($bucket_metadata_manifest, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\RestoredBucketMappings'; $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 postRestoreBucketMetadataWithHttpInfo Create a new bucket pre-seeded with shard info from a backup. @param \InfluxDB2\Model\BucketMetadataManifest $bucket_metadata_manifest Metadata manifest for a bucket. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\RestoredBucketMappings|string, HTTP status code, HTTP response headers (array of strings)
postRestoreBucketMetadataWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
protected function postRestoreBucketMetadataRequest($bucket_metadata_manifest, $zap_trace_span = null) { // verify the required parameter 'bucket_metadata_manifest' is set if ($bucket_metadata_manifest === null || (is_array($bucket_metadata_manifest) && count($bucket_metadata_manifest) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $bucket_metadata_manifest when calling postRestoreBucketMetadata' ); } $resourcePath = '/api/v2/restore/bucketMetadata'; $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($bucket_metadata_manifest)) { $_tempBody = $bucket_metadata_manifest; } 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 'postRestoreBucketMetadata' @param \InfluxDB2\Model\BucketMetadataManifest $bucket_metadata_manifest Metadata manifest for a bucket. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postRestoreBucketMetadataRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreKV($body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { list($response) = $this->postRestoreKVWithHttpInfo($body, $zap_trace_span, $content_encoding, $content_type); return $response; }
Operation postRestoreKV Overwrite the embedded KV store on the server with a backed-up snapshot. @param \SplFileObject $body Full KV snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\PostRestoreKVResponse|string
postRestoreKV
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreKVWithHttpInfo($body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { $request = $this->postRestoreKVRequest($body, $zap_trace_span, $content_encoding, $content_type); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\PostRestoreKVResponse'; $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 postRestoreKVWithHttpInfo Overwrite the embedded KV store on the server with a backed-up snapshot. @param \SplFileObject $body Full KV snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\PostRestoreKVResponse|string, HTTP status code, HTTP response headers (array of strings)
postRestoreKVWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
protected function postRestoreKVRequest($body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling postRestoreKV' ); } $resourcePath = '/api/v2/restore/kv'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($content_encoding !== null) { $headerParams['Content-Encoding'] = ObjectSerializer::toHeaderValue($content_encoding); } // header params if ($content_type !== null) { $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type); } // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], ['text/plain'] ); } // 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 'postRestoreKV' @param \SplFileObject $body Full KV snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type (optional, default to 'application/octet-stream') @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postRestoreKVRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreSQL($body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { $this->postRestoreSQLWithHttpInfo($body, $zap_trace_span, $content_encoding, $content_type); }
Operation postRestoreSQL Overwrite the embedded SQL store on the server with a backed-up snapshot. @param \SplFileObject $body Full SQL snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
postRestoreSQL
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreSQLWithHttpInfo($body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { $request = $this->postRestoreSQLRequest($body, $zap_trace_span, $content_encoding, $content_type); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation postRestoreSQLWithHttpInfo Overwrite the embedded SQL store on the server with a backed-up snapshot. @param \SplFileObject $body Full SQL snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
postRestoreSQLWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
protected function postRestoreSQLRequest($body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling postRestoreSQL' ); } $resourcePath = '/api/v2/restore/sql'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($content_encoding !== null) { $headerParams['Content-Encoding'] = ObjectSerializer::toHeaderValue($content_encoding); } // header params if ($content_type !== null) { $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type); } // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], ['text/plain'] ); } // 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 'postRestoreSQL' @param \SplFileObject $body Full SQL snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type (optional, default to 'application/octet-stream') @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postRestoreSQLRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreShardId($shard_id, $body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { $this->postRestoreShardIdWithHttpInfo($shard_id, $body, $zap_trace_span, $content_encoding, $content_type); }
Operation postRestoreShardId Restore a TSM snapshot into a shard. @param string $shard_id The shard ID. (required) @param \SplFileObject $body TSM snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
postRestoreShardId
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function postRestoreShardIdWithHttpInfo($shard_id, $body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { $request = $this->postRestoreShardIdRequest($shard_id, $body, $zap_trace_span, $content_encoding, $content_type); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation postRestoreShardIdWithHttpInfo Restore a TSM snapshot into a shard. @param string $shard_id The shard ID. (required) @param \SplFileObject $body TSM snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type (optional, default to 'application/octet-stream') @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
postRestoreShardIdWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
protected function postRestoreShardIdRequest($shard_id, $body, $zap_trace_span = null, $content_encoding = 'identity', $content_type = 'application/octet-stream') { // 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 postRestoreShardId' ); } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $body when calling postRestoreShardId' ); } $resourcePath = '/api/v2/restore/shards/{shardID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($content_encoding !== null) { $headerParams['Content-Encoding'] = ObjectSerializer::toHeaderValue($content_encoding); } // header params if ($content_type !== null) { $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type); } // path params if ($shard_id !== null) { $resourcePath = str_replace( '{' . 'shardID' . '}', ObjectSerializer::toPathValue($shard_id), $resourcePath ); } // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], ['text/plain'] ); } // 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 'postRestoreShardId' @param string $shard_id The shard ID. (required) @param \SplFileObject $body TSM snapshot. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $content_encoding The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. (optional, default to 'identity') @param string $content_type (optional, default to 'application/octet-stream') @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postRestoreShardIdRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RestoreService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RestoreService.php
MIT
public function getNotificationRulesIDQuery($rule_id, $zap_trace_span = null) { list($response) = $this->getNotificationRulesIDQueryWithHttpInfo($rule_id, $zap_trace_span); return $response; }
Operation getNotificationRulesIDQuery Retrieve a notification rule query @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\FluxResponse|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error
getNotificationRulesIDQuery
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RulesService.php
MIT
public function getNotificationRulesIDQueryWithHttpInfo($rule_id, $zap_trace_span = null) { $request = $this->getNotificationRulesIDQueryRequest($rule_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\FluxResponse'; $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 getNotificationRulesIDQueryWithHttpInfo Retrieve a notification rule query @param string $rule_id The notification rule 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\FluxResponse|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getNotificationRulesIDQueryWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RulesService.php
MIT
protected function getNotificationRulesIDQueryRequest($rule_id, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling getNotificationRulesIDQuery' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}/query'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_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 'getNotificationRulesIDQuery' @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getNotificationRulesIDQueryRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/RulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RulesService.php
MIT
public function deleteScrapersID($scraper_target_id, $zap_trace_span = null) { $this->deleteScrapersIDWithHttpInfo($scraper_target_id, $zap_trace_span); }
Operation deleteScrapersID Delete a scraper target @param string $scraper_target_id The identifier of the scraper target. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteScrapersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDWithHttpInfo($scraper_target_id, $zap_trace_span = null) { $request = $this->deleteScrapersIDRequest($scraper_target_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteScrapersIDWithHttpInfo Delete a scraper target @param string $scraper_target_id The identifier of the scraper target. (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)
deleteScrapersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function deleteScrapersIDRequest($scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling deleteScrapersID' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'deleteScrapersID' @param string $scraper_target_id The identifier of the scraper target. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteScrapersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDLabelsID($scraper_target_id, $label_id, $zap_trace_span = null) { $this->deleteScrapersIDLabelsIDWithHttpInfo($scraper_target_id, $label_id, $zap_trace_span); }
Operation deleteScrapersIDLabelsID Delete a label from a scraper target @param string $scraper_target_id The scraper target ID. (required) @param string $label_id The label ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteScrapersIDLabelsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDLabelsIDWithHttpInfo($scraper_target_id, $label_id, $zap_trace_span = null) { $request = $this->deleteScrapersIDLabelsIDRequest($scraper_target_id, $label_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteScrapersIDLabelsIDWithHttpInfo Delete a label from a scraper target @param string $scraper_target_id The scraper target ID. (required) @param string $label_id The label 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)
deleteScrapersIDLabelsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function deleteScrapersIDLabelsIDRequest($scraper_target_id, $label_id, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling deleteScrapersIDLabelsID' ); } // 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 deleteScrapersIDLabelsID' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/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 ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'deleteScrapersIDLabelsID' @param string $scraper_target_id The scraper target ID. (required) @param string $label_id The label ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteScrapersIDLabelsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDMembersID($user_id, $scraper_target_id, $zap_trace_span = null) { $this->deleteScrapersIDMembersIDWithHttpInfo($user_id, $scraper_target_id, $zap_trace_span); }
Operation deleteScrapersIDMembersID Remove a member from a scraper target @param string $user_id The ID of member to remove. (required) @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteScrapersIDMembersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDMembersIDWithHttpInfo($user_id, $scraper_target_id, $zap_trace_span = null) { $request = $this->deleteScrapersIDMembersIDRequest($user_id, $scraper_target_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteScrapersIDMembersIDWithHttpInfo Remove a member from a scraper target @param string $user_id The ID of member to remove. (required) @param string $scraper_target_id The scraper target 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)
deleteScrapersIDMembersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function deleteScrapersIDMembersIDRequest($user_id, $scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'user_id' is set if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $user_id when calling deleteScrapersIDMembersID' ); } // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling deleteScrapersIDMembersID' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/members/{userID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($user_id !== null) { $resourcePath = str_replace( '{' . 'userID' . '}', ObjectSerializer::toPathValue($user_id), $resourcePath ); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'deleteScrapersIDMembersID' @param string $user_id The ID of member to remove. (required) @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteScrapersIDMembersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDOwnersID($user_id, $scraper_target_id, $zap_trace_span = null) { $this->deleteScrapersIDOwnersIDWithHttpInfo($user_id, $scraper_target_id, $zap_trace_span); }
Operation deleteScrapersIDOwnersID Remove an owner from a scraper target @param string $user_id The ID of owner to remove. (required) @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteScrapersIDOwnersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScrapersIDOwnersIDWithHttpInfo($user_id, $scraper_target_id, $zap_trace_span = null) { $request = $this->deleteScrapersIDOwnersIDRequest($user_id, $scraper_target_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteScrapersIDOwnersIDWithHttpInfo Remove an owner from a scraper target @param string $user_id The ID of owner to remove. (required) @param string $scraper_target_id The scraper target 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)
deleteScrapersIDOwnersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function deleteScrapersIDOwnersIDRequest($user_id, $scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'user_id' is set if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $user_id when calling deleteScrapersIDOwnersID' ); } // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling deleteScrapersIDOwnersID' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/owners/{userID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($user_id !== null) { $resourcePath = str_replace( '{' . 'userID' . '}', ObjectSerializer::toPathValue($user_id), $resourcePath ); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'deleteScrapersIDOwnersID' @param string $user_id The ID of owner to remove. (required) @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteScrapersIDOwnersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapers($zap_trace_span = null, $name = null, $id = null, $org_id = null, $org = null) { list($response) = $this->getScrapersWithHttpInfo($zap_trace_span, $name, $id, $org_id, $org); return $response; }
Operation getScrapers List all scraper targets @param string $zap_trace_span OpenTracing span context (optional) @param string $name Specifies the name of the scraper target. (optional) @param string[] $id List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) @param string $org_id Specifies the organization ID of the scraper target. (optional) @param string $org Specifies the organization name of the scraper target. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ScraperTargetResponses
getScrapers
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersWithHttpInfo($zap_trace_span = null, $name = null, $id = null, $org_id = null, $org = null) { $request = $this->getScrapersRequest($zap_trace_span, $name, $id, $org_id, $org); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ScraperTargetResponses'; $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 getScrapersWithHttpInfo List all scraper targets @param string $zap_trace_span OpenTracing span context (optional) @param string $name Specifies the name of the scraper target. (optional) @param string[] $id List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) @param string $org_id Specifies the organization ID of the scraper target. (optional) @param string $org Specifies the organization name of the scraper target. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ScraperTargetResponses, HTTP status code, HTTP response headers (array of strings)
getScrapersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function getScrapersRequest($zap_trace_span = null, $name = null, $id = null, $org_id = null, $org = null) { $resourcePath = '/api/v2/scrapers'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // query params if ($name !== null) { $queryParams['name'] = ObjectSerializer::toQueryValue($name); } // query params if (is_array($id)) { $id = ObjectSerializer::serializeCollection($id, 'multi', true); } if ($id !== null) { $queryParams['id'] = ObjectSerializer::toQueryValue($id); } // query params if ($org_id !== null) { $queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id); } // query params if ($org !== null) { $queryParams['org'] = ObjectSerializer::toQueryValue($org); } // 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 'getScrapers' @param string $zap_trace_span OpenTracing span context (optional) @param string $name Specifies the name of the scraper target. (optional) @param string[] $id List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. (optional) @param string $org_id Specifies the organization ID of the scraper target. (optional) @param string $org Specifies the organization name of the scraper target. (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScrapersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersID($scraper_target_id, $zap_trace_span = null) { list($response) = $this->getScrapersIDWithHttpInfo($scraper_target_id, $zap_trace_span); return $response; }
Operation getScrapersID Retrieve a scraper target @param string $scraper_target_id The identifier of the scraper target. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ScraperTargetResponse|\InfluxDB2\Model\Error
getScrapersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDWithHttpInfo($scraper_target_id, $zap_trace_span = null) { $request = $this->getScrapersIDRequest($scraper_target_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ScraperTargetResponse'; $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 getScrapersIDWithHttpInfo Retrieve a scraper target @param string $scraper_target_id The identifier of the scraper target. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ScraperTargetResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getScrapersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function getScrapersIDRequest($scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling getScrapersID' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'getScrapersID' @param string $scraper_target_id The identifier of the scraper target. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScrapersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDLabels($scraper_target_id, $zap_trace_span = null) { list($response) = $this->getScrapersIDLabelsWithHttpInfo($scraper_target_id, $zap_trace_span); return $response; }
Operation getScrapersIDLabels List all labels for a scraper target @param string $scraper_target_id The scraper target 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
getScrapersIDLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDLabelsWithHttpInfo($scraper_target_id, $zap_trace_span = null) { $request = $this->getScrapersIDLabelsRequest($scraper_target_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 getScrapersIDLabelsWithHttpInfo List all labels for a scraper target @param string $scraper_target_id The scraper target 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)
getScrapersIDLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function getScrapersIDLabelsRequest($scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling getScrapersIDLabels' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/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 ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'getScrapersIDLabels' @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScrapersIDLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDMembers($scraper_target_id, $zap_trace_span = null) { list($response) = $this->getScrapersIDMembersWithHttpInfo($scraper_target_id, $zap_trace_span); return $response; }
Operation getScrapersIDMembers List all users with member privileges for a scraper target @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ResourceMembers|\InfluxDB2\Model\Error
getScrapersIDMembers
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDMembersWithHttpInfo($scraper_target_id, $zap_trace_span = null) { $request = $this->getScrapersIDMembersRequest($scraper_target_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ResourceMembers'; $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 getScrapersIDMembersWithHttpInfo List all users with member privileges for a scraper target @param string $scraper_target_id The scraper target 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\ResourceMembers|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getScrapersIDMembersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function getScrapersIDMembersRequest($scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling getScrapersIDMembers' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/members'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'getScrapersIDMembers' @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScrapersIDMembersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDOwners($scraper_target_id, $zap_trace_span = null) { list($response) = $this->getScrapersIDOwnersWithHttpInfo($scraper_target_id, $zap_trace_span); return $response; }
Operation getScrapersIDOwners List all owners of a scraper target @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ResourceOwners|\InfluxDB2\Model\Error
getScrapersIDOwners
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function getScrapersIDOwnersWithHttpInfo($scraper_target_id, $zap_trace_span = null) { $request = $this->getScrapersIDOwnersRequest($scraper_target_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ResourceOwners'; $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 getScrapersIDOwnersWithHttpInfo List all owners of a scraper target @param string $scraper_target_id The scraper target 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\ResourceOwners|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getScrapersIDOwnersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function getScrapersIDOwnersRequest($scraper_target_id, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling getScrapersIDOwners' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/owners'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'getScrapersIDOwners' @param string $scraper_target_id The scraper target ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScrapersIDOwnersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function patchScrapersID($scraper_target_id, $scraper_target_request, $zap_trace_span = null) { list($response) = $this->patchScrapersIDWithHttpInfo($scraper_target_id, $scraper_target_request, $zap_trace_span); return $response; }
Operation patchScrapersID Update a scraper target @param string $scraper_target_id The identifier of the scraper target. (required) @param \InfluxDB2\Model\ScraperTargetRequest $scraper_target_request Scraper target 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\ScraperTargetResponse|\InfluxDB2\Model\Error
patchScrapersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function patchScrapersIDWithHttpInfo($scraper_target_id, $scraper_target_request, $zap_trace_span = null) { $request = $this->patchScrapersIDRequest($scraper_target_id, $scraper_target_request, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ScraperTargetResponse'; $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 patchScrapersIDWithHttpInfo Update a scraper target @param string $scraper_target_id The identifier of the scraper target. (required) @param \InfluxDB2\Model\ScraperTargetRequest $scraper_target_request Scraper target 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\ScraperTargetResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
patchScrapersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function patchScrapersIDRequest($scraper_target_id, $scraper_target_request, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling patchScrapersID' ); } // verify the required parameter 'scraper_target_request' is set if ($scraper_target_request === null || (is_array($scraper_target_request) && count($scraper_target_request) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_request when calling patchScrapersID' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_id), $resourcePath ); } // body params $_tempBody = null; if (isset($scraper_target_request)) { $_tempBody = $scraper_target_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 'patchScrapersID' @param string $scraper_target_id The identifier of the scraper target. (required) @param \InfluxDB2\Model\ScraperTargetRequest $scraper_target_request Scraper target update to apply (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchScrapersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapers($scraper_target_request, $zap_trace_span = null) { list($response) = $this->postScrapersWithHttpInfo($scraper_target_request, $zap_trace_span); return $response; }
Operation postScrapers Create a scraper target @param \InfluxDB2\Model\ScraperTargetRequest $scraper_target_request Scraper target to create (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ScraperTargetResponse|\InfluxDB2\Model\Error
postScrapers
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersWithHttpInfo($scraper_target_request, $zap_trace_span = null) { $request = $this->postScrapersRequest($scraper_target_request, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ScraperTargetResponse'; $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 postScrapersWithHttpInfo Create a scraper target @param \InfluxDB2\Model\ScraperTargetRequest $scraper_target_request Scraper target 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\ScraperTargetResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postScrapersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function postScrapersRequest($scraper_target_request, $zap_trace_span = null) { // verify the required parameter 'scraper_target_request' is set if ($scraper_target_request === null || (is_array($scraper_target_request) && count($scraper_target_request) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_request when calling postScrapers' ); } $resourcePath = '/api/v2/scrapers'; $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($scraper_target_request)) { $_tempBody = $scraper_target_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 'postScrapers' @param \InfluxDB2\Model\ScraperTargetRequest $scraper_target_request Scraper target to create (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postScrapersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersIDLabels($scraper_target_id, $label_mapping, $zap_trace_span = null) { list($response) = $this->postScrapersIDLabelsWithHttpInfo($scraper_target_id, $label_mapping, $zap_trace_span); return $response; }
Operation postScrapersIDLabels Add a label to a scraper target @param string $scraper_target_id The scraper target 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
postScrapersIDLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersIDLabelsWithHttpInfo($scraper_target_id, $label_mapping, $zap_trace_span = null) { $request = $this->postScrapersIDLabelsRequest($scraper_target_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 postScrapersIDLabelsWithHttpInfo Add a label to a scraper target @param string $scraper_target_id The scraper target 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)
postScrapersIDLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function postScrapersIDLabelsRequest($scraper_target_id, $label_mapping, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling postScrapersIDLabels' ); } // 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 postScrapersIDLabels' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/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 ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_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 'postScrapersIDLabels' @param string $scraper_target_id The scraper target 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
postScrapersIDLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersIDMembers($scraper_target_id, $add_resource_member_request_body, $zap_trace_span = null) { list($response) = $this->postScrapersIDMembersWithHttpInfo($scraper_target_id, $add_resource_member_request_body, $zap_trace_span); return $response; }
Operation postScrapersIDMembers Add a member to a scraper target @param string $scraper_target_id The scraper target ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as member (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error
postScrapersIDMembers
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersIDMembersWithHttpInfo($scraper_target_id, $add_resource_member_request_body, $zap_trace_span = null) { $request = $this->postScrapersIDMembersRequest($scraper_target_id, $add_resource_member_request_body, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ResourceMember'; $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 postScrapersIDMembersWithHttpInfo Add a member to a scraper target @param string $scraper_target_id The scraper target ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as member (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postScrapersIDMembersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function postScrapersIDMembersRequest($scraper_target_id, $add_resource_member_request_body, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling postScrapersIDMembers' ); } // verify the required parameter 'add_resource_member_request_body' is set if ($add_resource_member_request_body === null || (is_array($add_resource_member_request_body) && count($add_resource_member_request_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $add_resource_member_request_body when calling postScrapersIDMembers' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/members'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_id), $resourcePath ); } // body params $_tempBody = null; if (isset($add_resource_member_request_body)) { $_tempBody = $add_resource_member_request_body; } 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 'postScrapersIDMembers' @param string $scraper_target_id The scraper target ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as member (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postScrapersIDMembersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersIDOwners($scraper_target_id, $add_resource_member_request_body, $zap_trace_span = null) { list($response) = $this->postScrapersIDOwnersWithHttpInfo($scraper_target_id, $add_resource_member_request_body, $zap_trace_span); return $response; }
Operation postScrapersIDOwners Add an owner to a scraper target @param string $scraper_target_id The scraper target ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ResourceOwner|\InfluxDB2\Model\Error
postScrapersIDOwners
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function postScrapersIDOwnersWithHttpInfo($scraper_target_id, $add_resource_member_request_body, $zap_trace_span = null) { $request = $this->postScrapersIDOwnersRequest($scraper_target_id, $add_resource_member_request_body, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\ResourceOwner'; $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 postScrapersIDOwnersWithHttpInfo Add an owner to a scraper target @param string $scraper_target_id The scraper target ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ResourceOwner|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postScrapersIDOwnersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
protected function postScrapersIDOwnersRequest($scraper_target_id, $add_resource_member_request_body, $zap_trace_span = null) { // verify the required parameter 'scraper_target_id' is set if ($scraper_target_id === null || (is_array($scraper_target_id) && count($scraper_target_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $scraper_target_id when calling postScrapersIDOwners' ); } // verify the required parameter 'add_resource_member_request_body' is set if ($add_resource_member_request_body === null || (is_array($add_resource_member_request_body) && count($add_resource_member_request_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $add_resource_member_request_body when calling postScrapersIDOwners' ); } $resourcePath = '/api/v2/scrapers/{scraperTargetID}/owners'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($scraper_target_id !== null) { $resourcePath = str_replace( '{' . 'scraperTargetID' . '}', ObjectSerializer::toPathValue($scraper_target_id), $resourcePath ); } // body params $_tempBody = null; if (isset($add_resource_member_request_body)) { $_tempBody = $add_resource_member_request_body; } 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 'postScrapersIDOwners' @param string $scraper_target_id The scraper target ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postScrapersIDOwnersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/ScraperTargetsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ScraperTargetsService.php
MIT
public function deleteScriptsID($script_id) { $this->deleteScriptsIDWithHttpInfo($script_id); }
Operation deleteScriptsID Delete a script @param string $script_id The ID of the script to delete. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteScriptsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function deleteScriptsIDWithHttpInfo($script_id) { $request = $this->deleteScriptsIDRequest($script_id); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteScriptsIDWithHttpInfo Delete a script @param string $script_id The ID of the script to delete. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
deleteScriptsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
protected function deleteScriptsIDRequest($script_id) { // verify the required parameter 'script_id' is set if ($script_id === null || (is_array($script_id) && count($script_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $script_id when calling deleteScriptsID' ); } $resourcePath = '/api/v2/scripts/{scriptID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // path params if ($script_id !== null) { $resourcePath = str_replace( '{' . 'scriptID' . '}', ObjectSerializer::toPathValue($script_id), $resourcePath ); } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( [] ); } else { $headers = $this->headerSelector->selectHeaders( [], [] ); } // 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 'deleteScriptsID' @param string $script_id The ID of the script to delete. (required) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteScriptsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function getScripts($limit = 100, $offset = 0, $name = null, $label_names = null, $label_contains = null) { list($response) = $this->getScriptsWithHttpInfo($limit, $offset, $name, $label_names, $label_contains); return $response; }
Operation getScripts List scripts @param int $limit Limits the number of scripts returned. Default is `100`. (optional, default to 100) @param int $offset The offset for pagination. The number of records to skip. (optional, default to 0) @param string $name The name of the script. (optional) @param string[] $label_names A list of label names. Only returns scripts that have all these labels. To retrieve a script, each name you pass in `labelNames` must exactly match the label for a script. (optional) @param string $label_contains A part of the label name. Returns scripts that have a label that contains this phrase. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Scripts|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error
getScripts
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function getScriptsWithHttpInfo($limit = 100, $offset = 0, $name = null, $label_names = null, $label_contains = null) { $request = $this->getScriptsRequest($limit, $offset, $name, $label_names, $label_contains); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Scripts'; $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 getScriptsWithHttpInfo List scripts @param int $limit Limits the number of scripts returned. Default is `100`. (optional, default to 100) @param int $offset The offset for pagination. The number of records to skip. (optional, default to 0) @param string $name The name of the script. (optional) @param string[] $label_names A list of label names. Only returns scripts that have all these labels. To retrieve a script, each name you pass in `labelNames` must exactly match the label for a script. (optional) @param string $label_contains A part of the label name. Returns scripts that have a label that contains this phrase. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Scripts|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getScriptsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
protected function getScriptsRequest($limit = 100, $offset = 0, $name = null, $label_names = null, $label_contains = null) { if ($limit !== null && $limit > 500) { throw new \InvalidArgumentException('invalid value for "$limit" when calling InvokableScriptsService.getScripts, must be smaller than or equal to 500.'); } if ($limit !== null && $limit < 0) { throw new \InvalidArgumentException('invalid value for "$limit" when calling InvokableScriptsService.getScripts, must be bigger than or equal to 0.'); } if ($offset !== null && $offset < 0) { throw new \InvalidArgumentException('invalid value for "$offset" when calling InvokableScriptsService.getScripts, must be bigger than or equal to 0.'); } $resourcePath = '/api/v2/scripts'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // query params if ($limit !== null) { $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } // query params if ($offset !== null) { $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } // query params if ($name !== null) { $queryParams['name'] = ObjectSerializer::toQueryValue($name); } // query params if (is_array($label_names)) { $label_names = ObjectSerializer::serializeCollection($label_names, 'multi', true); } if ($label_names !== null) { $queryParams['labelNames'] = ObjectSerializer::toQueryValue($label_names); } // query params if ($label_contains !== null) { $queryParams['labelContains'] = ObjectSerializer::toQueryValue($label_contains); } // 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 'getScripts' @param int $limit Limits the number of scripts returned. Default is &#x60;100&#x60;. (optional, default to 100) @param int $offset The offset for pagination. The number of records to skip. (optional, default to 0) @param string $name The name of the script. (optional) @param string[] $label_names A list of label names. Only returns scripts that have all these labels. To retrieve a script, each name you pass in &#x60;labelNames&#x60; must exactly match the label for a script. (optional) @param string $label_contains A part of the label name. Returns scripts that have a label that contains this phrase. (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScriptsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function getScriptsID($script_id) { list($response) = $this->getScriptsIDWithHttpInfo($script_id); return $response; }
Operation getScriptsID Retrieve a script @param string $script_id The script ID. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Script
getScriptsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function getScriptsIDWithHttpInfo($script_id) { $request = $this->getScriptsIDRequest($script_id); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Script'; $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 getScriptsIDWithHttpInfo Retrieve a script @param string $script_id The script ID. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Script, HTTP status code, HTTP response headers (array of strings)
getScriptsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
protected function getScriptsIDRequest($script_id) { // verify the required parameter 'script_id' is set if ($script_id === null || (is_array($script_id) && count($script_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $script_id when calling getScriptsID' ); } $resourcePath = '/api/v2/scripts/{scriptID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // path params if ($script_id !== null) { $resourcePath = str_replace( '{' . 'scriptID' . '}', ObjectSerializer::toPathValue($script_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 'getScriptsID' @param string $script_id The script ID. (required) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getScriptsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function patchScriptsID($script_id, $script_update_request) { list($response) = $this->patchScriptsIDWithHttpInfo($script_id, $script_update_request); return $response; }
Operation patchScriptsID Update a script @param string $script_id The script ID. (required) @param \InfluxDB2\Model\ScriptUpdateRequest $script_update_request Script update to apply (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Script
patchScriptsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function patchScriptsIDWithHttpInfo($script_id, $script_update_request) { $request = $this->patchScriptsIDRequest($script_id, $script_update_request); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Script'; $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 patchScriptsIDWithHttpInfo Update a script @param string $script_id The script ID. (required) @param \InfluxDB2\Model\ScriptUpdateRequest $script_update_request Script update to apply (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Script, HTTP status code, HTTP response headers (array of strings)
patchScriptsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
protected function patchScriptsIDRequest($script_id, $script_update_request) { // verify the required parameter 'script_id' is set if ($script_id === null || (is_array($script_id) && count($script_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $script_id when calling patchScriptsID' ); } // verify the required parameter 'script_update_request' is set if ($script_update_request === null || (is_array($script_update_request) && count($script_update_request) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $script_update_request when calling patchScriptsID' ); } $resourcePath = '/api/v2/scripts/{scriptID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // path params if ($script_id !== null) { $resourcePath = str_replace( '{' . 'scriptID' . '}', ObjectSerializer::toPathValue($script_id), $resourcePath ); } // body params $_tempBody = null; if (isset($script_update_request)) { $_tempBody = $script_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 'patchScriptsID' @param string $script_id The script ID. (required) @param \InfluxDB2\Model\ScriptUpdateRequest $script_update_request Script update to apply (required) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchScriptsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function patchScriptsIDAddLabels($script_id, $label_mapping) { list($response) = $this->patchScriptsIDAddLabelsWithHttpInfo($script_id, $label_mapping); return $response; }
Operation patchScriptsIDAddLabels Adds labels to a script @param string $script_id The script ID. (required) @param \InfluxDB2\Model\LabelMapping $label_mapping The names of labels to add to the script. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Script|object|\InfluxDB2\Model\Error
patchScriptsIDAddLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function patchScriptsIDAddLabelsWithHttpInfo($script_id, $label_mapping) { $request = $this->patchScriptsIDAddLabelsRequest($script_id, $label_mapping); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Script'; $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 patchScriptsIDAddLabelsWithHttpInfo Adds labels to a script @param string $script_id The script ID. (required) @param \InfluxDB2\Model\LabelMapping $label_mapping The names of labels to add to the script. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Script|object|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
patchScriptsIDAddLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
protected function patchScriptsIDAddLabelsRequest($script_id, $label_mapping) { // verify the required parameter 'script_id' is set if ($script_id === null || (is_array($script_id) && count($script_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $script_id when calling patchScriptsIDAddLabels' ); } // 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 patchScriptsIDAddLabels' ); } $resourcePath = '/api/v2/scripts/{scriptID}/labels/add'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // path params if ($script_id !== null) { $resourcePath = str_replace( '{' . 'scriptID' . '}', ObjectSerializer::toPathValue($script_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('PATCH', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'patchScriptsIDAddLabels' @param string $script_id The script ID. (required) @param \InfluxDB2\Model\LabelMapping $label_mapping The names of labels to add to the script. (required) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchScriptsIDAddLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function patchScriptsIDRemoveLabels($script_id, $label_mapping) { list($response) = $this->patchScriptsIDRemoveLabelsWithHttpInfo($script_id, $label_mapping); return $response; }
Operation patchScriptsIDRemoveLabels Removes labels from a script @param string $script_id The script ID. (required) @param \InfluxDB2\Model\LabelMapping $label_mapping The names of labels to remove from the script. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Script|object|\InfluxDB2\Model\Error
patchScriptsIDRemoveLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function patchScriptsIDRemoveLabelsWithHttpInfo($script_id, $label_mapping) { $request = $this->patchScriptsIDRemoveLabelsRequest($script_id, $label_mapping); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Script'; $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 patchScriptsIDRemoveLabelsWithHttpInfo Removes labels from a script @param string $script_id The script ID. (required) @param \InfluxDB2\Model\LabelMapping $label_mapping The names of labels to remove from the script. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Script|object|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
patchScriptsIDRemoveLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
protected function patchScriptsIDRemoveLabelsRequest($script_id, $label_mapping) { // verify the required parameter 'script_id' is set if ($script_id === null || (is_array($script_id) && count($script_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $script_id when calling patchScriptsIDRemoveLabels' ); } // 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 patchScriptsIDRemoveLabels' ); } $resourcePath = '/api/v2/scripts/{scriptID}/labels/remove'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // path params if ($script_id !== null) { $resourcePath = str_replace( '{' . 'scriptID' . '}', ObjectSerializer::toPathValue($script_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('PATCH', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'patchScriptsIDRemoveLabels' @param string $script_id The script ID. (required) @param \InfluxDB2\Model\LabelMapping $label_mapping The names of labels to remove from the script. (required) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchScriptsIDRemoveLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function postScripts($script_create_request) { list($response) = $this->postScriptsWithHttpInfo($script_create_request); return $response; }
Operation postScripts Create a script @param \InfluxDB2\Model\ScriptCreateRequest $script_create_request The script to create. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Script|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error
postScripts
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT
public function postScriptsWithHttpInfo($script_create_request) { $request = $this->postScriptsRequest($script_create_request); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Script'; $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 postScriptsWithHttpInfo Create a script @param \InfluxDB2\Model\ScriptCreateRequest $script_create_request The script to create. (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Script|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postScriptsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/InvokableScriptsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php
MIT