SecHack365 (0.1.0)

Download OpenAPI specification:

auth

Create User

Create User

Request Body schema: application/json
required
username
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{ }

Login

Login

Request Body schema: application/json
required
username
required
string
password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{ }

Logout

Logout

Responses

Response samples

Content type
application/json
{ }

users

Get All Users (for debug)

Get All Users (for debug)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get User by ID

Get User by ID

path Parameters
id
required
string

Responses

Response samples

Content type
{
  • "id": "string",
  • "username": "string",
  • "protocol": "string",
  • "display_name": "string",
  • "profile": "string",
  • "icon": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifiers": {
    },
  • "post_count": 0,
  • "follow_count": 0,
  • "follower_count": 0
}

Get Current User

Get Current User

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "username": "string",
  • "protocol": "string",
  • "display_name": "string",
  • "profile": "string",
  • "icon": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifiers": {
    },
  • "post_count": 0,
  • "follow_count": 0,
  • "follower_count": 0
}

Get Latest Posts of User

Get Latest Posts of User

path Parameters
id
required
string
query Parameters
offset
integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Follows of User

Get Follows of User

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Followers of User

Get Followers of User

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

ActivityPub Inbox

ActivityPub Inbox

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Lookup (Remote/Local) User

Lookup (Remote/Local) User

path Parameters
username
required
string
Example: @user,@user@example.com,npub123abc

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "username": "string",
  • "protocol": "string",
  • "display_name": "string",
  • "profile": "string",
  • "icon": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifiers": {
    },
  • "post_count": 0,
  • "follow_count": 0,
  • "follower_count": 0
}

follows

Follow

Follow

Request Body schema: application/json
required
target_id
required
string

Responses

Request samples

Content type
application/json
{
  • "target_id": "string"
}

Response samples

Content type
application/json
{ }

Unfollow

Unfollow

Request Body schema: application/json
required
target_id
required
string

Responses

Request samples

Content type
application/json
{
  • "target_id": "string"
}

Response samples

Content type
application/json
{ }

Check if User is Following

Check if User is Following

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "found": true
}

posts

Create Post

Create Post

Request Body schema: application/json
required
content
required
string

Responses

Request samples

Content type
application/json
{
  • "content": "string"
}

Response samples

Content type
application/json
{ }

Get Post by ID

Get Post by ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "user": {
    },
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Delete Post by ID

Delete Post by ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Get Timeline

Get Timeline

query Parameters
offset
integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

articles

Create Article

Create Article

Request Body schema: application/json
required
title
required
string
content
required
string

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "content": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "user": {
    },
  • "title": "string",
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get Article by ID

Get Article by ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "user": {
    },
  • "title": "string",
  • "content": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Get Comments by Article ID

Get Comments by Article ID

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

images

Upload Image

Upload Image

Request Body schema: multipart/form-data
required
image
string <binary>

Responses

Response samples

Content type
application/json

reactions

Add Reaction to Post

Add Reaction to Post

Request Body schema: application/json
required
type
required
string
post_id
required
string

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "post_id": "string"
}

Response samples

Content type
application/json
{ }

Remove Reaction to Post

Remove Reaction to Post

Responses

Response samples

Content type
application/json
{ }

config

Register a New Nostr Relay

Register a New Nostr Relay

Request Body schema: application/json
required
id
required
string
url
required
string
is_enable
required
boolean
created_at
required
string <date-time>
updated_at
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "is_enable": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{ }

Get Nostr Relays List

Get Nostr Relays List

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete a Nostr Relay

Delete a Nostr Relay

Responses

Response samples

Content type
application/json
{ }

nodeinfo

NodeInfo 2.0

NodeInfo 2.0

Responses

Response samples

Content type
application/json
{
  • "openRegistrations": false,
  • "protocols": [
    ],
  • "software": {
    },
  • "usage": {
    },
  • "services": {
    },
  • "metadata": { },
  • "version": "2.0"
}

.well-known

NodeInfo

NodeInfo

Responses

Response samples

Content type
application/json

WebFinger

WebFinger

query Parameters
resource
required
string
Example: resource=acct:user@example.com

Responses

Response samples

Content type
application/json
{
  • "subject": "acct:mock@localhost",
  • "links": [
    ]
}

NIP-05

NIP-05

query Parameters
name
required
string

Responses

Response samples

Content type
application/json
{
  • "names": {
    }
}

dev (localhost only)

Generate Mock

Generate Mock

Responses

Response samples

Content type
application/json
{ }

Reset Database

Reset Database

Responses

Response samples

Content type
application/json
{ }