Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apis to update helix document store #443

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions docs/openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ paths:
$ref: './site-metrics-api.yaml#/site-metrics-by-source'
/sites/{siteId}/experiments:
$ref: './experiments-api.yaml#/experiments'
/sites/{siteId}/redirects:
$ref: './site-api.yaml#/redirects-for-site'
/sites/{siteId}/metatdata:
$ref: './site-api.yaml#/metadata-for-site'
/slack/channels/invite-by-user-id:
$ref: './slack-api.yaml#/invite-by-user-id'
/trigger:
Expand Down
84 changes: 84 additions & 0 deletions docs/openapi/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1279,3 +1279,87 @@ ScrapeResult:
- url: 'https://example.com/fr/page2'
status: 'FAILED'
error: 'Timeout'
FixedURLs:
properties:
fixedURLs:
description: Set of urls that were fixed.
type: array
items:
type: object
properties:
sourceURL:
description: The broken backlink URL
type: string
destinationURL:
description: The target for the broken backlink included in redirects.xslx
type: string
Metadata:
properties:
metadata:
description: Set of key value pairs to be added to the metadata table.
type: array
items:
type: object
properties:
key:
description: The metadata key propertu
type: string
value:
description: The metadata value property
type: string
MultiStatusItem:
type: object
required:
- status
properties:
status:
type: integer
minimum: 200
maximum: 600
example: 400
message:
type: string
example: "Not found"
MultiStatusMetadata:
type: object
required:
- failure
- success
- total
properties:
failure:
type: integer
minimum: 0
example: 1
success:
type: integer
minimum: 0
example: 3
total:
type: integer
minimum: 0
example: 4
MultiStatusResponse:
type: object
required:
- payload
properties:
payload:
type: object
required:
- items
- metadata
properties:
items:
type: array
description: A list of multi status response items
items:
$ref: '#/MultiStatusItem'
metadata:
$ref: '#/MultiStatusMetadata'
MultiStatus:
description: Multi-Status
content:
application/json:
schema:
$ref: '#/MultiStatusResponse'
66 changes: 66 additions & 0 deletions docs/openapi/site-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,69 @@ site:
$ref: './responses.yaml#/404-site-not-found-with-id'
'500':
$ref: './responses.yaml#/500'
redirects-for-site:
parameters:
- $ref: './parameters.yaml#/siteId'
patch:
tags:
- site
summary: Publish redirects for a site
description: |
This endpoint is useful for publishing fixed URLs to the site document based authoring.
operationId: publishRedirectsForSite
requestBody:
required: true
content:
application/json:
schema:
$ref: './schemas.yaml#/FixedURLs'
responses:
'207':
description: The URLs that were successfully addeed to redirects and the URLs that failed
content:
application/json:
schema:
$ref: './schemas.yaml#/MultiStatus'
'400':
$ref: './responses.yaml#/400'
'401':
$ref: './responses.yaml#/401'
'404':
$ref: './responses.yaml#/404-audit-not-found'
'500':
$ref: './responses.yaml#/500'
security:
- api_key: [ ]
metadata-for-site:
parameters:
- $ref: './parameters.yaml#/siteId'
patch:
tags:
- site
summary: Publish redirects for a site
description: |
This endpoint is useful for publishing fixed URLs to the site document based authoring.
operationId: publishRedirectsForSite
requestBody:
required: true
content:
application/json:
schema:
$ref: './schemas.yaml#/Metadata'
responses:
'200':
description: The updated audit type config object
content:
application/json:
schema:
$ref: './schemas.yaml#/MultiStatus'
'400':
$ref: './responses.yaml#/400'
'401':
$ref: './responses.yaml#/401'
'404':
$ref: './responses.yaml#/404-audit-not-found'
'500':
$ref: './responses.yaml#/500'
security:
- api_key: [ ]
Loading