Skip to content

Instantly share code, notes, and snippets.

@johnnolan
Created March 8, 2021 09:04
Show Gist options
  • Save johnnolan/81b61a5d79c58c6bdc964a4681080642 to your computer and use it in GitHub Desktop.
Save johnnolan/81b61a5d79c58c6bdc964a4681080642 to your computer and use it in GitHub Desktop.
Performance Platform API
[
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh0cmFuc2FjdGlvbnNkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 456,
"dataType": "transactions",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhjb3N0ZGlnaXRhbA==",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 0,
"dataType": "cost",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhjb3N0LXBlci10cmFuc2FjdGlvbmRpZ2l0YWw=",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 0,
"dataType": "cost-per-transaction",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhkaWdpdGFsLXRha2UtdXBkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 1203,
"dataType": "digital-take-up",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhjb21wbGV0aW9uLXJhdGVkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 873,
"dataType": "completion-rate",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi12ZXJ5LWRpc3NhdGlzZmllZGRpZ2l0YWw=",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 12,
"dataType": "user-satisfaction-very-dissatisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi1kaXNzYXRpc2ZpZWRkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 3,
"dataType": "user-satisfaction-dissatisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi1uZWl0aGVyLXNhdGlzZmllZC1ub3ItZGlzc2F0aXNmaWVkZGlnaXRhbA==",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 34,
"dataType": "user-satisfaction-neither-satisfied-nor-dissatisfied",
"period": "month"
},
{
"_id": "2020-06-01T00:00:00+00:00opg-use-an-lpamonthuser-satisfaction-satisfieddigital",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 123,
"dataType": "user-satisfaction-satisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi12ZXJ5LXNhdGlzZmllZGRpZ2l0YWw=",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 340,
"dataType": "user-satisfaction-very-satisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi1wZXJjZW50ZGlnaXRhbA==",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 89,
"dataType": "user-satisfaction-percent",
"period": "month"
}
]
{
"openapi": "3.0.2",
"info": {
"title": "Swagger Performance Platform",
"version": "1.0.0",
"description": "This spec defines how our endpoint for presenting required Performance Platform data should look. It is important to keep all our services in line with the same specification.",
"termsOfService": "http://swagger.io/terms/",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-logo": {
"url": ""
},
"contact": null
},
"servers": [
{
"url": "http://opg-endpoint-url.com/v1",
"description": "",
"x-last-modified": 1614871380896
}
],
"paths": {
"/performance": {
"get": {
"tags": [],
"responses": {
"200": {
"$ref": "#/components/responses/200",
"description": "",
"x-last-modified": 1614872722078
}
},
"description": ""
},
"x-last-modified": 1614871332739
}
},
"components": {
"schemas": {
"Error": {
"required": [
"message",
"code"
],
"type": "object",
"properties": {
"message": {
"description": "The error message indicating what the issue is",
"type": "string"
},
"code": {
"description": "The http status code",
"maximum": 600,
"minimum": 100,
"type": "integer"
}
},
"example": {
"code": 400,
"message": "wrong input"
},
"x-last-modified": 1614942463176
},
"ApiResponse": {
"type": "object",
"properties": {
"_id": {
"format": "byte",
"description": " should be a unique url-friendly, base64-encoded, UTF8 encoded concatenation identifier, formed from _timestamp, service, period, dataType, stage/channel, as appropriate. Do not include any metrics figures in the _id.",
"type": "string"
},
"_timestamp": {
"format": "date-time",
"description": "The start of the period to which the data relates (e.g. midnight at the start of the day for daily data, or the start of the hour for hourly data). All times must be in the past.",
"type": "string"
},
"service": {
"description": "Name of the service these figures represent.",
"type": "string"
},
"channel": {
"description": "Which channel this data comes from such as digital, phone, post, etc",
"type": "string"
},
"count": {
"format": "int32",
"description": "The count representative of the metric being requested.",
"type": "integer"
},
"datatype": {
"description": "Name of the data you are sending such as transactions, digital-take-up, completion-rate",
"type": "string"
},
"period": {
"description": "Definition of `period` as it applies to ‘Digital take-up,’ and any other info a user might want to know about this param. e.g. hour, day, month",
"type": "string"
}
},
"example": [
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh0cmFuc2FjdGlvbnNkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 456,
"dataType": "transactions",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhjb3N0ZGlnaXRhbA==",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 0,
"dataType": "cost",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhjb3N0LXBlci10cmFuc2FjdGlvbmRpZ2l0YWw=",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 0,
"dataType": "cost-per-transaction",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhkaWdpdGFsLXRha2UtdXBkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 1203,
"dataType": "digital-take-up",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGhjb21wbGV0aW9uLXJhdGVkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 873,
"dataType": "completion-rate",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi12ZXJ5LWRpc3NhdGlzZmllZGRpZ2l0YWw=",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 12,
"dataType": "user-satisfaction-very-dissatisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi1kaXNzYXRpc2ZpZWRkaWdpdGFs",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 3,
"dataType": "user-satisfaction-dissatisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi1uZWl0aGVyLXNhdGlzZmllZC1ub3ItZGlzc2F0aXNmaWVkZGlnaXRhbA==",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 34,
"dataType": "user-satisfaction-neither-satisfied-nor-dissatisfied",
"period": "month"
},
{
"_id": "2020-06-01T00:00:00+00:00opg-use-an-lpamonthuser-satisfaction-satisfieddigital",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 123,
"dataType": "user-satisfaction-satisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi12ZXJ5LXNhdGlzZmllZGRpZ2l0YWw=",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 340,
"dataType": "user-satisfaction-very-satisfied",
"period": "month"
},
{
"_id": "MjAyMC0wNi0wMVQwMDowMDowMCswMDowMG9wZy11c2UtYW4tbHBhbW9udGh1c2VyLXNhdGlzZmFjdGlvbi1wZXJjZW50ZGlnaXRhbA==",
"_timestamp": "2020-06-01T00:00:00+00:00",
"service": "opg-use-an-lpa",
"channel": "digital",
"count": 89,
"dataType": "user-satisfaction-percent",
"period": "month"
}
],
"x-last-modified": 1614945071927
}
},
"responses": {
"200": {
"$ref": "#/components/schemas/ApiResponse",
"description": "",
"x-last-modified": 1614945081899
}
},
"securitySchemes": {},
"parameters": {}
},
"tags": [],
"security": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment