Green Button Connect My Data Resources

ApplicationInformation(fromESPI)

The ApplicationInformation resource exists for each Data Custodian / Third Party registration.  The Data Custodian is responsible for maintaining the contents of the ApplicationInformation resource and making it available to the Third Party through the ApplicationInformation API.

In order for the Third Party to retrieve the contents of the ApplicationInformation resource, they must submit a request to the Data Custodian's ApplicationInformation resource API using the "registration" access token assigned to them by the Data Custodian during the Third Party registration process or generated through the Third Party's use of the OAuth 2.0 Client Credential flow process using a scope= parameter value of "FB=36_40". 

<?xml version="1.0" encoding="UTF-8"?>
<entry  xmlns="http://www.w3.org/2005/Atom"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:espi="http://naesb.org/espi"
    xsi:schemaLocation=
                "http://www.w3.org/2005/Atom https://greenbuttondata.org/xsd/3_3/atom.xsd
                http://naesb.org/espi https://www.naesb.org/espi.xsd">
    <id>urn:uuid:af6e8b03-0299-467e-972a-a883ecdcc575</id>
    <link rel="up" href="https://greenbuttondata.org/DataCustodian/espi/1_1/resource/ApplicationInformation" type="espi-feed/ApplicationInformation"/>
    <link rel="self" href="https://greenbuttondata.org/DataCustodian/espi/1_1/resource/ApplicationInformation/7c8a3cac7855" type="espi-entry/ApplicationInformation"/>
    <title>Green Button Alliance Sample ThirdParty Application</title>
    <content>
        <espi:ApplicationInformation>
            <espi:dataCustodianId>data_custodian</espi:dataCustodianId>
            <espi:dataCustodianApplicationStatus>1</espi:dataCustodianApplicationStatus>
            <espi:thirdPartyNotifyUri>https://greenbuttondata.org/ThirdParty/espi/1_1/Notification</espi:thirdPartyNotifyUri>
            <espi:authorizationServerAuthorizationEndpoint>https://greenbuttondata.org/DataCustodian/oauth/authorize</espi:authorizationServerAuthorizationEndpoint>
            <espi:authorizationServerTokenEndpoint>https://greenbuttondata.org/DataCustodian/oauth/token</espi:authorizationServerTokenEndpoint>
            <espi:dataCustodianBulkRequestURI></espi:dataCustodianBulkRequestURI>
            <espi:dataCustodianResourceEndpoint>https://greenbuttondata.org/DataCustodian/espi/1_1/resource</espi:dataCustodianResourceEndpoint>
            <espi:client_secret>secret</espi:client_secret>
            <espi:client_name>GBA Third Party Client Demo</espi:client_name>
            <espi.client_uri>https://greenbuttondata.org/ThirdParty</espi.client_uri>
            <espi:redirect_uri>https://greenbuttondata.org/ThirdParty/espi/1_1/OAuthCallBack</espi:redirect_uri>
            <espi:client_id>third_party</espi:client_id>
            <espi:software_id>GBA Third Party Client Demo</espi:software_id>
            <espi:software_version>3.2</espi:software_version>
            <espi:client_id_issued_at>1429602217</espi:client_id_issued_at>
            <espi:client_secret_expires_at>0</espi:client_secret_expires_at>
            <espi:contacts>dcoffin@greenbuttonalliance.org</espi:contacts>
            <espi:token_endpoint_auth_method>client_secret_basic</espi:token_endpoint_auth_method>
            <espi:scope>FB=4_5_15;IntervalDuration=900;BlockDuration=monthly;HistoryLength=13</espi:scope>
            <espi:scope>FB=4_5_15;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13</espi:scope>
            <espi:scope>FB=4_5_12_15_16;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=13</espi:scope>
            <espi:grant_types>refresh_token</espi:grant_types>
            <espi:grant_types>authorization_code</espi:grant_types>
            <espi:grant_types>client_credentials</espi:grant_types>
            <espi:response_types>code</espi:response_types>
            <espi:registration_client_uri>greenbuttondata.org/oauth/registration</espi:registration_client_uri>
            <espi:registration_access_token>d89bb056-0f02-4d47-9fd2-ec6a19ba8d0c</espi:registration_access_token>
        </espi:ApplicationInformation>
    </content>
    <published>2014-01-02T10:00:00Z</published>
    <updated>2014-01-02T10:00:00Z</updated>
</entry>

Authorization(fromESPI)

The Authorization resource represents the current state of the Retail Customer's authorization allowing a Third Party to retrieve Energy Usage and Retail Customer Information from a Data Custodian.  A Third Party may retrieve the contents of an Authorization resource by accessing the Data Custodian's Authorization resource API using the "client" access token either assigned by the Data Custodian during the Third Party registration process or generated through the Third Party's use of the OAuth 2.0 Client_Credential flow process using a scope= parameter value of "FB=34_35".  The Data Custodian's Authorization API response will NOT contain either the access or refresh token values assigned at the time the Authorization was created for security reasons. Therefore, it is the Third Party's responsibility to ensure they capture and persist the access and refresh tokens locally at the time the Authorization is created.

<entry  xmlns="http://www.w3.org/2005/Atom"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:espi="http://naesb.org/espi"
    xsi:schemaLocation=
"http://www.w3.org/2005/Atom https://greenbuttondata.org/xsd/3_3/atom.xsd http://naesb.org/espi https://www.naesb.org/espi.xsd"> <id>urn:uuid:bdcb34c0-7afd-4812-b30c-0d90fbeab936</id> <link rel="up" href="https://data.greenbuttonconnect.org/DataCustodian/espi/1_1/resource/Authorization"/> <link rel="self" href="https://data.greenbuttonconnect.org/DataCustodian/espi/1_1/resource/Authorization/1dfa07c5740a_119652"/> <content> <espi:Authorization> <espi:authorizedPeriod> <espi:duration>0</espi:duration> <espi:start>0</espi:start> </espi:authorizedPeriod> <espi:publishedPeriod> <espi:duration>0</espi:duration> <espi:start>0</espi:start> </espi:publishedPeriod> <espi:status>1</espi:status> <espi:expires_at>31535999</espi:expires_at> <espi:scope>FB=4_5_15;IntervalDuration=900;BlockDuration=monthly;HistoryLength=13</espi:scope> <espi:token_type>Bearer</espi:token_type> <espi:resourceURI>https://greenbuttondata.org/DataCustodian/espi/1_1/resource/Batch/Subscription/1dfa07c5740a_119652</espi:resourceURI> <espi:authorizationURI>https://greenbuttondata.org/DataCustodian/espi/1_1/resource/Authorization/1dfa07c5740a_119652</espi:authorizationURI> <espi:customerResourceURI>https://greenbuttondata.org/DataCustodian/espi/1_1/resource/Batch/RetailCustomer/1dfa07c5740a_119652</espi:customerResourceURI> </espi:Authorization> </content> <published>2014-09-03T06:39:45Z</published> <updated>2014-09-03T06:39:45Z</updated> </entry>