Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Hvis I kender jeres "Client Id/Client secret" så spring dette step over!

  1. DataHub 3 PREPROD: Naviger til DataHub 3 https://preprod.datahub3.dk/market-participant/actors og naviger til Aktør-fanen.

  2. Vælg fanen ‘B2B adgang’ og træk jeres Client ID og generer jeres Client secret.

  3. Gem Client Id og Client Secret, da i ikke vil kunne se jeres Client Secret igen senere.

2. Bearer token

Kald endpoint for at få udleveret bearer token
[POST] https://login.microsoftonline.com/20e7a6b4-86e0-4e7a-a34d-6dc5a75d1982/oauth2/v2.0/token

 

[Required Header]
Content-Type: application/x-www-form-urlencoded

...

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2021 rel. 3 (x64) (http://www.altova.com )-->
<cim:RequestAggregatedMeasureData_MarketDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cim="urn:ediel.org:measure:requestaggregatedmeasuredata:0:1" xsi:schemaLocation="urn:ediel.org:measure:requestaggregatedmeasuredata:0:1 urn-ediel-org-measure-requestaggregatedmeasuredata-0-1.xsd">
<cim:mRID></cim:mRID>
<cim:type>E74</cim:type>
<cim:process.processType>D03</cim:process.processType>
<cim:businessSector.type>23</cim:businessSector.type>
<cim:sender_MarketParticipant.mRID codingScheme="A10"></cim:sender_MarketParticipant.mRID>
<cim:sender_MarketParticipant.marketRole.type></cim:sender_MarketParticipant.marketRole.type>
<cim:receiver_MarketParticipant.mRID codingScheme="A10">5790001330552</cim:receiver_MarketParticipant.mRID>
<cim:receiver_MarketParticipant.marketRole.type>DGL</cim:receiver_MarketParticipant.marketRole.type>
<cim:createdDateTime>2022-12-17T09:30:47Z</cim:createdDateTime>
<cim:Series>
<cim:mRID></cim:mRID>
<!-- <cim:settlement_Series.version>D01</cim:settlement_Series.version> -->
<cim:marketEvaluationPoint.type>E17</cim:marketEvaluationPoint.type>
<cim:marketEvaluationPoint.settlementMethod>D01</cim:marketEvaluationPoint.settlementMethod>
<cim:start_DateAndOrTime.dateTime>2023-01-01T23:00:00Z</cim:start_DateAndOrTime.dateTime>
<cim:end_DateAndOrTime.dateTime>2022-01-22T23:00:00Z</cim:end_DateAndOrTime.dateTime>
<cim:meteringGridArea_Domain.mRID codingScheme="NDK">804</cim:meteringGridArea_Domain.mRID>
<!--<cim:energySupplier_MarketParticipant.mRID codingScheme="A10"></cim:energySupplier_MarketParticipant.mRID>-->
<cim:balanceResponsibleParty_MarketParticipant.mRID codingScheme="A10"></cim:balanceResponsibleParty_MarketParticipant.mRID>
</cim:Series>
</cim:RequestAggregatedMeasureData_MarketDocument>

...

Vi har lavet en postman collection som der tager udgangspunkt i ovenstående, som kan hjælpe dig med at komme hurtigt igang.

Postman collection collection’en kan hentes her, og den indeholder en beskrivelse af hvordan man skal bruge den.

...

Du kan finde inspiration i vores acceptance test til hvordan du kan oprette en C# http client, som kan kommuniker med datahub DataHub 3 ud fra ovenstående. Repositoriet kan findes her: https://github.com/Energinet-DataHub/opengeh-edi/tree/main/source/AcceptanceTests/Tests.

Selve kommunikationen med DataHub 3 sker her: https://github.com/Energinet-DataHub/opengeh-edi/blob/main/source/AcceptanceTests/Drivers/EdiDriver.cs