FIWARE · Capability

FIWARE-NGSI v2 Specification — Entities

FIWARE-NGSI v2 Specification — Entities. 8 operations. Lead operation: List Entities. Self-contained Naftiko capability covering one Fiware business surface.

Run with Naftiko FiwareEntities

What You Can Do

GET
Listentities — List Entities
/v1/v2/entities
POST
Createentity — Create Entity
/v1/v2/entities
GET
Retrieveentity — Retrieve Entity
/v1/v2/entities/{entityid}
DELETE
Removeentity — Remove Entity
/v1/v2/entities/{entityid}
GET
Retrieveentityattributes — Retrieve Entity Attributes
/v1/v2/entities/{entityid}/attrs
PUT
Replaceallentityattributes — Replace all entity attributes
/v1/v2/entities/{entityid}/attrs
POST
Updateorappendentityattributes — Update or Append Entity Attributes
/v1/v2/entities/{entityid}/attrs
PATCH
Updateexistingentityattributes — Update Existing Entity Attributes
/v1/v2/entities/{entityid}/attrs

MCP Tools

list-entities

List Entities

read-only idempotent
create-entity

Create Entity

retrieve-entity

Retrieve Entity

read-only idempotent
remove-entity

Remove Entity

idempotent
retrieve-entity-attributes

Retrieve Entity Attributes

read-only idempotent
replace-all-entity-attributes

Replace all entity attributes

idempotent
update-append-entity-attributes

Update or Append Entity Attributes

update-existing-entity-attributes

Update Existing Entity Attributes

idempotent

Capability Spec

