Associated Attachments

Audio

Activity Vocabulary: Audio

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Audio
urlActivity Vocabulary 2.0YESAn array of links for given audio content in different formatsMUST be an Audio Link AND MUST have at least one supported audio MIME type
nameActivity Vocabulary 2.0noThe display name for the audio file
durationActivity Vocabulary 2.0noApproximate duration of the audio
PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given audio contentMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href contentMUST follow
hashDSNP 1.0YESArray of hashes for linked content validationMUST include at least one supported hash

Supported Audio MIME Types

FormatMIME TypeSpecification(s)
MP3audio/mpegRFC3003
OGGaudio/oggRFC5334
WebMaudio/webmWebM standard

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "attachments": [
    {
      "type": "Audio",
      "name": "The Scream",
      "url": [
        {
          "type": "Link",
          "href": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Wilhelm_Scream.ogg",
          "mediaType": "audio/ogg",
          "hash": [
            {
              "algorithm": "keccak256",
              "value": "0x3b33df3d163e86514e9041ac97e3d920a75bbafa8d9c1489e631897874b762cc"
            }
          ]
        }
      ],
      "duration": "1S"
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Image

Activity Vocabulary: Image

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Image
urlActivity Vocabulary 2.0YESAn array of links for given image content in different formatsMUST be an Image Link AND MUST have at least one supported image MIME type
nameActivity Vocabulary 2.0noThe display name or alt text for the image
PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given imageMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href content
hashDSNP 1.0YESArray of hashes for linked content validationMUST include at least one supported hash
heightActivity Vocabulary 2.0noA hint as to the rendering height in device-independent pixels
widthActivity Vocabulary 2.0noA hint as to the rendering width in device-independent pixels

Supported Image MIME Types

FormatMIME TypeSpecification(s)
JPEGimage/jpegRFC2045
PNGimage/pngW3C PNG Standard
SVGimage/svg+xmlW3C SVG standard
WebPimage/webpWebP standard
GIFimage/gifRFC2045

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "attachments": [
    {
      "type": "Image",
      "name": "One of the founders of DSNP",
      "url": [
        {
          "type": "Link",
          "href": "https://upload.wikimedia.org/wikipedia/commons/a/ae/Mccourt.jpg",
          "width": 350,
          "height": 228,
          "mediaType": "image/jpg",
          "hash": [
            {
              "algorithm": "keccak256",
              "value": "0x90b3b09658ec527d679c2de983b5720f6e12670724f7e227e5c360a3510b4cb5"
            }
          ]
        }
      ]
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Video

Activity Vocabulary: Video

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Video
urlActivity Vocabulary 2.0YESAn array of links for given video content in different formatsMUST be a Video Link AND MUST have at least one supported video MIME type
nameActivity Vocabulary 2.0noThe display name for the video
durationActivity Vocabulary 2.0noApproximate duration of the video
PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given contentMUST be a Supported URL Schema
mediaTypeActivity Vocabulary 2.0YESMIME type of href content
hashDSNP 1.0YESArray of hashes for linked content validationMUST include at least one supported hash
heightActivity Vocabulary 2.0noA hint as to the rendering height in device-independent pixels
widthActivity Vocabulary 2.0noA hint as to the rendering width in device-independent pixels

Supported Video MIME Types

FormatMIME TypeSpecification(s)
MPEGvideo/mpegRFC2045
OGGvideo/oggRFC5334
WebMvideo/webmWebM standard
H265video/H265RFC7798
MP4video/mp4RFC4337

Example

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "attachments": [
    {
      "type": "Video",
      "name": "One of the founders of DSNP",
      "duration": "PT10M32S",
      "url": [
        {
          "type": "Link",
          "href": "https://upload.wikimedia.org/wikipedia/commons/c/c0/Big_Buck_Bunny_4K.webm",
          "width": 4000,
          "height": 2250,
          "mediaType": "video/webm",
          "hash": [
            {
              "algorithm": "keccak256",
              "value": "0xf841950dfcedc968dbd63132da844b9f28faea3dbfd4cf326b3831b419a20e9a"
            }
          ]
        }
      ]
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}

Activity Vocabulary: Link

PropertyBase SpecRequiredDescriptionRestrictions
typeActivity Vocabulary 2.0YESIdentifies the type of the objectMUST be set to Link
hrefActivity Vocabulary 2.0YESThe URL for the given linkMUST be a Supported URL Schema
nameActivity Vocabulary 2.0noThe display name for the link

Examples

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "Check out the DSNP Website!",
  "mediaType": "text/plain",
  "attachment": [
    {
      "type": "Link",
      "name": "DSNP Website",
      "href": "https://dsnp.org"
    }
  ],
  "published": "1970-01-01T00:00:00+00:00"
}