InfluxDB PHP Client
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
InfluxDB2\Service\WriteService Class Reference

Public Member Functions

 __construct (ClientInterface $client=null, Configuration $config=null, HeaderSelector $selector=null)
 
 getConfig ()
 
 postWrite ($org, $bucket, $body, $zap_trace_span=null, $content_encoding='identity', $content_type='text/plain;charset=utf-8', $content_length=null, $accept='application/json', $org_id=null, $precision=null)
 
 postWriteWithHttpInfo ($org, $bucket, $body, $zap_trace_span=null, $content_encoding='identity', $content_type='text/plain;charset=utf-8', $content_length=null, $accept='application/json', $org_id=null, $precision=null)
 
 postWriteAsync ($org, $bucket, $body, $zap_trace_span=null, $content_encoding='identity', $content_type='text/plain;charset=utf-8', $content_length=null, $accept='application/json', $org_id=null, $precision=null)
 
 postWriteAsyncWithHttpInfo ($org, $bucket, $body, $zap_trace_span=null, $content_encoding='identity', $content_type='text/plain;charset=utf-8', $content_length=null, $accept='application/json', $org_id=null, $precision=null)
 

Protected Member Functions

 postWriteRequest ($org, $bucket, $body, $zap_trace_span=null, $content_encoding='identity', $content_type='text/plain;charset=utf-8', $content_length=null, $accept='application/json', $org_id=null, $precision=null)
 
 createHttpClientOption ()
 

Protected Attributes

 $client
 
 $config
 
 $headerSelector
 

Constructor & Destructor Documentation

◆ __construct()

InfluxDB2\Service\WriteService::__construct ( ClientInterface  $client = null,
Configuration  $config = null,
HeaderSelector  $selector = null 
)
Parameters
ClientInterface$client
Configuration$config
HeaderSelector$selector

Member Function Documentation

◆ createHttpClientOption()

InfluxDB2\Service\WriteService::createHttpClientOption ( )
protected

Create http client option

Exceptions

RuntimeException on file opening failure

Returns
array of http client options

◆ getConfig()

InfluxDB2\Service\WriteService::getConfig ( )
Returns
Configuration

◆ postWrite()

InfluxDB2\Service\WriteService::postWrite (   $org,
  $bucket,
  $body,
  $zap_trace_span = null,
  $content_encoding = 'identity',
  $content_type = 'text/plain; charset=utf-8',
  $content_length = null,
  $accept = 'application/json',
  $org_id = null,
  $precision = null 
)

Operation postWrite

Write time series data into InfluxDB

Parameters
string$orgSpecifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. (required)
string$bucketThe destination bucket for writes. (required)
string$bodyLine protocol body (required)
string$zap_trace_spanOpenTracing span context (optional)
string$content_encodingWhen present, its value indicates to the database that compression is applied to the line-protocol body. (optional, default to 'identity')
string$content_typeContent-Type is used to indicate the format of the data sent to the server. (optional, default to 'text/plain; charset=utf-8')
int$content_lengthContent-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent. (optional)
string$acceptSpecifies the return content format. (optional, default to 'application/json')
string$org_idSpecifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)
\InfluxDB2\Model\WritePrecision$precisionThe precision for the unix timestamps within the body line-protocol. (optional)
Exceptions

InfluxDB2\ApiException on non-2xx response

Exceptions

InvalidArgumentException

Returns
void

◆ postWriteAsync()

InfluxDB2\Service\WriteService::postWriteAsync (   $org,
  $bucket,
  $body,
  $zap_trace_span = null,
  $content_encoding = 'identity',
  $content_type = 'text/plain; charset=utf-8',
  $content_length = null,
  $accept = 'application/json',
  $org_id = null,
  $precision = null 
)

Operation postWriteAsync

Write time series data into InfluxDB

Parameters
string$orgSpecifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. (required)
string$bucketThe destination bucket for writes. (required)
string$bodyLine protocol body (required)
string$zap_trace_spanOpenTracing span context (optional)
string$content_encodingWhen present, its value indicates to the database that compression is applied to the line-protocol body. (optional, default to 'identity')
string$content_typeContent-Type is used to indicate the format of the data sent to the server. (optional, default to 'text/plain; charset=utf-8')
int$content_lengthContent-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent. (optional)
string$acceptSpecifies the return content format. (optional, default to 'application/json')
string$org_idSpecifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)
\InfluxDB2\Model\WritePrecision$precisionThe precision for the unix timestamps within the body line-protocol. (optional)
Exceptions

