Pre-release. Until the official launch, content may change, including published files.
Skip to content

Attachment draft ​

Metadata of a file attached to a task or a project. The file itself stays outside the broker and is referenced by URL.

Japanese name添付ファイル
Type IRIhttps://datamodels.jp/ns/task/Attachment
@contexthttps://datamodels.jp/context/task/v1.jsonld (alias, latest compatible version)
https://datamodels.jp/context/task/v1.0.0.jsonld (this version, immutable)
JSON Schema/schema/task/Attachment/v1.json
/schema/task/Attachment/v1.0.0.json
Exampleskey-values · normalized
Sourcegithub.com/geolonia/datamodels

Attributes ​

task ​

The task this belongs to

  • Value: Relationship → Task
  • IRI: https://datamodels.jp/ns/task/task

project ​

The project this belongs to

  • Value: Relationship → Project
  • IRI: https://datamodels.jp/ns/task/project

author ​

Creator (a person, organisation or team entity)

  • Value: Relationship → person, organisation or team
  • IRI: https://schema.org/author

contentUrl ​

required

URL of the file

  • Value: Property, string (uri)
  • IRI: https://schema.org/contentUrl

filename ​

File name

  • Value: Property, string
  • IRI: https://datamodels.jp/ns/task/filename

encodingFormat ​

MIME type

  • Value: Property, string
  • IRI: https://schema.org/encodingFormat

contentSize ​

Size in bytes

  • Value: Property, integer, ≥ 0
  • IRI: https://schema.org/contentSize

digest ​

Hash as algorithm:hex, e.g. sha256:…

  • Value: Property, string
  • IRI: https://datamodels.jp/ns/task/digest

description ​

Description

  • Value: Property, string
  • IRI: https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld#description

location ​

Where the file was taken (a point)

  • Value: GeoProperty (Geometry, Point)
  • IRI: https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld#location

source ​

URL of this object in the system of record

  • Value: Property, string (uri)
  • IRI: https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/source

externalId ​

Identifier in the system of record

  • Value: Property, string
  • IRI: https://datamodels.jp/ns/task/externalId

dateCreated ​

Creation time in the system of record (distinct from the broker attribute createdAt)

  • Value: Property, string (date-time)
  • IRI: https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/dateCreated

Example (key-values) ​

The examples are a fictional scenario (heavy rain in Chiyoda, Tokyo). Place names and codes are real; the events, people and teams are invented. See writing examples.

json
{
  "id": "urn:ngsi-ld:Attachment:77",
  "type": "Attachment",
  "task": "urn:ngsi-ld:Task:1234",
  "author": "urn:ngsi-ld:Team:field-team-a",
  "contentUrl": "https://tracker.example.jp/attachments/download/77/IMG_0012.jpg",
  "filename": "IMG_0012.jpg",
  "encodingFormat": "image/jpeg",
  "contentSize": 2483011,
  "digest": "sha256:9f2c1e5a7b3d4f60a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718",
  "description": "アンダーパス東側の入口、西向き",
  "location": {
    "type": "Point",
    "coordinates": [
      139.7514,
      35.6952
    ]
  },
  "source": "https://tracker.example.jp/attachments/77",
  "externalId": "77",
  "dateCreated": "2026-07-08T10:58:00+09:00"
}

Example (normalized) ​

json
{
  "@context": [
    "https://datamodels.jp/context/task/v1.0.0.jsonld",
    "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld"
  ],
  "id": "urn:ngsi-ld:Attachment:77",
  "type": "Attachment",
  "task": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:Task:1234"
  },
  "author": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:Team:field-team-a"
  },
  "contentUrl": {
    "type": "Property",
    "value": "https://tracker.example.jp/attachments/download/77/IMG_0012.jpg"
  },
  "filename": {
    "type": "Property",
    "value": "IMG_0012.jpg"
  },
  "encodingFormat": {
    "type": "Property",
    "value": "image/jpeg"
  },
  "contentSize": {
    "type": "Property",
    "value": 2483011
  },
  "digest": {
    "type": "Property",
    "value": "sha256:9f2c1e5a7b3d4f60a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718"
  },
  "description": {
    "type": "Property",
    "value": "アンダーパス東側の入口、西向き"
  },
  "location": {
    "type": "GeoProperty",
    "value": {
      "type": "Point",
      "coordinates": [
        139.7514,
        35.6952
      ]
    }
  },
  "source": {
    "type": "Property",
    "value": "https://tracker.example.jp/attachments/77"
  },
  "externalId": {
    "type": "Property",
    "value": "77"
  },
  "dateCreated": {
    "type": "Property",
    "value": {
      "@type": "DateTime",
      "@value": "2026-07-08T10:58:00+09:00"
    }
  }
}
http
Link: <https://datamodels.jp/context/task/v1.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"

How to validate data and send it to a broker: Using the models.

Corresponding standards: GitHub issue attachment (embedded in the body) ​

GitHub issue attachment (embedded in the body)

GitHub has no attachment API; URLs are extracted from the body

This modelMaps toNote
taskissue
contentUrlURL in body
filenameURL basename
encodingFormatno counterpart

Corresponding standards: Redmine attachment ​

Redmine attachment

This modelMaps toNote
taskcontainer_idwhen container_type is Issue
projectcontainer_idwhen container_type is Project (Files module)
authorauthor
contentUrlcontent_url
filenamefilename
encodingFormatcontent_type
contentSizefilesize
digestdigestRedmine stores the hex digest (SHA-256
descriptiondescription
dateCreatedcreated_on
externalIdid

Notes ​

  • Upstream considered (2026-09-18): Smart Data Models dataModel.IssueTracking (Open311 service_requests/services; IUDX IssueReporting), both citizen-complaint records shaped by one country's municipal process, not task models; dataModel.Transportation CityWork and dataModel.PredictiveMaintenance, domain-specific. RFC 8984 (JSCalendar Task) is the universal reference and supplies the value spaces used here. See issue #22.
  • The core is deliberately small. System-specific data (time spent, milestones, watchers, custom fields, map rotation) belongs in extensions.
  • Exactly one of task or project is required (schema oneOf). The file stays outside the broker.

Model content on this page is licensed under CC BY 4.0. LICENSE-CONTENT