code
stringlengths
17
247k
docstring
stringlengths
30
30.3k
func_name
stringlengths
1
89
language
stringclasses
1 value
repo
stringlengths
7
63
path
stringlengths
7
153
url
stringlengths
51
209
license
stringclasses
4 values
protected function postBucketsIDMembersRequest($bucket_id, $add_resource_member_request_body, $zap_trace_span = null) { // verify the required parameter 'bucket_id' is set if ($bucket_id === null || (is_array($bucket_id) && count($bucket_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $bucket_id when calling postBucketsIDMembers' ); } // 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 postBucketsIDMembers' ); } $resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) { $resourcePath = str_replace( '{' . 'bucketID' . '}', ObjectSerializer::toPathValue($bucket_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 'postBucketsIDMembers' @param string $bucket_id The ID of the bucket to retrieve users for. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as a member to the bucket. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postBucketsIDMembersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/BucketsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BucketsService.php
MIT
public function postBucketsIDOwners($bucket_id, $add_resource_member_request_body, $zap_trace_span = null) { list($response) = $this->postBucketsIDOwnersWithHttpInfo($bucket_id, $add_resource_member_request_body, $zap_trace_span); return $response; }
Operation postBucketsIDOwners Add an owner to a bucket @param string $bucket_id The bucket ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\ResourceOwner|\InfluxDB2\Model\Error
postBucketsIDOwners
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/BucketsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BucketsService.php
MIT
public function postBucketsIDOwnersWithHttpInfo($bucket_id, $add_resource_member_request_body, $zap_trace_span = null) { $request = $this->postBucketsIDOwnersRequest($bucket_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 postBucketsIDOwnersWithHttpInfo Add an owner to a bucket @param string $bucket_id The bucket ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\ResourceOwner|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
postBucketsIDOwnersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/BucketsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BucketsService.php
MIT
protected function postBucketsIDOwnersRequest($bucket_id, $add_resource_member_request_body, $zap_trace_span = null) { // verify the required parameter 'bucket_id' is set if ($bucket_id === null || (is_array($bucket_id) && count($bucket_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $bucket_id when calling postBucketsIDOwners' ); } // 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 postBucketsIDOwners' ); } $resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) { $resourcePath = str_replace( '{' . 'bucketID' . '}', ObjectSerializer::toPathValue($bucket_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 'postBucketsIDOwners' @param string $bucket_id The bucket ID. (required) @param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body User to add as owner (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postBucketsIDOwnersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/BucketsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/BucketsService.php
MIT
public function deleteUsersID($user_id, $zap_trace_span = null) { $this->deleteUsersIDWithHttpInfo($user_id, $zap_trace_span); }
Operation deleteUsersID Delete a user @param string $user_id The ID of the user to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteUsersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function deleteUsersIDWithHttpInfo($user_id, $zap_trace_span = null) { $request = $this->deleteUsersIDRequest($user_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteUsersIDWithHttpInfo Delete a user @param string $user_id The ID of the user 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)
deleteUsersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function deleteUsersIDRequest($user_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 deleteUsersID' ); } $resourcePath = '/api/v2/users/{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 ); } // 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 'deleteUsersID' @param string $user_id The ID of the user to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteUsersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getFlags($zap_trace_span = null) { list($response) = $this->getFlagsWithHttpInfo($zap_trace_span); return $response; }
Operation getFlags Return the feature flags for the currently authenticated user @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return map[string,object]|\InfluxDB2\Model\Error
getFlags
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getFlagsWithHttpInfo($zap_trace_span = null) { $request = $this->getFlagsRequest($zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = 'map[string,object]'; $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 getFlagsWithHttpInfo Return the feature flags for the currently authenticated user @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of map[string,object]|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getFlagsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function getFlagsRequest($zap_trace_span = null) { $resourcePath = '/api/v2/flags'; $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 'getFlags' @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getFlagsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getMe($zap_trace_span = null) { list($response) = $this->getMeWithHttpInfo($zap_trace_span); return $response; }
Operation getMe Retrieve the currently authenticated user @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\User|object|\InfluxDB2\Model\Error|string
getMe
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getMeWithHttpInfo($zap_trace_span = null) { $request = $this->getMeRequest($zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\User'; $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 getMeWithHttpInfo Retrieve the currently authenticated user @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\User|object|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
getMeWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function getMeRequest($zap_trace_span = null) { $resourcePath = '/api/v2/me'; $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 'getMe' @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getMeRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getUsersWithHttpInfo($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $name = null, $id = null) { $request = $this->getUsersRequest($zap_trace_span, $offset, $limit, $after, $name, $id); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Users'; $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 getUsersWithHttpInfo List users @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 string $after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional) @param string $name (optional) @param string $id (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Users|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
getUsersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function getUsersRequest($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $name = null, $id = null) { if ($offset !== null && $offset < 0) { throw new \InvalidArgumentException('invalid value for "$offset" when calling UsersService.getUsers, must be bigger than or equal to 0.'); } if ($limit !== null && $limit > 100) { throw new \InvalidArgumentException('invalid value for "$limit" when calling UsersService.getUsers, must be smaller than or equal to 100.'); } if ($limit !== null && $limit < 1) { throw new \InvalidArgumentException('invalid value for "$limit" when calling UsersService.getUsers, must be bigger than or equal to 1.'); } $resourcePath = '/api/v2/users'; $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 ($after !== null) { $queryParams['after'] = ObjectSerializer::toQueryValue($after); } // query params if ($name !== null) { $queryParams['name'] = ObjectSerializer::toQueryValue($name); } // query params if ($id !== null) { $queryParams['id'] = ObjectSerializer::toQueryValue($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 'getUsers' @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 &#x60;20&#x60;. (optional, default to 20) @param string $after Resource ID to seek from. Results are not inclusive of this ID. Use &#x60;after&#x60; instead of &#x60;offset&#x60;. (optional) @param string $name (optional) @param string $id (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getUsersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getUsersID($user_id, $zap_trace_span = null) { list($response) = $this->getUsersIDWithHttpInfo($user_id, $zap_trace_span); return $response; }
Operation getUsersID Retrieve a user @param string $user_id The user ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\User|string
getUsersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function getUsersIDWithHttpInfo($user_id, $zap_trace_span = null) { $request = $this->getUsersIDRequest($user_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\User'; $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 getUsersIDWithHttpInfo Retrieve a user @param string $user_id The user 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\User|string, HTTP status code, HTTP response headers (array of strings)
getUsersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function getUsersIDRequest($user_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 getUsersID' ); } $resourcePath = '/api/v2/users/{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 ); } // 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 'getUsersID' @param string $user_id The user ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getUsersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function patchUsersID($user_id, $post_user, $zap_trace_span = null) { list($response) = $this->patchUsersIDWithHttpInfo($user_id, $post_user, $zap_trace_span); return $response; }
Operation patchUsersID Update a user @param string $user_id The ID of the user to update. (required) @param \InfluxDB2\Model\PostUser $post_user User 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\User|string
patchUsersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function patchUsersIDWithHttpInfo($user_id, $post_user, $zap_trace_span = null) { $request = $this->patchUsersIDRequest($user_id, $post_user, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\User'; $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 patchUsersIDWithHttpInfo Update a user @param string $user_id The ID of the user to update. (required) @param \InfluxDB2\Model\PostUser $post_user User 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\User|string, HTTP status code, HTTP response headers (array of strings)
patchUsersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function patchUsersIDRequest($user_id, $post_user, $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 patchUsersID' ); } // verify the required parameter 'post_user' is set if ($post_user === null || (is_array($post_user) && count($post_user) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $post_user when calling patchUsersID' ); } $resourcePath = '/api/v2/users/{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 ); } // body params $_tempBody = null; if (isset($post_user)) { $_tempBody = $post_user; } 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 'patchUsersID' @param string $user_id The ID of the user to update. (required) @param \InfluxDB2\Model\PostUser $post_user User update to apply (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchUsersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function postUsers($post_user, $zap_trace_span = null) { list($response) = $this->postUsersWithHttpInfo($post_user, $zap_trace_span); return $response; }
Operation postUsers Create a user @param \InfluxDB2\Model\PostUser $post_user The user to create. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\User|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string
postUsers
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function postUsersWithHttpInfo($post_user, $zap_trace_span = null) { $request = $this->postUsersRequest($post_user, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\User'; $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 postUsersWithHttpInfo Create a user @param \InfluxDB2\Model\PostUser $post_user The user 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\User|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
postUsersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function postUsersRequest($post_user, $zap_trace_span = null) { // verify the required parameter 'post_user' is set if ($post_user === null || (is_array($post_user) && count($post_user) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $post_user when calling postUsers' ); } $resourcePath = '/api/v2/users'; $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_user)) { $_tempBody = $post_user; } 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 'postUsers' @param \InfluxDB2\Model\PostUser $post_user The user to create. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postUsersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function postUsersIDPassword($user_id, $password_reset_body, $zap_trace_span = null, $authorization = null) { $this->postUsersIDPasswordWithHttpInfo($user_id, $password_reset_body, $zap_trace_span, $authorization); }
Operation postUsersIDPassword Update a password @param string $user_id The user ID. (required) @param \InfluxDB2\Model\PasswordResetBody $password_reset_body New password (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
postUsersIDPassword
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function postUsersIDPasswordWithHttpInfo($user_id, $password_reset_body, $zap_trace_span = null, $authorization = null) { $request = $this->postUsersIDPasswordRequest($user_id, $password_reset_body, $zap_trace_span, $authorization); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation postUsersIDPasswordWithHttpInfo Update a password @param string $user_id The user ID. (required) @param \InfluxDB2\Model\PasswordResetBody $password_reset_body New password (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
postUsersIDPasswordWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function postUsersIDPasswordRequest($user_id, $password_reset_body, $zap_trace_span = null, $authorization = 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 postUsersIDPassword' ); } // verify the required parameter 'password_reset_body' is set if ($password_reset_body === null || (is_array($password_reset_body) && count($password_reset_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $password_reset_body when calling postUsersIDPassword' ); } $resourcePath = '/api/v2/users/{userID}/password'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($authorization !== null) { $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); } // path params if ($user_id !== null) { $resourcePath = str_replace( '{' . 'userID' . '}', ObjectSerializer::toPathValue($user_id), $resourcePath ); } // body params $_tempBody = null; if (isset($password_reset_body)) { $_tempBody = $password_reset_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; } } // this endpoint requires HTTP basic authentication if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'postUsersIDPassword' @param string $user_id The user ID. (required) @param \InfluxDB2\Model\PasswordResetBody $password_reset_body New password (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postUsersIDPasswordRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function putMePassword($password_reset_body, $zap_trace_span = null, $authorization = null) { $this->putMePasswordWithHttpInfo($password_reset_body, $zap_trace_span, $authorization); }
Operation putMePassword Update a password @param \InfluxDB2\Model\PasswordResetBody $password_reset_body The new password. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
putMePassword
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function putMePasswordWithHttpInfo($password_reset_body, $zap_trace_span = null, $authorization = null) { $request = $this->putMePasswordRequest($password_reset_body, $zap_trace_span, $authorization); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation putMePasswordWithHttpInfo Update a password @param \InfluxDB2\Model\PasswordResetBody $password_reset_body The new password. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
putMePasswordWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
protected function putMePasswordRequest($password_reset_body, $zap_trace_span = null, $authorization = null) { // verify the required parameter 'password_reset_body' is set if ($password_reset_body === null || (is_array($password_reset_body) && count($password_reset_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $password_reset_body when calling putMePassword' ); } $resourcePath = '/api/v2/me/password'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // header params if ($authorization !== null) { $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization); } // body params $_tempBody = null; if (isset($password_reset_body)) { $_tempBody = $password_reset_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; } } // this endpoint requires HTTP basic authentication if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('PUT', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'putMePassword' @param \InfluxDB2\Model\PasswordResetBody $password_reset_body The new password. (required) @param string $zap_trace_span OpenTracing span context (optional) @param string $authorization An auth credential for the Basic scheme (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
putMePasswordRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/UsersService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/UsersService.php
MIT
public function createNotificationRule($notification_rule) { list($response) = $this->createNotificationRuleWithHttpInfo($notification_rule); return $response; }
Operation createNotificationRule Add a notification rule @param \InfluxDB2\Model\NotificationRule $notification_rule Notification rule to create (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\NotificationRule|\InfluxDB2\Model\Error
createNotificationRule
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function createNotificationRuleWithHttpInfo($notification_rule) { $request = $this->createNotificationRuleRequest($notification_rule); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\NotificationRule'; $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 createNotificationRuleWithHttpInfo Add a notification rule @param \InfluxDB2\Model\NotificationRule $notification_rule Notification rule to create (required) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\NotificationRule|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
createNotificationRuleWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function createNotificationRuleRequest($notification_rule) { // verify the required parameter 'notification_rule' is set if ($notification_rule === null || (is_array($notification_rule) && count($notification_rule) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $notification_rule when calling createNotificationRule' ); } $resourcePath = '/api/v2/notificationRules'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // body params $_tempBody = null; if (isset($notification_rule)) { $_tempBody = $notification_rule; } 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 'createNotificationRule' @param \InfluxDB2\Model\NotificationRule $notification_rule Notification rule to create (required) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
createNotificationRuleRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function deleteNotificationRulesID($rule_id, $zap_trace_span = null) { $this->deleteNotificationRulesIDWithHttpInfo($rule_id, $zap_trace_span); }
Operation deleteNotificationRulesID Delete a notification rule @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteNotificationRulesID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function deleteNotificationRulesIDWithHttpInfo($rule_id, $zap_trace_span = null) { $request = $this->deleteNotificationRulesIDRequest($rule_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteNotificationRulesIDWithHttpInfo Delete a notification rule @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of null, HTTP status code, HTTP response headers (array of strings)
deleteNotificationRulesIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function deleteNotificationRulesIDRequest($rule_id, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling deleteNotificationRulesID' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_id), $resourcePath ); } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], [] ); } // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present if ($headers['Content-Type'] === 'application/json') { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); } else { $httpBody = $_tempBody; } } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'deleteNotificationRulesID' @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteNotificationRulesIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function deleteNotificationRulesIDLabelsID($rule_id, $label_id, $zap_trace_span = null) { $this->deleteNotificationRulesIDLabelsIDWithHttpInfo($rule_id, $label_id, $zap_trace_span); }
Operation deleteNotificationRulesIDLabelsID Delete label from a notification rule @param string $rule_id The notification rule ID. (required) @param string $label_id The ID of the label to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteNotificationRulesIDLabelsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function deleteNotificationRulesIDLabelsIDWithHttpInfo($rule_id, $label_id, $zap_trace_span = null) { $request = $this->deleteNotificationRulesIDLabelsIDRequest($rule_id, $label_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteNotificationRulesIDLabelsIDWithHttpInfo Delete label from a notification rule @param string $rule_id The notification rule ID. (required) @param string $label_id The ID of the label 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)
deleteNotificationRulesIDLabelsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function deleteNotificationRulesIDLabelsIDRequest($rule_id, $label_id, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling deleteNotificationRulesIDLabelsID' ); } // 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 deleteNotificationRulesIDLabelsID' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}/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 ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_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 'deleteNotificationRulesIDLabelsID' @param string $rule_id The notification rule ID. (required) @param string $label_id The ID of the label to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteNotificationRulesIDLabelsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function getNotificationRules($org_id, $zap_trace_span = null, $offset = null, $limit = 20, $check_id = null, $tag = null) { list($response) = $this->getNotificationRulesWithHttpInfo($org_id, $zap_trace_span, $offset, $limit, $check_id, $tag); return $response; }
Operation getNotificationRules List all notification rules @param string $org_id Only show notification rules that belong to a specific organization ID. (required) @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 &#x60;20&#x60;. (optional, default to 20) @param string $check_id Only show notifications that belong to the specific check ID. (optional) @param string $tag Only return notification rules that &quot;would match&quot; statuses which contain the tag key value pairs provided. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\NotificationRules|\InfluxDB2\Model\Error
getNotificationRules
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function getNotificationRulesWithHttpInfo($org_id, $zap_trace_span = null, $offset = null, $limit = 20, $check_id = null, $tag = null) { $request = $this->getNotificationRulesRequest($org_id, $zap_trace_span, $offset, $limit, $check_id, $tag); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\NotificationRules'; $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 getNotificationRulesWithHttpInfo List all notification rules @param string $org_id Only show notification rules that belong to a specific organization ID. (required) @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 &#x60;20&#x60;. (optional, default to 20) @param string $check_id Only show notifications that belong to the specific check ID. (optional) @param string $tag Only return notification rules that &quot;would match&quot; statuses which contain the tag key value pairs provided. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\NotificationRules|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getNotificationRulesWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function getNotificationRulesRequest($org_id, $zap_trace_span = null, $offset = null, $limit = 20, $check_id = null, $tag = 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 getNotificationRules' ); } if ($offset !== null && $offset < 0) { throw new \InvalidArgumentException('invalid value for "$offset" when calling NotificationRulesService.getNotificationRules, must be bigger than or equal to 0.'); } if ($limit !== null && $limit > 100) { throw new \InvalidArgumentException('invalid value for "$limit" when calling NotificationRulesService.getNotificationRules, must be smaller than or equal to 100.'); } if ($limit !== null && $limit < 1) { throw new \InvalidArgumentException('invalid value for "$limit" when calling NotificationRulesService.getNotificationRules, must be bigger than or equal to 1.'); } if ($tag !== null && !preg_match("/^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$/", $tag)) { throw new \InvalidArgumentException("invalid value for \"tag\" when calling NotificationRulesService.getNotificationRules, must conform to the pattern /^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$/."); } $resourcePath = '/api/v2/notificationRules'; $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 ($org_id !== null) { $queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id); } // query params if ($check_id !== null) { $queryParams['checkID'] = ObjectSerializer::toQueryValue($check_id); } // query params if ($tag !== null) { $queryParams['tag'] = ObjectSerializer::toQueryValue($tag); } // 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 'getNotificationRules' @param string $org_id Only show notification rules that belong to a specific organization ID. (required) @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 &#x60;20&#x60;. (optional, default to 20) @param string $check_id Only show notifications that belong to the specific check ID. (optional) @param string $tag Only return notification rules that &quot;would match&quot; statuses which contain the tag key value pairs provided. (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getNotificationRulesRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function getNotificationRulesID($rule_id, $zap_trace_span = null) { list($response) = $this->getNotificationRulesIDWithHttpInfo($rule_id, $zap_trace_span); return $response; }
Operation getNotificationRulesID Retrieve a notification rule @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\NotificationRule|\InfluxDB2\Model\Error
getNotificationRulesID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function getNotificationRulesIDWithHttpInfo($rule_id, $zap_trace_span = null) { $request = $this->getNotificationRulesIDRequest($rule_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\NotificationRule'; $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 getNotificationRulesIDWithHttpInfo Retrieve a notification rule @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\NotificationRule|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getNotificationRulesIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function getNotificationRulesIDRequest($rule_id, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling getNotificationRulesID' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_id), $resourcePath ); } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], [] ); } // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present if ($headers['Content-Type'] === 'application/json') { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); } else { $httpBody = $_tempBody; } } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'getNotificationRulesID' @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getNotificationRulesIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function getNotificationRulesIDLabels($rule_id, $zap_trace_span = null) { list($response) = $this->getNotificationRulesIDLabelsWithHttpInfo($rule_id, $zap_trace_span); return $response; }
Operation getNotificationRulesIDLabels List all labels for a notification rule @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\LabelsResponse|\InfluxDB2\Model\Error
getNotificationRulesIDLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function getNotificationRulesIDLabelsWithHttpInfo($rule_id, $zap_trace_span = null) { $request = $this->getNotificationRulesIDLabelsRequest($rule_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 getNotificationRulesIDLabelsWithHttpInfo List all labels for a notification rule @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\LabelsResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getNotificationRulesIDLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function getNotificationRulesIDLabelsRequest($rule_id, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling getNotificationRulesIDLabels' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}/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 ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_id), $resourcePath ); } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], [] ); } // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present if ($headers['Content-Type'] === 'application/json') { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); } else { $httpBody = $_tempBody; } } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'getNotificationRulesIDLabels' @param string $rule_id The notification rule ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getNotificationRulesIDLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function patchNotificationRulesID($rule_id, $notification_rule_update, $zap_trace_span = null) { list($response) = $this->patchNotificationRulesIDWithHttpInfo($rule_id, $notification_rule_update, $zap_trace_span); return $response; }
Operation patchNotificationRulesID Update a notification rule @param string $rule_id The notification rule ID. (required) @param \InfluxDB2\Model\NotificationRuleUpdate $notification_rule_update Notification rule 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\NotificationRule|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error
patchNotificationRulesID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function patchNotificationRulesIDWithHttpInfo($rule_id, $notification_rule_update, $zap_trace_span = null) { $request = $this->patchNotificationRulesIDRequest($rule_id, $notification_rule_update, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\NotificationRule'; $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 patchNotificationRulesIDWithHttpInfo Update a notification rule @param string $rule_id The notification rule ID. (required) @param \InfluxDB2\Model\NotificationRuleUpdate $notification_rule_update Notification rule 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\NotificationRule|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
patchNotificationRulesIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function patchNotificationRulesIDRequest($rule_id, $notification_rule_update, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling patchNotificationRulesID' ); } // verify the required parameter 'notification_rule_update' is set if ($notification_rule_update === null || (is_array($notification_rule_update) && count($notification_rule_update) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $notification_rule_update when calling patchNotificationRulesID' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_id), $resourcePath ); } // body params $_tempBody = null; if (isset($notification_rule_update)) { $_tempBody = $notification_rule_update; } 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 'patchNotificationRulesID' @param string $rule_id The notification rule ID. (required) @param \InfluxDB2\Model\NotificationRuleUpdate $notification_rule_update Notification rule update to apply (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchNotificationRulesIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function postNotificationRuleIDLabels($rule_id, $label_mapping, $zap_trace_span = null) { list($response) = $this->postNotificationRuleIDLabelsWithHttpInfo($rule_id, $label_mapping, $zap_trace_span); return $response; }
Operation postNotificationRuleIDLabels Add a label to a notification rule @param string $rule_id The notification rule 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
postNotificationRuleIDLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function postNotificationRuleIDLabelsWithHttpInfo($rule_id, $label_mapping, $zap_trace_span = null) { $request = $this->postNotificationRuleIDLabelsRequest($rule_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 postNotificationRuleIDLabelsWithHttpInfo Add a label to a notification rule @param string $rule_id The notification rule 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)
postNotificationRuleIDLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function postNotificationRuleIDLabelsRequest($rule_id, $label_mapping, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling postNotificationRuleIDLabels' ); } // 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 postNotificationRuleIDLabels' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}/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 ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_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 'postNotificationRuleIDLabels' @param string $rule_id The notification rule 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
postNotificationRuleIDLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function putNotificationRulesID($rule_id, $notification_rule, $zap_trace_span = null) { list($response) = $this->putNotificationRulesIDWithHttpInfo($rule_id, $notification_rule, $zap_trace_span); return $response; }
Operation putNotificationRulesID Update a notification rule @param string $rule_id The notification rule ID. (required) @param \InfluxDB2\Model\NotificationRule $notification_rule Notification rule 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\NotificationRule|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error
putNotificationRulesID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function putNotificationRulesIDWithHttpInfo($rule_id, $notification_rule, $zap_trace_span = null) { $request = $this->putNotificationRulesIDRequest($rule_id, $notification_rule, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\NotificationRule'; $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 putNotificationRulesIDWithHttpInfo Update a notification rule @param string $rule_id The notification rule ID. (required) @param \InfluxDB2\Model\NotificationRule $notification_rule Notification rule 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\NotificationRule|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
putNotificationRulesIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
protected function putNotificationRulesIDRequest($rule_id, $notification_rule, $zap_trace_span = null) { // verify the required parameter 'rule_id' is set if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $rule_id when calling putNotificationRulesID' ); } // verify the required parameter 'notification_rule' is set if ($notification_rule === null || (is_array($notification_rule) && count($notification_rule) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $notification_rule when calling putNotificationRulesID' ); } $resourcePath = '/api/v2/notificationRules/{ruleID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($rule_id !== null) { $resourcePath = str_replace( '{' . 'ruleID' . '}', ObjectSerializer::toPathValue($rule_id), $resourcePath ); } // body params $_tempBody = null; if (isset($notification_rule)) { $_tempBody = $notification_rule; } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], ['application/json'] ); } // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present if ($headers['Content-Type'] === 'application/json') { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); } else { $httpBody = $_tempBody; } } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('PUT', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'putNotificationRulesID' @param string $rule_id The notification rule ID. (required) @param \InfluxDB2\Model\NotificationRule $notification_rule Notification rule update to apply (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
putNotificationRulesIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/NotificationRulesService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/NotificationRulesService.php
MIT
public function deleteOrgsIDSecretsID($org_id, $secret_id, $zap_trace_span = null) { $this->deleteOrgsIDSecretsIDWithHttpInfo($org_id, $secret_id, $zap_trace_span); }
Operation deleteOrgsIDSecretsID Delete a secret from an organization @param string $org_id The organization ID. (required) @param string $secret_id The secret ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteOrgsIDSecretsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function deleteOrgsIDSecretsIDWithHttpInfo($org_id, $secret_id, $zap_trace_span = null) { $request = $this->deleteOrgsIDSecretsIDRequest($org_id, $secret_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteOrgsIDSecretsIDWithHttpInfo Delete a secret from an organization @param string $org_id The organization ID. (required) @param string $secret_id The secret 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)
deleteOrgsIDSecretsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
protected function deleteOrgsIDSecretsIDRequest($org_id, $secret_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 deleteOrgsIDSecretsID' ); } // verify the required parameter 'secret_id' is set if ($secret_id === null || (is_array($secret_id) && count($secret_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $secret_id when calling deleteOrgsIDSecretsID' ); } $resourcePath = '/api/v2/orgs/{orgID}/secrets/{secretID}'; $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 ); } // path params if ($secret_id !== null) { $resourcePath = str_replace( '{' . 'secretID' . '}', ObjectSerializer::toPathValue($secret_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 'deleteOrgsIDSecretsID' @param string $org_id The organization ID. (required) @param string $secret_id The secret ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteOrgsIDSecretsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function getOrgsIDSecrets($org_id, $zap_trace_span = null) { list($response) = $this->getOrgsIDSecretsWithHttpInfo($org_id, $zap_trace_span); return $response; }
Operation getOrgsIDSecrets List all secret keys for 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\SecretKeysResponse|\InfluxDB2\Model\Error
getOrgsIDSecrets
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function getOrgsIDSecretsWithHttpInfo($org_id, $zap_trace_span = null) { $request = $this->getOrgsIDSecretsRequest($org_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\SecretKeysResponse'; $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 getOrgsIDSecretsWithHttpInfo List all secret keys for 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\SecretKeysResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getOrgsIDSecretsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
protected function getOrgsIDSecretsRequest($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 getOrgsIDSecrets' ); } $resourcePath = '/api/v2/orgs/{orgID}/secrets'; $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 'getOrgsIDSecrets' @param string $org_id The organization ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getOrgsIDSecretsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function patchOrgsIDSecrets($org_id, $request_body, $zap_trace_span = null) { $this->patchOrgsIDSecretsWithHttpInfo($org_id, $request_body, $zap_trace_span); }
Operation patchOrgsIDSecrets Update secrets in an organization @param string $org_id The organization ID. (required) @param map[string,string] $request_body Secret key value pairs to update/add (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
patchOrgsIDSecrets
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function patchOrgsIDSecretsWithHttpInfo($org_id, $request_body, $zap_trace_span = null) { $request = $this->patchOrgsIDSecretsRequest($org_id, $request_body, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation patchOrgsIDSecretsWithHttpInfo Update secrets in an organization @param string $org_id The organization ID. (required) @param map[string,string] $request_body Secret key value pairs to update/add (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)
patchOrgsIDSecretsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
protected function patchOrgsIDSecretsRequest($org_id, $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 patchOrgsIDSecrets' ); } // verify the required parameter 'request_body' is set if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $request_body when calling patchOrgsIDSecrets' ); } $resourcePath = '/api/v2/orgs/{orgID}/secrets'; $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($request_body)) { $_tempBody = $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('PATCH', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'patchOrgsIDSecrets' @param string $org_id The organization ID. (required) @param map[string,string] $request_body Secret key value pairs to update/add (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
patchOrgsIDSecretsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function postOrgsIDSecrets($org_id, $secret_keys, $zap_trace_span = null) { $this->postOrgsIDSecretsWithHttpInfo($org_id, $secret_keys, $zap_trace_span); }
Operation postOrgsIDSecrets Delete secrets from an organization @param string $org_id The organization ID. (required) @param \InfluxDB2\Model\SecretKeys $secret_keys Secret key to delete (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
postOrgsIDSecrets
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function postOrgsIDSecretsWithHttpInfo($org_id, $secret_keys, $zap_trace_span = null) { $request = $this->postOrgsIDSecretsRequest($org_id, $secret_keys, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation postOrgsIDSecretsWithHttpInfo Delete secrets from an organization @param string $org_id The organization ID. (required) @param \InfluxDB2\Model\SecretKeys $secret_keys Secret key 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)
postOrgsIDSecretsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
protected function postOrgsIDSecretsRequest($org_id, $secret_keys, $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 postOrgsIDSecrets' ); } // verify the required parameter 'secret_keys' is set if ($secret_keys === null || (is_array($secret_keys) && count($secret_keys) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $secret_keys when calling postOrgsIDSecrets' ); } $resourcePath = '/api/v2/orgs/{orgID}/secrets/delete'; $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($secret_keys)) { $_tempBody = $secret_keys; } 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 'postOrgsIDSecrets' @param string $org_id The organization ID. (required) @param \InfluxDB2\Model\SecretKeys $secret_keys Secret key to delete (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
postOrgsIDSecretsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/SecretsService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecretsService.php
MIT
public function deleteTasksID($task_id, $zap_trace_span = null) { $this->deleteTasksIDWithHttpInfo($task_id, $zap_trace_span); }
Operation deleteTasksID Delete a task @param string $task_id The ID of the task to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteTasksID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDWithHttpInfo($task_id, $zap_trace_span = null) { $request = $this->deleteTasksIDRequest($task_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteTasksIDWithHttpInfo Delete a task @param string $task_id The ID of the task 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)
deleteTasksIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function deleteTasksIDRequest($task_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling deleteTasksID' ); } $resourcePath = '/api/v2/tasks/{taskID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'deleteTasksID' @param string $task_id The ID of the task to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteTasksIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDLabelsID($task_id, $label_id, $zap_trace_span = null) { $this->deleteTasksIDLabelsIDWithHttpInfo($task_id, $label_id, $zap_trace_span); }
Operation deleteTasksIDLabelsID Delete a label from a task @param string $task_id The ID of the task to delete the label from. (required) @param string $label_id The ID of the label to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteTasksIDLabelsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDLabelsIDWithHttpInfo($task_id, $label_id, $zap_trace_span = null) { $request = $this->deleteTasksIDLabelsIDRequest($task_id, $label_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteTasksIDLabelsIDWithHttpInfo Delete a label from a task @param string $task_id The ID of the task to delete the label from. (required) @param string $label_id The ID of the label 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)
deleteTasksIDLabelsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function deleteTasksIDLabelsIDRequest($task_id, $label_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling deleteTasksIDLabelsID' ); } // 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 deleteTasksIDLabelsID' ); } $resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'deleteTasksIDLabelsID' @param string $task_id The ID of the task to delete the label from. (required) @param string $label_id The ID of the label to delete. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteTasksIDLabelsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDMembersID($user_id, $task_id, $zap_trace_span = null) { $this->deleteTasksIDMembersIDWithHttpInfo($user_id, $task_id, $zap_trace_span); }
Operation deleteTasksIDMembersID Remove a member from a task @param string $user_id The ID of the member to remove. (required) @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteTasksIDMembersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDMembersIDWithHttpInfo($user_id, $task_id, $zap_trace_span = null) { $request = $this->deleteTasksIDMembersIDRequest($user_id, $task_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteTasksIDMembersIDWithHttpInfo Remove a member from a task @param string $user_id The ID of the member to remove. (required) @param string $task_id The task 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)
deleteTasksIDMembersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function deleteTasksIDMembersIDRequest($user_id, $task_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 deleteTasksIDMembersID' ); } // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling deleteTasksIDMembersID' ); } $resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'deleteTasksIDMembersID' @param string $user_id The ID of the member to remove. (required) @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteTasksIDMembersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDOwnersID($user_id, $task_id, $zap_trace_span = null) { $this->deleteTasksIDOwnersIDWithHttpInfo($user_id, $task_id, $zap_trace_span); }
Operation deleteTasksIDOwnersID Remove an owner from a task @param string $user_id The ID of the owner to remove. (required) @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteTasksIDOwnersID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDOwnersIDWithHttpInfo($user_id, $task_id, $zap_trace_span = null) { $request = $this->deleteTasksIDOwnersIDRequest($user_id, $task_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteTasksIDOwnersIDWithHttpInfo Remove an owner from a task @param string $user_id The ID of the owner to remove. (required) @param string $task_id The task 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)
deleteTasksIDOwnersIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function deleteTasksIDOwnersIDRequest($user_id, $task_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 deleteTasksIDOwnersID' ); } // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling deleteTasksIDOwnersID' ); } $resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'deleteTasksIDOwnersID' @param string $user_id The ID of the owner to remove. (required) @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteTasksIDOwnersIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDRunsID($task_id, $run_id, $zap_trace_span = null) { $this->deleteTasksIDRunsIDWithHttpInfo($task_id, $run_id, $zap_trace_span); }
Operation deleteTasksIDRunsID Cancel a running task @param string $task_id The ID of the task to cancel. (required) @param string $run_id The ID of the task run to cancel. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return void
deleteTasksIDRunsID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function deleteTasksIDRunsIDWithHttpInfo($task_id, $run_id, $zap_trace_span = null) { $request = $this->deleteTasksIDRunsIDRequest($task_id, $run_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); return [null, $response->getStatusCode(), $response->getHeaders()]; }
Operation deleteTasksIDRunsIDWithHttpInfo Cancel a running task @param string $task_id The ID of the task to cancel. (required) @param string $run_id The ID of the task run to cancel. (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)
deleteTasksIDRunsIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function deleteTasksIDRunsIDRequest($task_id, $run_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling deleteTasksIDRunsID' ); } // verify the required parameter 'run_id' is set if ($run_id === null || (is_array($run_id) && count($run_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $run_id when calling deleteTasksIDRunsID' ); } $resourcePath = '/api/v2/tasks/{taskID}/runs/{runID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_id), $resourcePath ); } // path params if ($run_id !== null) { $resourcePath = str_replace( '{' . 'runID' . '}', ObjectSerializer::toPathValue($run_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 'deleteTasksIDRunsID' @param string $task_id The ID of the task to cancel. (required) @param string $run_id The ID of the task run to cancel. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
deleteTasksIDRunsIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksWithHttpInfo($zap_trace_span = null, $name = null, $after = null, $user = null, $org = null, $org_id = null, $status = null, $limit = 100, $type = null) { $request = $this->getTasksRequest($zap_trace_span, $name, $after, $user, $org, $org_id, $status, $limit, $type); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Tasks'; $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 getTasksWithHttpInfo List tasks @param string $zap_trace_span OpenTracing span context (optional) @param string $name Task name. Only returns tasks with this name. Different tasks may have the same name. (optional) @param string $after Task ID. Only returns tasks created after this task. (optional) @param string $user User ID. Only returns tasks owned by this user. (optional) @param string $org Organization name. Only returns tasks owned by this organization. (optional) @param string $org_id Organization ID. Only returns tasks owned by this organization. (optional) @param string $status Task status (&#x60;active&#x60; or &#x60;inactive&#x60;). Only returns tasks with this status. (optional) @param int $limit Limits the number of tasks returned. The minimum is &#x60;1&#x60;, the maximum is &#x60;500&#x60;, and the default is &#x60;100&#x60;. (optional, default to 100) @param string $type Task type (&#x60;basic&#x60; or &#x60;system&#x60;). The default (&#x60;system&#x60;) response contains all the metadata properties for tasks. To reduce the payload size, pass &#x60;basic&#x60; to omit some task properties (&#x60;flux&#x60;, &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;) from the response. (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Tasks|object|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
getTasksWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function getTasksRequest($zap_trace_span = null, $name = null, $after = null, $user = null, $org = null, $org_id = null, $status = null, $limit = 100, $type = null) { if ($limit !== null && $limit > 500) { throw new \InvalidArgumentException('invalid value for "$limit" when calling TasksService.getTasks, must be smaller than or equal to 500.'); } if ($limit !== null && $limit < 1) { throw new \InvalidArgumentException('invalid value for "$limit" when calling TasksService.getTasks, must be bigger than or equal to 1.'); } $resourcePath = '/api/v2/tasks'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // query params if ($name !== null) { $queryParams['name'] = ObjectSerializer::toQueryValue($name); } // query params if ($after !== null) { $queryParams['after'] = ObjectSerializer::toQueryValue($after); } // query params if ($user !== null) { $queryParams['user'] = ObjectSerializer::toQueryValue($user); } // 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 ($status !== null) { $queryParams['status'] = ObjectSerializer::toQueryValue($status); } // query params if ($limit !== null) { $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } // query params if ($type !== null) { $queryParams['type'] = ObjectSerializer::toQueryValue($type); } // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], [] ); } // for model (json/xml) if (isset($_tempBody)) { // $_tempBody is the method argument, if present if ($headers['Content-Type'] === 'application/json') { $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); } else { $httpBody = $_tempBody; } } $headers = array_merge( $headerParams, $headers ); return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams); }
Create request for operation 'getTasks' @param string $zap_trace_span OpenTracing span context (optional) @param string $name Task name. Only returns tasks with this name. Different tasks may have the same name. (optional) @param string $after Task ID. Only returns tasks created after this task. (optional) @param string $user User ID. Only returns tasks owned by this user. (optional) @param string $org Organization name. Only returns tasks owned by this organization. (optional) @param string $org_id Organization ID. Only returns tasks owned by this organization. (optional) @param string $status Task status (&#x60;active&#x60; or &#x60;inactive&#x60;). Only returns tasks with this status. (optional) @param int $limit Limits the number of tasks returned. The minimum is &#x60;1&#x60;, the maximum is &#x60;500&#x60;, and the default is &#x60;100&#x60;. (optional, default to 100) @param string $type Task type (&#x60;basic&#x60; or &#x60;system&#x60;). The default (&#x60;system&#x60;) response contains all the metadata properties for tasks. To reduce the payload size, pass &#x60;basic&#x60; to omit some task properties (&#x60;flux&#x60;, &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;) from the response. (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getTasksRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksID($task_id, $zap_trace_span = null) { list($response) = $this->getTasksIDWithHttpInfo($task_id, $zap_trace_span); return $response; }
Operation getTasksID Retrieve a task @param string $task_id The ID of the task to retrieve. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Task|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string
getTasksID
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDWithHttpInfo($task_id, $zap_trace_span = null) { $request = $this->getTasksIDRequest($task_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Task'; $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 getTasksIDWithHttpInfo Retrieve a task @param string $task_id The ID of the task to retrieve. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return array of \InfluxDB2\Model\Task|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
getTasksIDWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function getTasksIDRequest($task_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling getTasksID' ); } $resourcePath = '/api/v2/tasks/{taskID}'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'getTasksID' @param string $task_id The ID of the task to retrieve. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getTasksIDRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDLabels($task_id, $zap_trace_span = null) { list($response) = $this->getTasksIDLabelsWithHttpInfo($task_id, $zap_trace_span); return $response; }
Operation getTasksIDLabels List labels for a task @param string $task_id The ID of the task to retrieve labels for. (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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string
getTasksIDLabels
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDLabelsWithHttpInfo($task_id, $zap_trace_span = null) { $request = $this->getTasksIDLabelsRequest($task_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 getTasksIDLabelsWithHttpInfo List labels for a task @param string $task_id The ID of the task to retrieve labels 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\LabelsResponse|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
getTasksIDLabelsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function getTasksIDLabelsRequest($task_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling getTasksIDLabels' ); } $resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'getTasksIDLabels' @param string $task_id The ID of the task to retrieve labels for. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getTasksIDLabelsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDLogs($task_id, $zap_trace_span = null) { list($response) = $this->getTasksIDLogsWithHttpInfo($task_id, $zap_trace_span); return $response; }
Operation getTasksIDLogs Retrieve all logs for a task @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InfluxDB2\ApiException on non-2xx response @throws \InvalidArgumentException @return \InfluxDB2\Model\Logs|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string
getTasksIDLogs
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDLogsWithHttpInfo($task_id, $zap_trace_span = null) { $request = $this->getTasksIDLogsRequest($task_id, $zap_trace_span); $response = $this->defaultApi->sendRequest($request); $returnType = '\InfluxDB2\Model\Logs'; $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 getTasksIDLogsWithHttpInfo Retrieve all logs for a task @param string $task_id The task 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\Logs|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings)
getTasksIDLogsWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function getTasksIDLogsRequest($task_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling getTasksIDLogs' ); } $resourcePath = '/api/v2/tasks/{taskID}/logs'; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; // header params if ($zap_trace_span !== null) { $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span); } // path params if ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'getTasksIDLogs' @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getTasksIDLogsRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDMembers($task_id, $zap_trace_span = null) { list($response) = $this->getTasksIDMembersWithHttpInfo($task_id, $zap_trace_span); return $response; }
Operation getTasksIDMembers List all task members @param string $task_id The task 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
getTasksIDMembers
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDMembersWithHttpInfo($task_id, $zap_trace_span = null) { $request = $this->getTasksIDMembersRequest($task_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 getTasksIDMembersWithHttpInfo List all task members @param string $task_id The task 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)
getTasksIDMembersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
protected function getTasksIDMembersRequest($task_id, $zap_trace_span = null) { // verify the required parameter 'task_id' is set if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $task_id when calling getTasksIDMembers' ); } $resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) { $resourcePath = str_replace( '{' . 'taskID' . '}', ObjectSerializer::toPathValue($task_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 'getTasksIDMembers' @param string $task_id The task ID. (required) @param string $zap_trace_span OpenTracing span context (optional) @throws \InvalidArgumentException @return \Psr\Http\Message\RequestInterface
getTasksIDMembersRequest
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDOwners($task_id, $zap_trace_span = null) { list($response) = $this->getTasksIDOwnersWithHttpInfo($task_id, $zap_trace_span); return $response; }
Operation getTasksIDOwners List all owners of a task @param string $task_id The ID of the task to retrieve 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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error
getTasksIDOwners
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT
public function getTasksIDOwnersWithHttpInfo($task_id, $zap_trace_span = null) { $request = $this->getTasksIDOwnersRequest($task_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 getTasksIDOwnersWithHttpInfo List all owners of a task @param string $task_id The ID of the task to retrieve 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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings)
getTasksIDOwnersWithHttpInfo
php
influxdata/influxdb-client-php
src/InfluxDB2/Service/TasksService.php
https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php
MIT