code
stringlengths 17
247k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
protected function getTasksIDOwnersRequest($task_id, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling getTasksIDOwners'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getTasksIDOwners'
@param string $task_id The ID of the task to retrieve owners for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTasksIDOwnersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function getTasksIDRuns($task_id, $zap_trace_span = null, $after = null, $limit = 100, $after_time = null, $before_time = null)
{
list($response) = $this->getTasksIDRunsWithHttpInfo($task_id, $zap_trace_span, $after, $limit, $after_time, $before_time);
return $response;
} | Operation getTasksIDRuns
List runs for a task
@param string $task_id The ID of the task to get runs for. Only returns runs for this task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $after A task run ID. Only returns runs created after this run. (optional)
@param int $limit Limits the number of task runs returned. Default is `100`. (optional, default to 100)
@param \DateTime $after_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. (optional)
@param \DateTime $before_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Runs|object|\InfluxDB2\Model\Error|string | getTasksIDRuns | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function getTasksIDRunsWithHttpInfo($task_id, $zap_trace_span = null, $after = null, $limit = 100, $after_time = null, $before_time = null)
{
$request = $this->getTasksIDRunsRequest($task_id, $zap_trace_span, $after, $limit, $after_time, $before_time);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Runs';
$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 getTasksIDRunsWithHttpInfo
List runs for a task
@param string $task_id The ID of the task to get runs for. Only returns runs for this task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $after A task run ID. Only returns runs created after this run. (optional)
@param int $limit Limits the number of task runs returned. Default is `100`. (optional, default to 100)
@param \DateTime $after_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. (optional)
@param \DateTime $before_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Runs|object|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getTasksIDRunsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function getTasksIDRunsRequest($task_id, $zap_trace_span = null, $after = null, $limit = 100, $after_time = null, $before_time = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling getTasksIDRuns'
);
}
if ($limit !== null && $limit > 500) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling TasksService.getTasksIDRuns, must be smaller than or equal to 500.');
}
if ($limit !== null && $limit < 1) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling TasksService.getTasksIDRuns, must be bigger than or equal to 1.');
}
$resourcePath = '/api/v2/tasks/{taskID}/runs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($after !== null) {
$queryParams['after'] = ObjectSerializer::toQueryValue($after);
}
// query params
if ($limit !== null) {
$queryParams['limit'] = ObjectSerializer::toQueryValue($limit);
}
// query params
if ($after_time !== null) {
$queryParams['afterTime'] = ObjectSerializer::toQueryValue($after_time);
}
// query params
if ($before_time !== null) {
$queryParams['beforeTime'] = ObjectSerializer::toQueryValue($before_time);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getTasksIDRuns'
@param string $task_id The ID of the task to get runs for. Only returns runs for this task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $after A task run ID. Only returns runs created after this run. (optional)
@param int $limit Limits the number of task runs returned. Default is `100`. (optional, default to 100)
@param \DateTime $after_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. (optional)
@param \DateTime $before_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/v2.3/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTasksIDRunsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function getTasksIDRunsID($task_id, $run_id, $zap_trace_span = null)
{
list($response) = $this->getTasksIDRunsIDWithHttpInfo($task_id, $run_id, $zap_trace_span);
return $response;
} | Operation getTasksIDRunsID
Retrieve a run for a task.
@param string $task_id The ID of the task to retrieve runs for. (required)
@param string $run_id The ID of the run to retrieve. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Run|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | getTasksIDRunsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function getTasksIDRunsIDWithHttpInfo($task_id, $run_id, $zap_trace_span = null)
{
$request = $this->getTasksIDRunsIDRequest($task_id, $run_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Run';
$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 getTasksIDRunsIDWithHttpInfo
Retrieve a run for a task.
@param string $task_id The ID of the task to retrieve runs for. (required)
@param string $run_id The ID of the run 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\Run|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getTasksIDRunsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function getTasksIDRunsIDRequest($task_id, $run_id, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling getTasksIDRunsID'
);
}
// verify the required parameter 'run_id' is set
if ($run_id === null || (is_array($run_id) && count($run_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $run_id when calling getTasksIDRunsID'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/runs/{runID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// path params
if ($run_id !== null) {
$resourcePath = str_replace(
'{' . 'runID' . '}',
ObjectSerializer::toPathValue($run_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getTasksIDRunsID'
@param string $task_id The ID of the task to retrieve runs for. (required)
@param string $run_id The ID of the run to retrieve. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTasksIDRunsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function getTasksIDRunsIDLogs($task_id, $run_id, $zap_trace_span = null)
{
list($response) = $this->getTasksIDRunsIDLogsWithHttpInfo($task_id, $run_id, $zap_trace_span);
return $response;
} | Operation getTasksIDRunsIDLogs
Retrieve all logs for a run
@param string $task_id The ID of the task to get logs for. (required)
@param string $run_id The ID of the run to get logs for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Logs|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | getTasksIDRunsIDLogs | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function getTasksIDRunsIDLogsWithHttpInfo($task_id, $run_id, $zap_trace_span = null)
{
$request = $this->getTasksIDRunsIDLogsRequest($task_id, $run_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Logs';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getTasksIDRunsIDLogsWithHttpInfo
Retrieve all logs for a run
@param string $task_id The ID of the task to get logs for. (required)
@param string $run_id The ID of the run to get logs 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\Logs|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getTasksIDRunsIDLogsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function getTasksIDRunsIDLogsRequest($task_id, $run_id, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling getTasksIDRunsIDLogs'
);
}
// verify the required parameter 'run_id' is set
if ($run_id === null || (is_array($run_id) && count($run_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $run_id when calling getTasksIDRunsIDLogs'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/runs/{runID}/logs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// path params
if ($run_id !== null) {
$resourcePath = str_replace(
'{' . 'runID' . '}',
ObjectSerializer::toPathValue($run_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getTasksIDRunsIDLogs'
@param string $task_id The ID of the task to get logs for. (required)
@param string $run_id The ID of the run to get logs for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getTasksIDRunsIDLogsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function patchTasksID($task_id, $task_update_request, $zap_trace_span = null)
{
list($response) = $this->patchTasksIDWithHttpInfo($task_id, $task_update_request, $zap_trace_span);
return $response;
} | Operation patchTasksID
Update a task
@param string $task_id The ID of the task to update. (required)
@param \InfluxDB2\Model\TaskUpdateRequest $task_update_request An object that contains updated task properties to apply. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Task|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | patchTasksID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function patchTasksIDWithHttpInfo($task_id, $task_update_request, $zap_trace_span = null)
{
$request = $this->patchTasksIDRequest($task_id, $task_update_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Task';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation patchTasksIDWithHttpInfo
Update a task
@param string $task_id The ID of the task to update. (required)
@param \InfluxDB2\Model\TaskUpdateRequest $task_update_request An object that contains updated task properties 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\Task|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | patchTasksIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function patchTasksIDRequest($task_id, $task_update_request, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling patchTasksID'
);
}
// verify the required parameter 'task_update_request' is set
if ($task_update_request === null || (is_array($task_update_request) && count($task_update_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_update_request when calling patchTasksID'
);
}
$resourcePath = '/api/v2/tasks/{taskID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($task_update_request)) {
$_tempBody = $task_update_request;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PATCH', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'patchTasksID'
@param string $task_id The ID of the task to update. (required)
@param \InfluxDB2\Model\TaskUpdateRequest $task_update_request An object that contains updated task properties to apply. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchTasksIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasks($task_create_request, $zap_trace_span = null)
{
list($response) = $this->postTasksWithHttpInfo($task_create_request, $zap_trace_span);
return $response;
} | Operation postTasks
Create a task
@param \InfluxDB2\Model\TaskCreateRequest $task_create_request The task to create. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Task|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postTasks | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksWithHttpInfo($task_create_request, $zap_trace_span = null)
{
$request = $this->postTasksRequest($task_create_request, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Task';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation postTasksWithHttpInfo
Create a task
@param \InfluxDB2\Model\TaskCreateRequest $task_create_request The task 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\Task|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postTasksWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function postTasksRequest($task_create_request, $zap_trace_span = null)
{
// verify the required parameter 'task_create_request' is set
if ($task_create_request === null || (is_array($task_create_request) && count($task_create_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_create_request when calling postTasks'
);
}
$resourcePath = '/api/v2/tasks';
$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($task_create_request)) {
$_tempBody = $task_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 'postTasks'
@param \InfluxDB2\Model\TaskCreateRequest $task_create_request The task to create. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTasksRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDLabels($task_id, $label_mapping, $zap_trace_span = null)
{
list($response) = $this->postTasksIDLabelsWithHttpInfo($task_id, $label_mapping, $zap_trace_span);
return $response;
} | Operation postTasksIDLabels
Add a label to a task
@param string $task_id The ID of the task to label. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping An object that contains a _`labelID`_ to add to the task. (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|string | postTasksIDLabels | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDLabelsWithHttpInfo($task_id, $label_mapping, $zap_trace_span = null)
{
$request = $this->postTasksIDLabelsRequest($task_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 postTasksIDLabelsWithHttpInfo
Add a label to a task
@param string $task_id The ID of the task to label. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping An object that contains a _`labelID`_ to add to the task. (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|string, HTTP status code, HTTP response headers (array of strings) | postTasksIDLabelsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function postTasksIDLabelsRequest($task_id, $label_mapping, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling postTasksIDLabels'
);
}
// 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 postTasksIDLabels'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/labels';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (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 'postTasksIDLabels'
@param string $task_id The ID of the task to label. (required)
@param \InfluxDB2\Model\LabelMapping $label_mapping An object that contains a _`labelID`_ to add to the task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTasksIDLabelsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDMembers($task_id, $add_resource_member_request_body, $zap_trace_span = null)
{
list($response) = $this->postTasksIDMembersWithHttpInfo($task_id, $add_resource_member_request_body, $zap_trace_span);
return $response;
} | Operation postTasksIDMembers
Add a member to a task
@param string $task_id The task ID. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as a member of the task. (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 | postTasksIDMembers | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDMembersWithHttpInfo($task_id, $add_resource_member_request_body, $zap_trace_span = null)
{
$request = $this->postTasksIDMembersRequest($task_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 postTasksIDMembersWithHttpInfo
Add a member to a task
@param string $task_id The task ID. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as a member of the task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\ResourceMember|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postTasksIDMembersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function postTasksIDMembersRequest($task_id, $add_resource_member_request_body, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling postTasksIDMembers'
);
}
// 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 postTasksIDMembers'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/members';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (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 'postTasksIDMembers'
@param string $task_id The task ID. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as a member of the task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTasksIDMembersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDOwners($task_id, $add_resource_member_request_body, $zap_trace_span = null)
{
list($response) = $this->postTasksIDOwnersWithHttpInfo($task_id, $add_resource_member_request_body, $zap_trace_span);
return $response;
} | Operation postTasksIDOwners
Add an owner for a task
@param string $task_id The task ID. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as an owner of the task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\ResourceOwner|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postTasksIDOwners | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDOwnersWithHttpInfo($task_id, $add_resource_member_request_body, $zap_trace_span = null)
{
$request = $this->postTasksIDOwnersRequest($task_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 postTasksIDOwnersWithHttpInfo
Add an owner for a task
@param string $task_id The task ID. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as an owner of the task. (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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postTasksIDOwnersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function postTasksIDOwnersRequest($task_id, $add_resource_member_request_body, $zap_trace_span = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling postTasksIDOwners'
);
}
// 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 postTasksIDOwners'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/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 ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_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 'postTasksIDOwners'
@param string $task_id The task ID. (required)
@param \InfluxDB2\Model\AddResourceMemberRequestBody $add_resource_member_request_body A user to add as an owner of the task. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTasksIDOwnersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDRuns($task_id, $zap_trace_span = null, $run_manually = null)
{
list($response) = $this->postTasksIDRunsWithHttpInfo($task_id, $zap_trace_span, $run_manually);
return $response;
} | Operation postTasksIDRuns
Start a task run, overriding the schedule
@param string $task_id task_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param \InfluxDB2\Model\RunManually $run_manually run_manually (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Run|object|\InfluxDB2\Model\Error|string | postTasksIDRuns | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDRunsWithHttpInfo($task_id, $zap_trace_span = null, $run_manually = null)
{
$request = $this->postTasksIDRunsRequest($task_id, $zap_trace_span, $run_manually);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Run';
$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 postTasksIDRunsWithHttpInfo
Start a task run, overriding the schedule
@param string $task_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param \InfluxDB2\Model\RunManually $run_manually (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Run|object|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | postTasksIDRunsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function postTasksIDRunsRequest($task_id, $zap_trace_span = null, $run_manually = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling postTasksIDRuns'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/runs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($run_manually)) {
$_tempBody = $run_manually;
}
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 'postTasksIDRuns'
@param string $task_id (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param \InfluxDB2\Model\RunManually $run_manually (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTasksIDRunsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDRunsIDRetry($task_id, $run_id, $zap_trace_span = null, $body = null)
{
list($response) = $this->postTasksIDRunsIDRetryWithHttpInfo($task_id, $run_id, $zap_trace_span, $body);
return $response;
} | Operation postTasksIDRunsIDRetry
Retry a task run
@param string $task_id The ID of the task to retry. (required)
@param string $run_id The ID of the task run to retry. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $body body (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Run|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | postTasksIDRunsIDRetry | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function postTasksIDRunsIDRetryWithHttpInfo($task_id, $run_id, $zap_trace_span = null, $body = null)
{
$request = $this->postTasksIDRunsIDRetryRequest($task_id, $run_id, $zap_trace_span, $body);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Run';
$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 postTasksIDRunsIDRetryWithHttpInfo
Retry a task run
@param string $task_id The ID of the task to retry. (required)
@param string $run_id The ID of the task run to retry. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $body (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Run|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | postTasksIDRunsIDRetryWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
protected function postTasksIDRunsIDRetryRequest($task_id, $run_id, $zap_trace_span = null, $body = null)
{
// verify the required parameter 'task_id' is set
if ($task_id === null || (is_array($task_id) && count($task_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $task_id when calling postTasksIDRunsIDRetry'
);
}
// verify the required parameter 'run_id' is set
if ($run_id === null || (is_array($run_id) && count($run_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $run_id when calling postTasksIDRunsIDRetry'
);
}
$resourcePath = '/api/v2/tasks/{taskID}/runs/{runID}/retry';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($task_id !== null) {
$resourcePath = str_replace(
'{' . 'taskID' . '}',
ObjectSerializer::toPathValue($task_id),
$resourcePath
);
}
// path params
if ($run_id !== null) {
$resourcePath = str_replace(
'{' . 'runID' . '}',
ObjectSerializer::toPathValue($run_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($body)) {
$_tempBody = $body;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json; charset=utf-8']
);
}
// 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 'postTasksIDRunsIDRetry'
@param string $task_id The ID of the task to retry. (required)
@param string $run_id The ID of the task run to retry. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $body (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postTasksIDRunsIDRetryRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/TasksService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/TasksService.php | MIT |
public function deleteDBRPID($dbrp_id, $zap_trace_span = null, $org_id = null, $org = null)
{
$this->deleteDBRPIDWithHttpInfo($dbrp_id, $zap_trace_span, $org_id, $org);
} | Operation deleteDBRPID
Delete a database retention policy
@param string $dbrp_id The database retention policy mapping (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteDBRPID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function deleteDBRPIDWithHttpInfo($dbrp_id, $zap_trace_span = null, $org_id = null, $org = null)
{
$request = $this->deleteDBRPIDRequest($dbrp_id, $zap_trace_span, $org_id, $org);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteDBRPIDWithHttpInfo
Delete a database retention policy
@param string $dbrp_id The database retention policy mapping (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteDBRPIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
protected function deleteDBRPIDRequest($dbrp_id, $zap_trace_span = null, $org_id = null, $org = null)
{
// verify the required parameter 'dbrp_id' is set
if ($dbrp_id === null || (is_array($dbrp_id) && count($dbrp_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dbrp_id when calling deleteDBRPID'
);
}
$resourcePath = '/api/v2/dbrps/{dbrpID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dbrp_id !== null) {
$resourcePath = str_replace(
'{' . 'dbrpID' . '}',
ObjectSerializer::toPathValue($dbrp_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 'deleteDBRPID'
@param string $dbrp_id The database retention policy mapping (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteDBRPIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function getDBRPs($zap_trace_span = null, $org_id = null, $org = null, $id = null, $bucket_id = null, $default = null, $db = null, $rp = null)
{
list($response) = $this->getDBRPsWithHttpInfo($zap_trace_span, $org_id, $org, $id, $bucket_id, $default, $db, $rp);
return $response;
} | Operation getDBRPs
List database retention policy mappings
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID to filter on (optional)
@param string $org Specifies the organization name to filter on (optional)
@param string $id Specifies the mapping ID to filter on (optional)
@param string $bucket_id Specifies the bucket ID to filter on (optional)
@param bool $default Specifies filtering on default (optional)
@param string $db Specifies the database to filter on (optional)
@param string $rp Specifies the retention policy to filter on (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\DBRPs|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getDBRPs | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function getDBRPsWithHttpInfo($zap_trace_span = null, $org_id = null, $org = null, $id = null, $bucket_id = null, $default = null, $db = null, $rp = null)
{
$request = $this->getDBRPsRequest($zap_trace_span, $org_id, $org, $id, $bucket_id, $default, $db, $rp);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\DBRPs';
$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 getDBRPsWithHttpInfo
List database retention policy mappings
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID to filter on (optional)
@param string $org Specifies the organization name to filter on (optional)
@param string $id Specifies the mapping ID to filter on (optional)
@param string $bucket_id Specifies the bucket ID to filter on (optional)
@param bool $default Specifies filtering on default (optional)
@param string $db Specifies the database to filter on (optional)
@param string $rp Specifies the retention policy to filter on (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\DBRPs|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getDBRPsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
protected function getDBRPsRequest($zap_trace_span = null, $org_id = null, $org = null, $id = null, $bucket_id = null, $default = null, $db = null, $rp = null)
{
$resourcePath = '/api/v2/dbrps';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// query params
if ($id !== null) {
$queryParams['id'] = ObjectSerializer::toQueryValue($id);
}
// query params
if ($bucket_id !== null) {
$queryParams['bucketID'] = ObjectSerializer::toQueryValue($bucket_id);
}
// query params
if ($default !== null) {
$queryParams['default'] = ObjectSerializer::toQueryValue($default);
}
// query params
if ($db !== null) {
$queryParams['db'] = ObjectSerializer::toQueryValue($db);
}
// query params
if ($rp !== null) {
$queryParams['rp'] = ObjectSerializer::toQueryValue($rp);
}
// 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 'getDBRPs'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID to filter on (optional)
@param string $org Specifies the organization name to filter on (optional)
@param string $id Specifies the mapping ID to filter on (optional)
@param string $bucket_id Specifies the bucket ID to filter on (optional)
@param bool $default Specifies filtering on default (optional)
@param string $db Specifies the database to filter on (optional)
@param string $rp Specifies the retention policy to filter on (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDBRPsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function getDBRPsID($dbrp_id, $zap_trace_span = null, $org_id = null, $org = null)
{
list($response) = $this->getDBRPsIDWithHttpInfo($dbrp_id, $zap_trace_span, $org_id, $org);
return $response;
} | Operation getDBRPsID
Retrieve a database retention policy mapping
@param string $dbrp_id The database retention policy mapping ID (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\DBRPGet|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getDBRPsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function getDBRPsIDWithHttpInfo($dbrp_id, $zap_trace_span = null, $org_id = null, $org = null)
{
$request = $this->getDBRPsIDRequest($dbrp_id, $zap_trace_span, $org_id, $org);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\DBRPGet';
$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 getDBRPsIDWithHttpInfo
Retrieve a database retention policy mapping
@param string $dbrp_id The database retention policy mapping ID (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\DBRPGet|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getDBRPsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
protected function getDBRPsIDRequest($dbrp_id, $zap_trace_span = null, $org_id = null, $org = null)
{
// verify the required parameter 'dbrp_id' is set
if ($dbrp_id === null || (is_array($dbrp_id) && count($dbrp_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dbrp_id when calling getDBRPsID'
);
}
$resourcePath = '/api/v2/dbrps/{dbrpID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dbrp_id !== null) {
$resourcePath = str_replace(
'{' . 'dbrpID' . '}',
ObjectSerializer::toPathValue($dbrp_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 'getDBRPsID'
@param string $dbrp_id The database retention policy mapping ID (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDBRPsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function patchDBRPID($dbrp_id, $dbrp_update, $zap_trace_span = null, $org_id = null, $org = null)
{
list($response) = $this->patchDBRPIDWithHttpInfo($dbrp_id, $dbrp_update, $zap_trace_span, $org_id, $org);
return $response;
} | Operation patchDBRPID
Update a database retention policy mapping
@param string $dbrp_id The database retention policy mapping. (required)
@param \InfluxDB2\Model\DBRPUpdate $dbrp_update Database retention policy update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\DBRPGet|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | patchDBRPID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function patchDBRPIDWithHttpInfo($dbrp_id, $dbrp_update, $zap_trace_span = null, $org_id = null, $org = null)
{
$request = $this->patchDBRPIDRequest($dbrp_id, $dbrp_update, $zap_trace_span, $org_id, $org);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\DBRPGet';
$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 patchDBRPIDWithHttpInfo
Update a database retention policy mapping
@param string $dbrp_id The database retention policy mapping. (required)
@param \InfluxDB2\Model\DBRPUpdate $dbrp_update Database retention policy update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\DBRPGet|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | patchDBRPIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
protected function patchDBRPIDRequest($dbrp_id, $dbrp_update, $zap_trace_span = null, $org_id = null, $org = null)
{
// verify the required parameter 'dbrp_id' is set
if ($dbrp_id === null || (is_array($dbrp_id) && count($dbrp_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dbrp_id when calling patchDBRPID'
);
}
// verify the required parameter 'dbrp_update' is set
if ($dbrp_update === null || (is_array($dbrp_update) && count($dbrp_update) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dbrp_update when calling patchDBRPID'
);
}
$resourcePath = '/api/v2/dbrps/{dbrpID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dbrp_id !== null) {
$resourcePath = str_replace(
'{' . 'dbrpID' . '}',
ObjectSerializer::toPathValue($dbrp_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($dbrp_update)) {
$_tempBody = $dbrp_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 'patchDBRPID'
@param string $dbrp_id The database retention policy mapping. (required)
@param \InfluxDB2\Model\DBRPUpdate $dbrp_update Database retention policy update to apply (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id Specifies the organization ID of the mapping (optional)
@param string $org Specifies the organization name of the mapping (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchDBRPIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function postDBRP($dbrp_create, $zap_trace_span = null)
{
list($response) = $this->postDBRPWithHttpInfo($dbrp_create, $zap_trace_span);
return $response;
} | Operation postDBRP
Add a database retention policy mapping
@param \InfluxDB2\Model\DBRPCreate $dbrp_create The database retention policy mapping to add (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\DBRP|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postDBRP | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function postDBRPWithHttpInfo($dbrp_create, $zap_trace_span = null)
{
$request = $this->postDBRPRequest($dbrp_create, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\DBRP';
$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 postDBRPWithHttpInfo
Add a database retention policy mapping
@param \InfluxDB2\Model\DBRPCreate $dbrp_create The database retention policy mapping 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\DBRP|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postDBRPWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
protected function postDBRPRequest($dbrp_create, $zap_trace_span = null)
{
// verify the required parameter 'dbrp_create' is set
if ($dbrp_create === null || (is_array($dbrp_create) && count($dbrp_create) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dbrp_create when calling postDBRP'
);
}
$resourcePath = '/api/v2/dbrps';
$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($dbrp_create)) {
$_tempBody = $dbrp_create;
}
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 'postDBRP'
@param \InfluxDB2\Model\DBRPCreate $dbrp_create The database retention policy mapping to add (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postDBRPRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DBRPsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DBRPsService.php | MIT |
public function deleteDashboardsIDCellsID($dashboard_id, $cell_id, $zap_trace_span = null)
{
$this->deleteDashboardsIDCellsIDWithHttpInfo($dashboard_id, $cell_id, $zap_trace_span);
} | Operation deleteDashboardsIDCellsID
Delete a dashboard cell
@param string $dashboard_id The ID of the dashboard to delete. (required)
@param string $cell_id The ID of the cell to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteDashboardsIDCellsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function deleteDashboardsIDCellsIDWithHttpInfo($dashboard_id, $cell_id, $zap_trace_span = null)
{
$request = $this->deleteDashboardsIDCellsIDRequest($dashboard_id, $cell_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteDashboardsIDCellsIDWithHttpInfo
Delete a dashboard cell
@param string $dashboard_id The ID of the dashboard to delete. (required)
@param string $cell_id The ID of the cell 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) | deleteDashboardsIDCellsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
protected function deleteDashboardsIDCellsIDRequest($dashboard_id, $cell_id, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling deleteDashboardsIDCellsID'
);
}
// verify the required parameter 'cell_id' is set
if ($cell_id === null || (is_array($cell_id) && count($cell_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $cell_id when calling deleteDashboardsIDCellsID'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/cells/{cellID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// path params
if ($cell_id !== null) {
$resourcePath = str_replace(
'{' . 'cellID' . '}',
ObjectSerializer::toPathValue($cell_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 'deleteDashboardsIDCellsID'
@param string $dashboard_id The ID of the dashboard to delete. (required)
@param string $cell_id The ID of the cell to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteDashboardsIDCellsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function getDashboardsIDCellsIDView($dashboard_id, $cell_id, $zap_trace_span = null)
{
list($response) = $this->getDashboardsIDCellsIDViewWithHttpInfo($dashboard_id, $cell_id, $zap_trace_span);
return $response;
} | Operation getDashboardsIDCellsIDView
Retrieve the view for a cell
@param string $dashboard_id The dashboard ID. (required)
@param string $cell_id The cell ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\View|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getDashboardsIDCellsIDView | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function getDashboardsIDCellsIDViewWithHttpInfo($dashboard_id, $cell_id, $zap_trace_span = null)
{
$request = $this->getDashboardsIDCellsIDViewRequest($dashboard_id, $cell_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\View';
$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 getDashboardsIDCellsIDViewWithHttpInfo
Retrieve the view for a cell
@param string $dashboard_id The dashboard ID. (required)
@param string $cell_id The cell 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\View|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getDashboardsIDCellsIDViewWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
protected function getDashboardsIDCellsIDViewRequest($dashboard_id, $cell_id, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling getDashboardsIDCellsIDView'
);
}
// verify the required parameter 'cell_id' is set
if ($cell_id === null || (is_array($cell_id) && count($cell_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $cell_id when calling getDashboardsIDCellsIDView'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// path params
if ($cell_id !== null) {
$resourcePath = str_replace(
'{' . 'cellID' . '}',
ObjectSerializer::toPathValue($cell_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 'getDashboardsIDCellsIDView'
@param string $dashboard_id The dashboard ID. (required)
@param string $cell_id The cell ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getDashboardsIDCellsIDViewRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function patchDashboardsIDCellsID($dashboard_id, $cell_id, $cell_update, $zap_trace_span = null)
{
list($response) = $this->patchDashboardsIDCellsIDWithHttpInfo($dashboard_id, $cell_id, $cell_update, $zap_trace_span);
return $response;
} | Operation patchDashboardsIDCellsID
Update the non-positional information related to a cell
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $cell_id The ID of the cell to update. (required)
@param \InfluxDB2\Model\CellUpdate $cell_update cell_update (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Cell|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | patchDashboardsIDCellsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function patchDashboardsIDCellsIDWithHttpInfo($dashboard_id, $cell_id, $cell_update, $zap_trace_span = null)
{
$request = $this->patchDashboardsIDCellsIDRequest($dashboard_id, $cell_id, $cell_update, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Cell';
$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 patchDashboardsIDCellsIDWithHttpInfo
Update the non-positional information related to a cell
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $cell_id The ID of the cell to update. (required)
@param \InfluxDB2\Model\CellUpdate $cell_update (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Cell|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | patchDashboardsIDCellsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
protected function patchDashboardsIDCellsIDRequest($dashboard_id, $cell_id, $cell_update, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling patchDashboardsIDCellsID'
);
}
// verify the required parameter 'cell_id' is set
if ($cell_id === null || (is_array($cell_id) && count($cell_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $cell_id when calling patchDashboardsIDCellsID'
);
}
// verify the required parameter 'cell_update' is set
if ($cell_update === null || (is_array($cell_update) && count($cell_update) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $cell_update when calling patchDashboardsIDCellsID'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/cells/{cellID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// path params
if ($cell_id !== null) {
$resourcePath = str_replace(
'{' . 'cellID' . '}',
ObjectSerializer::toPathValue($cell_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($cell_update)) {
$_tempBody = $cell_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 'patchDashboardsIDCellsID'
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $cell_id The ID of the cell to update. (required)
@param \InfluxDB2\Model\CellUpdate $cell_update (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchDashboardsIDCellsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function patchDashboardsIDCellsIDView($dashboard_id, $cell_id, $view, $zap_trace_span = null)
{
list($response) = $this->patchDashboardsIDCellsIDViewWithHttpInfo($dashboard_id, $cell_id, $view, $zap_trace_span);
return $response;
} | Operation patchDashboardsIDCellsIDView
Update the view for a cell
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $cell_id The ID of the cell to update. (required)
@param \InfluxDB2\Model\View $view view (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\View|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | patchDashboardsIDCellsIDView | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function patchDashboardsIDCellsIDViewWithHttpInfo($dashboard_id, $cell_id, $view, $zap_trace_span = null)
{
$request = $this->patchDashboardsIDCellsIDViewRequest($dashboard_id, $cell_id, $view, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\View';
$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 patchDashboardsIDCellsIDViewWithHttpInfo
Update the view for a cell
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $cell_id The ID of the cell to update. (required)
@param \InfluxDB2\Model\View $view (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\View|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | patchDashboardsIDCellsIDViewWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
protected function patchDashboardsIDCellsIDViewRequest($dashboard_id, $cell_id, $view, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling patchDashboardsIDCellsIDView'
);
}
// verify the required parameter 'cell_id' is set
if ($cell_id === null || (is_array($cell_id) && count($cell_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $cell_id when calling patchDashboardsIDCellsIDView'
);
}
// verify the required parameter 'view' is set
if ($view === null || (is_array($view) && count($view) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $view when calling patchDashboardsIDCellsIDView'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// path params
if ($cell_id !== null) {
$resourcePath = str_replace(
'{' . 'cellID' . '}',
ObjectSerializer::toPathValue($cell_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($view)) {
$_tempBody = $view;
}
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 'patchDashboardsIDCellsIDView'
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $cell_id The ID of the cell to update. (required)
@param \InfluxDB2\Model\View $view (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchDashboardsIDCellsIDViewRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function postDashboardsIDCells($dashboard_id, $create_cell, $zap_trace_span = null)
{
list($response) = $this->postDashboardsIDCellsWithHttpInfo($dashboard_id, $create_cell, $zap_trace_span);
return $response;
} | Operation postDashboardsIDCells
Create a dashboard cell
@param string $dashboard_id The ID of the dashboard to update. (required)
@param \InfluxDB2\Model\CreateCell $create_cell Cell that will be added (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Cell|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | postDashboardsIDCells | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function postDashboardsIDCellsWithHttpInfo($dashboard_id, $create_cell, $zap_trace_span = null)
{
$request = $this->postDashboardsIDCellsRequest($dashboard_id, $create_cell, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Cell';
$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 postDashboardsIDCellsWithHttpInfo
Create a dashboard cell
@param string $dashboard_id The ID of the dashboard to update. (required)
@param \InfluxDB2\Model\CreateCell $create_cell Cell that will be added (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Cell|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postDashboardsIDCellsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
protected function postDashboardsIDCellsRequest($dashboard_id, $create_cell, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling postDashboardsIDCells'
);
}
// verify the required parameter 'create_cell' is set
if ($create_cell === null || (is_array($create_cell) && count($create_cell) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $create_cell when calling postDashboardsIDCells'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/cells';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($create_cell)) {
$_tempBody = $create_cell;
}
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 'postDashboardsIDCells'
@param string $dashboard_id The ID of the dashboard to update. (required)
@param \InfluxDB2\Model\CreateCell $create_cell Cell that will be added (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postDashboardsIDCellsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function putDashboardsIDCells($dashboard_id, $cell, $zap_trace_span = null)
{
list($response) = $this->putDashboardsIDCellsWithHttpInfo($dashboard_id, $cell, $zap_trace_span);
return $response;
} | Operation putDashboardsIDCells
Replace cells in a dashboard
@param string $dashboard_id The ID of the dashboard to update. (required)
@param \InfluxDB2\Model\Cell[] $cell cell (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Dashboard|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | putDashboardsIDCells | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function putDashboardsIDCellsWithHttpInfo($dashboard_id, $cell, $zap_trace_span = null)
{
$request = $this->putDashboardsIDCellsRequest($dashboard_id, $cell, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Dashboard';
$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 putDashboardsIDCellsWithHttpInfo
Replace cells in a dashboard
@param string $dashboard_id The ID of the dashboard to update. (required)
@param \InfluxDB2\Model\Cell[] $cell (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Dashboard|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | putDashboardsIDCellsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
protected function putDashboardsIDCellsRequest($dashboard_id, $cell, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling putDashboardsIDCells'
);
}
// verify the required parameter 'cell' is set
if ($cell === null || (is_array($cell) && count($cell) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $cell when calling putDashboardsIDCells'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/cells';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($cell)) {
$_tempBody = $cell;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('PUT', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'putDashboardsIDCells'
@param string $dashboard_id The ID of the dashboard to update. (required)
@param \InfluxDB2\Model\Cell[] $cell (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | putDashboardsIDCellsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/CellsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/CellsService.php | MIT |
public function deleteLabelsID($label_id, $zap_trace_span = null)
{
$this->deleteLabelsIDWithHttpInfo($label_id, $zap_trace_span);
} | Operation deleteLabelsID
Delete a label
@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 | deleteLabelsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function deleteLabelsIDWithHttpInfo($label_id, $zap_trace_span = null)
{
$request = $this->deleteLabelsIDRequest($label_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteLabelsIDWithHttpInfo
Delete a label
@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) | deleteLabelsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
protected function deleteLabelsIDRequest($label_id, $zap_trace_span = null)
{
// 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 deleteLabelsID'
);
}
$resourcePath = '/api/v2/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 ($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 'deleteLabelsID'
@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 | deleteLabelsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function getLabels($zap_trace_span = null, $org_id = null)
{
list($response) = $this->getLabelsWithHttpInfo($zap_trace_span, $org_id);
return $response;
} | Operation getLabels
List all labels
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id The organization ID. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\LabelsResponse|\InfluxDB2\Model\Error|string | getLabels | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function getLabelsWithHttpInfo($zap_trace_span = null, $org_id = null)
{
$request = $this->getLabelsRequest($zap_trace_span, $org_id);
$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 getLabelsWithHttpInfo
List all labels
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id The organization ID. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\LabelsResponse|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getLabelsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
protected function getLabelsRequest($zap_trace_span = null, $org_id = null)
{
$resourcePath = '/api/v2/labels';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getLabels'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org_id The organization ID. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getLabelsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function getLabelsID($label_id, $zap_trace_span = null)
{
list($response) = $this->getLabelsIDWithHttpInfo($label_id, $zap_trace_span);
return $response;
} | Operation getLabelsID
Retrieve a label
@param string $label_id The ID of the label to update. (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|string | getLabelsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function getLabelsIDWithHttpInfo($label_id, $zap_trace_span = null)
{
$request = $this->getLabelsIDRequest($label_id, $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 getLabelsIDWithHttpInfo
Retrieve a label
@param string $label_id The ID of the label to update. (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|string, HTTP status code, HTTP response headers (array of strings) | getLabelsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
protected function getLabelsIDRequest($label_id, $zap_trace_span = null)
{
// 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 getLabelsID'
);
}
$resourcePath = '/api/v2/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 ($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('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getLabelsID'
@param string $label_id The ID of the label to update. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getLabelsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function patchLabelsID($label_id, $label_update, $zap_trace_span = null)
{
list($response) = $this->patchLabelsIDWithHttpInfo($label_id, $label_update, $zap_trace_span);
return $response;
} | Operation patchLabelsID
Update a label
@param string $label_id The ID of the label to update. (required)
@param \InfluxDB2\Model\LabelUpdate $label_update A label update. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\LabelResponse|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | patchLabelsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function patchLabelsIDWithHttpInfo($label_id, $label_update, $zap_trace_span = null)
{
$request = $this->patchLabelsIDRequest($label_id, $label_update, $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 patchLabelsIDWithHttpInfo
Update a label
@param string $label_id The ID of the label to update. (required)
@param \InfluxDB2\Model\LabelUpdate $label_update A label update. (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|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | patchLabelsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
protected function patchLabelsIDRequest($label_id, $label_update, $zap_trace_span = null)
{
// 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 patchLabelsID'
);
}
// verify the required parameter 'label_update' is set
if ($label_update === null || (is_array($label_update) && count($label_update) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $label_update when calling patchLabelsID'
);
}
$resourcePath = '/api/v2/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 ($label_id !== null) {
$resourcePath = str_replace(
'{' . 'labelID' . '}',
ObjectSerializer::toPathValue($label_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($label_update)) {
$_tempBody = $label_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 'patchLabelsID'
@param string $label_id The ID of the label to update. (required)
@param \InfluxDB2\Model\LabelUpdate $label_update A label update. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchLabelsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function postLabels($label_create_request)
{
list($response) = $this->postLabelsWithHttpInfo($label_create_request);
return $response;
} | Operation postLabels
Create a label
@param \InfluxDB2\Model\LabelCreateRequest $label_create_request The label to create. (required)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\LabelResponse|\InfluxDB2\Model\Error|string | postLabels | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function postLabelsWithHttpInfo($label_create_request)
{
$request = $this->postLabelsRequest($label_create_request);
$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 postLabelsWithHttpInfo
Create a label
@param \InfluxDB2\Model\LabelCreateRequest $label_create_request The label to create. (required)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\LabelResponse|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | postLabelsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
protected function postLabelsRequest($label_create_request)
{
// verify the required parameter 'label_create_request' is set
if ($label_create_request === null || (is_array($label_create_request) && count($label_create_request) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $label_create_request when calling postLabels'
);
}
$resourcePath = '/api/v2/labels';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// body params
$_tempBody = null;
if (isset($label_create_request)) {
$_tempBody = $label_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 'postLabels'
@param \InfluxDB2\Model\LabelCreateRequest $label_create_request The label to create. (required)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postLabelsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/LabelsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/LabelsService.php | MIT |
public function deleteSourcesID($source_id, $zap_trace_span = null)
{
$this->deleteSourcesIDWithHttpInfo($source_id, $zap_trace_span);
} | Operation deleteSourcesID
Delete a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteSourcesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function deleteSourcesIDWithHttpInfo($source_id, $zap_trace_span = null)
{
$request = $this->deleteSourcesIDRequest($source_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteSourcesIDWithHttpInfo
Delete a source
@param string $source_id The source 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) | deleteSourcesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function deleteSourcesIDRequest($source_id, $zap_trace_span = 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 deleteSourcesID'
);
}
$resourcePath = '/api/v2/sources/{sourceID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// 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('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteSourcesID'
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteSourcesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSources($zap_trace_span = null, $org = null)
{
list($response) = $this->getSourcesWithHttpInfo($zap_trace_span, $org);
return $response;
} | Operation getSources
List all sources
@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\Sources|\InfluxDB2\Model\Error | getSources | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSourcesWithHttpInfo($zap_trace_span = null, $org = null)
{
$request = $this->getSourcesRequest($zap_trace_span, $org);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Sources';
$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 getSourcesWithHttpInfo
List all sources
@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\Sources|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getSourcesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function getSourcesRequest($zap_trace_span = null, $org = null)
{
$resourcePath = '/api/v2/sources';
$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);
}
// 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 'getSources'
@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 | getSourcesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSourcesID($source_id, $zap_trace_span = null)
{
list($response) = $this->getSourcesIDWithHttpInfo($source_id, $zap_trace_span);
return $response;
} | Operation getSourcesID
Retrieve a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Source|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getSourcesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSourcesIDWithHttpInfo($source_id, $zap_trace_span = null)
{
$request = $this->getSourcesIDRequest($source_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Source';
$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 getSourcesIDWithHttpInfo
Retrieve a source
@param string $source_id The source 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\Source|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getSourcesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function getSourcesIDRequest($source_id, $zap_trace_span = 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 getSourcesID'
);
}
$resourcePath = '/api/v2/sources/{sourceID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// 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 'getSourcesID'
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getSourcesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSourcesIDHealth($source_id, $zap_trace_span = null)
{
list($response) = $this->getSourcesIDHealthWithHttpInfo($source_id, $zap_trace_span);
return $response;
} | Operation getSourcesIDHealth
Get the health of a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\Error | getSourcesIDHealth | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSourcesIDHealthWithHttpInfo($source_id, $zap_trace_span = null)
{
$request = $this->getSourcesIDHealthRequest($source_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\HealthCheck';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getSourcesIDHealthWithHttpInfo
Get the health of a source
@param string $source_id The source 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\HealthCheck|\InfluxDB2\Model\HealthCheck|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getSourcesIDHealthWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function getSourcesIDHealthRequest($source_id, $zap_trace_span = 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 getSourcesIDHealth'
);
}
$resourcePath = '/api/v2/sources/{sourceID}/health';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// 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 'getSourcesIDHealth'
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getSourcesIDHealthRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function patchSourcesID($source_id, $source, $zap_trace_span = null)
{
list($response) = $this->patchSourcesIDWithHttpInfo($source_id, $source, $zap_trace_span);
return $response;
} | Operation patchSourcesID
Update a Source
@param string $source_id The source ID. (required)
@param \InfluxDB2\Model\Source $source Source update (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Source|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | patchSourcesID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function patchSourcesIDWithHttpInfo($source_id, $source, $zap_trace_span = null)
{
$request = $this->patchSourcesIDRequest($source_id, $source, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Source';
$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 patchSourcesIDWithHttpInfo
Update a Source
@param string $source_id The source ID. (required)
@param \InfluxDB2\Model\Source $source Source update (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Source|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | patchSourcesIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function patchSourcesIDRequest($source_id, $source, $zap_trace_span = 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 patchSourcesID'
);
}
// verify the required parameter 'source' is set
if ($source === null || (is_array($source) && count($source) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $source when calling patchSourcesID'
);
}
$resourcePath = '/api/v2/sources/{sourceID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// 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 (isset($source)) {
$_tempBody = $source;
}
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 'patchSourcesID'
@param string $source_id The source ID. (required)
@param \InfluxDB2\Model\Source $source Source update (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | patchSourcesIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function postSources($source, $zap_trace_span = null)
{
list($response) = $this->postSourcesWithHttpInfo($source, $zap_trace_span);
return $response;
} | Operation postSources
Create a source
@param \InfluxDB2\Model\Source $source Source to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Source|\InfluxDB2\Model\Error | postSources | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function postSourcesWithHttpInfo($source, $zap_trace_span = null)
{
$request = $this->postSourcesRequest($source, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Source';
$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 postSourcesWithHttpInfo
Create a source
@param \InfluxDB2\Model\Source $source Source 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\Source|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | postSourcesWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function postSourcesRequest($source, $zap_trace_span = null)
{
// verify the required parameter 'source' is set
if ($source === null || (is_array($source) && count($source) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $source when calling postSources'
);
}
$resourcePath = '/api/v2/sources';
$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($source)) {
$_tempBody = $source;
}
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 'postSources'
@param \InfluxDB2\Model\Source $source Source to create (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postSourcesRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function deleteDashboardsID($dashboard_id, $zap_trace_span = null)
{
$this->deleteDashboardsIDWithHttpInfo($dashboard_id, $zap_trace_span);
} | Operation deleteDashboardsID
Delete a dashboard
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteDashboardsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DashboardsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DashboardsService.php | MIT |
public function deleteDashboardsIDWithHttpInfo($dashboard_id, $zap_trace_span = null)
{
$request = $this->deleteDashboardsIDRequest($dashboard_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteDashboardsIDWithHttpInfo
Delete a dashboard
@param string $dashboard_id The ID of the dashboard to update. (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) | deleteDashboardsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DashboardsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DashboardsService.php | MIT |
protected function deleteDashboardsIDRequest($dashboard_id, $zap_trace_span = null)
{
// verify the required parameter 'dashboard_id' is set
if ($dashboard_id === null || (is_array($dashboard_id) && count($dashboard_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $dashboard_id when calling deleteDashboardsID'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_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 'deleteDashboardsID'
@param string $dashboard_id The ID of the dashboard to update. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteDashboardsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/DashboardsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DashboardsService.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.