InvalidArgumentException

Returns
\GuzzleHttp\Promise\PromiseInterface

◆ postWriteAsyncWithHttpInfo()

InfluxDB2\Service\WriteService::postWriteAsyncWithHttpInfo (   $org,
  $bucket,
  $body,
  $zap_trace_span = null,
  $content_encoding = 'identity',
  $content_type = 'text/plain; charset=utf-8',
  $content_length = null,
  $accept = 'application/json',
  $org_id = null,
  $precision = null 
)

Operation postWriteAsyncWithHttpInfo

Write time series data into InfluxDB

Parameters
string$orgSpecifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. (required)
string$bucketThe destination bucket for writes. (required)
string$bodyLine protocol body (required)
string$zap_trace_spanOpenTracing span context (optional)
string$content_encodingWhen present, its value indicates to the database that compression is applied to the line-protocol body. (optional, default to 'identity')
string$content_typeContent-Type is used to indicate the format of the data sent to the server. (optional, default to 'text/plain; charset=utf-8')
int$content_lengthContent-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent. (optional)
string$acceptSpecifies the return content format. (optional, default to 'application/json')
string$org_idSpecifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)
\InfluxDB2\Model\WritePrecision$precisionThe precision for the unix timestamps within the body line-protocol. (optional)
Exceptions

InvalidArgumentException

Returns
\GuzzleHttp\Promise\PromiseInterface

◆ postWriteRequest()

InfluxDB2\Service\WriteService::postWriteRequest (   $org,
  $bucket,
  $body,
  $zap_trace_span = null,
  $content_encoding = 'identity',
  $content_type = 'text/plain; charset=utf-8',
  $content_length = null,
  $accept = 'application/json',
  $org_id = null,
  $precision = null 
)
protected

Create request for operation 'postWrite'

Parameters
string$orgSpecifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. (required)
string$bucketThe destination bucket for writes. (required)
string$bodyLine protocol body (required)
string$zap_trace_spanOpenTracing span context (optional)
string$content_encodingWhen present, its value indicates to the database that compression is applied to the line-protocol body. (optional, default to 'identity')
string$content_typeContent-Type is used to indicate the format of the data sent to the server. (optional, default to 'text/plain; charset=utf-8')
int$content_lengthContent-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent. (optional)
string$acceptSpecifies the return content format. (optional, default to 'application/json')
string$org_idSpecifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)
\InfluxDB2\Model\WritePrecision$precisionThe precision for the unix timestamps within the body line-protocol. (optional)
Exceptions

InvalidArgumentException

Returns
\GuzzleHttp\Psr7\Request

◆ postWriteWithHttpInfo()

InfluxDB2\Service\WriteService::postWriteWithHttpInfo (   $org,
  $bucket,
  $body,
  $zap_trace_span = null,
  $content_encoding = 'identity',
  $content_type = 'text/plain; charset=utf-8',
  $content_length = null,
  $accept = 'application/json',
  $org_id = null,
  $precision = null 
)

Operation postWriteWithHttpInfo

Write time series data into InfluxDB

Parameters
string$orgSpecifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence. (required)
string$bucketThe destination bucket for writes. (required)
string$bodyLine protocol body (required)
string$zap_trace_spanOpenTracing span context (optional)
string$content_encodingWhen present, its value indicates to the database that compression is applied to the line-protocol body. (optional, default to 'identity')
string$content_typeContent-Type is used to indicate the format of the data sent to the server. (optional, default to 'text/plain; charset=utf-8')
int$content_lengthContent-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent. (optional)
string$acceptSpecifies the return content format. (optional, default to 'application/json')
string$org_idSpecifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence. (optional)
\InfluxDB2\Model\WritePrecision$precisionThe precision for the unix timestamps within the body line-protocol. (optional)
Exceptions

InfluxDB2\ApiException on non-2xx response

Exceptions

InvalidArgumentException

Returns
array of null, HTTP status code, HTTP response headers (array of strings)

The documentation for this class was generated from the following file: