Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,44 @@
]
}
},
"/api/v1/namespaces/{namespace}/schedule-count": {
"get": {
"summary": "CountSchedules is a visibility API to count schedules in a specific namespace.",
"operationId": "CountSchedules2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1CountSchedulesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "query",
"description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/api/v1/namespaces/{namespace}/schedules": {
"get": {
"summary": "List all schedules in a namespace.",
Expand Down Expand Up @@ -5668,6 +5706,44 @@
]
}
},
"/namespaces/{namespace}/schedule-count": {
"get": {
"summary": "CountSchedules is a visibility API to count schedules in a specific namespace.",
"operationId": "CountSchedules",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1CountSchedulesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "query",
"description": "Visibility query, see https://docs.temporal.io/list-filter for the syntax.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/namespaces/{namespace}/schedules": {
"get": {
"summary": "List all schedules in a namespace.",
Expand Down Expand Up @@ -11478,6 +11554,40 @@
}
}
},
"v1CountSchedulesResponse": {
"type": "object",
"properties": {
"count": {
"type": "string",
"format": "int64",
"description": "If `query` is not grouping by any field, the count is an approximate number\nof schedules that match the query.\nIf `query` is grouping by a field, the count is simply the sum of the counts\nof the groups returned in the response. This number can be smaller than the\ntotal number of schedules matching the query."
},
"groups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1CountSchedulesResponseAggregationGroup"
},
"description": "Contains the groups if the request is grouping by a field.\nThe list might not be complete, and the counts of each group is approximate."
}
}
},
"v1CountSchedulesResponseAggregationGroup": {
"type": "object",
"properties": {
"groupValues": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Payload"
}
},
"count": {
"type": "string",
"format": "int64"
}
}
},
"v1CountWorkflowExecutionsResponse": {
"type": "object",
"properties": {
Expand Down
87 changes: 87 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,36 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/namespaces/{namespace}/schedule-count:
get:
tags:
- WorkflowService
description: CountSchedules is a visibility API to count schedules in a specific namespace.
operationId: CountSchedules
parameters:
- name: namespace
in: path
required: true
schema:
type: string
- name: query
in: query
description: Visibility query, see https://docs.temporal.io/list-filter for the syntax.
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CountSchedulesResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/namespaces/{namespace}/schedules:
get:
tags:
Expand Down Expand Up @@ -5113,6 +5143,36 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/namespaces/{namespace}/schedule-count:
get:
tags:
- WorkflowService
description: CountSchedules is a visibility API to count schedules in a specific namespace.
operationId: CountSchedules
parameters:
- name: namespace
in: path
required: true
schema:
type: string
- name: query
in: query
description: Visibility query, see https://docs.temporal.io/list-filter for the syntax.
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CountSchedulesResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/namespaces/{namespace}/schedules:
get:
tags:
Expand Down Expand Up @@ -8568,6 +8628,33 @@ components:
$ref: '#/components/schemas/Payload'
count:
type: string
CountSchedulesResponse:
type: object
properties:
count:
type: string
description: |-
If `query` is not grouping by any field, the count is an approximate number
of schedules that match the query.
If `query` is grouping by a field, the count is simply the sum of the counts
of the groups returned in the response. This number can be smaller than the
total number of schedules matching the query.
groups:
type: array
items:
$ref: '#/components/schemas/CountSchedulesResponse_AggregationGroup'
description: |-
Contains the groups if the request is grouping by a field.
The list might not be complete, and the counts of each group is approximate.
CountSchedulesResponse_AggregationGroup:
type: object
properties:
groupValues:
type: array
items:
$ref: '#/components/schemas/Payload'
count:
type: string
CountWorkflowExecutionsResponse:
type: object
properties:
Expand Down
24 changes: 24 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,30 @@ message ListSchedulesResponse {
bytes next_page_token = 2;
}

message CountSchedulesRequest {
string namespace = 1;
// Visibility query, see https://docs.temporal.io/list-filter for the syntax.
string query = 2;
}

message CountSchedulesResponse {
// If `query` is not grouping by any field, the count is an approximate number
// of schedules that match the query.
// If `query` is grouping by a field, the count is simply the sum of the counts
// of the groups returned in the response. This number can be smaller than the
// total number of schedules matching the query.
int64 count = 1;

// Contains the groups if the request is grouping by a field.
// The list might not be complete, and the counts of each group is approximate.
repeated AggregationGroup groups = 2;

message AggregationGroup {
repeated temporal.api.common.v1.Payload group_values = 1;
int64 count = 2;
}
}

// [cleanup-wv-pre-release]
message UpdateWorkerBuildIdCompatibilityRequest {
message AddNewCompatibleVersion {
Expand Down
10 changes: 10 additions & 0 deletions temporal/api/workflowservice/v1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,16 @@ service WorkflowService {
};
}

// CountSchedules is a visibility API to count schedules in a specific namespace.
rpc CountSchedules (CountSchedulesRequest) returns (CountSchedulesResponse) {
option (google.api.http) = {
get: "/namespaces/{namespace}/schedule-count"
additional_bindings {
get: "/api/v1/namespaces/{namespace}/schedule-count"
}
};
}

// Deprecated. Use `UpdateWorkerVersioningRules`.
//
// Allows users to specify sets of worker build id versions on a per task queue basis. Versions
Expand Down
Loading