DR Requests

Create DR Request

Creates a new DR Request. 

Endpoint

POST {{baseUrl}}/requests​

 

Request

Path Parameter

N/A

 

Request Header

You should enter the following information in the request header in JSON format.

 

Request Header (Common Header) Information

Name

Type

Required

Description

x-service-id

string

mandatory

The Service ID value which used to identify the owner of the request

x-service-token

string

mandatory

The Service Token value to ensure that the request is valid. It is issued before service integration.

x-message-id

string

optional

 The value for tracing the processing of target requests

x-country-code

string

mandatory

The country code to provide the service. The ISO country code is used. (E.g. KR, US, TW, CN, ......)

 

Request Body

You should enter the following information in the request body in JSON format.

 

Request Body Information

Name

Type

Required

Description

requestID

string

mandatory

The DR Request ID

name

string

optional

(from OpenADR spec)

The DR Request name

eventSignals (array)

signalID

string

mandatory

(from OpenADR spec)

The event signal ID

signalName

string

mandatory

(from OpenADR spec)

The OpenADR event name

LG DR service use 'SIMPLE'(Simple levels), 'LOAD_CONTROL'(level control with offset).

signalType

string

mandatory

(from OpenADR spec)

The OpenADR event signal

LG DR service use 'level'(DR program level), 'x-loadControlLevelOffset'(level control with offset).

targets

string array

mandatory

(from OpenADR spec)

The target device (x-DEVICE_TV, x-DEVICE_AIR_CONDITIONER)

minTemp

number

optional

Minimum limit of DR target temperature (for air conditioner)

  • Range: 64℉ - 86℉ (minTemp <= maxTemp)
  • Default value: 64℉

maxTemp

number

optional

Maximum limit of DR target temperature (for air conditioner)

  • Range: 64℉ - 86℉ (minTemp <= maxTemp)
  • Default value: 86℉

tempOffset

number

optional

DR target temperature change amount (for air conditioner)

  • Range: 4℉ - 16℉
  • Default value: 4℉

unit

string

optional

Temperature unit (for air conditioner)

  • F: Fahrenheit
  • C: Celsius

eventTargets (array)

venID

string 

mandatory

(from OpenADR spec)

The target VEN ID (Virtual End Node ID)

It could be an Energy Management System (EMS) or a group of end devices.

The value for VEN ID has to be pre-defined before the DR event. Please contact the LG DR team to arrange VEN ID.

resourceIDs

string array 

optional

(from OpenADR spec)

The target resource ID

It could be a device type or a group of end devices.

The value for resourceID has to be pre-defined before the DR event. Please contact the LG DR team to arrange resourceID.

vtnID

string

mandatory

(from OpenADR spec)

The VTN ID (Virtual Top Node ID)
 It could be an aggregation server or utility server's ID.

The value for vtnID has to be pre-defined before the DR event. Please contact the LG DR team to arrange vtnID.

startTs

number 

mandatory

DR start time

  • UTC timestamp value (13 digits)
  • Unit: millisecond

endTs

number

mandatory

DR end time

  • UTC timestamp value (13 digits)
  • Unit: millisecond
If minTemp and maxTemp have the same value, the target temperature is set to the minTemp value. At this time, the tempOffset value is ignored.

 

Request Example

$ curl '{{baseUrl}}/requests' -i -X POST
    -H 'Accept: application/json'
    -H 'x-message-id: message-id'
    -H 'x-service-id: 3rd-party-service-id'
    -H 'x-service-token: 3rd-party-service-token'
    -H 'x-country-code: us'
    -d '{
        "requestID": "2020-10-15-dr",
        "name": "first event",
        "startTs": 1234567890123,
        "endTs": 1234567890123,
        "eventSignals": [
            {
                "signalID": "2020-09-25-dr-event-01-signal-01",
                "signalName": "SIMPLE",
                "signalType": "level",
                "targets": [ "x-DEVICE_TV", "x-DEVICE_ESS" ]
            },
            {
                "signalID": "2020-09-25-dr-event-01-signal-02",
                "signalName": "LOAD_CONTROL",
                "signalType": "x-LoadControlLevelOffset",
                "targets": [ "x-DEVICE_AIR_CONDITIONER" ]
                "maxTemp": 86,
                "tempOffset": 6
            }
        ],
        "eventTargets":[
            {
                "venID": "CE-01",
                "resourceIDs": ["CE-TV", "CE-ESS"],
            },
            {
                "venID": "CE-02",
            }
        ],
    "vtnID": "vtn01"
}

 

Response

Response Body

In response to the request, the following information is returned in the JSON format in the response body.

 

Response Body Information

Key

Value

code

Result code for the request

For a description of the code values, please refer to the Common Response page.

data

Result data corresponding to the result code

 

requestID

The DR Request ID

 

Response Example

{
    "code": 2000,
    "data": {
        "requestID": "2020-10-15-dr"
    }
}

 

Delete DR Request

Deletes a specific DR Request. You can delete DR Request only when the status of the DR Request is pending (status: 0).

Endpoint

