feat: add system api proto (#3294)

* feat: add system api proto

* Update proto/zitadel/instance.proto

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* Update proto/zitadel/instance.proto

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* Update proto/zitadel/instance.proto

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

* feat: add system api proto

* feat: add system api proto

* feat: add system api proto

* feat: add system api proto

* generate grpc

* feat: remove region from system proto

* fix: remove metrics endpoint

* fix: add md file

* rebuild proto

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2022-03-22 08:47:18 +01:00
committed by GitHub
parent 5132ebe07c
commit 9e13b70a3d
8 changed files with 1454 additions and 2 deletions

View File

@@ -0,0 +1,108 @@
---
title: zitadel/instance.proto
---
> This document reflects the state from API 1.0 (available from 20.04.2021)
## Messages
### DomainsQuery
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| domains | repeated string | - | string.max_len: 200<br /> |
| method | zitadel.v1.ListQueryMethod | - | enum.defined_only: true<br /> |
### IdQuery
IdQuery is always equals
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.max_len: 200<br /> |
### Instance
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | |
| details | zitadel.v1.ObjectDetails | - | |
| state | State | - | |
| generated_domain | string | - | |
| custom_domains | repeated string | - | |
| name | string | - | |
| version | string | - | |
### Query
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.id_query | IdQuery | - | |
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.domains_query | DomainsQuery | - | |
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.state_query | StateQuery | - | |
### StateQuery
StateQuery is always equals
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| state | State | - | enum.defined_only: true<br /> |
## Enums
### FieldName {#fieldname}
| Name | Number | Description |
| ---- | ------ | ----------- |
| FIELD_NAME_UNSPECIFIED | 0 | - |
| FIELD_NAME_ID | 1 | - |
| FIELD_NAME_GENERATED_DOMAIN | 2 | - |
| FIELD_NAME_NAME | 3 | - |
| FIELD_NAME_CREATION_DATE | 4 | - |
### State {#state}
| Name | Number | Description |
| ---- | ------ | ----------- |
| STATE_UNSPECIFIED | 0 | - |
| STATE_CREATING | 1 | - |
| STATE_RUNNING | 2 | - |
| STATE_STOPPING | 3 | - |
| STATE_STOPPED | 4 | - |

View File

@@ -66,6 +66,16 @@ on manipulation: the | |
## Enums
### ListQueryMethod {#listquerymethod}
| Name | Number | Description |
| ---- | ------ | ----------- |
| LIST_QUERY_METHOD_IN | 0 | - |
### TextQueryMethod {#textquerymethod}

View File

@@ -0,0 +1,153 @@
---
title: zitadel/settings.proto
---
> This document reflects the state from API 1.0 (available from 20.04.2021)
## Messages
### DebugNotificationProvider
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| compact | bool | - | |
### OIDCSettings
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| access_token_lifetime | google.protobuf.Duration | - | |
| id_token_lifetime | google.protobuf.Duration | - | |
| refresh_token_idle_expiration | google.protobuf.Duration | - | |
| refresh_token_expiration | google.protobuf.Duration | - | |
### SMSProvider
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| id | string | - | |
| state | SMSProviderConfigState | - | |
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) config.twilio | TwilioConfig | - | |
### SMTPConfig
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| sender_address | string | - | |
| sender_name | string | - | |
| tls | bool | - | |
| host | string | - | |
| user | string | - | |
### SecretGenerator
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| generator_type | SecretGeneratorType | - | |
| details | zitadel.v1.ObjectDetails | - | |
| length | uint32 | - | |
| expiry | google.protobuf.Duration | - | |
| include_lower_letters | bool | - | |
| include_upper_letters | bool | - | |
| include_digits | bool | - | |
| include_symbols | bool | - | |
### SecretGeneratorQuery
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.type_query | SecretGeneratorTypeQuery | - | |
### SecretGeneratorTypeQuery
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| generator_type | SecretGeneratorType | - | |
### TwilioConfig
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| sid | string | - | |
| sender_number | string | - | |
## Enums
### SMSProviderConfigState {#smsproviderconfigstate}
| Name | Number | Description |
| ---- | ------ | ----------- |
| SMS_PROVIDER_CONFIG_STATE_UNSPECIFIED | 0 | - |
| SMS_PROVIDER_CONFIG_ACTIVE | 1 | - |
| SMS_PROVIDER_CONFIG_INACTIVE | 2 | - |
### SecretGeneratorType {#secretgeneratortype}
| Name | Number | Description |
| ---- | ------ | ----------- |
| SECRET_GENERATOR_TYPE_UNSPECIFIED | 0 | - |
| SECRET_GENERATOR_TYPE_INIT_CODE | 1 | - |
| SECRET_GENERATOR_TYPE_VERIFY_EMAIL_CODE | 2 | - |
| SECRET_GENERATOR_TYPE_VERIFY_PHONE_CODE | 3 | - |
| SECRET_GENERATOR_TYPE_PASSWORD_RESET_CODE | 4 | - |
| SECRET_GENERATOR_TYPE_PASSWORDLESS_INIT_CODE | 5 | - |
| SECRET_GENERATOR_TYPE_APP_SECRET | 6 | - |

View File

