Skip to content

Commit

Permalink
Operator API updates (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierChirouze authored Feb 10, 2022
1 parent aca9ce4 commit 40b954a
Show file tree
Hide file tree
Showing 98 changed files with 3,902 additions and 566 deletions.
3 changes: 0 additions & 3 deletions mvp-spec/examples/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions mvp-spec/examples/body-id-and-preferences.json

This file was deleted.

17 changes: 0 additions & 17 deletions mvp-spec/examples/body-new-id.json

This file was deleted.

10 changes: 0 additions & 10 deletions mvp-spec/examples/id.json

This file was deleted.

16 changes: 0 additions & 16 deletions mvp-spec/examples/identity.json

This file was deleted.

6 changes: 0 additions & 6 deletions mvp-spec/examples/request-advertiserA.json

This file was deleted.

6 changes: 0 additions & 6 deletions mvp-spec/examples/request-cmpC.json

This file was deleted.

6 changes: 0 additions & 6 deletions mvp-spec/examples/request-publisherP.json

This file was deleted.

3 changes: 0 additions & 3 deletions mvp-spec/examples/response-200.json

This file was deleted.

3 changes: 0 additions & 3 deletions mvp-spec/examples/response-404.json

This file was deleted.

6 changes: 0 additions & 6 deletions mvp-spec/examples/response-operatorO.json

This file was deleted.

17 changes: 17 additions & 0 deletions mvp-spec/json-schemas/error.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Error",
"description": "The description of an error",
"$id": "error",
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string",
"description": "The error message"
}
},
"required": [
"message"
]
}
8 changes: 8 additions & 0 deletions mvp-spec/json-schemas/get-3pc-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-3pc-request",
"title": "GET /v1/3pc request",
"type": "null",
"additionalProperties": false,
"description": "No parameter expected to call this endpoint"
}
16 changes: 16 additions & 0 deletions mvp-spec/json-schemas/get-3pc-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-3pc-response",
"title": "GET /v1/3pc response",
"type": "object",
"additionalProperties": false,
"properties": {
"3pc": {
"$ref": "test-3pc.json",
"description": "Value of `paf_test_3pc` if it was found (3rd party cookies are supported)\n\nIf 3rd party cookies are not supported, the endpoint returns `404` and an error message"
}
},
"required": [
"3pc"
]
}
8 changes: 8 additions & 0 deletions mvp-spec/json-schemas/get-identity-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-identity-request",
"title": "GET /v1/identity request",
"type": "null",
"additionalProperties": false,
"description": "No parameter expected to call this endpoint"
}
58 changes: 58 additions & 0 deletions mvp-spec/json-schemas/get-identity-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-identity-response",
"title": "GET /v1/identity response",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The name of the contracting party, since the domain may not reflect the company name.\n",
"examples": ["Criteo"]
},
"type": {
"type": "string",
"enum": ["vendor", "operator"],
"description": "The type of contracting party in the PAF ecosystem"
},
"version": {
"$ref": "version.json",
"description": "The type of contracting party in the PAF ecosystem"
},
"keys": {
"type": "array",
"description": "List of public keys the contracting party used or is using for signing data and messages",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"key": {
"type": "string",
"description": "Public key string value",
"examples": [
"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUnarwp0gUZgjb9fsYNLcNrddNKV5\nh4/WfMRMVh3HIqojt3LIsvUQig1rm9ZkcNx+IHZVhDM+hso2sXlGjF9xOQ==\n-----END PUBLIC KEY-----"
]
},
"start": {
"$ref": "timestamp.json",
"description": "Timestamp when the contracting party started using this key for signing"
},
"end": {
"$ref": "timestamp.json",
"description": "Timestamp when the contracting party stopped using this key for signing"
}
},
"required": [
"key",
"start"
]
}
}
},
"required": [
"name",
"type",
"version",
"keys"
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-id-prefs-request",
"title": "GET /v1/id-prefs request",
"$id": "get-ids-prefs-request",
"title": "GET /v1/ids-prefs request",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
33 changes: 33 additions & 0 deletions mvp-spec/json-schemas/get-ids-prefs-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-ids-prefs-response",
"title": "GET /v1/ids-prefs response",
"additionalProperties": false,
"properties": {
"sender": {
"$ref": "domain.json",
"description": "The domain name of the sender of this response (the operator domain name)"
},
"receiver": {
"$ref": "domain.json",
"description": "The domain name of the receiver of this request (the website)"
},
"timestamp": {
"$ref": "timestamp.json"
},
"signature": {
"$ref": "signature.json",
"description": "Signature based on input:\n```\nsender + '\\u2063' +\nreceiver + '\\u2063' +\ntimestamp + '\\u2063' +\npreferences.source.signature + '\\u2063' +\nidentifiers[0].source.signature + '\\u2063' +\nidentifiers[1].source.signature + '\\u2063' +\n...\nidentifiers[n].source.signature\n```"
},
"body": {
"$ref": "ids-and-optional-preferences.json"
}
},
"required": [
"sender",
"receiver",
"timestamp",
"signature",
"body"
]
}
3 changes: 2 additions & 1 deletion mvp-spec/json-schemas/identifier.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"examples": ["7435313e-caee-4889-8ad7-0acd0114ae3c"]
},
"source": {
"$ref": "source.json"
"$ref": "source.json",
"description": "Signature based on input:\n\n```identifier.source.domain + '\\u2063' + \nidentifier.source.timestamp + '\\u2063' + \nidentifier.type + '\\u2063'+\nidentifier.value\n```"
}
},
"required": [
Expand Down
11 changes: 11 additions & 0 deletions mvp-spec/json-schemas/identifiers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "List of identifiers",
"$id": "identifiers",
"type": "array",
"additionalProperties": false,
"items": {
"$ref": "identifier.json",
"description": "Signature based on input **that depends on the identifiers**:\n\n```identifier.source.domain + '\\u2063' + \nidentifier.source.timestamp + '\\u2063' + \nidentifier.type + '\\u2063'+\nidentifier.value\n```"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "id-and-optional-preferences",
"$id": "ids-and-optional-preferences",
"title": "Identifiers and optional preferences",
"description": "A list of identifiers and optionally, some preferences",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Identifiers and preferences",
"description": "A list of identifiers and some preferences",
"$id": "id-and-preferences",
"$id": "ids-and-preferences",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
19 changes: 0 additions & 19 deletions mvp-spec/json-schemas/post-id-prefs-response.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "post-id-prefs-request",
"title": "POST /v1/id-prefs request",
"$id": "post-ids-prefs-request",
"title": "POST /v1/ids-prefs request",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -21,7 +21,7 @@
"description": "Signature based on input:\n\n```\nsender + '\\u2063' +\nreceiver + '\\u2063' +\ntimestamp + '\\u2063' +\npreferences.source.signature + '\\u2063' +\nidentifiers[0].source.signature + '\\u2063' +\nidentifiers[1].source.signature + '\\u2063' +\n...\nidentifiers[n].source.signature\n```"
},
"body": {
"$ref": "id-and-preferences.json"
"$ref": "ids-and-preferences.json"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "get-id-prefs-response",
"title": "GET /v1/id-prefs response",
"$id": "post-ids-prefs-response",
"title": "POST /v1/ids-prefs response",
"additionalProperties": false,
"properties": {
"sender": {
Expand All @@ -20,7 +20,7 @@
"description": "Signature based on input:\n```\nsender + '\\u2063' +\nreceiver + '\\u2063' +\ntimestamp + '\\u2063' +\npreferences.source.signature + '\\u2063' +\nidentifiers[0].source.signature + '\\u2063' +\nidentifiers[1].source.signature + '\\u2063' +\n...\nidentifiers[n].source.signature\n```"
},
"body": {
"$ref": "id-and-optional-preferences.json"
"$ref": "ids-and-preferences.json"
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion mvp-spec/json-schemas/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"required": ["use_browsing_for_personalization"]
},
"source": {
"$ref": "source.json"
"$ref": "source.json",
"description": "Signature based on input:\n\n**⚠️ Note that it uses data from identifiers**:\n\n```preferences.source.domain + '\\u2063' +\npreferences.source.timestamp + '\\u2063' +\nidentifiers[type=\"prebid_id\"].source.signature + '\\u2063' +\npreferences.data.key1 + '\\u2063' + preferences.data[key1].value + '\\u2063' +\npreferences.data.key2 + '\\u2063' + preferences.data[key2].value + '\\u2063' +\n...\npreferences.data.keyN + '\\u2063' + preferences.data[keyN].value\n```"
}
},
"required": [
Expand Down
19 changes: 19 additions & 0 deletions mvp-spec/json-schemas/redirect-get-ids-prefs-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "redirect-get-ids-prefs-request",
"title": "GET /v1/redirect/get-ids-prefs request",
"type": "object",
"additionalProperties": false,
"properties": {
"returnUrl": {
"$ref": "return-url.json"
},
"request": {
"$ref": "get-ids-prefs-request.json"
}
},
"required": [
"returnUrl",
"request"
]
}
Loading

0 comments on commit 40b954a

Please sign in to comment.