Content Watcher Service
API Reference
Path Table
Method | Path | Description |
---|---|---|
PUT | /v1/asset/upload | Upload asset files |
POST | /v1/content/{msaId}/broadcast | Create DSNP Broadcast for user |
POST | /v1/content/{msaId}/reply | Create DSNP Reply for user |
POST | /v1/content/{msaId}/reaction | Create DSNP Reaction for user |
PUT | /v1/content/{msaId} | Update DSNP Content for user |
DELETE | /v1/content/{msaId} | Delete DSNP Content for user |
PUT | /v1/profile/{msaId} | Update a user's Profile |
GET | /healthz | Check the health status of the service |
GET | /livez | Check the live status of the service |
GET | /readyz | Check the ready status of the service |
GET | /dev/request/{jobId} | Get a Job given a jobId |
POST | /dev/dummy/announcement/{queueType}/{count} | Create dummy announcement data |
Reference Table
Name | Path | Description |
---|---|---|
FilesUploadDto | #/components/schemas/FilesUploadDto | |
UploadResponseDto | #/components/schemas/UploadResponseDto | |
AssetReferenceDto | #/components/schemas/AssetReferenceDto | |
AssetDto | #/components/schemas/AssetDto | |
TagTypeEnum | #/components/schemas/TagTypeEnum | Identifies the tag type |
TagDto | #/components/schemas/TagDto | |
UnitTypeEnum | #/components/schemas/UnitTypeEnum | The units for radius and altitude (defaults to meters) |
LocationDto | #/components/schemas/LocationDto | |
NoteActivityDto | #/components/schemas/NoteActivityDto | |
BroadcastDto | #/components/schemas/BroadcastDto | |
AnnouncementResponseDto | #/components/schemas/AnnouncementResponseDto | |
ReplyDto | #/components/schemas/ReplyDto | |
ReactionDto | #/components/schemas/ReactionDto | |
ModifiableAnnouncementType | #/components/schemas/ModifiableAnnouncementType | Target announcement type |
UpdateDto | #/components/schemas/UpdateDto | |
TombstoneDto | #/components/schemas/TombstoneDto | |
ProfileActivityDto | #/components/schemas/ProfileActivityDto | |
ProfileDto | #/components/schemas/ProfileDto |
Path Details
[PUT]/v1/asset/upload
- Summary
Upload asset files
RequestBody
- multipart/form-data
{
files?: string[]
}
Responses
- 2XX
application/json
{
assetIds?: string[]
}
[POST]/v1/content/{msaId}/broadcast
- Summary
Create DSNP Broadcast for user
RequestBody
- application/json
{
content: {
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
Responses
- 2XX
application/json
{
referenceId: string
}
[POST]/v1/content/{msaId}/reply
- Summary
Create DSNP Reply for user
RequestBody
- application/json
{
// Target DSNP Content URI
inReplyTo: string
content: {
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
Responses
- 2XX
application/json
{
referenceId: string
}
[POST]/v1/content/{msaId}/reaction
- Summary
Create DSNP Reaction for user
RequestBody
- application/json
{
// the encoded reaction emoji
emoji: string
// Indicates whether the emoji should be applied and if so, at what strength
apply: number
// Target DSNP Content URI
inReplyTo: string
}
Responses
- 2XX
application/json
{
referenceId: string
}
[PUT]/v1/content/{msaId}
- Summary
Update DSNP Content for user
RequestBody
- application/json
{
// Target announcement type
targetAnnouncementType: enum[broadcast, reply]
// Target DSNP Content Hash
targetContentHash: string
content: {
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
Responses
- 2XX
application/json
{
referenceId: string
}
[DELETE]/v1/content/{msaId}
- Summary
Delete DSNP Content for user
RequestBody
- application/json
{
// Target announcement type
targetAnnouncementType: enum[broadcast, reply]
// Target DSNP Content Hash
targetContentHash: string
}
Responses
- 2XX
application/json
{
referenceId: string
}
[PUT]/v1/profile/{msaId}
- Summary
Update a user's Profile
RequestBody
- application/json
{
profile: {
icon: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// Used as a plain text biography of the profile
summary?: string
// The time of publishing ISO8601
published?: string
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
Responses
- 202
[GET]/healthz
- Summary
Check the health status of the service
Responses
- 200 Service is healthy
[GET]/livez
- Summary
Check the live status of the service
Responses
- 200 Service is live
[GET]/readyz
- Summary
Check the ready status of the service
Responses
- 200 Service is ready
[GET]/dev/request/{jobId}
-
Summary
Get a Job given a jobId -
Description
ONLY enabled when ENVIRONMENT="dev".
Responses
- 200
[POST]/dev/dummy/announcement/{queueType}/{count}
-
Summary
Create dummy announcement data -
Description
ONLY enabled when ENVIRONMENT="dev".
Responses
- 201
References
#/components/schemas/FilesUploadDto
{
files?: string[]
}
#/components/schemas/UploadResponseDto
{
assetIds?: string[]
}
#/components/schemas/AssetReferenceDto
{
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}
#/components/schemas/AssetDto
{
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}
#/components/schemas/TagTypeEnum
{
"type": "string",
"description": "Identifies the tag type",
"enum": [
"mention",
"hashtag"
]
}
#/components/schemas/TagDto
{
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}
#/components/schemas/UnitTypeEnum
{
"type": "string",
"description": "The units for radius and altitude (defaults to meters)",
"enum": [
"cm",
"m",
"km",
"inches",
"feet",
"miles"
]
}
#/components/schemas/LocationDto
{
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
#/components/schemas/NoteActivityDto
{
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
#/components/schemas/BroadcastDto
{
content: {
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
#/components/schemas/AnnouncementResponseDto
{
referenceId: string
}
#/components/schemas/ReplyDto
{
// Target DSNP Content URI
inReplyTo: string
content: {
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
#/components/schemas/ReactionDto
{
// the encoded reaction emoji
emoji: string
// Indicates whether the emoji should be applied and if so, at what strength
apply: number
// Target DSNP Content URI
inReplyTo: string
}
#/components/schemas/ModifiableAnnouncementType
{
"type": "string",
"description": "Target announcement type",
"enum": [
"broadcast",
"reply"
]
}
#/components/schemas/UpdateDto
{
// Target announcement type
targetAnnouncementType: enum[broadcast, reply]
// Target DSNP Content Hash
targetContentHash: string
content: {
// Text content of the note
content: string
// The time of publishing ISO8601
published: string
assets: {
// Determines if this asset is a link
isLink?: boolean
references: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// The display name for the file
name?: string
// The URL for the given content
href?: string
}[]
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}
#/components/schemas/TombstoneDto
{
// Target announcement type
targetAnnouncementType: enum[broadcast, reply]
// Target DSNP Content Hash
targetContentHash: string
}
#/components/schemas/ProfileActivityDto
{
icon: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// Used as a plain text biography of the profile
summary?: string
// The time of publishing ISO8601
published?: string
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
#/components/schemas/ProfileDto
{
profile: {
icon: {
// The unique Id for the uploaded asset
referenceId: string
// A hint as to the rendering height in device-independent pixels for image or video assets
height?: number
// A hint as to the rendering width in device-independent pixels for image or video asset
width?: number
// Approximate duration of the video or audio asset
duration?: string
}[]
// Used as a plain text biography of the profile
summary?: string
// The time of publishing ISO8601
published?: string
// The display name for the activity type
name?: string
tag: {
// Identifies the tag type
type: enum[mention, hashtag]
// The text of the tag
name?: string
// Link to the user mentioned
mentionedId?: string
}[]
location: {
// The units for radius and altitude (defaults to meters)
units?: enum[cm, m, km, inches, feet, miles]
// The display name for the location
name: string
// The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)
accuracy?: number
// The altitude of the location
altitude?: number
// The latitude of the location
latitude?: number
// The longitude of the location
longitude?: number
// The area around the given point that comprises the location
radius?: number
}
}
}