Resources

Create / Update Resource

Creates new resources or updates resource information.

Endpoint

POST {{baseUrl}}/resources

 

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

Key

Type

Required

Description

resourceID

string

mandatory

The uniquely identifiable resource ID, which represents a group of users or devices.

venID

string

mandatory

The uniquely identifiable VEN ID (Virtual End Node ID), which represents a group of resources.

comment

string

optional

The description of the resource

 

Request Example 

$ curl '{{baseUrl}}/resources' -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 '{"resourceID":"lgeDR-CE-TV",
        "venID": "LGE_DR",
        "comment":"LGE TV DR system"
    }

 

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

 

resourceID

The resource ID

 

Response Example

{
  "code": 2000,
  "data": {
    "resourceID": "lgeDR-CE-TV"
  }
}

 

Get Resource

Checks a resource of specific VEN.

Endpoint

GET {{baseUrl}}/resources/{ven-id}

 

Request

Path Parameter

Enters the specific ven-id.

 

Parameter Information

Name

Type

Required

Description

ven-id

string

mandatory

A specific VEN ID (Virtual End Node ID). It could be an EMS (Energy Management System) 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 (cloud-sdt-dr@lge.com) to arrange VEN 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}}/resource/{ven-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 Informaition

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

 

resourceID

The uniquely identifiable resource ID, which is registered to LG DR service.

 

venID

The uniquely identifiable VEN ID, which represents a group of resources.

 

comment

The description of the resource

 

insertTs

The registered time (10 digits)

 

Response Example

{
    "code": 2000,
    "data": [
        {
            "resourceID":"lgeDR-CE-TV",
            "comment": "Electro - LGE TV DR system",
            "venID: "LGE_DR",
            "insertTs": "1234567890"
        },
        {
            "resourceID":"lgeDR-ST-ESS",
            "comment": "Stark- LGE ESS DR system",
            "venID: "LGE_DR",
            "insertTs": "1234567891"
        },
        {
            "resourceID":"LgeDR-ST-AC",
            "comment": "Stark - LGE Air Conditioner DR system",
            "venID: "LGE_DR",
            "insertTs": "1234567892"
        }
    ]
}