Understanding the meta.edgelq.com service APIv1alpha2, in proto package ntt.meta.v1alpha2.

Service meta.edgelq.com in version v1alpha2, proto package ntt.meta.v1alpha2

Here is the list of resources supported in Meta service APIv1alpha2:

Deployment Resource

Deployment Resource - describes meta information about deployment of a parent Service.

Name patterns:

  • regions/{region}/deployments/{deployment}

Parent resources:

This section covers the methods and messages to interact with Deployment resource.

Deployment Methods

Here is the list of Deployment resource methods:

GetDeployment Method

GetDeployment

rpc GetDeployment(GetDeploymentRequest) returns (Deployment)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/deployments.get

The equivalent REST API is:

GET /v1alpha2/{name=regions/*/deployments/*} 

BatchGetDeployments Method

BatchGetDeployments

rpc BatchGetDeployments(BatchGetDeploymentsRequest) returns (BatchGetDeploymentsResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/deployments.batchGet

The equivalent REST API is:

GET /v1alpha2/deployments:batchGet 

ListDeployments Method

ListDeployments

rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/deployments.list

The equivalent REST API is:

GET /v1alpha2/{parent=regions/*}/deployments 

WatchDeployment Method

WatchDeployment

rpc WatchDeployment(WatchDeploymentRequest) returns (WatchDeploymentResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/deployments.watch

The equivalent REST API is:

POST /v1alpha2/{name=regions/*/deployments/*}:watch 

WatchDeployments Method

WatchDeployments

rpc WatchDeployments(WatchDeploymentsRequest) returns (WatchDeploymentsResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/deployments.watch

The equivalent REST API is:

POST /v1alpha2/{parent=regions/*}/deployments:watch 

Deployment Messages

Here is the list of Deployment resource messages:

Deployment Message

NameTypeDescription
namestring (name of Deployment)Name of Deployment When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-zA-Z0-9_.-]{1,128}
servicestring (reference to Service)Deployed service
metadataMetaMetadata

GetDeploymentRequest Message

A request message of the GetDeployment method.

NameTypeDescription
namestring (name of Deployment)Name of ntt.meta.v1alpha2.Deployment
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetDeploymentsRequest Message

A request message of the BatchGetDeployments method.

NameTypeDescription
namesrepeated string (name of Deployment)Names of Deployments
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetDeploymentsResponse Message

A response message of the BatchGetDeployments method.

NameTypeDescription
deploymentsrepeated Deploymentfound Deployments
missingrepeated string (name of Deployment)list of not found Deployments

ListDeploymentsRequest Message

A request message of the ListDeployments method.

NameTypeDescription
parentstring (parent name of Deployment)Parent name of ntt.meta.v1alpha2.Deployment
page_sizeint32Requested page size. Server may return fewer Deployments than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Deployment)A token identifying a page of results the server should return. Typically, this is the value of ListDeploymentsResponse.next_page_token.
order_bystring (orderBy of Deployment)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Deployment)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListDeploymentsResponse Message

A response message of the ListDeployments method.

NameTypeDescription
deploymentsrepeated DeploymentThe list of Deployments
prev_page_tokenstring (cursor of Deployment)A token to retrieve previous page of results. Pass this value in the ListDeploymentsRequest.page_token.
next_page_tokenstring (cursor of Deployment)A token to retrieve next page of results. Pass this value in the ListDeploymentsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Deployments across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchDeploymentRequest Message

A request message of the WatchDeployment method.

NameTypeDescription
namestring (name of Deployment)Name of ntt.meta.v1alpha2.Deployment
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchDeploymentResponse Message

A response message of the WatchDeployment method.

NameTypeDescription
changeDeploymentChange

WatchDeploymentsRequest Message

A request message of the WatchDeployments method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Deployment)Parent name of ntt.meta.v1alpha2.Deployment
page_sizeint32Requested page size. Server may return fewer Deployments than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Deployment)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Deployment)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Deployment)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Deployment that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Deployment that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchDeploymentsResponse Message

A response message of the WatchDeployments method.

NameTypeDescription
deployment_changesrepeated DeploymentChangeChanges of Deployments
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Deployments will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchDeploymentsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Deployments will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchDeploymentsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Deployment)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Deployment)New token to retrieve next page of results.

Region Resource

Region Resource

Name patterns:

  • regions/{region}

This section covers the methods and messages to interact with Region resource.

Region Methods

Here is the list of Region resource methods:

GetRegion Method

GetRegion

rpc GetRegion(GetRegionRequest) returns (Region)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/regions.get

The equivalent REST API is:

GET /v1alpha2/{name=regions/*} 

BatchGetRegions Method

BatchGetRegions

rpc BatchGetRegions(BatchGetRegionsRequest) returns (BatchGetRegionsResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/regions.batchGet

The equivalent REST API is:

GET /v1alpha2/regions:batchGet 

ListRegions Method

ListRegions

rpc ListRegions(ListRegionsRequest) returns (ListRegionsResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/regions.list

The equivalent REST API is:

GET /v1alpha2/regions 

WatchRegion Method

WatchRegion

rpc WatchRegion(WatchRegionRequest) returns (WatchRegionResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/regions.watch

The equivalent REST API is:

POST /v1alpha2/{name=regions/*}:watch 

WatchRegions Method

WatchRegions

rpc WatchRegions(WatchRegionsRequest) returns (WatchRegionsResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/regions.watch

The equivalent REST API is:

POST /v1alpha2/regions:watch 

Region Messages

Here is the list of Region resource messages:

Region Message

NameTypeDescription
namestring (name of Region)Name of Region When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9-]{0,28}[a-z0-9]
titlestringRegion title
domainstringRegion domain, for example us-west.edgelq.com
locationRegion.RegionLocationRegion location
is_defaultboolWhether is default. Only one record is allowed to have this attribute on.
connectivity_scoresrepeated Region.RegionConnectivityPreferenceHardcoded scores regarding connectivity preference.
metadataMetaMetadata

Region.RegionLocation Message

RegionLocation describes deployment location of a region.

NameTypeDescription
continentstring
countrystring
agglomerationstring
citystring
cloudstring

Region.RegionConnectivityPreference Message

RegionConnectivityPreference is a hardcoded connectivity score to other region.

NameTypeDescription
deststring (reference to Region)Destination region
scoreint32Hardcoded score

GetRegionRequest Message

A request message of the GetRegion method.

NameTypeDescription
namestring (name of Region)Name of ntt.meta.v1alpha2.Region
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetRegionsRequest Message

A request message of the BatchGetRegions method.

NameTypeDescription
namesrepeated string (name of Region)Names of Regions
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetRegionsResponse Message

A response message of the BatchGetRegions method.

NameTypeDescription
regionsrepeated Regionfound Regions
missingrepeated string (name of Region)list of not found Regions

ListRegionsRequest Message

A request message of the ListRegions method.

NameTypeDescription
page_sizeint32Requested page size. Server may return fewer Regions than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Region)A token identifying a page of results the server should return. Typically, this is the value of ListRegionsResponse.next_page_token.
order_bystring (orderBy of Region)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Region)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListRegionsResponse Message

A response message of the ListRegions method.

NameTypeDescription
regionsrepeated RegionThe list of Regions
prev_page_tokenstring (cursor of Region)A token to retrieve previous page of results. Pass this value in the ListRegionsRequest.page_token.
next_page_tokenstring (cursor of Region)A token to retrieve next page of results. Pass this value in the ListRegionsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Regions across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchRegionRequest Message

A request message of the WatchRegion method.

NameTypeDescription
namestring (name of Region)Name of ntt.meta.v1alpha2.Region
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchRegionResponse Message

A response message of the WatchRegion method.

NameTypeDescription
changeRegionChange

WatchRegionsRequest Message

A request message of the WatchRegions method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
page_sizeint32Requested page size. Server may return fewer Regions than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Region)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Region)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Region)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Region that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Region that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchRegionsResponse Message

A response message of the WatchRegions method.

NameTypeDescription
region_changesrepeated RegionChangeChanges of Regions
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Regions will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchRegionsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Regions will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchRegionsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Region)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Region)New token to retrieve next page of results.

Resource Resource

Resource Resource

Name patterns:

  • services/{service}/resources/{resource}

Parent resources:

This section covers the methods and messages to interact with Resource resource.

Resource Methods

Here is the list of Resource resource methods:

GetResource Method

GetResource

rpc GetResource(GetResourceRequest) returns (Resource)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/resources.get

The equivalent REST API is:

GET /v1alpha2/{name=services/*/resources/*} 

BatchGetResources Method

BatchGetResources

rpc BatchGetResources(BatchGetResourcesRequest) returns (BatchGetResourcesResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/resources.batchGet

The equivalent REST API is:

GET /v1alpha2/resources:batchGet 

ListResources Method

ListResources

rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/resources.list

The equivalent REST API is:

GET /v1alpha2/{parent=services/*}/resources 

WatchResource Method

WatchResource

rpc WatchResource(WatchResourceRequest) returns (WatchResourceResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/resources.watch

The equivalent REST API is:

POST /v1alpha2/{name=services/*/resources/*}:watch 

WatchResources Method

WatchResources

rpc WatchResources(WatchResourcesRequest) returns (WatchResourcesResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/resources.watch

The equivalent REST API is:

POST /v1alpha2/{parent=services/*}/resources:watch 

Resource Messages

Here is the list of Resource resource messages:

Resource Message

NameTypeDescription
namestring (name of Resource)Name of Resource in CamelCase, for example “Device”
plural_namestringPlural name of resource in CamelForm, for example “Devices”
fqnstringFully qualified name, for example devices.edgelq.com/Device. It can also be derived from name too.
is_regionalboolWhether resource is regional
metadataMetaMetadata

GetResourceRequest Message

A request message of the GetResource method.

NameTypeDescription
namestring (name of Resource)Name of ntt.meta.v1alpha2.Resource
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetResourcesRequest Message

A request message of the BatchGetResources method.

NameTypeDescription
namesrepeated string (name of Resource)Names of Resources
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetResourcesResponse Message

A response message of the BatchGetResources method.

NameTypeDescription
resourcesrepeated Resourcefound Resources
missingrepeated string (name of Resource)list of not found Resources

ListResourcesRequest Message

A request message of the ListResources method.

NameTypeDescription
parentstring (parent name of Resource)Parent name of ntt.meta.v1alpha2.Resource
page_sizeint32Requested page size. Server may return fewer Resources than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Resource)A token identifying a page of results the server should return. Typically, this is the value of ListResourcesResponse.next_page_token.
order_bystring (orderBy of Resource)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Resource)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListResourcesResponse Message

A response message of the ListResources method.

NameTypeDescription
resourcesrepeated ResourceThe list of Resources
prev_page_tokenstring (cursor of Resource)A token to retrieve previous page of results. Pass this value in the ListResourcesRequest.page_token.
next_page_tokenstring (cursor of Resource)A token to retrieve next page of results. Pass this value in the ListResourcesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Resources across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchResourceRequest Message

A request message of the WatchResource method.

NameTypeDescription
namestring (name of Resource)Name of ntt.meta.v1alpha2.Resource
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchResourceResponse Message

A response message of the WatchResource method.

NameTypeDescription
changeResourceChange

WatchResourcesRequest Message

A request message of the WatchResources method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Resource)Parent name of ntt.meta.v1alpha2.Resource
page_sizeint32Requested page size. Server may return fewer Resources than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Resource)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Resource)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Resource)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Resource that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Resource that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchResourcesResponse Message

A response message of the WatchResources method.

NameTypeDescription
resource_changesrepeated ResourceChangeChanges of Resources
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Resources will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchResourcesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Resources will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchResourcesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Resource)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Resource)New token to retrieve next page of results.

Service Resource

Service Resource

Name patterns:

  • services/{service}

This section covers the methods and messages to interact with Service resource.

Service Methods

Here is the list of Service resource methods:

GetService Method

GetService

rpc GetService(GetServiceRequest) returns (Service)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/services.get

The equivalent REST API is:

GET /v1alpha2/{name=services/*} 

BatchGetServices Method

BatchGetServices

rpc BatchGetServices(BatchGetServicesRequest) returns (BatchGetServicesResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/services.batchGet

The equivalent REST API is:

GET /v1alpha2/services:batchGet 

ListServices Method

ListServices

rpc ListServices(ListServicesRequest) returns (ListServicesResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/services.list

The equivalent REST API is:

GET /v1alpha2/services 

WatchService Method

WatchService

rpc WatchService(WatchServiceRequest) returns (WatchServiceResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/services.watch

The equivalent REST API is:

POST /v1alpha2/{name=services/*}:watch 

WatchServices Method

WatchServices

rpc WatchServices(WatchServicesRequest) returns (WatchServicesResponse)

with the following messages:

Required Permissions:

  • services/meta.edgelq.com/permissions/services.watch

The equivalent REST API is:

POST /v1alpha2/services:watch 

Service Messages

Here is the list of Service resource messages:

Service Message

NameTypeDescription
namestring (name of Service)Name of Service - it has form of service domain, for example devices.edgelq.com, so full reference name would be like services/devices.edgelq.com
display_namestringDisplay name, for example “Devices” - CamelVersion
current_versionstringCurrent version of the service, for example “v1alpha2”
all_versionsrepeated stringAll version in order from newest (index 0) to oldest
metadataMetaMetadata

GetServiceRequest Message

A request message of the GetService method.

NameTypeDescription
namestring (name of Service)Name of ntt.meta.v1alpha2.Service
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetServicesRequest Message

A request message of the BatchGetServices method.

NameTypeDescription
namesrepeated string (name of Service)Names of Services
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetServicesResponse Message

A response message of the BatchGetServices method.

NameTypeDescription
servicesrepeated Servicefound Services
missingrepeated string (name of Service)list of not found Services

ListServicesRequest Message

A request message of the ListServices method.

NameTypeDescription
page_sizeint32Requested page size. Server may return fewer Services than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Service)A token identifying a page of results the server should return. Typically, this is the value of ListServicesResponse.next_page_token.
order_bystring (orderBy of Service)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Service)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListServicesResponse Message

A response message of the ListServices method.

NameTypeDescription
servicesrepeated ServiceThe list of Services
prev_page_tokenstring (cursor of Service)A token to retrieve previous page of results. Pass this value in the ListServicesRequest.page_token.
next_page_tokenstring (cursor of Service)A token to retrieve next page of results. Pass this value in the ListServicesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Services across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchServiceRequest Message

A request message of the WatchService method.

NameTypeDescription
namestring (name of Service)Name of ntt.meta.v1alpha2.Service
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchServiceResponse Message

A response message of the WatchService method.

NameTypeDescription
changeServiceChange

WatchServicesRequest Message

A request message of the WatchServices method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
page_sizeint32Requested page size. Server may return fewer Services than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Service)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Service)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Service)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Service that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Service that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchServicesResponse Message

A response message of the WatchServices method.

NameTypeDescription
service_changesrepeated ServiceChangeChanges of Services
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Services will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchServicesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Services will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchServicesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Service)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Service)New token to retrieve next page of results.

Meta Service Shared Methods and Messages

Meta Service Shared Messages

Here is the list of Meta service shared messages:

DeploymentChange Message

DeploymentChange is used by Watch notifications Responses to describe change of single Deployment One of Added, Modified, Removed

NameTypeDescription
addedDeploymentChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedDeploymentChange.ModifiedModified is returned when watched document is modified
currentDeploymentChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedDeploymentChange.RemovedRemoved is returned when Deployment is deleted or leaves Query view

DeploymentChange.Added Message

Deployment has been added to query view

NameTypeDescription
deploymentDeployment
view_indexint32Integer describing index of added Deployment in resulting query view.

DeploymentChange.Current Message

Deployment has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
deploymentDeployment

DeploymentChange.Modified Message

Deployment changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Deployment)Name of modified Deployment
deploymentDeploymentNew version of Deployment or masked difference, depending on mask_changes instrumentation of issued [WatchDeploymentRequest] or [WatchDeploymentsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Deployment. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Deployment new index in resulting query view.

DeploymentChange.Removed Message

Removed is returned when Deployment is deleted or leaves Query view

NameTypeDescription
namestring (name of Deployment)
view_indexint32Integer specifying removed Deployment index. Not populated in stateless watch type.

RegionChange Message

RegionChange is used by Watch notifications Responses to describe change of single Region One of Added, Modified, Removed

NameTypeDescription
addedRegionChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedRegionChange.ModifiedModified is returned when watched document is modified
currentRegionChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedRegionChange.RemovedRemoved is returned when Region is deleted or leaves Query view

RegionChange.Added Message

Region has been added to query view

NameTypeDescription
regionRegion
view_indexint32Integer describing index of added Region in resulting query view.

RegionChange.Current Message

Region has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
regionRegion

RegionChange.Modified Message

Region changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Region)Name of modified Region
regionRegionNew version of Region or masked difference, depending on mask_changes instrumentation of issued [WatchRegionRequest] or [WatchRegionsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Region. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Region new index in resulting query view.

RegionChange.Removed Message

Removed is returned when Region is deleted or leaves Query view

NameTypeDescription
namestring (name of Region)
view_indexint32Integer specifying removed Region index. Not populated in stateless watch type.

ResourceChange Message

ResourceChange is used by Watch notifications Responses to describe change of single Resource One of Added, Modified, Removed

NameTypeDescription
addedResourceChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedResourceChange.ModifiedModified is returned when watched document is modified
currentResourceChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedResourceChange.RemovedRemoved is returned when Resource is deleted or leaves Query view

ResourceChange.Added Message

Resource has been added to query view

NameTypeDescription
resourceResource
view_indexint32Integer describing index of added Resource in resulting query view.

ResourceChange.Current Message

Resource has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
resourceResource

ResourceChange.Modified Message

Resource changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Resource)Name of modified Resource
resourceResourceNew version of Resource or masked difference, depending on mask_changes instrumentation of issued [WatchResourceRequest] or [WatchResourcesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Resource. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Resource new index in resulting query view.

ResourceChange.Removed Message

Removed is returned when Resource is deleted or leaves Query view

NameTypeDescription
namestring (name of Resource)
view_indexint32Integer specifying removed Resource index. Not populated in stateless watch type.

ServiceChange Message

ServiceChange is used by Watch notifications Responses to describe change of single Service One of Added, Modified, Removed

NameTypeDescription
addedServiceChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedServiceChange.ModifiedModified is returned when watched document is modified
currentServiceChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedServiceChange.RemovedRemoved is returned when Service is deleted or leaves Query view

ServiceChange.Added Message

Service has been added to query view

NameTypeDescription
serviceService
view_indexint32Integer describing index of added Service in resulting query view.

ServiceChange.Current Message

Service has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
serviceService

ServiceChange.Modified Message

Service changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Service)Name of modified Service
serviceServiceNew version of Service or masked difference, depending on mask_changes instrumentation of issued [WatchServiceRequest] or [WatchServicesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Service. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Service new index in resulting query view.

ServiceChange.Removed Message

Removed is returned when Service is deleted or leaves Query view

NameTypeDescription
namestring (name of Service)
view_indexint32Integer specifying removed Service index. Not populated in stateless watch type.