Delete Verb

Use a DELETE API to delete resources that are identified by the Request-URI.

A successful response to DELETE requests SHOULD be:

  • HTTP 200 OK, if the response includes an entity describing the status.
  • HTTP 202 Accepted, if the action has been queued.
  • HTTP 204 No Content, if the action has been performed but the response does not include an entity.

DELETE operations are idempotent. When a resouce is deleted, it is removed from the collection of resources and remains so, even when the DELETE API is called on the same resource repeatedly. The 404 NOT FOUND response code is returned when the DELETE API is called on a deleted resource for the second time. Some may argue that this makes the DELETE method non-idempotent. It is a matter of discussion and personal opinion.

If the request passes through a cache and the Request-URI identifies one or more currently cached entities, these entries SHOULD be handled as stale. Responses to this method are not cacheable.

DELETE LUI

http://<Domain name>:<PORT>/api/[VERSION_NO]/<LU Name>/<iid>&token=<TOKEN NAME>&[format=json/xml]

| Component | Description | Mandatory | Example | Default | | ------------- | --------------------------------------------- | ------------- | --------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | Api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | LU Name | Logical unit name or COMMON for common tables | Y | PATIENT COMMON | | | Iid | Instance Id | Y | 1 | | | Token | API key | Y | | | | Format | Response format | Y | JSON/XML | JSON |

Example:

  • http://localhost:3213/api/v1.0/lu/PATIENT/1?token=ABC

    Delete LUI 1 from PATIENT LU

    Request Body: null

    Response Body: null

    Response code: 200 if delete ended successfully

DELETE Data From LU Table

http://<Domain name>:<PORT>/api/[VERSION_NO]/lu/<LU Name>/<iid>/<TABLE_NAME>&token=<API Key>&[format=json/xml]

| Component | Description | Mandatory | Example | Default | | ------------- | --------------------------------------------- | ------------- | --------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | Api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | LU name | Logical unit name or COMMON for common tables | Y | PATIENT COMMON | | | Iid | Instance Id | Y | 1 | | | TABLE_NAME | Table name for data deletion | Y | PAYMENT | | | WHERE CLAUSE | Where clause statement | Y | INVOICE_ID=1 | | | token | API key | Y | | | | format | Response format | Y | JSON/XML | JSON |

Example:

  • http://localhost:3213/api/v1.0/lu/PATIENT/1/INVOICE?WHERE=CUSTOMER=1 or NAME=’LION’&token=ABC

    Delete data from PATIENT LU instance id 1, INVOICE table by where clause

    Request Body: null

    Response Body: null

    Response code: 200 if delete ended successfully

Delete Data From Common Table

http://<Domain Name>:<PORT>/api/[VERSION_NO]/COMMON/<COMMON TABLE NAME>?<WHERE CLAUSE>&token=<API Key>&[format=json/xml]

| Component | Description | Mandatory | Example | Default | | ----------------- | ---------------------------- | ------------- | ------------- | ----------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | api | API | Y | api | | | COMMON | Specify that scope is common | Y | COMMON | | | COMMON TABLE NAME | Common table name | N | ADDRESSES | | | WHERE CLAUSE | Where clause statement | Y | CITY_ID=1 | | | token | API key | Y | | | | format | Response format | Y | JSON/XML | JSON |

Example:

  • http://localhost:3213/api/v1.0/COMMON?CITIES&WHERE CITY_ID=1&token=ABC

    Delete data from CITIES common table where city_id = 1

    Request Body: null

    Response Body: null

    Response code: 200 if delete ended successfully

Delete Custom Web Service

Delete works like GET. All parameters should be populated on the URL or header.

Previous

Delete Verb

Use a DELETE API to delete resources that are identified by the Request-URI.

A successful response to DELETE requests SHOULD be:

  • HTTP 200 OK, if the response includes an entity describing the status.
  • HTTP 202 Accepted, if the action has been queued.
  • HTTP 204 No Content, if the action has been performed but the response does not include an entity.

DELETE operations are idempotent. When a resouce is deleted, it is removed from the collection of resources and remains so, even when the DELETE API is called on the same resource repeatedly. The 404 NOT FOUND response code is returned when the DELETE API is called on a deleted resource for the second time. Some may argue that this makes the DELETE method non-idempotent. It is a matter of discussion and personal opinion.

If the request passes through a cache and the Request-URI identifies one or more currently cached entities, these entries SHOULD be handled as stale. Responses to this method are not cacheable.

DELETE LUI

http://<Domain name>:<PORT>/api/[VERSION_NO]/<LU Name>/<iid>&token=<TOKEN NAME>&[format=json/xml]

| Component | Description | Mandatory | Example | Default | | ------------- | --------------------------------------------- | ------------- | --------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | Api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | LU Name | Logical unit name or COMMON for common tables | Y | PATIENT COMMON | | | Iid | Instance Id | Y | 1 | | | Token | API key | Y | | | | Format | Response format | Y | JSON/XML | JSON |

Example:

  • http://localhost:3213/api/v1.0/lu/PATIENT/1?token=ABC

    Delete LUI 1 from PATIENT LU

    Request Body: null

    Response Body: null

    Response code: 200 if delete ended successfully

DELETE Data From LU Table

http://<Domain name>:<PORT>/api/[VERSION_NO]/lu/<LU Name>/<iid>/<TABLE_NAME>&token=<API Key>&[format=json/xml]

| Component | Description | Mandatory | Example | Default | | ------------- | --------------------------------------------- | ------------- | --------------- | -------------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | Api | API | Y | api | | | VERSION_NO | Version number | N | V1.4 | Latest version | | LU name | Logical unit name or COMMON for common tables | Y | PATIENT COMMON | | | Iid | Instance Id | Y | 1 | | | TABLE_NAME | Table name for data deletion | Y | PAYMENT | | | WHERE CLAUSE | Where clause statement | Y | INVOICE_ID=1 | | | token | API key | Y | | | | format | Response format | Y | JSON/XML | JSON |

Example:

  • http://localhost:3213/api/v1.0/lu/PATIENT/1/INVOICE?WHERE=CUSTOMER=1 or NAME=’LION’&token=ABC

    Delete data from PATIENT LU instance id 1, INVOICE table by where clause

    Request Body: null

    Response Body: null

    Response code: 200 if delete ended successfully

Delete Data From Common Table

http://<Domain Name>:<PORT>/api/[VERSION_NO]/COMMON/<COMMON TABLE NAME>?<WHERE CLAUSE>&token=<API Key>&[format=json/xml]

| Component | Description | Mandatory | Example | Default | | ----------------- | ---------------------------- | ------------- | ------------- | ----------- | | Domain name | Domain name | Y | localhost | | | PORT | PORT | Y | 3213 | | | api | API | Y | api | | | COMMON | Specify that scope is common | Y | COMMON | | | COMMON TABLE NAME | Common table name | N | ADDRESSES | | | WHERE CLAUSE | Where clause statement | Y | CITY_ID=1 | | | token | API key | Y | | | | format | Response format | Y | JSON/XML | JSON |

Example:

  • http://localhost:3213/api/v1.0/COMMON?CITIES&WHERE CITY_ID=1&token=ABC

    Delete data from CITIES common table where city_id = 1

    Request Body: null

    Response Body: null

    Response code: 200 if delete ended successfully

Delete Custom Web Service

Delete works like GET. All parameters should be populated on the URL or header.

Previous