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:
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"fmt": {
|
||||
"exclude": ["docs/"]
|
||||
},
|
||||
"lint": {
|
||||
"exclude": ["docs/"]
|
||||
},
|
||||
"tasks": {
|
||||
"jetstream:prod": "deno run --allow-net --allow-read --allow-write --allow-env --allow-ffi --unstable-ffi jetstream.ts",
|
||||
"jetstream": "deno run --watch --allow-net --allow-read --allow-write --allow-env --allow-ffi --unstable-ffi jetstream.ts",
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
meta {
|
||||
name: List every webhook subscription
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/admin/webhooks
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: All subscriptions across all DIDs.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/admin/webhooks
|
||||
method: GET
|
||||
mode: none
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"did": "",
|
||||
"method": "",
|
||||
"url": "",
|
||||
"verb": ""
|
||||
}
|
||||
]
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 401 Response
|
||||
description: Missing or invalid bearer token.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/admin/webhooks
|
||||
method: GET
|
||||
mode: none
|
||||
}
|
||||
|
||||
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}}/admin/webhooks
|
||||
method: GET
|
||||
mode: none
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 403
|
||||
text: Forbidden
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
7
docs/Remanso Jetstream API/admin/folder.bru
Normal file
7
docs/Remanso Jetstream API/admin/folder.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: admin
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
84
docs/Remanso Jetstream API/auth/GitHub OAuth proxy.bru
Normal file
84
docs/Remanso Jetstream API/auth/GitHub OAuth proxy.bru
Normal file
@@ -0,0 +1,84 @@
|
||||
meta {
|
||||
name: GitHub OAuth proxy
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/auth/github
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
params:query {
|
||||
code:
|
||||
~type:
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: GitHub access-token response (shape determined by GitHub).
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/auth/github
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
code:
|
||||
~type:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 400 Response
|
||||
description: Malformed input.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/auth/github
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
code:
|
||||
~type:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 400
|
||||
text: Bad Request
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
7
docs/Remanso Jetstream API/auth/folder.bru
Normal file
7
docs/Remanso Jetstream API/auth/folder.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: auth
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
9
docs/Remanso Jetstream API/bruno.json
Normal file
9
docs/Remanso Jetstream API/bruno.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "Remanso Jetstream API",
|
||||
"type": "collection",
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
".git"
|
||||
]
|
||||
}
|
||||
7
docs/Remanso Jetstream API/collection.bru
Normal file
7
docs/Remanso Jetstream API/collection.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: Remanso Jetstream API
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: none
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
vars {
|
||||
baseUrl: http://localhost:8080
|
||||
}
|
||||
3
docs/Remanso Jetstream API/environments/Production.bru
Normal file
3
docs/Remanso Jetstream API/environments/Production.bru
Normal file
@@ -0,0 +1,3 @@
|
||||
vars {
|
||||
baseUrl: https://api.remanso.space
|
||||
}
|
||||
42
docs/Remanso Jetstream API/meta/Health probe.bru
Normal file
42
docs/Remanso Jetstream API/meta/Health probe.bru
Normal file
@@ -0,0 +1,42 @@
|
||||
meta {
|
||||
name: Health probe
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/health
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: Service is up
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/health
|
||||
method: GET
|
||||
mode: none
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"status": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
40
docs/Remanso Jetstream API/meta/Hello world.bru
Normal file
40
docs/Remanso Jetstream API/meta/Hello world.bru
Normal file
@@ -0,0 +1,40 @@
|
||||
meta {
|
||||
name: Hello world
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: Plain text greeting
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/
|
||||
method: GET
|
||||
mode: none
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: text/plain
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: text
|
||||
content: '''
|
||||
Hello world
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
7
docs/Remanso Jetstream API/meta/folder.bru
Normal file
7
docs/Remanso Jetstream API/meta/folder.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: meta
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
meta {
|
||||
name: List discoverable notes across all users
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/notes
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
params:query {
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: A page of notes ordered by rkey descending.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/notes
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"notes": [
|
||||
{
|
||||
"did": "",
|
||||
"rkey": "",
|
||||
"title": "",
|
||||
"publishedAt": "",
|
||||
"createdAt": "",
|
||||
"language": ""
|
||||
}
|
||||
],
|
||||
"cursor": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
meta {
|
||||
name: List discoverable notes for a single DID
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/:did/notes
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
params:query {
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path {
|
||||
did:
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: A page of notes for the given DID.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/notes
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"notes": [
|
||||
{
|
||||
"did": "",
|
||||
"rkey": "",
|
||||
"title": "",
|
||||
"publishedAt": "",
|
||||
"createdAt": "",
|
||||
"language": ""
|
||||
}
|
||||
],
|
||||
"cursor": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
105
docs/Remanso Jetstream API/notes/Multi-DID feed.bru
Normal file
105
docs/Remanso Jetstream API/notes/Multi-DID feed.bru
Normal file
@@ -0,0 +1,105 @@
|
||||
meta {
|
||||
name: Multi-DID feed
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{baseUrl}}/notes/feed
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"dids": [],
|
||||
"cursor": "",
|
||||
"limit": 0
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: A page of notes from the requested DIDs.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/notes/feed
|
||||
method: POST
|
||||
mode: json
|
||||
body:json: {
|
||||
{
|
||||
"dids": [],
|
||||
"cursor": "",
|
||||
"limit": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"notes": [
|
||||
{
|
||||
"did": "",
|
||||
"rkey": "",
|
||||
"title": "",
|
||||
"publishedAt": "",
|
||||
"createdAt": "",
|
||||
"language": ""
|
||||
}
|
||||
],
|
||||
"cursor": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 400 Response
|
||||
description: Malformed input.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/notes/feed
|
||||
method: POST
|
||||
mode: json
|
||||
body:json: {
|
||||
{
|
||||
"dids": [],
|
||||
"cursor": "",
|
||||
"limit": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 400
|
||||
text: Bad Request
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
7
docs/Remanso Jetstream API/notes/folder.bru
Normal file
7
docs/Remanso Jetstream API/notes/folder.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: notes
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
meta {
|
||||
name: Owner-scoped full-text fuzzy search
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/:did/search
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
params:query {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path {
|
||||
did: did:plc:4m3kouplb7s7xozjd3whinvl
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: A page of search hits for the caller's DID.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/search
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"did": "",
|
||||
"rkey": "",
|
||||
"title": "",
|
||||
"snippet": "",
|
||||
"score": 0,
|
||||
"publishedAt": ""
|
||||
}
|
||||
],
|
||||
"cursor": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 400 Response
|
||||
description: Malformed input.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/search
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
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/search
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
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/search
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 403
|
||||
text: Forbidden
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
meta {
|
||||
name: Public full-text fuzzy search
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/search?q=
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
params:query {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: A page of search hits.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/search
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"did": "",
|
||||
"rkey": "",
|
||||
"title": "",
|
||||
"snippet": "",
|
||||
"score": 0,
|
||||
"publishedAt": ""
|
||||
}
|
||||
],
|
||||
"cursor": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 400 Response
|
||||
description: Malformed input.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/search
|
||||
method: GET
|
||||
mode: none
|
||||
params:query: {
|
||||
q:
|
||||
~cursor:
|
||||
~limit:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 400
|
||||
text: Bad Request
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
7
docs/Remanso Jetstream API/search/folder.bru
Normal file
7
docs/Remanso Jetstream API/search/folder.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: search
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
@@ -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": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
meta {
|
||||
name: Delete a single webhook subscription by id
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{baseUrl}}/:did/webhooks/:id
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
params:path {
|
||||
did:
|
||||
id:
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 204 Response
|
||||
description: Subscription deleted.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks/:id
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
id:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
status: {
|
||||
code: 204
|
||||
text: No Content
|
||||
}
|
||||
|
||||
body: {
|
||||
type: text
|
||||
content: '''
|
||||
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 400 Response
|
||||
description: Malformed input.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks/:id
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
id:
|
||||
}
|
||||
}
|
||||
|
||||
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/:id
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
id:
|
||||
}
|
||||
}
|
||||
|
||||
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/:id
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
id:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 403
|
||||
text: Forbidden
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 404 Response
|
||||
description: No subscription with that id owned by this DID.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks/:id
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
id:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 404
|
||||
text: Not Found
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
meta {
|
||||
name: Delete every webhook subscription for the caller
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
params:path {
|
||||
did:
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 204 Response
|
||||
description: All subscriptions deleted.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
status: {
|
||||
code: 204
|
||||
text: No Content
|
||||
}
|
||||
|
||||
body: {
|
||||
type: text
|
||||
content: '''
|
||||
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 401 Response
|
||||
description: Missing or invalid bearer token.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
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: DELETE
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 403
|
||||
text: Forbidden
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
meta {
|
||||
name: List a DID's webhook subscriptions
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
params:path {
|
||||
did: did:plc:4m3kouplb7s7xozjd3whinvl
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 200 Response
|
||||
description: All subscriptions owned by the caller.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: GET
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 200
|
||||
text: OK
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"did": "",
|
||||
"method": "",
|
||||
"url": "",
|
||||
"verb": ""
|
||||
}
|
||||
]
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
example {
|
||||
name: 401 Response
|
||||
description: Missing or invalid bearer token.
|
||||
|
||||
request: {
|
||||
url: {{baseUrl}}/:did/webhooks
|
||||
method: GET
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
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: GET
|
||||
mode: none
|
||||
params:path: {
|
||||
did:
|
||||
}
|
||||
}
|
||||
|
||||
response: {
|
||||
headers: {
|
||||
Content-Type: application/json
|
||||
}
|
||||
|
||||
status: {
|
||||
code: 403
|
||||
text: Forbidden
|
||||
}
|
||||
|
||||
body: {
|
||||
type: json
|
||||
content: '''
|
||||
{
|
||||
"error": ""
|
||||
}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
7
docs/Remanso Jetstream API/webhooks/folder.bru
Normal file
7
docs/Remanso Jetstream API/webhooks/folder.bru
Normal file
@@ -0,0 +1,7 @@
|
||||
meta {
|
||||
name: webhooks
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
Reference in New Issue
Block a user