-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from nflaig/graffiti
Add graffiti API
- Loading branch information
Showing
4 changed files
with
139 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
get: | ||
operationId: getGraffiti | ||
summary: Get Graffiti | ||
description: | | ||
Get the graffiti for an individual validator. If no graffiti is set | ||
explicitly, returns the process-wide default. | ||
security: | ||
- bearerAuth: [] | ||
tags: | ||
- Graffiti | ||
parameters: | ||
- in: path | ||
name: pubkey | ||
schema: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/Pubkey" | ||
required: true | ||
responses: | ||
"200": | ||
description: success response | ||
content: | ||
application/json: | ||
schema: | ||
title: GraffitiResponse | ||
type: object | ||
required: [data] | ||
properties: | ||
data: | ||
type: object | ||
required: [graffiti] | ||
properties: | ||
pubkey: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/Pubkey" | ||
graffiti: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/Graffiti" | ||
"400": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/BadRequest" | ||
"401": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/Unauthorized" | ||
"403": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/Forbidden" | ||
"404": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/NotFound" | ||
"500": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError" | ||
|
||
post: | ||
operationId: setGraffiti | ||
summary: Set Graffiti | ||
description: | | ||
Set the graffiti for an individual validator. | ||
security: | ||
- bearerAuth: [] | ||
tags: | ||
- Graffiti | ||
parameters: | ||
- in: path | ||
name: pubkey | ||
schema: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/Pubkey" | ||
required: true | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
title: SetGraffitiRequest | ||
type: object | ||
required: [graffiti] | ||
properties: | ||
graffiti: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/Graffiti" | ||
responses: | ||
"202": | ||
description: successfully updated | ||
"400": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/BadRequest" | ||
"401": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/Unauthorized" | ||
"403": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/Forbidden" | ||
"404": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/NotFound" | ||
"500": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError" | ||
|
||
delete: | ||
operationId: deleteGraffiti | ||
summary: Delete Configured Graffiti | ||
description: | | ||
Delete the configured graffiti for the specified public key. | ||
security: | ||
- bearerAuth: [] | ||
tags: | ||
- Graffiti | ||
parameters: | ||
- in: path | ||
name: pubkey | ||
schema: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/Pubkey" | ||
required: true | ||
responses: | ||
"204": | ||
description: Successfully removed the graffiti, or there was no graffiti set for the requested public key. | ||
"400": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/BadRequest" | ||
"401": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/Unauthorized" | ||
"403": | ||
description: A graffiti was found, but cannot be removed. This may be because the graffiti was in configuration files that cannot be updated. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/ErrorResponse" | ||
"404": | ||
description: The key was not found on the server, nothing to delete. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../keymanager-oapi.yaml#/components/schemas/ErrorResponse" | ||
"500": | ||
$ref: "../keymanager-oapi.yaml#/components/responses/InternalError" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: string | ||
description: "Arbitrary data to set in the graffiti field of BeaconBlockBody" | ||
example: "plain text value" |