CommunicationParty API

A REST API for getting events or an export of CommunicationParty. The events contains CommunicationParty.Updatedand CommunicationParty.Created events...

Environments

Environment URL
Test cpe.test.grunndata.nhn.no/CommunicationPartyEvents
QA cpe.qa.grunndata.nhn.no/CommunicationPartyEvents
Production cpe.grunndata.nhn.no/CommunicationPartyEvents

Swagger

Environment URL
Test cpe.test.grunndata.nhn.no/swagger
QA cpe.qa.grunndata.nhn.no/swagger
Production cpe.grunndata.nhn.no/swagger

Endpoints

HTTP Method Endpoint Description
GET [/CommunicationPartyEvents] Get events
GET [/CommunicationPartyExport] Get full export of all CommunicationParties

GET /CommunicationPartyEvents

Get CommunicationParty events based on given parameters. NB: The value in fromDatetime needs to be URL Encoded.

Path parameters

Parameter Type Description
eventId string The id of the first event from where to start the search
fromDatetime string The datetimestamp of the event from where to get events from
Page int The page number the response will contain, default is page 1
Size int The size of the page

Example

Get all events

GET /CommunicationPartyEvents

Get events from a given id

GET /CommunicationPartyEvents?EventId=ddcae29a-68bc-40f9-854d-bad97d784a04

Get events from a given datetime

GET /CommunicationPartyEvents?FromDatetime=2023-06-07T07%3A11%3A25.000%2B02%3A00

Get events from a given datetime with paging

GET /CommunicationPartyEvents?FromDatetime=2023-06-07T07%3A11%3A25.000%2B02%3A00&Page=2&Size=1

### Response
```json
{
    "communicationParties": [
        {
            "EventId": "string",
            "FromDatetime": "datetimeoffset",
            "HerId": "string",
            "OrgNr": "string",
            "CommunicationParty": "object"
        }
    ],
    "_Links": {
        "first": {
            "href": "string"
        },
        "prev": {
            "href": "string"
        },
        "self": {
            "href": "string"
        },
        "next": {
            "href": "string"
        },
        "last": {
            "href": "string"
        }
    },
    "Page": {
        "size": "int",
        "totalElements": "int",
        "totalPages": "int",
        "number": "int"
    }
}

GET /CommunicationPartyExport

Get a full export of all CommunicationParties. Returns streamed JSON data.