delete - NGSI command

Common Options

Options Description
--host value, -h value specify host or alias
--token value specify oauth token
--service value, -s value specify FIWARE Service
--path value, -p value specify FIWARE ServicePath
--help show help (default: false)

Delete an entity

This command will delete entity

ngsi delete [common options] entity [options]

Options

Options Description
--id value, -i value specify entity id
--type value, -t value specify entity Type
--link value, -L value specify @context
--help show help (default: false)

Example

Request:

ngsi delete entity --id urn:ngsi-ld:Product:010

Delete multiple entities

This command deletes entities or attributes from entities.

ngsi delete [common options] entities [options]

Options

Options Description
--keyValues, -k specify keyValues (default: false)
--data value, -d value specify data
--link value, -L value specify @context
--help show help (default: false)

Example

Request:

ngsi delete entities \
--data '[
  {
    "id":"urn:ngsi-ld:Product:001", "type":"Product"
  },
  {
    "id":"urn:ngsi-ld:Product:002", "type":"Product"
  }
]'

Request:

ngsi delete entities \
--data '[
  {
    "id":"urn:ngsi-ld:Product:003", "type":"Product",
    "price":{},
    "name": {}
  },
  {
    "id":"urn:ngsi-ld:Product:004", "type":"Product",
    "price":{},
    "name": {}
  }
]'

Delete a temporal entity

This command will delete a temporal entity.

ngsi delete [common options] tentity [options]

Options

Options Description
--id value, -i value specify entity id
--link value, -L value @context (LD)
--help show help (default: false)

Delete an Attribute from an Entity

This command will delete attribute.

ngsi delete [common options] attr [options]

Options

Options Description
--id value, -i value specify entity id
--type value, -t value specify entity Type
--attr value specify attribute name
--link value, -L value specify @context
--help show help (default: false)

Example

Request:

ngsi delete attr --id urn:ngsi-ld:Product:001 --attr specialOffer

Delete an attribute from a temporal entity

This command will delete an attribute from a temporal entity.

ngsi delete [common options] tattr [options]

Options

Options Description
--id value, -i value specify entity id
--attr value specify attribute name
--deleteAll all atribute instances are deleted (default: false)
--datasetId value datasetId of the dataset to be deleted
--instanceId value attribute instance id (LD)
--link value, -L value @context (LD)
--help show help (default: false)

Delete a subscription

This command deletes subscriptions.

ngsi delete [common options] subscription [options]

Options

Options Description
--id value, -i value specify subscription id
--help show help (default: false)

Example

Request:

ngsi delete subscription --id urn:ngsi-ld:Subscription:5f680822ef40bb66fe006dcf

Delete a registration

This command deletes registrations.

ngsi delete [common options] registration [options]

Options

Options Description
--id value, -i value specify registration id
--help show help (default: false)

Example

Request:

ngsi delete registration --id urn:ngsi-ld:ContextSourceRegistration:5f6840e6ef40bb66fe006dd0