DELETE {{baseUrl}}/requests/{dr-id}​

 

Request

Path Parameter

Enters the dr-id to deliver the DR Request identification value.

 

Parameter Information

Name

Type

Required

Description

dr-id

string

mandatory

The DR Request ID

 

Request Header

You should enter the following information in the request header in JSON format.

 

Request Header (Common Header) Information

Name

Type

Required

Description

x-service-id

string

mandatory

The Service ID value which used to identify the owner of the request

x-service-token

string

mandatory

The Service Token value to ensure that the request is valid. It is issued before service integration.

x-message-id

string

optional

The value for tracing the processing of target requests

x-country-code

string

mandatory

The country code to provide the service. The ISO country code is used. (E.g. KR, US, TW, CN, ......)

 

Request Body

N/A

 

Request Example

$ curl '{{baseUrl}}/requests/{dr-id}' -i -X DELETE
    -H 'Accept: application/json'
    -H 'x-message-id: message-id'
    -H 'x-service-id: 3rd-party-service-id'
    -H 'x-service-token: 3rd-party-service-token'
    -H 'x-country-code: us'

 

Response

Response Body

In response to the request, the following information is returned in the JSON format in the response body.

 

Response Body Information

Key

Value

code

Result code for the request

For a description of the code values, please refer to the Common Response page.

data

Result data corresponding to the result code

 

id

The DR Request ID

 

Response Example

{
    "code": 2000,
    "data": {
        "id": "2020-10-15-dr"
    }
}

 

Get DR Request

Gets the information of a specific DR Request.

Endpoint

GET {{baseUrl}}/requests/{dr-id}​

 

Request

Path Parameter

Enters the dr-id to deliver the DR Request identification value.

 

Parameter Information

Name

Type

Required

Description

dr-id

string

mandatory

The DR Request ID

 

Request Header

You should enter the following information in the request header in JSON format.

 

Request Header (Common Header) Information

Name

Type

Required

Description

x-service-id

string

mandatory

The Service ID value which used to identify the owner of the request

x-service-token

string

mandatory

The Service Token value to ensure that the request is valid. It is issued before service integration.

x-message-id

string

optional

The value for tracing the processing of target requests

x-country-code

string

mandatory

The country code to provide the service. The ISO country code is used. (E.g. KR, US, TW, CN, ......)

 

Request Body

N/A

 

Request Example

$ curl '{{baseUrl}}/requests/{dr-id}' -i -X GET
    -H 'Accept: application/json'
    -H 'x-message-id: message-id'
    -H 'x-service-id: 3rd-party-service-id'
    -H 'x-service-token: 3rd-party-service-token'
    -H 'x-country-code: us'

 

Response

Response Body

In response to the request, the following information is returned in the JSON format in the response body.

 

Response Body Information

Key

Value

code

Result code for the request

For a description of the code values, please refer to the Common Response page.

data

Result data corresponding to the result code

 

requestID

The DR Request ID

 

name

The DR Request name

 

eventSignals

-

   

signalID

The event signal ID

   

signalName

The OpenADR event name

LG DR service use 'SIMPLE'(Simple levels), 'LOAD_CONTROL'(level control with offset).

   

signalType

The OpenADR event signal

LG DR service use 'level'(DR program level), 'x-loadControlLevelOffset'(level control with offset).

   

targets

The target devices

   

minTemp

Minimum limit of DR target temperature 

   

maxTemp

Maximum limit of DR target temperature 

   

tempOffset

DR target temperature change amount

   

unit

Temperature unit

  • F: Fahrenheit 
  • C: Celsius 
 

eventTargets

-

   

venID

The target VEN ID (Virtual End Node ID)

  • It could be an Energy Management System (EMS) or a group of end devices.
  • It is prearranged ID when registering VTN and VEN information before the DR request.
   

resourceIDs

The target resource ID

  • It could be a device type or an end device group.
  • It is prearranged ID when registering VTN and VEN information before the DR request.
 

vtnID

The VTN ID (Virtual Top Node ID)

  • It could be an aggregation server or utility server's ID.
  • It is prearranged ID when registering VTN and VEN information before the DR request.
 

startTs

DR start time

 

endTs

DR end time (timestamp)

 

status

The DR Request status

  • 0: pending
  • 1: standby (The notifications are dispatched.)
  • 2: active
  • 3: completed
  • 9: canceled
 

insertTs

DR Request creation time (10 digits)

 

Response Example

{ 
    "code": 2000,
    "data": {
        "requestID": "2020-10-15-dr", 
        "name": "first event", 
        "startTs": 1234567890123, 
        "endTs": 1234567890123, 
        "eventSignals": [ 
            {
                "signalID": "2020-09-25-dr-event-01-signal-01", 
                "signalName": "SIMPLE", 
                "targets": ["x-DEVICE_TV"]
            }
        ],
        "eventTargets": { 
                "venID": ["ven-02"],
                "resourceIDs" : [],
        },
        "vtnID": "vtn01",
        "status": "1",
        "insertTs": 1573112603404
        }
}