Skip to content

Commit

Permalink
one api
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix committed Feb 18, 2025
1 parent c7a4d79 commit d284aa1
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 333 deletions.
76 changes: 10 additions & 66 deletions disperser/dataapi/docs/v2/V2_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,94 +118,38 @@ const docTemplateV2 = `{
}
}
},
"/blobs/feed/backward": {
"/blobs/feed": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Blobs"
],
"summary": "Fetch blob feed backward in time (newest to oldest)",
"summary": "Fetch blob feed in specified direction",
"parameters": [
{
"type": "string",
"description": "Fetch blobs before this time (ISO 8601 format) [default: now]",
"name": "before",
"in": "query"
},
{
"type": "string",
"description": "Stop fetching at this time (ISO 8601 format) [default: now-1h]",
"name": "until",
"in": "query"
"description": "Direction to fetch: 'forward' or 'backward' [default: forward]",
"name": "direction",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Pagination cursor for fetching older items; override before [default: empty]",
"name": "cursor",
"in": "query"
},
{
"type": "integer",
"description": "Maximum number of blobs to fetch [default: 20; max: 1000]",
"name": "limit",
"description": "Fetch blobs before this time, exclusive (ISO 8601 format, example: 2006-01-02T15:04:05Z) [default: now]",
"name": "before",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v2.BlobFeedResponse"
}
},
"400": {
"description": "error: Bad request",
"schema": {
"$ref": "#/definitions/v2.ErrorResponse"
}
},
"404": {
"description": "error: Not found",
"schema": {
"$ref": "#/definitions/v2.ErrorResponse"
}
},
"500": {
"description": "error: Server error",
"schema": {
"$ref": "#/definitions/v2.ErrorResponse"
}
}
}
}
},
"/blobs/feed/forward": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Blobs"
],
"summary": "Fetch blob feed forward in time (oldest to newest)",
"parameters": [
{
"type": "string",
"description": "Fetch blobs after this time (ISO 8601 format) [default: until - 1h]",
"description": "Fetch blobs after this time, exclusive (ISO 8601 format, example: 2006-01-02T15:04:05Z); must be smaller than 'before' [default: before-1h]",
"name": "after",
"in": "query"
},
{
"type": "string",
"description": "Stop fetching at this time (ISO 8601 format) [default: now]",
"name": "until",
"in": "query"
},
{
"type": "string",
"description": "Pagination cursor for fetching newer items; override after [default: empty]",
"description": "Pagination cursor; for 'forward', fetches blobs from 'cursor' to 'before', for 'backward', fetches from 'after' to 'cursor' (all are exclusive) [default: empty]",
"name": "cursor",
"in": "query"
},
Expand Down
76 changes: 10 additions & 66 deletions disperser/dataapi/docs/v2/V2_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,94 +115,38 @@
}
}
},
"/blobs/feed/backward": {
"/blobs/feed": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Blobs"
],
"summary": "Fetch blob feed backward in time (newest to oldest)",
"summary": "Fetch blob feed in specified direction",
"parameters": [
{
"type": "string",
"description": "Fetch blobs before this time (ISO 8601 format) [default: now]",
"name": "before",
"in": "query"
},
{
"type": "string",
"description": "Stop fetching at this time (ISO 8601 format) [default: now-1h]",
"name": "until",
"in": "query"
"description": "Direction to fetch: 'forward' or 'backward' [default: forward]",
"name": "direction",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Pagination cursor for fetching older items; override before [default: empty]",
"name": "cursor",
"in": "query"
},
{
"type": "integer",
"description": "Maximum number of blobs to fetch [default: 20; max: 1000]",
"name": "limit",
"description": "Fetch blobs before this time, exclusive (ISO 8601 format, example: 2006-01-02T15:04:05Z) [default: now]",
"name": "before",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v2.BlobFeedResponse"
}
},
"400": {
"description": "error: Bad request",
"schema": {
"$ref": "#/definitions/v2.ErrorResponse"
}
},
"404": {
"description": "error: Not found",
"schema": {
"$ref": "#/definitions/v2.ErrorResponse"
}
},
"500": {
"description": "error: Server error",
"schema": {
"$ref": "#/definitions/v2.ErrorResponse"
}
}
}
}
},
"/blobs/feed/forward": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Blobs"
],
"summary": "Fetch blob feed forward in time (oldest to newest)",
"parameters": [
{
"type": "string",
"description": "Fetch blobs after this time (ISO 8601 format) [default: until - 1h]",
"description": "Fetch blobs after this time, exclusive (ISO 8601 format, example: 2006-01-02T15:04:05Z); must be smaller than 'before' [default: before-1h]",
"name": "after",
"in": "query"
},
{
"type": "string",
"description": "Stop fetching at this time (ISO 8601 format) [default: now]",
"name": "until",
"in": "query"
},
{
"type": "string",
"description": "Pagination cursor for fetching newer items; override after [default: empty]",
"description": "Pagination cursor; for 'forward', fetches blobs from 'cursor' to 'before', for 'backward', fetches from 'after' to 'cursor' (all are exclusive) [default: empty]",
"name": "cursor",
"in": "query"
},
Expand Down
61 changes: 13 additions & 48 deletions disperser/dataapi/docs/v2/V2_swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -672,62 +672,27 @@ paths:
summary: Fetch blob certificate by blob key v2
tags:
- Blobs
/blobs/feed/backward:
/blobs/feed:
get:
parameters:
- description: 'Fetch blobs before this time (ISO 8601 format) [default: now]'
- description: 'Direction to fetch: ''forward'' or ''backward'' [default: forward]'
in: query
name: before
type: string
- description: 'Stop fetching at this time (ISO 8601 format) [default: now-1h]'
in: query
name: until
name: direction
required: true
type: string
- description: 'Pagination cursor for fetching older items; override before
[default: empty]'
- description: 'Fetch blobs before this time, exclusive (ISO 8601 format, example:
2006-01-02T15:04:05Z) [default: now]'
in: query
name: cursor
name: before
type: string
- description: 'Maximum number of blobs to fetch [default: 20; max: 1000]'
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v2.BlobFeedResponse'
"400":
description: 'error: Bad request'
schema:
$ref: '#/definitions/v2.ErrorResponse'
"404":
description: 'error: Not found'
schema:
$ref: '#/definitions/v2.ErrorResponse'
"500":
description: 'error: Server error'
schema:
$ref: '#/definitions/v2.ErrorResponse'
summary: Fetch blob feed backward in time (newest to oldest)
tags:
- Blobs
/blobs/feed/forward:
get:
parameters:
- description: 'Fetch blobs after this time (ISO 8601 format) [default: until
- 1h]'
- description: 'Fetch blobs after this time, exclusive (ISO 8601 format, example:
2006-01-02T15:04:05Z); must be smaller than ''before'' [default: before-1h]'
in: query
name: after
type: string
- description: 'Stop fetching at this time (ISO 8601 format) [default: now]'
in: query
name: until
type: string
- description: 'Pagination cursor for fetching newer items; override after [default:
empty]'
- description: 'Pagination cursor; for ''forward'', fetches blobs from ''cursor''
to ''before'', for ''backward'', fetches from ''after'' to ''cursor'' (all
are exclusive) [default: empty]'
in: query
name: cursor
type: string
Expand All @@ -754,7 +719,7 @@ paths:
description: 'error: Server error'
schema:
$ref: '#/definitions/v2.ErrorResponse'
summary: Fetch blob feed forward in time (oldest to newest)
summary: Fetch blob feed in specified direction
tags:
- Blobs
/metrics/summary:
Expand Down
Loading

0 comments on commit d284aa1

Please sign in to comment.