docs(api): add Bruno collection for Jetstream API
Excludes docs/ from deno fmt and deno lint so the Bruno files don't break formatting and lint checks in CI.
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
meta {
|
||||
name: Add one or more webhook subscriptions
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
params:path {
|
||||
did:
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"method": "",
|
||||
"url": "",
|
||||
"token": "",
|
||||
"verb": ""
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 201 Response
|
||||
description: One subscription per requested verb.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: POST
|
||||
mode: json
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
|
||||
body:json: {
|
||||
{
|
||||
"method": "",
|
||||
"url": "",
|
||||
"token": "",
|
||||
"verb": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 201
|
||||
text: Created
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"did": "",
|
||||
"method": "",
|
||||
"url": "",
|
||||
"verb": ""
|
||||
}
|
||||
]
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 400 Response
|
||||
description: Malformed input.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: POST
|
||||
mode: json
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
|
||||
body:json: {
|
||||
{
|
||||
"method": "",
|
||||
"url": "",
|
||||
"token": "",
|
||||
"verb": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 400
|
||||
text: Bad Request
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 401 Response
|
||||
description: Missing or invalid bearer token.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: POST
|
||||
mode: json
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
|
||||
body:json: {
|
||||
{
|
||||
"method": "",
|
||||
"url": "",
|
||||
"token": "",
|
||||
"verb": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 401
|
||||
text: Unauthorized
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 403 Response
|
||||
description: Token is valid but the caller is not authorized for this resource.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: POST
|
||||
mode: json
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
|
||||
body:json: {
|
||||
{
|
||||
"method": "",
|
||||
"url": "",
|
||||
"token": "",
|
||||
"verb": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 403
|
||||
text: Forbidden
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user