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 getDebugPprofTrace($zap_trace_span = null, $seconds = null)
{
list($response) = $this->getDebugPprofTraceWithHttpInfo($zap_trace_span, $seconds);
return $response;
} | Operation getDebugPprofTrace
Retrieve the runtime execution trace
@param string $zap_trace_span OpenTracing span context (optional)
@param string $seconds Number of seconds to collect profile data. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|string | getDebugPprofTrace | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getDebugPprofTraceWithHttpInfo($zap_trace_span = null, $seconds = null)
{
$request = $this->getDebugPprofTraceRequest($zap_trace_span, $seconds);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getDebugPprofTraceWithHttpInfo
Retrieve the runtime execution trace
@param string $zap_trace_span OpenTracing span context (optional)
@param string $seconds Number of seconds to collect profile data. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|string, HTTP status code, HTTP response headers (array of strings) | getDebugPprofTraceWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getDebugPprofTraceRequest($zap_trace_span = null, $seconds = null)
{
$resourcePath = '/debug/pprof/trace';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($seconds !== null) {
$queryParams['seconds'] = ObjectSerializer::toQueryValue($seconds);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/octet-stream', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/octet-stream', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getDebugPprofTrace'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $seconds Number of seconds to collect profile data. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDebugPprofTraceRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getHealth($zap_trace_span = null)
{
list($response) = $this->getHealthWithHttpInfo($zap_trace_span);
return $response;
} | Operation getHealth
Retrieve the health of the instance
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\HealthCheck|string | getHealth | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getHealthWithHttpInfo($zap_trace_span = null)
{
$request = $this->getHealthRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\HealthCheck';
$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 getHealthWithHttpInfo
Retrieve the health of the instance
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\HealthCheck|string, HTTP status code, HTTP response headers (array of strings) | getHealthWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getHealthRequest($zap_trace_span = null)
{
$resourcePath = '/health';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getHealth'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getHealthRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getMetrics($zap_trace_span = null)
{
list($response) = $this->getMetricsWithHttpInfo($zap_trace_span);
return $response;
} | Operation getMetrics
Retrieve workload performance metrics
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return string|string | getMetrics | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getMetricsWithHttpInfo($zap_trace_span = null)
{
$request = $this->getMetricsRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = 'string';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getMetricsWithHttpInfo
Retrieve workload performance metrics
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of string|string, HTTP status code, HTTP response headers (array of strings) | getMetricsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getMetricsRequest($zap_trace_span = null)
{
$resourcePath = '/metrics';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getMetrics'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getMetricsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getPing()
{
$this->getPingWithHttpInfo();
} | Operation getPing
Get the status and version of the instance
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | getPing | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getPingWithHttpInfo()
{
$request = $this->getPingRequest();
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation getPingWithHttpInfo
Get the status and version 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/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.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/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getReady($zap_trace_span = null)
{
list($response) = $this->getReadyWithHttpInfo($zap_trace_span);
return $response;
} | Operation getReady
Get the readiness of an instance at startup
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Ready|string | getReady | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getReadyWithHttpInfo($zap_trace_span = null)
{
$request = $this->getReadyRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Ready';
$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 getReadyWithHttpInfo
Get the readiness of an instance at startup
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Ready|string, HTTP status code, HTTP response headers (array of strings) | getReadyWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getReadyRequest($zap_trace_span = null)
{
$resourcePath = '/ready';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getReady'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getReadyRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getResources($zap_trace_span = null)
{
list($response) = $this->getResourcesWithHttpInfo($zap_trace_span);
return $response;
} | Operation getResources
List all known resources
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return string[]|\InfluxDB2\Model\Error | getResources | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getResourcesWithHttpInfo($zap_trace_span = null)
{
$request = $this->getResourcesRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = 'string[]';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getResourcesWithHttpInfo
List all known resources
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of string[]|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getResourcesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getResourcesRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/resources';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getResources'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getResourcesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getRoutes($zap_trace_span = null)
{
list($response) = $this->getRoutesWithHttpInfo($zap_trace_span);
return $response;
} | Operation getRoutes
List all top level routes
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Routes | getRoutes | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function getRoutesWithHttpInfo($zap_trace_span = null)
{
$request = $this->getRoutesRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Routes';
$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 getRoutesWithHttpInfo
List all top level routes
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Routes, HTTP status code, HTTP response headers (array of strings) | getRoutesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
protected function getRoutesRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getRoutes'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getRoutesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SystemInformationEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SystemInformationEndpointsService.php | MIT |
public function deleteOrgsID($org_id, $zap_trace_span = null)
{
$this->deleteOrgsIDWithHttpInfo($org_id, $zap_trace_span);
} | Operation deleteOrgsID
Delete an organization
@param string $org_id The ID of the organization to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteOrgsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function deleteOrgsIDWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->deleteOrgsIDRequest($org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteOrgsIDWithHttpInfo
Delete an organization
@param string $org_id The ID of the organization to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteOrgsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function deleteOrgsIDRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling deleteOrgsID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'deleteOrgsID'
@param string $org_id The ID of the organization to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteOrgsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function deleteOrgsIDMembersID($user_id, $org_id, $zap_trace_span = null)
{
$this->deleteOrgsIDMembersIDWithHttpInfo($user_id, $org_id, $zap_trace_span);
} | Operation deleteOrgsIDMembersID
Remove a member from an organization
@param string $user_id The ID of the member to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteOrgsIDMembersID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function deleteOrgsIDMembersIDWithHttpInfo($user_id, $org_id, $zap_trace_span = null)
{
$request = $this->deleteOrgsIDMembersIDRequest($user_id, $org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteOrgsIDMembersIDWithHttpInfo
Remove a member from an organization
@param string $user_id The ID of the member to remove. (required)
@param string $org_id The organization 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) | deleteOrgsIDMembersIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function deleteOrgsIDMembersIDRequest($user_id, $org_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 deleteOrgsIDMembersID'
);
}
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling deleteOrgsIDMembersID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/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 ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'deleteOrgsIDMembersID'
@param string $user_id The ID of the member to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteOrgsIDMembersIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function deleteOrgsIDOwnersID($user_id, $org_id, $zap_trace_span = null)
{
$this->deleteOrgsIDOwnersIDWithHttpInfo($user_id, $org_id, $zap_trace_span);
} | Operation deleteOrgsIDOwnersID
Remove an owner from an organization
@param string $user_id The ID of the owner to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteOrgsIDOwnersID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function deleteOrgsIDOwnersIDWithHttpInfo($user_id, $org_id, $zap_trace_span = null)
{
$request = $this->deleteOrgsIDOwnersIDRequest($user_id, $org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteOrgsIDOwnersIDWithHttpInfo
Remove an owner from an organization
@param string $user_id The ID of the owner to remove. (required)
@param string $org_id The organization 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) | deleteOrgsIDOwnersIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function deleteOrgsIDOwnersIDRequest($user_id, $org_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 deleteOrgsIDOwnersID'
);
}
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling deleteOrgsIDOwnersID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/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 ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'deleteOrgsIDOwnersID'
@param string $user_id The ID of the owner to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteOrgsIDOwnersIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgs($zap_trace_span = null, $offset = null, $limit = 20, $descending = false, $org = null, $org_id = null, $user_id = null)
{
list($response) = $this->getOrgsWithHttpInfo($zap_trace_span, $offset, $limit, $descending, $org, $org_id, $user_id);
return $response;
} | Operation getOrgs
List organizations
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param bool $descending descending (optional, default to false)
@param string $org An organization name. Only returns organizations with this name. (optional)
@param string $org_id An organization ID. Only returns the organization with this ID. (optional)
@param string $user_id A user ID. Only returns organizations where this user is a member or owner. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Organizations|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | getOrgs | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsWithHttpInfo($zap_trace_span = null, $offset = null, $limit = 20, $descending = false, $org = null, $org_id = null, $user_id = null)
{
$request = $this->getOrgsRequest($zap_trace_span, $offset, $limit, $descending, $org, $org_id, $user_id);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Organizations';
$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 getOrgsWithHttpInfo
List organizations
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param bool $descending (optional, default to false)
@param string $org An organization name. Only returns organizations with this name. (optional)
@param string $org_id An organization ID. Only returns the organization with this ID. (optional)
@param string $user_id A user ID. Only returns organizations where this user is a member or owner. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Organizations|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getOrgsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function getOrgsRequest($zap_trace_span = null, $offset = null, $limit = 20, $descending = false, $org = null, $org_id = null, $user_id = null)
{
if ($offset !== null && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling OrganizationsService.getOrgs, must be bigger than or equal to 0.');
}
if ($limit !== null && $limit > 100) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling OrganizationsService.getOrgs, must be smaller than or equal to 100.');
}
if ($limit !== null && $limit < 1) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling OrganizationsService.getOrgs, must be bigger than or equal to 1.');
}
$resourcePath = '/api/v2/orgs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($offset !== null) {
$queryParams['offset'] = ObjectSerializer::toQueryValue($offset);
}
// query params
if ($limit !== null) {
$queryParams['limit'] = ObjectSerializer::toQueryValue($limit);
}
// query params
if ($descending !== null) {
$queryParams['descending'] = ObjectSerializer::toQueryValue($descending);
}
// 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 ($user_id !== null) {
$queryParams['userID'] = ObjectSerializer::toQueryValue($user_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getOrgs'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param bool $descending (optional, default to false)
@param string $org An organization name. Only returns organizations with this name. (optional)
@param string $org_id An organization ID. Only returns the organization with this ID. (optional)
@param string $user_id A user ID. Only returns organizations where this user is a member or owner. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsID($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsID
Retrieve an organization
@param string $org_id The ID of the organization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Organization|\InfluxDB2\Model\Error | getOrgsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsIDWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDRequest($org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Organization';
$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 getOrgsIDWithHttpInfo
Retrieve an organization
@param string $org_id The ID of the organization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Organization|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function getOrgsIDRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'getOrgsID'
@param string $org_id The ID of the organization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsIDMembers($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDMembersWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsIDMembers
List all members of an organization
@param string $org_id The organization 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|\InfluxDB2\Model\Error | getOrgsIDMembers | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsIDMembersWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDMembersRequest($org_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 getOrgsIDMembersWithHttpInfo
List all members of an organization
@param string $org_id The organization 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|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDMembersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function getOrgsIDMembersRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsIDMembers'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/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 ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'getOrgsIDMembers'
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDMembersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsIDOwners($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDOwnersWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsIDOwners
List all owners of an organization
@param string $org_id The ID of the organization to list owners for. (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|\InfluxDB2\Model\Error | getOrgsIDOwners | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getOrgsIDOwnersWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDOwnersRequest($org_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 getOrgsIDOwnersWithHttpInfo
List all owners of an organization
@param string $org_id The ID of the organization to list owners for. (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|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDOwnersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function getOrgsIDOwnersRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsIDOwners'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/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 ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'getOrgsIDOwners'
@param string $org_id The ID of the organization to list owners for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDOwnersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function patchOrgsID($org_id, $patch_organization_request, $zap_trace_span = null)
{
list($response) = $this->patchOrgsIDWithHttpInfo($org_id, $patch_organization_request, $zap_trace_span);
return $response;
} | Operation patchOrgsID
Update an organization
@param string $org_id The ID of the organization to get. (required)
@param \InfluxDB2\Model\PatchOrganizationRequest $patch_organization_request Organization 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\Organization|\InfluxDB2\Model\Error | patchOrgsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function patchOrgsIDWithHttpInfo($org_id, $patch_organization_request, $zap_trace_span = null)
{
$request = $this->patchOrgsIDRequest($org_id, $patch_organization_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Organization';
$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 patchOrgsIDWithHttpInfo
Update an organization
@param string $org_id The ID of the organization to get. (required)
@param \InfluxDB2\Model\PatchOrganizationRequest $patch_organization_request Organization 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\Organization|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | patchOrgsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function patchOrgsIDRequest($org_id, $patch_organization_request, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling patchOrgsID'
);
}
// verify the required parameter 'patch_organization_request' is set
if ($patch_organization_request === null || (is_array($patch_organization_request) && count($patch_organization_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $patch_organization_request when calling patchOrgsID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($patch_organization_request)) {
$_tempBody = $patch_organization_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 'patchOrgsID'
@param string $org_id The ID of the organization to get. (required)
@param \InfluxDB2\Model\PatchOrganizationRequest $patch_organization_request Organization update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchOrgsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function postOrgs($post_organization_request, $zap_trace_span = null)
{
list($response) = $this->postOrgsWithHttpInfo($post_organization_request, $zap_trace_span);
return $response;
} | Operation postOrgs
Create an organization
@param \InfluxDB2\Model\PostOrganizationRequest $post_organization_request The organization to create. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Organization|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | postOrgs | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function postOrgsWithHttpInfo($post_organization_request, $zap_trace_span = null)
{
$request = $this->postOrgsRequest($post_organization_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Organization';
$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 postOrgsWithHttpInfo
Create an organization
@param \InfluxDB2\Model\PostOrganizationRequest $post_organization_request The organization 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\Organization|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | postOrgsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function postOrgsRequest($post_organization_request, $zap_trace_span = null)
{
// verify the required parameter 'post_organization_request' is set
if ($post_organization_request === null || (is_array($post_organization_request) && count($post_organization_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $post_organization_request when calling postOrgs'
);
}
$resourcePath = '/api/v2/orgs';
$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($post_organization_request)) {
$_tempBody = $post_organization_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 'postOrgs'
@param \InfluxDB2\Model\PostOrganizationRequest $post_organization_request The organization to create. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postOrgsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function postOrgsIDMembers($org_id, $add_resource_member_request_body, $zap_trace_span = null)
{
list($response) = $this->postOrgsIDMembersWithHttpInfo($org_id, $add_resource_member_request_body, $zap_trace_span);
return $response;
} | Operation postOrgsIDMembers
Add a member to an organization
@param string $org_id The organization 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 | postOrgsIDMembers | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function postOrgsIDMembersWithHttpInfo($org_id, $add_resource_member_request_body, $zap_trace_span = null)
{
$request = $this->postOrgsIDMembersRequest($org_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 postOrgsIDMembersWithHttpInfo
Add a member to an organization
@param string $org_id The organization 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) | postOrgsIDMembersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function postOrgsIDMembersRequest($org_id, $add_resource_member_request_body, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling postOrgsIDMembers'
);
}
// 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 postOrgsIDMembers'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/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 ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'postOrgsIDMembers'
@param string $org_id The organization 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 | postOrgsIDMembersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function postOrgsIDOwners($org_id, $add_resource_member_request_body, $zap_trace_span = null)
{
list($response) = $this->postOrgsIDOwnersWithHttpInfo($org_id, $add_resource_member_request_body, $zap_trace_span);
return $response;
} | Operation postOrgsIDOwners
Add an owner to an organization
@param string $org_id The ID of the organization that you want to add an owner for. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body The user to add as an owner of the organization. (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 | postOrgsIDOwners | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function postOrgsIDOwnersWithHttpInfo($org_id, $add_resource_member_request_body, $zap_trace_span = null)
{
$request = $this->postOrgsIDOwnersRequest($org_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 postOrgsIDOwnersWithHttpInfo
Add an owner to an organization
@param string $org_id The ID of the organization that you want to add an owner for. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body The user to add as an owner of the organization. (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) | postOrgsIDOwnersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
protected function postOrgsIDOwnersRequest($org_id, $add_resource_member_request_body, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling postOrgsIDOwners'
);
}
// 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 postOrgsIDOwners'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/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 ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_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 'postOrgsIDOwners'
@param string $org_id The ID of the organization that you want to add an owner for. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body The user to add as an owner of the organization. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postOrgsIDOwnersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/OrganizationsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/OrganizationsService.php | MIT |
public function getResources($zap_trace_span = null)
{
list($response) = $this->getResourcesWithHttpInfo($zap_trace_span);
return $response;
} | Operation getResources
List all known resources
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return string[]|\InfluxDB2\Model\Error | getResources | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ResourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ResourcesService.php | MIT |
public function getResourcesWithHttpInfo($zap_trace_span = null)
{
$request = $this->getResourcesRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = 'string[]';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getResourcesWithHttpInfo
List all known resources
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of string[]|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getResourcesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ResourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ResourcesService.php | MIT |
protected function getResourcesRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/resources';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getResources'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getResourcesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/ResourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/ResourcesService.php | MIT |
public function getRoutes($zap_trace_span = null)
{
list($response) = $this->getRoutesWithHttpInfo($zap_trace_span);
return $response;
} | Operation getRoutes
List all top level routes
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Routes | getRoutes | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RoutesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RoutesService.php | MIT |
public function getRoutesWithHttpInfo($zap_trace_span = null)
{
$request = $this->getRoutesRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Routes';
$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 getRoutesWithHttpInfo
List all top level routes
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Routes, HTTP status code, HTTP response headers (array of strings) | getRoutesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RoutesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RoutesService.php | MIT |
protected function getRoutesRequest($zap_trace_span = null)
{
$resourcePath = '/api/v2/';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getRoutes'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getRoutesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/RoutesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/RoutesService.php | MIT |
public function getMetrics($zap_trace_span = null)
{
list($response) = $this->getMetricsWithHttpInfo($zap_trace_span);
return $response;
} | Operation getMetrics
Retrieve workload performance metrics
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return string|string | getMetrics | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/MetricsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/MetricsService.php | MIT |
public function getMetricsWithHttpInfo($zap_trace_span = null)
{
$request = $this->getMetricsRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = 'string';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getMetricsWithHttpInfo
Retrieve workload performance metrics
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of string|string, HTTP status code, HTTP response headers (array of strings) | getMetricsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/MetricsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/MetricsService.php | MIT |
protected function getMetricsRequest($zap_trace_span = null)
{
$resourcePath = '/metrics';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['text/plain', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getMetrics'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getMetricsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/MetricsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/MetricsService.php | MIT |
public function getHealth($zap_trace_span = null)
{
list($response) = $this->getHealthWithHttpInfo($zap_trace_span);
return $response;
} | Operation getHealth
Retrieve the health of the instance
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\HealthCheck|string | getHealth | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/HealthService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/HealthService.php | MIT |
public function getHealthWithHttpInfo($zap_trace_span = null)
{
$request = $this->getHealthRequest($zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\HealthCheck';
$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 getHealthWithHttpInfo
Retrieve the health of the instance
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\HealthCheck|string, HTTP status code, HTTP response headers (array of strings) | getHealthWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/HealthService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/HealthService.php | MIT |
protected function getHealthRequest($zap_trace_span = null)
{
$resourcePath = '/health';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getHealth'
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getHealthRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/HealthService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/HealthService.php | MIT |
public function deleteTelegrafsID($telegraf_id, $zap_trace_span = null)
{
$this->deleteTelegrafsIDWithHttpInfo($telegraf_id, $zap_trace_span);
} | Operation deleteTelegrafsID
Delete a Telegraf configuration
@param string $telegraf_id The Telegraf configuration ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteTelegrafsID | 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 deleteTelegrafsIDWithHttpInfo($telegraf_id, $zap_trace_span = null)
{
$request = $this->deleteTelegrafsIDRequest($telegraf_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteTelegrafsIDWithHttpInfo
Delete a Telegraf configuration
@param string $telegraf_id The Telegraf configuration 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) | deleteTelegrafsIDWithHttpInfo | 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 deleteTelegrafsIDRequest($telegraf_id, $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 deleteTelegrafsID'
);
}
$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 ($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 'deleteTelegrafsID'
@param string $telegraf_id The Telegraf configuration ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteTelegrafsIDRequest | 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 deleteTelegrafsIDLabelsID($telegraf_id, $label_id, $zap_trace_span = null)
{
$this->deleteTelegrafsIDLabelsIDWithHttpInfo($telegraf_id, $label_id, $zap_trace_span);
} | Operation deleteTelegrafsIDLabelsID
Delete a label from a Telegraf config
@param string $telegraf_id The Telegraf config 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 | deleteTelegrafsIDLabelsID | 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 deleteTelegrafsIDLabelsIDWithHttpInfo($telegraf_id, $label_id, $zap_trace_span = null)
{
$request = $this->deleteTelegrafsIDLabelsIDRequest($telegraf_id, $label_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteTelegrafsIDLabelsIDWithHttpInfo
Delete a label from a Telegraf config
@param string $telegraf_id The Telegraf config 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) | deleteTelegrafsIDLabelsIDWithHttpInfo | 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 deleteTelegrafsIDLabelsIDRequest($telegraf_id, $label_id, $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 deleteTelegrafsIDLabelsID'
);
}
// 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 deleteTelegrafsIDLabelsID'
);
}
$resourcePath = '/api/v2/telegrafs/{telegrafID}/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 ($telegraf_id !== null) {
$resourcePath = str_replace(
'{' . 'telegrafID' . '}',
ObjectSerializer::toPathValue($telegraf_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 'deleteTelegrafsIDLabelsID'
@param string $telegraf_id The Telegraf config 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 | deleteTelegrafsIDLabelsIDRequest | 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 deleteTelegrafsIDMembersID($user_id, $telegraf_id, $zap_trace_span = null)
{
$this->deleteTelegrafsIDMembersIDWithHttpInfo($user_id, $telegraf_id, $zap_trace_span);
} | Operation deleteTelegrafsIDMembersID
Remove a member from a Telegraf config
@param string $user_id The ID of the member to remove. (required)
@param string $telegraf_id The Telegraf config ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteTelegrafsIDMembersID | 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 deleteTelegrafsIDMembersIDWithHttpInfo($user_id, $telegraf_id, $zap_trace_span = null)
{
$request = $this->deleteTelegrafsIDMembersIDRequest($user_id, $telegraf_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteTelegrafsIDMembersIDWithHttpInfo
Remove a member from a Telegraf config
@param string $user_id The ID of the member to remove. (required)
@param string $telegraf_id The Telegraf config 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) | deleteTelegrafsIDMembersIDWithHttpInfo | 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 deleteTelegrafsIDMembersIDRequest($user_id, $telegraf_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 deleteTelegrafsIDMembersID'
);
}
// 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 deleteTelegrafsIDMembersID'
);
}
$resourcePath = '/api/v2/telegrafs/{telegrafID}/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 ($telegraf_id !== null) {
$resourcePath = str_replace(
'{' . 'telegrafID' . '}',
ObjectSerializer::toPathValue($telegraf_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 'deleteTelegrafsIDMembersID'
@param string $user_id The ID of the member to remove. (required)
@param string $telegraf_id The Telegraf config ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteTelegrafsIDMembersIDRequest | 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 deleteTelegrafsIDOwnersID($user_id, $telegraf_id, $zap_trace_span = null)
{
$this->deleteTelegrafsIDOwnersIDWithHttpInfo($user_id, $telegraf_id, $zap_trace_span);
} | Operation deleteTelegrafsIDOwnersID
Remove an owner from a Telegraf config
@param string $user_id The ID of the owner to remove. (required)
@param string $telegraf_id The Telegraf config ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteTelegrafsIDOwnersID | 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 deleteTelegrafsIDOwnersIDWithHttpInfo($user_id, $telegraf_id, $zap_trace_span = null)
{
$request = $this->deleteTelegrafsIDOwnersIDRequest($user_id, $telegraf_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteTelegrafsIDOwnersIDWithHttpInfo
Remove an owner from a Telegraf config
@param string $user_id The ID of the owner to remove. (required)
@param string $telegraf_id The Telegraf config 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) | deleteTelegrafsIDOwnersIDWithHttpInfo | 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 deleteTelegrafsIDOwnersIDRequest($user_id, $telegraf_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 deleteTelegrafsIDOwnersID'
);
}
// 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 deleteTelegrafsIDOwnersID'
);
}
$resourcePath = '/api/v2/telegrafs/{telegrafID}/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 ($telegraf_id !== null) {
$resourcePath = str_replace(
'{' . 'telegrafID' . '}',
ObjectSerializer::toPathValue($telegraf_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 'deleteTelegrafsIDOwnersID'
@param string $user_id The ID of the owner to remove. (required)
@param string $telegraf_id The Telegraf config ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteTelegrafsIDOwnersIDRequest | 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 getTelegrafs($zap_trace_span = null, $org_id = null)
{
list($response) = $this->getTelegrafsWithHttpInfo($zap_trace_span, $org_id);
return $response;
} | Operation getTelegrafs
List all Telegraf configurations
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id The organization ID the Telegraf config belongs to. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Telegrafs|\InfluxDB2\Model\Error | getTelegrafs | 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 getTelegrafsWithHttpInfo($zap_trace_span = null, $org_id = null)
{
$request = $this->getTelegrafsRequest($zap_trace_span, $org_id);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Telegrafs';
$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 getTelegrafsWithHttpInfo
List all Telegraf configurations
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id The organization ID the Telegraf config belongs to. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Telegrafs|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getTelegrafsWithHttpInfo | 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 getTelegrafsRequest($zap_trace_span = null, $org_id = null)
{
$resourcePath = '/api/v2/telegrafs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getTelegrafs'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id The organization ID the Telegraf config belongs to. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTelegrafsRequest | 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 getTelegrafsID($telegraf_id, $zap_trace_span = null, $accept = 'application/toml')
{
list($response) = $this->getTelegrafsIDWithHttpInfo($telegraf_id, $zap_trace_span, $accept);
return $response;
} | Operation getTelegrafsID
Retrieve a Telegraf configuration
@param string $telegraf_id The Telegraf configuration ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept accept (optional, default to 'application/toml')
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return string|\InfluxDB2\Model\Error | getTelegrafsID | 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 getTelegrafsIDWithHttpInfo($telegraf_id, $zap_trace_span = null, $accept = 'application/toml')
{
$request = $this->getTelegrafsIDRequest($telegraf_id, $zap_trace_span, $accept);
$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 getTelegrafsIDWithHttpInfo
Retrieve a Telegraf configuration
@param string $telegraf_id The Telegraf configuration ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept (optional, default to 'application/toml')
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of string|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getTelegrafsIDWithHttpInfo | 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 getTelegrafsIDRequest($telegraf_id, $zap_trace_span = null, $accept = 'application/toml')
{
// 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 getTelegrafsID'
);
}
$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);
}
// header params
if ($accept !== null) {
$headerParams['Accept'] = ObjectSerializer::toHeaderValue($accept);
}
// path params
if ($telegraf_id !== null) {
$resourcePath = str_replace(
'{' . 'telegrafID' . '}',
ObjectSerializer::toPathValue($telegraf_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/toml', 'application/json', 'application/octet-stream']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/toml', 'application/json', 'application/octet-stream'],
[]
);
}
// 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 'getTelegrafsID'
@param string $telegraf_id The Telegraf configuration ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $accept (optional, default to 'application/toml')
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTelegrafsIDRequest | 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 getTelegrafsIDLabels($telegraf_id, $zap_trace_span = null)
{
list($response) = $this->getTelegrafsIDLabelsWithHttpInfo($telegraf_id, $zap_trace_span);
return $response;
} | Operation getTelegrafsIDLabels
List all labels for a Telegraf config
@param string $telegraf_id The Telegraf config 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 | getTelegrafsIDLabels | 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 getTelegrafsIDLabelsWithHttpInfo($telegraf_id, $zap_trace_span = null)
{
$request = $this->getTelegrafsIDLabelsRequest($telegraf_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 getTelegrafsIDLabelsWithHttpInfo
List all labels for a Telegraf config
@param string $telegraf_id The Telegraf config 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) | getTelegrafsIDLabelsWithHttpInfo | 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 getTelegrafsIDLabelsRequest($telegraf_id, $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 getTelegrafsIDLabels'
);
}
$resourcePath = '/api/v2/telegrafs/{telegrafID}/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 ($telegraf_id !== null) {
$resourcePath = str_replace(
'{' . 'telegrafID' . '}',
ObjectSerializer::toPathValue($telegraf_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 'getTelegrafsIDLabels'
@param string $telegraf_id The Telegraf config ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTelegrafsIDLabelsRequest | 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 getTelegrafsIDMembers($telegraf_id, $zap_trace_span = null)
{
list($response) = $this->getTelegrafsIDMembersWithHttpInfo($telegraf_id, $zap_trace_span);
return $response;
} | Operation getTelegrafsIDMembers
List all users with member privileges for a Telegraf config
@param string $telegraf_id The Telegraf config 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 | getTelegrafsIDMembers | 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 getTelegrafsIDMembersWithHttpInfo($telegraf_id, $zap_trace_span = null)
{
$request = $this->getTelegrafsIDMembersRequest($telegraf_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 getTelegrafsIDMembersWithHttpInfo
List all users with member privileges for a Telegraf config
@param string $telegraf_id The Telegraf config 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) | getTelegrafsIDMembersWithHttpInfo | 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 getTelegrafsIDMembersRequest($telegraf_id, $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 getTelegrafsIDMembers'
);
}
$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 ($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 'getTelegrafsIDMembers'
@param string $telegraf_id The Telegraf config ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTelegrafsIDMembersRequest | 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 getTelegrafsIDOwners($telegraf_id, $zap_trace_span = null)
{
list($response) = $this->getTelegrafsIDOwnersWithHttpInfo($telegraf_id, $zap_trace_span);
return $response;
} | Operation getTelegrafsIDOwners
List all owners of a Telegraf configuration
@param string $telegraf_id The Telegraf configuration 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 | getTelegrafsIDOwners | 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 getTelegrafsIDOwnersWithHttpInfo($telegraf_id, $zap_trace_span = null)
{
$request = $this->getTelegrafsIDOwnersRequest($telegraf_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 getTelegrafsIDOwnersWithHttpInfo
List all owners of a Telegraf configuration
@param string $telegraf_id The Telegraf configuration 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) | getTelegrafsIDOwnersWithHttpInfo | 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 getTelegrafsIDOwnersRequest($telegraf_id, $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 getTelegrafsIDOwners'
);
}
$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 ($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 'getTelegrafsIDOwners'
@param string $telegraf_id The Telegraf configuration ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTelegrafsIDOwnersRequest | 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 postTelegrafs($telegraf_plugin_request, $zap_trace_span = null)
{
list($response) = $this->postTelegrafsWithHttpInfo($telegraf_plugin_request, $zap_trace_span);
return $response;
} | Operation postTelegrafs
Create a Telegraf configuration
@param \InfluxDB2\Model\TelegrafPluginRequest $telegraf_plugin_request Telegraf configuration to create (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 | postTelegrafs | 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 postTelegrafsWithHttpInfo($telegraf_plugin_request, $zap_trace_span = null)
{
$request = $this->postTelegrafsRequest($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 postTelegrafsWithHttpInfo
Create a Telegraf configuration
@param \InfluxDB2\Model\TelegrafPluginRequest $telegraf_plugin_request Telegraf configuration 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\Telegraf|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postTelegrafsWithHttpInfo | 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 postTelegrafsRequest($telegraf_plugin_request, $zap_trace_span = null)
{
// 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 postTelegrafs'
);
}
$resourcePath = '/api/v2/telegrafs';
$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($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('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postTelegrafs'
@param \InfluxDB2\Model\TelegrafPluginRequest $telegraf_plugin_request Telegraf configuration to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTelegrafsRequest | 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 postTelegrafsIDLabels($telegraf_id, $label_mapping, $zap_trace_span = null)
{
list($response) = $this->postTelegrafsIDLabelsWithHttpInfo($telegraf_id, $label_mapping, $zap_trace_span);
return $response;
} | Operation postTelegrafsIDLabels
Add a label to a Telegraf config
@param string $telegraf_id The Telegraf config 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 | postTelegrafsIDLabels | 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 postTelegrafsIDLabelsWithHttpInfo($telegraf_id, $label_mapping, $zap_trace_span = null)
{
$request = $this->postTelegrafsIDLabelsRequest($telegraf_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 postTelegrafsIDLabelsWithHttpInfo
Add a label to a Telegraf config
@param string $telegraf_id The Telegraf config 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) | postTelegrafsIDLabelsWithHttpInfo | 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 postTelegrafsIDLabelsRequest($telegraf_id, $label_mapping, $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 postTelegrafsIDLabels'
);
}
// 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 postTelegrafsIDLabels'
);
}
$resourcePath = '/api/v2/telegrafs/{telegrafID}/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 ($telegraf_id !== null) {
$resourcePath = str_replace(
'{' . 'telegrafID' . '}',
ObjectSerializer::toPathValue($telegraf_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 'postTelegrafsIDLabels'
@param string $telegraf_id The Telegraf config 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 | postTelegrafsIDLabelsRequest | 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 postTelegrafsIDMembers($telegraf_id, $add_resource_member_request_body, $zap_trace_span = null)
{
list($response) = $this->postTelegrafsIDMembersWithHttpInfo($telegraf_id, $add_resource_member_request_body, $zap_trace_span);
return $response;
} | Operation postTelegrafsIDMembers
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 \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error | postTelegrafsIDMembers | 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 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.