code
stringlengths 17
296k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
protected function postScriptsRequest($script_create_request)
{
// verify the required parameter 'script_create_request' is set
if ($script_create_request === null || (is_array($script_create_request) && count($script_create_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $script_create_request when calling postScripts'
);
}
$resourcePath = '/api/v2/scripts';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// body params
$_tempBody = null;
if (isset($script_create_request)) {
$_tempBody = $script_create_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postScripts'
@param \InfluxDB2\Model\ScriptCreateRequest $script_create_request The script to create. (required)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postScriptsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/InvokableScriptsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php | MIT |
public function postScriptsIDInvoke($script_id, $script_invocation_params = null)
{
list($response) = $this->postScriptsIDInvokeWithHttpInfo($script_id, $script_invocation_params);
return $response;
} | Operation postScriptsIDInvoke
Invoke a script
@param string $script_id Script ID. Only returns scripts with this ID. (required)
@param \InfluxDB2\Model\ScriptInvocationParams $script_invocation_params script_invocation_params (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \SplFileObject|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postScriptsIDInvoke | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/InvokableScriptsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php | MIT |
public function postScriptsIDInvokeWithHttpInfo($script_id, $script_invocation_params = null)
{
$request = $this->postScriptsIDInvokeRequest($script_id, $script_invocation_params);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\SplFileObject';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postScriptsIDInvokeWithHttpInfo
Invoke a script
@param string $script_id Script ID. Only returns scripts with this ID. (required)
@param \InfluxDB2\Model\ScriptInvocationParams $script_invocation_params (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \SplFileObject|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postScriptsIDInvokeWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/InvokableScriptsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php | MIT |
protected function postScriptsIDInvokeRequest($script_id, $script_invocation_params = null)
{
// verify the required parameter 'script_id' is set
if ($script_id === null || (is_array($script_id) && count($script_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $script_id when calling postScriptsIDInvoke'
);
}
$resourcePath = '/api/v2/scripts/{scriptID}/invoke';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($script_id !== null) {
$resourcePath = str_replace(
'{' . 'scriptID' . '}',
ObjectSerializer::toPathValue($script_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($script_invocation_params)) {
$_tempBody = $script_invocation_params;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['text/csv', 'application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['text/csv', '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 'postScriptsIDInvoke'
@param string $script_id Script ID. Only returns scripts with this ID. (required)
@param \InfluxDB2\Model\ScriptInvocationParams $script_invocation_params (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postScriptsIDInvokeRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/InvokableScriptsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/InvokableScriptsService.php | MIT |
public function deleteBucketsID($bucket_id, $zap_trace_span = null)
{
$this->deleteBucketsIDWithHttpInfo($bucket_id, $zap_trace_span);
} | Operation deleteBucketsID
Delete a bucket
@param string $bucket_id Bucket ID. The ID of the bucket to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteBucketsID | 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 deleteBucketsIDWithHttpInfo($bucket_id, $zap_trace_span = null)
{
$request = $this->deleteBucketsIDRequest($bucket_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteBucketsIDWithHttpInfo
Delete a bucket
@param string $bucket_id Bucket ID. The ID of the bucket 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) | deleteBucketsIDWithHttpInfo | 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 deleteBucketsIDRequest($bucket_id, $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 deleteBucketsID'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}';
$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 ($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 'deleteBucketsID'
@param string $bucket_id Bucket ID. The ID of the bucket to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteBucketsIDRequest | 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 deleteBucketsIDLabelsID($bucket_id, $label_id, $zap_trace_span = null)
{
$this->deleteBucketsIDLabelsIDWithHttpInfo($bucket_id, $label_id, $zap_trace_span);
} | Operation deleteBucketsIDLabelsID
Delete a label from a bucket
@param string $bucket_id The bucket 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 | deleteBucketsIDLabelsID | 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 deleteBucketsIDLabelsIDWithHttpInfo($bucket_id, $label_id, $zap_trace_span = null)
{
$request = $this->deleteBucketsIDLabelsIDRequest($bucket_id, $label_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteBucketsIDLabelsIDWithHttpInfo
Delete a label from a bucket
@param string $bucket_id The bucket 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) | deleteBucketsIDLabelsIDWithHttpInfo | 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 deleteBucketsIDLabelsIDRequest($bucket_id, $label_id, $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 deleteBucketsIDLabelsID'
);
}
// 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 deleteBucketsIDLabelsID'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) {
$resourcePath = str_replace(
'{' . 'bucketID' . '}',
ObjectSerializer::toPathValue($bucket_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 'deleteBucketsIDLabelsID'
@param string $bucket_id The bucket 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 | deleteBucketsIDLabelsIDRequest | 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 deleteBucketsIDMembersID($user_id, $bucket_id, $zap_trace_span = null)
{
$this->deleteBucketsIDMembersIDWithHttpInfo($user_id, $bucket_id, $zap_trace_span);
} | Operation deleteBucketsIDMembersID
Remove a member from a bucket
@param string $user_id The ID of the user to remove. (required)
@param string $bucket_id The ID of the bucket to remove a user from. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteBucketsIDMembersID | 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 deleteBucketsIDMembersIDWithHttpInfo($user_id, $bucket_id, $zap_trace_span = null)
{
$request = $this->deleteBucketsIDMembersIDRequest($user_id, $bucket_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteBucketsIDMembersIDWithHttpInfo
Remove a member from a bucket
@param string $user_id The ID of the user to remove. (required)
@param string $bucket_id The ID of the bucket to remove a user from. (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) | deleteBucketsIDMembersIDWithHttpInfo | 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 deleteBucketsIDMembersIDRequest($user_id, $bucket_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 deleteBucketsIDMembersID'
);
}
// 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 deleteBucketsIDMembersID'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) {
$resourcePath = str_replace(
'{' . 'bucketID' . '}',
ObjectSerializer::toPathValue($bucket_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 'deleteBucketsIDMembersID'
@param string $user_id The ID of the user to remove. (required)
@param string $bucket_id The ID of the bucket to remove a user from. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteBucketsIDMembersIDRequest | 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 deleteBucketsIDOwnersID($user_id, $bucket_id, $zap_trace_span = null)
{
$this->deleteBucketsIDOwnersIDWithHttpInfo($user_id, $bucket_id, $zap_trace_span);
} | Operation deleteBucketsIDOwnersID
Remove an owner from a bucket
@param string $user_id The ID of the owner to remove. (required)
@param string $bucket_id The bucket ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteBucketsIDOwnersID | 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 deleteBucketsIDOwnersIDWithHttpInfo($user_id, $bucket_id, $zap_trace_span = null)
{
$request = $this->deleteBucketsIDOwnersIDRequest($user_id, $bucket_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteBucketsIDOwnersIDWithHttpInfo
Remove an owner from a bucket
@param string $user_id The ID of the owner to remove. (required)
@param string $bucket_id The bucket 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) | deleteBucketsIDOwnersIDWithHttpInfo | 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 deleteBucketsIDOwnersIDRequest($user_id, $bucket_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 deleteBucketsIDOwnersID'
);
}
// 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 deleteBucketsIDOwnersID'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) {
$resourcePath = str_replace(
'{' . 'bucketID' . '}',
ObjectSerializer::toPathValue($bucket_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 'deleteBucketsIDOwnersID'
@param string $user_id The ID of the owner to remove. (required)
@param string $bucket_id The bucket ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteBucketsIDOwnersIDRequest | 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 getBuckets($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $org = null, $org_id = null, $name = null, $id = null)
{
list($response) = $this->getBucketsWithHttpInfo($zap_trace_span, $offset, $limit, $after, $org, $org_id, $name, $id);
return $response;
} | Operation getBuckets
List buckets
@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 $org Organization name. The name of the organization. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Creates a bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Accepts either `org` or `orgID`. - InfluxDB creates the bucket within this organization. (optional)
@param string $org_id Organization ID. The organization ID. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Creates a bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Accepts either `org` or `orgID`. - InfluxDB creates the bucket within this organization. (optional)
@param string $name Bucket name. Only returns buckets with this specific name. (optional)
@param string $id Bucket ID. Only returns the bucket with this ID. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Buckets|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getBuckets | 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 getBucketsWithHttpInfo($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $org = null, $org_id = null, $name = null, $id = null)
{
$request = $this->getBucketsRequest($zap_trace_span, $offset, $limit, $after, $org, $org_id, $name, $id);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Buckets';
$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 getBucketsWithHttpInfo
List buckets
@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 $org Organization name. The name of the organization. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Creates a bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Accepts either `org` or `orgID`. - InfluxDB creates the bucket within this organization. (optional)
@param string $org_id Organization ID. The organization ID. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Creates a bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Accepts either `org` or `orgID`. - InfluxDB creates the bucket within this organization. (optional)
@param string $name Bucket name. Only returns buckets with this specific name. (optional)
@param string $id Bucket ID. Only returns the bucket with this ID. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Buckets|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getBucketsWithHttpInfo | 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 getBucketsRequest($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $org = null, $org_id = null, $name = null, $id = null)
{
if ($offset !== null && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling BucketsService.getBuckets, must be bigger than or equal to 0.');
}
if ($limit !== null && $limit > 100) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling BucketsService.getBuckets, must be smaller than or equal to 100.');
}
if ($limit !== null && $limit < 1) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling BucketsService.getBuckets, must be bigger than or equal to 1.');
}
$resourcePath = '/api/v2/buckets';
$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 ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($name !== null) {
$queryParams['name'] = ObjectSerializer::toQueryValue($name);
}
// query params
if ($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 'getBuckets'
@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 $org Organization name. The name of the organization. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Creates a bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Accepts either `org` or `orgID`. - InfluxDB creates the bucket within this organization. (optional)
@param string $org_id Organization ID. The organization ID. #### InfluxDB Cloud - Doesn't use `org` or `orgID`. - Creates a bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Accepts either `org` or `orgID`. - InfluxDB creates the bucket within this organization. (optional)
@param string $name Bucket name. Only returns buckets with this specific name. (optional)
@param string $id Bucket ID. Only returns the bucket with this ID. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBucketsRequest | 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 getBucketsID($bucket_id, $zap_trace_span = null)
{
list($response) = $this->getBucketsIDWithHttpInfo($bucket_id, $zap_trace_span);
return $response;
} | Operation getBucketsID
Retrieve a bucket
@param string $bucket_id The ID of the bucket to retrieve. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Bucket|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getBucketsID | 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 getBucketsIDWithHttpInfo($bucket_id, $zap_trace_span = null)
{
$request = $this->getBucketsIDRequest($bucket_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Bucket';
$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 getBucketsIDWithHttpInfo
Retrieve a bucket
@param string $bucket_id The ID of the bucket 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\Bucket|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getBucketsIDWithHttpInfo | 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 getBucketsIDRequest($bucket_id, $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 getBucketsID'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}';
$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 ($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 'getBucketsID'
@param string $bucket_id The ID of the bucket to retrieve. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBucketsIDRequest | 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 getBucketsIDLabels($bucket_id, $zap_trace_span = null)
{
list($response) = $this->getBucketsIDLabelsWithHttpInfo($bucket_id, $zap_trace_span);
return $response;
} | Operation getBucketsIDLabels
List all labels for a bucket
@param string $bucket_id The ID of the bucket 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|\InfluxDB2\Model\Error | getBucketsIDLabels | 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 getBucketsIDLabelsWithHttpInfo($bucket_id, $zap_trace_span = null)
{
$request = $this->getBucketsIDLabelsRequest($bucket_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 getBucketsIDLabelsWithHttpInfo
List all labels for a bucket
@param string $bucket_id The ID of the bucket 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|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getBucketsIDLabelsWithHttpInfo | 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 getBucketsIDLabelsRequest($bucket_id, $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 getBucketsIDLabels'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) {
$resourcePath = str_replace(
'{' . 'bucketID' . '}',
ObjectSerializer::toPathValue($bucket_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 'getBucketsIDLabels'
@param string $bucket_id The ID of the bucket to retrieve labels for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBucketsIDLabelsRequest | 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 getBucketsIDMembers($bucket_id, $zap_trace_span = null)
{
list($response) = $this->getBucketsIDMembersWithHttpInfo($bucket_id, $zap_trace_span);
return $response;
} | Operation getBucketsIDMembers
List all users with member privileges for a bucket
@param string $bucket_id The ID of the bucket to retrieve users for. (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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getBucketsIDMembers | 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 getBucketsIDMembersWithHttpInfo($bucket_id, $zap_trace_span = null)
{
$request = $this->getBucketsIDMembersRequest($bucket_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 getBucketsIDMembersWithHttpInfo
List all users with member privileges for a bucket
@param string $bucket_id The ID of the bucket to retrieve users 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\ResourceMembers|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getBucketsIDMembersWithHttpInfo | 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 getBucketsIDMembersRequest($bucket_id, $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 getBucketsIDMembers'
);
}
$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 ($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 'getBucketsIDMembers'
@param string $bucket_id The ID of the bucket to retrieve users for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBucketsIDMembersRequest | 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 getBucketsIDOwners($bucket_id, $zap_trace_span = null)
{
list($response) = $this->getBucketsIDOwnersWithHttpInfo($bucket_id, $zap_trace_span);
return $response;
} | Operation getBucketsIDOwners
List all owners of a bucket
@param string $bucket_id The bucket ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\ResourceOwners|\InfluxDB2\Model\Error | getBucketsIDOwners | 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 getBucketsIDOwnersWithHttpInfo($bucket_id, $zap_trace_span = null)
{
$request = $this->getBucketsIDOwnersRequest($bucket_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 getBucketsIDOwnersWithHttpInfo
List all owners of a bucket
@param string $bucket_id The bucket ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\ResourceOwners|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getBucketsIDOwnersWithHttpInfo | 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 getBucketsIDOwnersRequest($bucket_id, $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 getBucketsIDOwners'
);
}
$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 ($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 'getBucketsIDOwners'
@param string $bucket_id The bucket ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getBucketsIDOwnersRequest | 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 getSourcesIDBuckets($source_id, $zap_trace_span = null, $org = null)
{
list($response) = $this->getSourcesIDBucketsWithHttpInfo($source_id, $zap_trace_span, $org);
return $response;
} | Operation getSourcesIDBuckets
Get buckets in a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Buckets|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getSourcesIDBuckets | 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 getSourcesIDBucketsWithHttpInfo($source_id, $zap_trace_span = null, $org = null)
{
$request = $this->getSourcesIDBucketsRequest($source_id, $zap_trace_span, $org);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Buckets';
$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 getSourcesIDBucketsWithHttpInfo
Get buckets in a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Buckets|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getSourcesIDBucketsWithHttpInfo | 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 getSourcesIDBucketsRequest($source_id, $zap_trace_span = null, $org = null)
{
// verify the required parameter 'source_id' is set
if ($source_id === null || (is_array($source_id) && count($source_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $source_id when calling getSourcesIDBuckets'
);
}
$resourcePath = '/api/v2/sources/{sourceID}/buckets';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($source_id !== null) {
$resourcePath = str_replace(
'{' . 'sourceID' . '}',
ObjectSerializer::toPathValue($source_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 'getSourcesIDBuckets'
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getSourcesIDBucketsRequest | 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 patchBucketsID($bucket_id, $patch_bucket_request, $zap_trace_span = null)
{
list($response) = $this->patchBucketsIDWithHttpInfo($bucket_id, $patch_bucket_request, $zap_trace_span);
return $response;
} | Operation patchBucketsID
Update a bucket
@param string $bucket_id The bucket ID. (required)
@param \InfluxDB2\Model\PatchBucketRequest $patch_bucket_request The bucket 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\Bucket|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | patchBucketsID | 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 patchBucketsIDWithHttpInfo($bucket_id, $patch_bucket_request, $zap_trace_span = null)
{
$request = $this->patchBucketsIDRequest($bucket_id, $patch_bucket_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Bucket';
$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 patchBucketsIDWithHttpInfo
Update a bucket
@param string $bucket_id The bucket ID. (required)
@param \InfluxDB2\Model\PatchBucketRequest $patch_bucket_request The bucket 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\Bucket|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | patchBucketsIDWithHttpInfo | 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 patchBucketsIDRequest($bucket_id, $patch_bucket_request, $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 patchBucketsID'
);
}
// verify the required parameter 'patch_bucket_request' is set
if ($patch_bucket_request === null || (is_array($patch_bucket_request) && count($patch_bucket_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $patch_bucket_request when calling patchBucketsID'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}';
$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($patch_bucket_request)) {
$_tempBody = $patch_bucket_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PATCH', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'patchBucketsID'
@param string $bucket_id The bucket ID. (required)
@param \InfluxDB2\Model\PatchBucketRequest $patch_bucket_request The bucket update to apply. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchBucketsIDRequest | 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 postBuckets($post_bucket_request, $zap_trace_span = null)
{
list($response) = $this->postBucketsWithHttpInfo($post_bucket_request, $zap_trace_span);
return $response;
} | Operation postBuckets
Create a bucket
@param \InfluxDB2\Model\PostBucketRequest $post_bucket_request Bucket to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Bucket|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postBuckets | 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 postBucketsWithHttpInfo($post_bucket_request, $zap_trace_span = null)
{
$request = $this->postBucketsRequest($post_bucket_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Bucket';
$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 postBucketsWithHttpInfo
Create a bucket
@param \InfluxDB2\Model\PostBucketRequest $post_bucket_request Bucket 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\Bucket|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postBucketsWithHttpInfo | 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 postBucketsRequest($post_bucket_request, $zap_trace_span = null)
{
// verify the required parameter 'post_bucket_request' is set
if ($post_bucket_request === null || (is_array($post_bucket_request) && count($post_bucket_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $post_bucket_request when calling postBuckets'
);
}
$resourcePath = '/api/v2/buckets';
$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_bucket_request)) {
$_tempBody = $post_bucket_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postBuckets'
@param \InfluxDB2\Model\PostBucketRequest $post_bucket_request Bucket to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postBucketsRequest | 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 postBucketsIDLabels($bucket_id, $label_mapping, $zap_trace_span = null)
{
list($response) = $this->postBucketsIDLabelsWithHttpInfo($bucket_id, $label_mapping, $zap_trace_span);
return $response;
} | Operation postBucketsIDLabels
Add a label to a bucket
@param string $bucket_id Bucket ID. The ID of the bucket to label. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping An object that contains a _`labelID`_ to add to the bucket. (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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postBucketsIDLabels | 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 postBucketsIDLabelsWithHttpInfo($bucket_id, $label_mapping, $zap_trace_span = null)
{
$request = $this->postBucketsIDLabelsRequest($bucket_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 postBucketsIDLabelsWithHttpInfo
Add a label to a bucket
@param string $bucket_id Bucket ID. The ID of the bucket to label. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping An object that contains a _`labelID`_ to add to the bucket. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\LabelResponse|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postBucketsIDLabelsWithHttpInfo | 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 postBucketsIDLabelsRequest($bucket_id, $label_mapping, $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 postBucketsIDLabels'
);
}
// 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 postBucketsIDLabels'
);
}
$resourcePath = '/api/v2/buckets/{bucketID}/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 ($bucket_id !== null) {
$resourcePath = str_replace(
'{' . 'bucketID' . '}',
ObjectSerializer::toPathValue($bucket_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 'postBucketsIDLabels'
@param string $bucket_id Bucket ID. The ID of the bucket to label. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping An object that contains a _`labelID`_ to add to the bucket. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postBucketsIDLabelsRequest | 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 postBucketsIDMembers($bucket_id, $add_resource_member_request_body, $zap_trace_span = null)
{
list($response) = $this->postBucketsIDMembersWithHttpInfo($bucket_id, $add_resource_member_request_body, $zap_trace_span);
return $response;
} | Operation postBucketsIDMembers
Add a member to a bucket
@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 \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postBucketsIDMembers | 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 postBucketsIDMembersWithHttpInfo($bucket_id, $add_resource_member_request_body, $zap_trace_span = null)
{
$request = $this->postBucketsIDMembersRequest($bucket_id, $add_resource_member_request_body, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\ResourceMember';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postBucketsIDMembersWithHttpInfo
Add a member to a bucket
@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 \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postBucketsIDMembersWithHttpInfo | 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 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 `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 \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 `20`. (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 "would match" 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 `20`. (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 "would match" 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 `20`. (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 "would match" 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 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.