delete - NGSI command

Common Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--help show help (default: true)

Delete an entity

This command will delete entity

ngsi delete [common options] entity [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE entity id (required)
--type VALUE, -t VALUE entity type
--link VALUE, -L VALUE @context VALUE (LD)
--help show help (default: true)

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
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--data VALUE, -d VALUE entities data (required)
--keyValues, -K keyValues (default: false)
--link VALUE, -L VALUE @context VALUE (LD)
--help show help (default: true)

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
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE temporal entity id (required)
--link VALUE, -L VALUE @context VALUE (LD)
--help show help (default: true)

Delete an Attribute from an Entity

This command will delete attribute.

ngsi delete [common options] attr [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE entity id (required)
--attr VALUE attribute name (required)
--type VALUE, -t VALUE entity type
--link VALUE, -L VALUE @context VALUE (LD)
--help show help (default: true)

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
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE temporal entity id (required)
--attr VALUE attribute name (required)
--deleteAll all attribute 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 VALUE (LD)
--help show help (default: true)

Delete a subscription

This command deletes subscriptions.

ngsi delete [common options] subscription [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE subscription id (required)
--help show help (default: true)

Example

Request:

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

Delete a registration

This command deletes registration.

ngsi delete [common options] registration [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE registration id (required)
--help show help (default: true)

Example

Request:

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

Delete a JSON-LD context

This command deletes a JSON-LD context.

ngsi delete [common options] ldContext [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--service VALUE, -s VALUE FIWARE Service VALUE
--path VALUE, -p VALUE FIWARE ServicePath VALUE
--id VALUE, -i VALUE jsonldContexts id (LD) (required)
--help show help (default: true)

Example

Request:

ngsi delete --host orion-ld ldContext --id d42e7ffe-ed21-11eb-bc92-0242c0a8a010