{ "openapi": "3.0.0", "paths": { "/v1/asset/upload": { "put": { "operationId": "AssetControllerV1_assetUpload", "summary": "Upload asset files [deprecated; use `POST /v2/asset/upload` instead]", "deprecated": true, "parameters": [], "requestBody": { "required": true, "description": "Asset files", "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FilesUploadDto" } } } }, "responses": { "400": { "description": "Bad request, eg too many files or file too large" }, "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadResponseDto" } } } } }, "tags": [ "v1/asset" ] } }, "/v2/asset/upload": { "post": { "operationId": "AssetControllerV2_uploadFile", "summary": "Upload asset files", "parameters": [], "requestBody": { "required": true, "description": "Asset files", "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/FilesUploadDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadResponseDtoV2" } } } } }, "tags": [ "v2/asset" ] } }, "/v1/content/{msaId}/broadcast": { "post": { "operationId": "ContentControllerV1_broadcast", "summary": "Create DSNP Broadcast for user", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BroadcastDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v1/content" ] } }, "/v1/content/{msaId}/reply": { "post": { "operationId": "ContentControllerV1_reply", "summary": "Create DSNP Reply for user", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReplyDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v1/content" ] } }, "/v1/content/{msaId}/reaction": { "post": { "operationId": "ContentControllerV1_reaction", "summary": "Create DSNP Reaction for user", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v1/content" ] } }, "/v1/content/{msaId}": { "put": { "operationId": "ContentControllerV1_update", "summary": "Update DSNP Content for user", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v1/content" ] }, "delete": { "operationId": "ContentControllerV1_delete", "summary": "Delete DSNP Content for user [deprecated; use `POST /v2/content/{msaId}/tombstones` instead]", "deprecated": true, "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TombstoneDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v1/content" ] } }, "/v2/content/{msaId}/on-chain": { "post": { "operationId": "ContentControllerV2_postContent", "summary": "Create on-chain content for a given schema", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnChainContentDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v2/content" ] } }, "/v2/content/batchAnnouncement": { "post": { "operationId": "ContentControllerV2_postBatches", "summary": "Create off-chain batch content announcements", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchFilesDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v2/content" ] } }, "/v2/content/{msaId}/tombstones": { "post": { "operationId": "ContentControllerV2_postTombstone", "summary": "Post an announcement that previously-announced content is invalid/revoked", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TombstoneDto" } } } }, "responses": { "2XX": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnnouncementResponseDto" } } } } }, "tags": [ "v2/content" ] } }, "/v1/profile/{msaId}": { "put": { "operationId": "ProfileControllerV1_profile", "summary": "Update a user's Profile", "parameters": [ { "name": "msaId", "required": true, "in": "path", "description": "Msa Id of requested account", "schema": { "example": "2", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileDto" } } } }, "responses": { "202": { "description": "" } }, "tags": [ "v1/profile" ] } }, "/healthz": { "get": { "operationId": "HealthController_healthz", "summary": "Check the health status of the service", "parameters": [], "responses": { "200": { "description": "Service is healthy" } }, "tags": [ "health" ] } }, "/livez": { "get": { "operationId": "HealthController_livez", "summary": "Check the live status of the service", "parameters": [], "responses": { "200": { "description": "Service is live" } }, "tags": [ "health" ] } }, "/readyz": { "get": { "operationId": "HealthController_readyz", "summary": "Check the ready status of the service", "parameters": [], "responses": { "200": { "description": "Service is ready" } }, "tags": [ "health" ] } }, "/dev/request/{jobId}": { "get": { "operationId": "DevelopmentControllerV1_requestJob", "summary": "Get a Job given a jobId", "description": "ONLY enabled when ENVIRONMENT=\"dev\".", "parameters": [ { "name": "jobId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "dev" ] } }, "/dev/dummy/announcement/{queueType}/{count}": { "post": { "operationId": "DevelopmentControllerV1_populate", "summary": "Create dummy announcement data", "description": "ONLY enabled when ENVIRONMENT=\"dev\".", "parameters": [ { "name": "queueType", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "count", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "201": { "description": "" } }, "tags": [ "dev" ] } }, "/metrics": { "get": { "operationId": "PrometheusController_index", "parameters": [], "responses": { "200": { "description": "" } } } } }, "info": { "title": "Content Publishing Service API", "description": "Content Publishing Service API", "version": "1.0", "contact": {} }, "tags": [], "servers": [], "components": { "schemas": { "FilesUploadDto": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "string", "format": "binary" } } }, "required": [ "files" ] }, "UploadResponseDto": { "type": "object", "properties": { "assetIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "assetIds" ] }, "FileResponseDto": { "type": "object", "properties": { "cid": { "type": "string" }, "error": { "type": "string" } } }, "UploadResponseDtoV2": { "type": "object", "properties": { "files": { "type": "array", "items": { "$ref": "#/components/schemas/FileResponseDto" } } }, "required": [ "files" ] }, "AssetReferenceDto": { "type": "object", "properties": { "referenceId": { "type": "string", "description": "The unique Id for the uploaded asset", "example": "bafybeibzj4b4zt4h6n2f6i6lam3cidmywqj5rznb2ofr3gnahurorje2tu", "minLength": 1 }, "height": { "type": "number", "description": "A hint as to the rendering height in device-independent pixels for image or video assets", "example": 228 }, "width": { "type": "number", "description": "A hint as to the rendering width in device-independent pixels for image or video asset", "example": 350 }, "duration": { "type": "string", "description": "Approximate duration of the video or audio asset", "example": "PT10M32S", "pattern": "DURATION_REGEX" } }, "required": [ "referenceId" ] }, "AssetDto": { "type": "object", "properties": { "isLink": { "type": "boolean", "description": "Determines if this asset is a link", "example": false }, "references": { "type": "array", "items": { "$ref": "#/components/schemas/AssetReferenceDto" } }, "name": { "type": "string", "description": "The display name for the file", "example": "TheScream", "minLength": 1 }, "href": { "type": "string", "description": "The URL for the given content", "example": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Wilhelm_Scream.ogg", "minLength": 1 } } }, "TagTypeEnum": { "type": "string", "description": "Identifies the tag type", "enum": [ "mention", "hashtag" ] }, "TagDto": { "type": "object", "properties": { "type": { "example": "mention", "$ref": "#/components/schemas/TagTypeEnum" }, "name": { "type": "string", "description": "The text of the tag", "example": "@sally", "minLength": 1 }, "mentionedId": { "type": "string", "description": "Link to the user mentioned", "example": "dsnp://12345678" } }, "required": [ "type" ] }, "UnitTypeEnum": { "type": "string", "description": "The units for radius and altitude (defaults to meters)", "enum": [ "cm", "m", "km", "inches", "feet", "miles" ] }, "LocationDto": { "type": "object", "properties": { "units": { "example": "m", "$ref": "#/components/schemas/UnitTypeEnum" }, "name": { "type": "string", "description": "The display name for the location", "example": "New York, NY", "minLength": 1 }, "accuracy": { "type": "number", "description": "The accuracy of the coordinates as a percentage. (e.g. 94.0 means 94.0% accurate)", "example": 94, "minimum": 0, "maximum": 100 }, "altitude": { "type": "number", "description": "The altitude of the location", "example": 10 }, "latitude": { "type": "number", "description": "The latitude of the location", "example": 40.73 }, "longitude": { "type": "number", "description": "The longitude of the location", "example": -73.93 }, "radius": { "type": "number", "description": "The area around the given point that comprises the location", "example": 100, "minimum": 0 } }, "required": [ "name" ] }, "NoteActivityDto": { "type": "object", "properties": { "content": { "type": "string", "description": "Text content of the note", "example": "Hello world!", "minLength": 1 }, "published": { "type": "string", "description": "The time of publishing ISO8601", "example": "1970-01-01T00:00:00+00:00" }, "assets": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDto" } }, "name": { "type": "string", "description": "The display name for the activity type", "example": "A simple activity" }, "tag": { "type": "array", "items": { "$ref": "#/components/schemas/TagDto" } }, "location": { "$ref": "#/components/schemas/LocationDto" } }, "required": [ "content", "published" ] }, "BroadcastDto": { "type": "object", "properties": { "content": { "$ref": "#/components/schemas/NoteActivityDto" } }, "required": [ "content" ] }, "AnnouncementResponseDto": { "type": "object", "properties": { "referenceId": { "type": "string" } }, "required": [ "referenceId" ] }, "ReplyDto": { "type": "object", "properties": { "inReplyTo": { "type": "string", "description": "Target DSNP Content URI", "example": "dsnp://78187493520/bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna" }, "content": { "$ref": "#/components/schemas/NoteActivityDto" } }, "required": [ "inReplyTo", "content" ] }, "ReactionDto": { "type": "object", "properties": { "emoji": { "type": "string", "description": "the encoded reaction emoji", "example": "😀", "minLength": 1, "pattern": "DSNP_EMOJI_REGEX" }, "apply": { "type": "number", "description": "Indicates whether the emoji should be applied and if so, at what strength", "example": 1 }, "inReplyTo": { "type": "string", "description": "Target DSNP Content URI", "example": "dsnp://78187493520/bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna" } }, "required": [ "emoji", "apply", "inReplyTo" ] }, "ModifiableAnnouncementType": { "type": "string", "description": "Target announcement type", "enum": [ "broadcast", "reply" ] }, "UpdateDto": { "type": "object", "properties": { "targetAnnouncementType": { "example": "broadcast", "$ref": "#/components/schemas/ModifiableAnnouncementType" }, "targetContentHash": { "type": "string", "description": "Target DSNP Content Hash", "example": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna" }, "content": { "$ref": "#/components/schemas/NoteActivityDto" } }, "required": [ "targetAnnouncementType", "targetContentHash", "content" ] }, "TombstoneDto": { "type": "object", "properties": { "targetAnnouncementType": { "example": "broadcast", "$ref": "#/components/schemas/ModifiableAnnouncementType" }, "targetContentHash": { "type": "string", "description": "Target DSNP Content Hash", "example": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna" } }, "required": [ "targetAnnouncementType", "targetContentHash" ] }, "OnChainContentDto": { "type": "object", "properties": { "schemaId": { "type": "number", "description": "Schema ID of the OnChain schema this message is being posted to.\n@example: 16" }, "payload": { "type": "string", "description": "Payload bytes encoded as a hex string using the schema defined by `schemaId`", "pattern": "/^0x/" }, "published": { "type": "string", "description": "The time of publishing ISO8601", "example": "1970-01-01T00:00:00+00:00" } }, "required": [ "schemaId", "payload", "published" ] }, "BatchFileDto": { "type": "object", "properties": { "schemaId": { "type": "number", "description": "Schema ID of batched off-chain content", "example": 123 }, "cid": { "type": "string", "description": "CIDv1 of off-chain batch file", "example": "bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi" } }, "required": [ "schemaId", "cid" ] }, "BatchFilesDto": { "type": "object", "properties": { "batchFiles": { "type": "array", "items": { "$ref": "#/components/schemas/BatchFileDto" } } }, "required": [ "batchFiles" ] }, "ProfileActivityDto": { "type": "object", "properties": { "icon": { "type": "array", "items": { "$ref": "#/components/schemas/AssetReferenceDto" } }, "summary": { "type": "string", "description": "Used as a plain text biography of the profile", "example": "John Doe is actually a small kitten." }, "published": { "type": "string", "description": "The time of publishing ISO8601", "example": "1970-01-01T00:00:00+00:00" }, "name": { "type": "string", "description": "The display name for the activity type", "example": "A simple activity" }, "tag": { "type": "array", "items": { "$ref": "#/components/schemas/TagDto" } }, "location": { "$ref": "#/components/schemas/LocationDto" } } }, "ProfileDto": { "type": "object", "properties": { "profile": { "$ref": "#/components/schemas/ProfileActivityDto" } }, "required": [ "profile" ] } } }, "x-tagGroups": [ { "name": "asset", "tags": [ "v1/asset", "v2/asset" ] }, { "name": "content", "tags": [ "v1/content", "v2/content" ] }, { "name": "health", "tags": [ "health" ] }, { "name": "profile", "tags": [ "v1/profile" ] } ] }