@@ -0,0 +1,522 @@
---
title: zitadel/system.proto
---
> This document reflects the state from API 1.0 (available from 20.04.2021)
## SystemService {#zitadelsystemv1systemservice}
### Healthz
> **rpc** Healthz([HealthzRequest](#healthzrequest))
[HealthzResponse](#healthzresponse)
Indicates if ZITADEL is running.
It respondes as soon as ZITADEL started
GET: /healthz
### ListInstances
> **rpc** ListInstances([ListInstancesRequest](#listinstancesrequest))
[ListInstancesResponse](#listinstancesresponse)
Returns a list of ZITADEL instances/tenants
POST: /instances
### GetInstance
> **rpc** GetInstance([GetInstanceRequest](#getinstancerequest))
[GetInstanceResponse](#getinstanceresponse)
Returns the detail of an instance
GET: /instances/{id}
### AddInstance
> **rpc** AddInstance([AddInstanceRequest](#addinstancerequest))
[AddInstanceResponse](#addinstanceresponse)
Creates a new instance with all needed setup data
This might take some time
POST: /instances
### RemoveInstance
> **rpc** RemoveInstance([RemoveInstanceRequest](#removeinstancerequest))
[RemoveInstanceResponse](#removeinstanceresponse)
Removes a instances
This might take some time
DELETE: /instances/{id}
### GetUsage
> **rpc** GetUsage([GetUsageRequest](#getusagerequest))
[GetUsageResponse](#getusageresponse)
Returns the usage metrics of an instance
GET: /instances/{id}/usage
### GetGeneratedDomain
> **rpc** GetGeneratedDomain([GetGeneratedDomainRequest](#getgenerateddomainrequest))
[GetGeneratedDomainResponse](#getgenerateddomainresponse)
Returns the domain of an instance
GET: /instances/{id}/domains/generated
### GetCustomDomains
> **rpc** GetCustomDomains([GetCustomDomainsRequest](#getcustomdomainsrequest))
[GetCustomDomainsResponse](#getcustomdomainsresponse)
Returns the custom domains of an instance
GET: /instances/{id}/domains/custom
### AddCustomDomain
> **rpc** AddCustomDomain([AddCustomDomainRequest](#addcustomdomainrequest))
[AddCustomDomainResponse](#addcustomdomainresponse)
Returns the domain of an instance
POST: /instances/{id}/domains/custom
### ListViews
> **rpc** ListViews([ListViewsRequest](#listviewsrequest))
[ListViewsResponse](#listviewsresponse)
Returns all stored read models of ZITADEL
views are used for search optimisation and optimise request latencies
they represent the delta of the event happend on the objects
POST: /views/_search
### ClearView
> **rpc** ClearView([ClearViewRequest](#clearviewrequest))
[ClearViewResponse](#clearviewresponse)
Truncates the delta of the change stream
be carefull with this function because ZITADEL has to
recompute the deltas after they got cleared.
Search requests will return wrong results until all deltas are recomputed
POST: /views/{database}/{view_name}
### ListFailedEvents
> **rpc** ListFailedEvents([ListFailedEventsRequest](#listfailedeventsrequest))
[ListFailedEventsResponse](#listfailedeventsresponse)
Returns event descriptions which cannot be processed.
It's possible that some events need some retries.
For example if the SMTP-API wasn't able to send an email at the first time
POST: /failedevents/_search
### RemoveFailedEvent
> **rpc** RemoveFailedEvent([RemoveFailedEventRequest](#removefailedeventrequest))
[RemoveFailedEventResponse](#removefailedeventresponse)
Deletes the event from failed events view.
the event is not removed from the change stream
This call is usefull if the system was able to process the event later.
e.g. if the second try of sending an email was successful. the first try produced a
failed event. You can find out if it worked on the `failure_count`
DELETE: /failedevents/{database}/{view_name}/{failed_sequence}
## Messages
### AddCustomDomainRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| custom_domain | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### AddCustomDomainResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### AddInstanceRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| instance_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| first_org_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| custom_domain | string | - | string.max_len: 200<br /> |
| owner_first_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| owner_last_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| owner_email | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| owner_username | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| password | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| request_limit | uint64 | - | |
| action_mins_limit | uint64 | - | |
### AddInstanceResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | |
### ChangeSubscriptionRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| domain | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| subscription_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| request_limit | uint64 | - | |
| action_mins_limit | uint64 | - | |
### ChangeSubscriptionResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### ClearViewRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| database | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| view_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### ClearViewResponse
This is an empty response
### FailedEvent
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| database | string | - | |
| view_name | string | - | |
| failed_sequence | uint64 | - | |
| failure_count | uint64 | - | |
| error_message | string | - | |
### GetCustomDomainsRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetCustomDomainsResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| domains | repeated string | - | |
### GetGeneratedDomainRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetGeneratedDomainResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| domain | string | - | |
### GetInstanceRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetInstanceResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| instance | zitadel.instance.v1.Instance | - | |
### GetUsageRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetUsageResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| executed_requests | uint64 | - | |
| executed_action_mins | uint64 | - | |
### HealthzRequest
This is an empty request
### HealthzResponse
This is an empty response
### ListFailedEventsRequest
This is an empty request
### ListFailedEventsResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| result | repeated FailedEvent | TODO: list details | |
### ListInstancesRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| query | zitadel.v1.ListQuery | list limitations and ordering | |
| sorting_column | zitadel.instance.v1.FieldName | the field the result is sorted | |
| queries | repeated zitadel.instance.v1.Query | criterias the client is looking for | |
### ListInstancesResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ListDetails | - | |
| sorting_column | zitadel.instance.v1.FieldName | - | |
| result | repeated zitadel.instance.v1.Instance | - | |
### ListViewsRequest
This is an empty request
### ListViewsResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| result | repeated View | TODO: list details | |
### RemoveFailedEventRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| database | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| view_name | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| failed_sequence | uint64 | - | |
### RemoveFailedEventResponse
This is an empty response
### RemoveInstanceRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### RemoveInstanceResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### View
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| database | string | - | |
| view_name | string | - | |
| processed_sequence | uint64 | - | |
| event_timestamp | google.protobuf.Timestamp | The timestamp the event occured | |
| last_successful_spooler_run | google.protobuf.Timestamp | - | |
| instance | string | - | |