code
stringlengths 17
296k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public function 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 deleteOrgsIDMembersID($user_id, $org_id, $zap_trace_span = null)
{
$this->deleteOrgsIDMembersIDWithHttpInfo($user_id, $org_id, $zap_trace_span);
} | Operation deleteOrgsIDMembersID
Remove a member from an organization
@param string $user_id The ID of the member to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteOrgsIDMembersID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function deleteOrgsIDMembersIDWithHttpInfo($user_id, $org_id, $zap_trace_span = null)
{
$request = $this->deleteOrgsIDMembersIDRequest($user_id, $org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteOrgsIDMembersIDWithHttpInfo
Remove a member from an organization
@param string $user_id The ID of the member to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteOrgsIDMembersIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function deleteOrgsIDMembersIDRequest($user_id, $org_id, $zap_trace_span = null)
{
// verify the required parameter 'user_id' is set
if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling deleteOrgsIDMembersID'
);
}
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling deleteOrgsIDMembersID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/members/{userID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userID' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteOrgsIDMembersID'
@param string $user_id The ID of the member to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteOrgsIDMembersIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function deleteOrgsIDOwnersID($user_id, $org_id, $zap_trace_span = null)
{
$this->deleteOrgsIDOwnersIDWithHttpInfo($user_id, $org_id, $zap_trace_span);
} | Operation deleteOrgsIDOwnersID
Remove an owner from an organization
@param string $user_id The ID of the owner to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteOrgsIDOwnersID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function deleteOrgsIDOwnersIDWithHttpInfo($user_id, $org_id, $zap_trace_span = null)
{
$request = $this->deleteOrgsIDOwnersIDRequest($user_id, $org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteOrgsIDOwnersIDWithHttpInfo
Remove an owner from an organization
@param string $user_id The ID of the owner to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteOrgsIDOwnersIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function deleteOrgsIDOwnersIDRequest($user_id, $org_id, $zap_trace_span = null)
{
// verify the required parameter 'user_id' is set
if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling deleteOrgsIDOwnersID'
);
}
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling deleteOrgsIDOwnersID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/owners/{userID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userID' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteOrgsIDOwnersID'
@param string $user_id The ID of the owner to remove. (required)
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteOrgsIDOwnersIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function deleteOrgsIDSecretsID($org_id, $secret_id, $zap_trace_span = null)
{
$this->deleteOrgsIDSecretsIDWithHttpInfo($org_id, $secret_id, $zap_trace_span);
} | Operation deleteOrgsIDSecretsID
Delete a secret from an organization
@param string $org_id The organization ID. (required)
@param string $secret_id The secret ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteOrgsIDSecretsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function deleteOrgsIDSecretsIDWithHttpInfo($org_id, $secret_id, $zap_trace_span = null)
{
$request = $this->deleteOrgsIDSecretsIDRequest($org_id, $secret_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteOrgsIDSecretsIDWithHttpInfo
Delete a secret from an organization
@param string $org_id The organization ID. (required)
@param string $secret_id The secret ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteOrgsIDSecretsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function deleteOrgsIDSecretsIDRequest($org_id, $secret_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling deleteOrgsIDSecretsID'
);
}
// verify the required parameter 'secret_id' is set
if ($secret_id === null || (is_array($secret_id) && count($secret_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $secret_id when calling deleteOrgsIDSecretsID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/secrets/{secretID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// path params
if ($secret_id !== null) {
$resourcePath = str_replace(
'{' . 'secretID' . '}',
ObjectSerializer::toPathValue($secret_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteOrgsIDSecretsID'
@param string $org_id The organization ID. (required)
@param string $secret_id The secret ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteOrgsIDSecretsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getAuthorizations($zap_trace_span = null, $user_id = null, $user = null, $org_id = null, $org = null)
{
list($response) = $this->getAuthorizationsWithHttpInfo($zap_trace_span, $user_id, $user, $org_id, $org);
return $response;
} | Operation getAuthorizations
List authorizations
@param string $zap_trace_span OpenTracing span context (optional)
@param string $user_id A user ID. Only returns authorizations scoped to this user. (optional)
@param string $user A user name. Only returns authorizations scoped to this user. (optional)
@param string $org_id An organization ID. Only returns authorizations that belong to this organization. (optional)
@param string $org An organization name. Only returns authorizations that belong to this organization. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Authorizations|string|object|\InfluxDB2\Model\Error|string | getAuthorizations | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getAuthorizationsWithHttpInfo($zap_trace_span = null, $user_id = null, $user = null, $org_id = null, $org = null)
{
$request = $this->getAuthorizationsRequest($zap_trace_span, $user_id, $user, $org_id, $org);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Authorizations';
$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 getAuthorizationsWithHttpInfo
List authorizations
@param string $zap_trace_span OpenTracing span context (optional)
@param string $user_id A user ID. Only returns authorizations scoped to this user. (optional)
@param string $user A user name. Only returns authorizations scoped to this user. (optional)
@param string $org_id An organization ID. Only returns authorizations that belong to this organization. (optional)
@param string $org An organization name. Only returns authorizations that belong to this organization. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Authorizations|string|object|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getAuthorizationsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getAuthorizationsRequest($zap_trace_span = null, $user_id = null, $user = null, $org_id = null, $org = null)
{
$resourcePath = '/api/v2/authorizations';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($user_id !== null) {
$queryParams['userID'] = ObjectSerializer::toQueryValue($user_id);
}
// query params
if ($user !== null) {
$queryParams['user'] = ObjectSerializer::toQueryValue($user);
}
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getAuthorizations'
@param string $zap_trace_span OpenTracing span context (optional)
@param string $user_id A user ID. Only returns authorizations scoped to this user. (optional)
@param string $user A user name. Only returns authorizations scoped to this user. (optional)
@param string $org_id An organization ID. Only returns authorizations that belong to this organization. (optional)
@param string $org An organization name. Only returns authorizations that belong to this organization. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getAuthorizationsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getAuthorizationsID($auth_id, $zap_trace_span = null)
{
list($response) = $this->getAuthorizationsIDWithHttpInfo($auth_id, $zap_trace_span);
return $response;
} | Operation getAuthorizationsID
Retrieve an authorization
@param string $auth_id The ID of the authorization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Authorization|string | getAuthorizationsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getAuthorizationsIDWithHttpInfo($auth_id, $zap_trace_span = null)
{
$request = $this->getAuthorizationsIDRequest($auth_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Authorization';
$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 getAuthorizationsIDWithHttpInfo
Retrieve an authorization
@param string $auth_id The ID of the authorization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Authorization|string, HTTP status code, HTTP response headers (array of strings) | getAuthorizationsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getAuthorizationsIDRequest($auth_id, $zap_trace_span = null)
{
// verify the required parameter 'auth_id' is set
if ($auth_id === null || (is_array($auth_id) && count($auth_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $auth_id when calling getAuthorizationsID'
);
}
$resourcePath = '/api/v2/authorizations/{authID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($auth_id !== null) {
$resourcePath = str_replace(
'{' . 'authID' . '}',
ObjectSerializer::toPathValue($auth_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 'getAuthorizationsID'
@param string $auth_id The ID of the authorization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getAuthorizationsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgs($zap_trace_span = null, $offset = null, $limit = 20, $descending = false, $org = null, $org_id = null, $user_id = null)
{
list($response) = $this->getOrgsWithHttpInfo($zap_trace_span, $offset, $limit, $descending, $org, $org_id, $user_id);
return $response;
} | Operation getOrgs
List organizations
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param bool $descending descending (optional, default to false)
@param string $org An organization name. Only returns organizations with this name. (optional)
@param string $org_id An organization ID. Only returns the organization with this ID. (optional)
@param string $user_id A user ID. Only returns organizations where this user is a member or owner. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Organizations|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string | getOrgs | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsWithHttpInfo($zap_trace_span = null, $offset = null, $limit = 20, $descending = false, $org = null, $org_id = null, $user_id = null)
{
$request = $this->getOrgsRequest($zap_trace_span, $offset, $limit, $descending, $org, $org_id, $user_id);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Organizations';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getOrgsWithHttpInfo
List organizations
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param bool $descending (optional, default to false)
@param string $org An organization name. Only returns organizations with this name. (optional)
@param string $org_id An organization ID. Only returns the organization with this ID. (optional)
@param string $user_id A user ID. Only returns organizations where this user is a member or owner. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Organizations|\InfluxDB2\Model\Error|object|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getOrgsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getOrgsRequest($zap_trace_span = null, $offset = null, $limit = 20, $descending = false, $org = null, $org_id = null, $user_id = null)
{
if ($offset !== null && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling SecurityAndAccessEndpointsService.getOrgs, must be bigger than or equal to 0.');
}
if ($limit !== null && $limit > 100) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling SecurityAndAccessEndpointsService.getOrgs, must be smaller than or equal to 100.');
}
if ($limit !== null && $limit < 1) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling SecurityAndAccessEndpointsService.getOrgs, must be bigger than or equal to 1.');
}
$resourcePath = '/api/v2/orgs';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($offset !== null) {
$queryParams['offset'] = ObjectSerializer::toQueryValue($offset);
}
// query params
if ($limit !== null) {
$queryParams['limit'] = ObjectSerializer::toQueryValue($limit);
}
// query params
if ($descending !== null) {
$queryParams['descending'] = ObjectSerializer::toQueryValue($descending);
}
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// query params
if ($org_id !== null) {
$queryParams['orgID'] = ObjectSerializer::toQueryValue($org_id);
}
// query params
if ($user_id !== null) {
$queryParams['userID'] = ObjectSerializer::toQueryValue($user_id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getOrgs'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param bool $descending (optional, default to false)
@param string $org An organization name. Only returns organizations with this name. (optional)
@param string $org_id An organization ID. Only returns the organization with this ID. (optional)
@param string $user_id A user ID. Only returns organizations where this user is a member or owner. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsID($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsID
Retrieve an organization
@param string $org_id The ID of the organization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Organization|\InfluxDB2\Model\Error | getOrgsID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDRequest($org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Organization';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getOrgsIDWithHttpInfo
Retrieve an organization
@param string $org_id The ID of the organization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Organization|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getOrgsIDRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsID'
);
}
$resourcePath = '/api/v2/orgs/{orgID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getOrgsID'
@param string $org_id The ID of the organization to get. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDMembers($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDMembersWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsIDMembers
List all members of an organization
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\ResourceMembers|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getOrgsIDMembers | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDMembersWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDMembersRequest($org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\ResourceMembers';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getOrgsIDMembersWithHttpInfo
List all members of an organization
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\ResourceMembers|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDMembersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getOrgsIDMembersRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsIDMembers'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/members';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getOrgsIDMembers'
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDMembersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDOwners($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDOwnersWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsIDOwners
List all owners of an organization
@param string $org_id The ID of the organization to list owners for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\ResourceOwners|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getOrgsIDOwners | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDOwnersWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDOwnersRequest($org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\ResourceOwners';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getOrgsIDOwnersWithHttpInfo
List all owners of an organization
@param string $org_id The ID of the organization to list owners for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\ResourceOwners|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDOwnersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getOrgsIDOwnersRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsIDOwners'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/owners';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getOrgsIDOwners'
@param string $org_id The ID of the organization to list owners for. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDOwnersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDSecrets($org_id, $zap_trace_span = null)
{
list($response) = $this->getOrgsIDSecretsWithHttpInfo($org_id, $zap_trace_span);
return $response;
} | Operation getOrgsIDSecrets
List all secret keys for an organization
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\SecretKeysResponse|\InfluxDB2\Model\Error | getOrgsIDSecrets | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getOrgsIDSecretsWithHttpInfo($org_id, $zap_trace_span = null)
{
$request = $this->getOrgsIDSecretsRequest($org_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\SecretKeysResponse';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getOrgsIDSecretsWithHttpInfo
List all secret keys for an organization
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\SecretKeysResponse|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getOrgsIDSecretsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getOrgsIDSecretsRequest($org_id, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling getOrgsIDSecrets'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/secrets';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getOrgsIDSecrets'
@param string $org_id The organization ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getOrgsIDSecretsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getUsersWithHttpInfo($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $name = null, $id = null)
{
$request = $this->getUsersRequest($zap_trace_span, $offset, $limit, $after, $name, $id);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Users';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getUsersWithHttpInfo
List users
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param string $after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
@param string $name (optional)
@param string $id (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Users|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error|string, HTTP status code, HTTP response headers (array of strings) | getUsersWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getUsersRequest($zap_trace_span = null, $offset = null, $limit = 20, $after = null, $name = null, $id = null)
{
if ($offset !== null && $offset < 0) {
throw new \InvalidArgumentException('invalid value for "$offset" when calling SecurityAndAccessEndpointsService.getUsers, must be bigger than or equal to 0.');
}
if ($limit !== null && $limit > 100) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling SecurityAndAccessEndpointsService.getUsers, must be smaller than or equal to 100.');
}
if ($limit !== null && $limit < 1) {
throw new \InvalidArgumentException('invalid value for "$limit" when calling SecurityAndAccessEndpointsService.getUsers, must be bigger than or equal to 1.');
}
$resourcePath = '/api/v2/users';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($offset !== null) {
$queryParams['offset'] = ObjectSerializer::toQueryValue($offset);
}
// query params
if ($limit !== null) {
$queryParams['limit'] = ObjectSerializer::toQueryValue($limit);
}
// query params
if ($after !== null) {
$queryParams['after'] = ObjectSerializer::toQueryValue($after);
}
// query params
if ($name !== null) {
$queryParams['name'] = ObjectSerializer::toQueryValue($name);
}
// query params
if ($id !== null) {
$queryParams['id'] = ObjectSerializer::toQueryValue($id);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getUsers'
@param string $zap_trace_span OpenTracing span context (optional)
@param int $offset The offset for pagination. The number of records to skip. (optional)
@param int $limit Limits the number of records returned. Default is `20`. (optional, default to 20)
@param string $after Resource ID to seek from. Results are not inclusive of this ID. Use `after` instead of `offset`. (optional)
@param string $name (optional)
@param string $id (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getUsersRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getUsersID($user_id, $zap_trace_span = null)
{
list($response) = $this->getUsersIDWithHttpInfo($user_id, $zap_trace_span);
return $response;
} | Operation getUsersID
Retrieve a user
@param string $user_id The user ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\User|string | getUsersID | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function getUsersIDWithHttpInfo($user_id, $zap_trace_span = null)
{
$request = $this->getUsersIDRequest($user_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\User';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getUsersIDWithHttpInfo
Retrieve a user
@param string $user_id The user ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\User|string, HTTP status code, HTTP response headers (array of strings) | getUsersIDWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function getUsersIDRequest($user_id, $zap_trace_span = null)
{
// verify the required parameter 'user_id' is set
if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling getUsersID'
);
}
$resourcePath = '/api/v2/users/{userID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userID' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getUsersID'
@param string $user_id The user ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getUsersIDRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function postOrgsIDSecrets($org_id, $secret_keys, $zap_trace_span = null)
{
$this->postOrgsIDSecretsWithHttpInfo($org_id, $secret_keys, $zap_trace_span);
} | Operation postOrgsIDSecrets
Delete secrets from an organization
@param string $org_id The organization ID. (required)
@param \InfluxDB2\Model\SecretKeys $secret_keys Secret key to delete (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | postOrgsIDSecrets | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function postOrgsIDSecretsWithHttpInfo($org_id, $secret_keys, $zap_trace_span = null)
{
$request = $this->postOrgsIDSecretsRequest($org_id, $secret_keys, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation postOrgsIDSecretsWithHttpInfo
Delete secrets from an organization
@param string $org_id The organization ID. (required)
@param \InfluxDB2\Model\SecretKeys $secret_keys Secret key to delete (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | postOrgsIDSecretsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function postOrgsIDSecretsRequest($org_id, $secret_keys, $zap_trace_span = null)
{
// verify the required parameter 'org_id' is set
if ($org_id === null || (is_array($org_id) && count($org_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $org_id when calling postOrgsIDSecrets'
);
}
// verify the required parameter 'secret_keys' is set
if ($secret_keys === null || (is_array($secret_keys) && count($secret_keys) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $secret_keys when calling postOrgsIDSecrets'
);
}
$resourcePath = '/api/v2/orgs/{orgID}/secrets/delete';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($org_id !== null) {
$resourcePath = str_replace(
'{' . 'orgID' . '}',
ObjectSerializer::toPathValue($org_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($secret_keys)) {
$_tempBody = $secret_keys;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postOrgsIDSecrets'
@param string $org_id The organization ID. (required)
@param \InfluxDB2\Model\SecretKeys $secret_keys Secret key to delete (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postOrgsIDSecretsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function postUsersIDPassword($user_id, $password_reset_body, $zap_trace_span = null, $authorization = null)
{
$this->postUsersIDPasswordWithHttpInfo($user_id, $password_reset_body, $zap_trace_span, $authorization);
} | Operation postUsersIDPassword
Update a password
@param string $user_id The user ID. (required)
@param \InfluxDB2\Model\PasswordResetBody $password_reset_body New password (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $authorization An auth credential for the Basic scheme (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | postUsersIDPassword | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
public function postUsersIDPasswordWithHttpInfo($user_id, $password_reset_body, $zap_trace_span = null, $authorization = null)
{
$request = $this->postUsersIDPasswordRequest($user_id, $password_reset_body, $zap_trace_span, $authorization);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation postUsersIDPasswordWithHttpInfo
Update a password
@param string $user_id The user ID. (required)
@param \InfluxDB2\Model\PasswordResetBody $password_reset_body New password (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $authorization An auth credential for the Basic scheme (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | postUsersIDPasswordWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | MIT |
protected function postUsersIDPasswordRequest($user_id, $password_reset_body, $zap_trace_span = null, $authorization = null)
{
// verify the required parameter 'user_id' is set
if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling postUsersIDPassword'
);
}
// verify the required parameter 'password_reset_body' is set
if ($password_reset_body === null || (is_array($password_reset_body) && count($password_reset_body) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $password_reset_body when calling postUsersIDPassword'
);
}
$resourcePath = '/api/v2/users/{userID}/password';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// header params
if ($authorization !== null) {
$headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);
}
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userID' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if (isset($password_reset_body)) {
$_tempBody = $password_reset_body;
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
['application/json']
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
// this endpoint requires HTTP basic authentication
if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {
$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword());
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('POST', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'postUsersIDPassword'
@param string $user_id The user ID. (required)
@param \InfluxDB2\Model\PasswordResetBody $password_reset_body New password (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $authorization An auth credential for the Basic scheme (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | postUsersIDPasswordRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SecurityAndAccessEndpointsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SecurityAndAccessEndpointsService.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 getSourcesIDBuckets($source_id, $zap_trace_span = null, $org = null)
{
list($response) = $this->getSourcesIDBucketsWithHttpInfo($source_id, $zap_trace_span, $org);
return $response;
} | Operation getSourcesIDBuckets
Get buckets in a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \InfluxDB2\Model\Buckets|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error | getSourcesIDBuckets | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
public function getSourcesIDBucketsWithHttpInfo($source_id, $zap_trace_span = null, $org = null)
{
$request = $this->getSourcesIDBucketsRequest($source_id, $zap_trace_span, $org);
$response = $this->defaultApi->sendRequest($request);
$returnType = '\InfluxDB2\Model\Buckets';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} | Operation getSourcesIDBucketsWithHttpInfo
Get buckets in a source
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of \InfluxDB2\Model\Buckets|\InfluxDB2\Model\Error|\InfluxDB2\Model\Error, HTTP status code, HTTP response headers (array of strings) | getSourcesIDBucketsWithHttpInfo | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/SourcesService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/SourcesService.php | MIT |
protected function getSourcesIDBucketsRequest($source_id, $zap_trace_span = null, $org = null)
{
// verify the required parameter 'source_id' is set
if ($source_id === null || (is_array($source_id) && count($source_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $source_id when calling getSourcesIDBuckets'
);
}
$resourcePath = '/api/v2/sources/{sourceID}/buckets';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($org !== null) {
$queryParams['org'] = ObjectSerializer::toQueryValue($org);
}
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($source_id !== null) {
$resourcePath = str_replace(
'{' . 'sourceID' . '}',
ObjectSerializer::toPathValue($source_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('GET', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'getSourcesIDBuckets'
@param string $source_id The source ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@param string $org The name of the organization. (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | getSourcesIDBucketsRequest | php | influxdata/influxdb-client-php | src/InfluxDB2/Service/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 |
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/DashboardsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DashboardsService.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/DashboardsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DashboardsService.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/DashboardsService.php | https://github.com/influxdata/influxdb-client-php/blob/master/src/InfluxDB2/Service/DashboardsService.php | MIT |
public function deleteDashboardsIDLabelsID($dashboard_id, $label_id, $zap_trace_span = null)
{
$this->deleteDashboardsIDLabelsIDWithHttpInfo($dashboard_id, $label_id, $zap_trace_span);
} | Operation deleteDashboardsIDLabelsID
Delete a label from a dashboard
@param string $dashboard_id The dashboard ID. (required)
@param string $label_id The ID of the label to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteDashboardsIDLabelsID | 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 deleteDashboardsIDLabelsIDWithHttpInfo($dashboard_id, $label_id, $zap_trace_span = null)
{
$request = $this->deleteDashboardsIDLabelsIDRequest($dashboard_id, $label_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteDashboardsIDLabelsIDWithHttpInfo
Delete a label from a dashboard
@param string $dashboard_id The dashboard ID. (required)
@param string $label_id The ID of the label to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array of null, HTTP status code, HTTP response headers (array of strings) | deleteDashboardsIDLabelsIDWithHttpInfo | 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 deleteDashboardsIDLabelsIDRequest($dashboard_id, $label_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 deleteDashboardsIDLabelsID'
);
}
// 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 deleteDashboardsIDLabelsID'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/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 ($dashboard_id !== null) {
$resourcePath = str_replace(
'{' . 'dashboardID' . '}',
ObjectSerializer::toPathValue($dashboard_id),
$resourcePath
);
}
// path params
if ($label_id !== null) {
$resourcePath = str_replace(
'{' . 'labelID' . '}',
ObjectSerializer::toPathValue($label_id),
$resourcePath
);
}
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
}
$headers = array_merge(
$headerParams,
$headers
);
return $this->defaultApi->createRequest('DELETE', $resourcePath, $httpBody, $headers, $queryParams);
} | Create request for operation 'deleteDashboardsIDLabelsID'
@param string $dashboard_id The dashboard ID. (required)
@param string $label_id The ID of the label to delete. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteDashboardsIDLabelsIDRequest | 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 deleteDashboardsIDMembersID($user_id, $dashboard_id, $zap_trace_span = null)
{
$this->deleteDashboardsIDMembersIDWithHttpInfo($user_id, $dashboard_id, $zap_trace_span);
} | Operation deleteDashboardsIDMembersID
Remove a member from a dashboard
@param string $user_id The ID of the member to remove. (required)
@param string $dashboard_id The dashboard ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteDashboardsIDMembersID | 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 deleteDashboardsIDMembersIDWithHttpInfo($user_id, $dashboard_id, $zap_trace_span = null)
{
$request = $this->deleteDashboardsIDMembersIDRequest($user_id, $dashboard_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteDashboardsIDMembersIDWithHttpInfo
Remove a member from a dashboard
@param string $user_id The ID of the member to remove. (required)
@param string $dashboard_id The dashboard 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) | deleteDashboardsIDMembersIDWithHttpInfo | 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 deleteDashboardsIDMembersIDRequest($user_id, $dashboard_id, $zap_trace_span = null)
{
// verify the required parameter 'user_id' is set
if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $user_id when calling deleteDashboardsIDMembersID'
);
}
// 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 deleteDashboardsIDMembersID'
);
}
$resourcePath = '/api/v2/dashboards/{dashboardID}/members/{userID}';
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// header params
if ($zap_trace_span !== null) {
$headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);
}
// path params
if ($user_id !== null) {
$resourcePath = str_replace(
'{' . 'userID' . '}',
ObjectSerializer::toPathValue($user_id),
$resourcePath
);
}
// path params
if ($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 'deleteDashboardsIDMembersID'
@param string $user_id The ID of the member to remove. (required)
@param string $dashboard_id The dashboard ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InvalidArgumentException
@return \Psr\Http\Message\RequestInterface | deleteDashboardsIDMembersIDRequest | 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 deleteDashboardsIDOwnersID($user_id, $dashboard_id, $zap_trace_span = null)
{
$this->deleteDashboardsIDOwnersIDWithHttpInfo($user_id, $dashboard_id, $zap_trace_span);
} | Operation deleteDashboardsIDOwnersID
Remove an owner from a dashboard
@param string $user_id The ID of the owner to remove. (required)
@param string $dashboard_id The dashboard ID. (required)
@param string $zap_trace_span OpenTracing span context (optional)
@throws \InfluxDB2\ApiException on non-2xx response
@throws \InvalidArgumentException
@return void | deleteDashboardsIDOwnersID | 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 deleteDashboardsIDOwnersIDWithHttpInfo($user_id, $dashboard_id, $zap_trace_span = null)
{
$request = $this->deleteDashboardsIDOwnersIDRequest($user_id, $dashboard_id, $zap_trace_span);
$response = $this->defaultApi->sendRequest($request);
return [null, $response->getStatusCode(), $response->getHeaders()];
} | Operation deleteDashboardsIDOwnersIDWithHttpInfo
Remove an owner from a dashboard
@param string $user_id The ID of the owner to remove. (required)
@param string $dashboard_id The dashboard 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) | deleteDashboardsIDOwnersIDWithHttpInfo | 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.