ngsiv2-entities.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: FIWARE-NGSI v2 Specification — Entities
  description: 'FIWARE-NGSI v2 Specification — Entities. 8 operations. Lead operation: List Entities. Self-contained Naftiko
    capability covering one Fiware business surface.'
  tags:
  - Fiware
  - Entities
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FIWARE_API_KEY: FIWARE_API_KEY
capability:
  consumes:
  - type: http
    namespace: ngsiv2-entities
    baseUri: http://orion.lab.fiware.org
    description: FIWARE-NGSI v2 Specification — Entities business capability. Self-contained, no shared references.
    resources:
    - name: v2-entities
      path: /v2/entities
      operations:
      - name: listentities
        method: GET
        description: List Entities
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: query
          type: string
          description: A comma-separated list of elements.
        - name: type
          in: query
          type: string
          description: comma-separated list of elements.
        - name: idPattern
          in: query
          type: string
          description: A correctly formated regular expression.
        - name: typePattern
          in: query
          type: string
          description: A correctly formated regular expression.
        - name: q
          in: query
          type: string
          description: A query expression, composed of a list of statements
        - name: mq
          in: query
          type: string
          description: A query expression for attribute metadata,
        - name: georel
          in: query
          type: string
          description: Spatial relationship between matching entities and a
        - name: geometry
          in: query
          type: string
          description: Geografical area to which the query is restricted.
        - name: coords
          in: query
          type: string
          description: List of latitude-longitude
        - name: limit
          in: query
          type: number
          description: Limits the number of entities to be retrieved
        - name: offset
          in: query
          type: number
          description: Establishes the offset from where entities are retrieved
        - name: attrs
          in: query
          type: string
          description: Comma-separated list of attribute names whose data
        - name: metadata
          in: query
          type: string
          description: A list of metadata names to include in the response.
        - name: orderBy
          in: query
          type: string
          description: Criteria for ordering results.
        - name: options
          in: query
          type: string
          description: Options dictionary
      - name: createentity
        method: POST
        description: Create Entity
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Content-Type
          in: header
          type: string
          required: true
        - name: body
          in: body
          type: string
          required: true
        - name: options
          in: query
          type: string
          description: Options dictionary
    - name: v2-entities-entityId
      path: /v2/entities/{entityId}
      operations:
      - name: retrieveentity
        method: GET
        description: Retrieve Entity
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: entityId
          in: path
          type: string
          description: Id of the entity to be retrieved
          required: true
        - name: type
          in: query
          type: string
          description: Entity type, to avoid ambiguity in case there are several
        - name: attrs
          in: query
          type: string
          description: Comma-separated list of attribute names whose
        - name: metadata
          in: query
          type: string
          description: A list of metadata names to include in the response.
        - name: options
          in: query
          type: string
          description: Options dictionary
      - name: removeentity
        method: DELETE
        description: Remove Entity
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: entityId
          in: path
          type: string
          description: Id of the entity to be deleted
          required: true
        - name: type
          in: query
          type: string
          description: Entity type, to avoid ambiguity in case there are several
    - name: v2-entities-entityId-attrs
      path: /v2/entities/{entityId}/attrs
      operations:
      - name: retrieveentityattributes
        method: GET
        description: Retrieve Entity Attributes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: entityId
          in: path
          type: string
          description: Id of the entity to be retrieved
          required: true
        - name: type
          in: query
          type: string
          description: Entity type, to avoid ambiguity in case there are several
        - name: attrs
          in: query
          type: string
          description: Comma-separated list of attribute names whose
        - name: metadata
          in: query
          type: string
          description: A list of metadata names to include in the response.
        - name: options
          in: query
          type: string
          description: Options dictionary
      - name: replaceallentityattributes
        method: PUT
        description: Replace all entity attributes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: entityId
          in: path
          type: string
          description: Id of the entity in question.
          required: true
        - name: Content-Type
          in: header
          type: string
          required: true
        - name: body
          in: body
          type: string
          required: true
        - name: type
          in: query
          type: string
          description: Entity type, to avoid ambiguity in case there are several
        - name: options
          in: query
          type: string
          description: Operations options
      - name: updateorappendentityattributes
        method: POST
        description: Update or Append Entity Attributes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: entityId
          in: path
          type: string
          description: Entity id to be updated
          required: true
        - name: Content-Type
          in: header
          type: string
          required: true
        - name: body
          in: body
          type: string
          required: true
        - name: type
          in: query
          type: string
          description: Entity type, to avoid ambiguity in case there are several
        - name: options
          in: query
          type: string
          description: Operations options
      - name: updateexistingentityattributes
        method: PATCH
        description: Update Existing Entity Attributes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: entityId
          in: path
          type: string
          description: Id of the entity to be updated
          required: true
        - name: Content-Type
          in: header
          type: string
          required: true
        - name: body
          in: body
          type: string
          required: true
        - name: type
          in: query
          type: string
          description: Entity type, to avoid ambiguity in case there are several
        - name: options
          in: query
          type: string
          description: Operations options
  exposes:
  - type: rest
    namespace: ngsiv2-entities-rest
    port: 8080
    description: REST adapter for FIWARE-NGSI v2 Specification — Entities. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v2/entities
      name: v2-entities
      description: REST surface for v2-entities.
      operations:
      - method: GET
        name: listentities
        description: List Entities
        call: ngsiv2-entities.listentities
        with:
          id: rest.id
          type: rest.type
          idPattern: rest.idPattern
          typePattern: rest.typePattern
          q: rest.q
          mq: rest.mq
          georel: rest.georel
          geometry: rest.geometry
          coords: rest.coords
          limit: rest.limit
          offset: rest.offset
          attrs: rest.attrs
          metadata: rest.metadata
          orderBy: rest.orderBy
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createentity
        description: Create Entity
        call: ngsiv2-entities.createentity
        with:
          Content-Type: rest.Content-Type
          body: rest.body
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/entities/{entityid}
      name: v2-entities-entityid
      description: REST surface for v2-entities-entityId.
      operations:
      - method: GET
        name: retrieveentity
        description: Retrieve Entity
        call: ngsiv2-entities.retrieveentity
        with:
          entityId: rest.entityId
          type: rest.type
          attrs: rest.attrs
          metadata: rest.metadata
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: removeentity
        description: Remove Entity
        call: ngsiv2-entities.removeentity
        with:
          entityId: rest.entityId
          type: rest.type
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/entities/{entityid}/attrs
      name: v2-entities-entityid-attrs
      description: REST surface for v2-entities-entityId-attrs.
      operations:
      - method: GET
        name: retrieveentityattributes
        description: Retrieve Entity Attributes
        call: ngsiv2-entities.retrieveentityattributes
        with:
          entityId: rest.entityId
          type: rest.type
          attrs: rest.attrs
          metadata: rest.metadata
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: replaceallentityattributes
        description: Replace all entity attributes
        call: ngsiv2-entities.replaceallentityattributes
        with:
          entityId: rest.entityId
          Content-Type: rest.Content-Type
          body: rest.body
          type: rest.type
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: updateorappendentityattributes
        description: Update or Append Entity Attributes
        call: ngsiv2-entities.updateorappendentityattributes
        with:
          entityId: rest.entityId
          Content-Type: rest.Content-Type
          body: rest.body
          type: rest.type
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateexistingentityattributes
        description: Update Existing Entity Attributes
        call: ngsiv2-entities.updateexistingentityattributes
        with:
          entityId: rest.entityId
          Content-Type: rest.Content-Type
          body: rest.body
          type: rest.type
          options: rest.options
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: ngsiv2-entities-mcp
    port: 9090
    transport: http
    description: MCP adapter for FIWARE-NGSI v2 Specification — Entities. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-entities
      description: List Entities
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: ngsiv2-entities.listentities
      with:
        id: tools.id
        type: tools.type
        idPattern: tools.idPattern
        typePattern: tools.typePattern
        q: tools.q
        mq: tools.mq
        georel: tools.georel
        geometry: tools.geometry
        coords: tools.coords
        limit: tools.limit
        offset: tools.offset
        attrs: tools.attrs
        metadata: tools.metadata
        orderBy: tools.orderBy
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.
    - name: create-entity
      description: Create Entity
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: ngsiv2-entities.createentity
      with:
        Content-Type: tools.Content-Type
        body: tools.body
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-entity
      description: Retrieve Entity
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: ngsiv2-entities.retrieveentity
      with:
        entityId: tools.entityId
        type: tools.type
        attrs: tools.attrs
        metadata: tools.metadata
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.
    - name: remove-entity
      description: Remove Entity
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: ngsiv2-entities.removeentity
      with:
        entityId: tools.entityId
        type: tools.type
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-entity-attributes
      description: Retrieve Entity Attributes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: ngsiv2-entities.retrieveentityattributes
      with:
        entityId: tools.entityId
        type: tools.type
        attrs: tools.attrs
        metadata: tools.metadata
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.
    - name: replace-all-entity-attributes
      description: Replace all entity attributes
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: ngsiv2-entities.replaceallentityattributes
      with:
        entityId: tools.entityId
        Content-Type: tools.Content-Type
        body: tools.body
        type: tools.type
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.
    - name: update-append-entity-attributes
      description: Update or Append Entity Attributes
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: ngsiv2-entities.updateorappendentityattributes
      with:
        entityId: tools.entityId
        Content-Type: tools.Content-Type
        body: tools.body
        type: tools.type
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.
    - name: update-existing-entity-attributes
      description: Update Existing Entity Attributes
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: ngsiv2-entities.updateexistingentityattributes
      with:
        entityId: tools.entityId
        Content-Type: tools.Content-Type
        body: tools.body
        type: tools.type
        options: tools.options
      outputParameters:
      - type: object
        mapping: $.