Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit dac79eb

Browse files
[bot]update openapi3 schema
1 parent a76b1a7 commit dac79eb

File tree

1 file changed

+39
-91
lines changed

1 file changed

+39
-91
lines changed

api/build/core-openapi3.yaml

Lines changed: 39 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,7 @@ paths:
8484
description: |-
8585
- `202` and a key trial, if one still needs to be passed
8686
- `200` and the appropriate data if the key trial has been passed and is not yet expired.
87-
The data is a gzipped tarball (.tar.gz) named `[email protected]`, where
88-
- `export[numbers]` is the word `export` with 20 random digits appended to it
89-
- `user` is the actors' name
90-
- `subdomain.example.com` is the FQDN of the server the actor is registered on.
91-
92-
This file archive contains a file `messages.json` which is a JSON `MessageBatch` of all
93-
messages sent by the user. Note the [definition of the word "message" in polyproto](https://docs.polyphony.chat/Protocol%20Specifications/core/#:~:text=software%20for%20clients.-,message%2C%20messages,-%3A%20In%20the%20context).
94-
If the server where the data export was requested from has [RawR](https://docs.polyphony.chat/Protocol%20Specifications/core/#731-resource-addressing-with-relative-roots)
95-
enabled, the file archive will contain a folder named `rawr`. This folder contains all
96-
RawR-content uploaded by the actor to that server. The files in this folder are named after
97-
the resource ID. File extensions are only added if they were known to the server. An
98-
example file name might be `2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`,
99-
referencing the file which was hosted at `<server_url>/.p2/core/resource/2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`.
87+
See the `P2Export` schema for more information.
10088
- `204` if the server needs time to gather the data. A `Retry-After` header is included in
10189
the response, indicating to the actor the point in time at which they should query this
10290
endpoint again. If this point in time is after the expiry timestamp of the completed key trial,
@@ -105,24 +93,12 @@ paths:
10593
content:
10694
application/json:
10795
schema:
108-
$ref: '#/components/schemas/TypeSpec.Http.File'
96+
$ref: '#/components/schemas/polyproto.core.models.P2Export'
10997
'202':
11098
description: |-
11199
- `202` and a key trial, if one still needs to be passed
112100
- `200` and the appropriate data if the key trial has been passed and is not yet expired.
113-
The data is a gzipped tarball (.tar.gz) named `[email protected]`, where
114-
- `export[numbers]` is the word `export` with 20 random digits appended to it
115-
- `user` is the actors' name
116-
- `subdomain.example.com` is the FQDN of the server the actor is registered on.
117-
118-
This file archive contains a file `messages.json` which is a JSON `MessageBatch` of all
119-
messages sent by the user. Note the [definition of the word "message" in polyproto](https://docs.polyphony.chat/Protocol%20Specifications/core/#:~:text=software%20for%20clients.-,message%2C%20messages,-%3A%20In%20the%20context).
120-
If the server where the data export was requested from has [RawR](https://docs.polyphony.chat/Protocol%20Specifications/core/#731-resource-addressing-with-relative-roots)
121-
enabled, the file archive will contain a folder named `rawr`. This folder contains all
122-
RawR-content uploaded by the actor to that server. The files in this folder are named after
123-
the resource ID. File extensions are only added if they were known to the server. An
124-
example file name might be `2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`,
125-
referencing the file which was hosted at `<server_url>/.p2/core/resource/2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`.
101+
See the `P2Export` schema for more information.
126102
- `204` if the server needs time to gather the data. A `Retry-After` header is included in
127103
the response, indicating to the actor the point in time at which they should query this
128104
endpoint again. If this point in time is after the expiry timestamp of the completed key trial,
@@ -136,19 +112,7 @@ paths:
136112
description: |-
137113
- `202` and a key trial, if one still needs to be passed
138114
- `200` and the appropriate data if the key trial has been passed and is not yet expired.
139-
The data is a gzipped tarball (.tar.gz) named `[email protected]`, where
140-
- `export[numbers]` is the word `export` with 20 random digits appended to it
141-
- `user` is the actors' name
142-
- `subdomain.example.com` is the FQDN of the server the actor is registered on.
143-
144-
This file archive contains a file `messages.json` which is a JSON `MessageBatch` of all
145-
messages sent by the user. Note the [definition of the word "message" in polyproto](https://docs.polyphony.chat/Protocol%20Specifications/core/#:~:text=software%20for%20clients.-,message%2C%20messages,-%3A%20In%20the%20context).
146-
If the server where the data export was requested from has [RawR](https://docs.polyphony.chat/Protocol%20Specifications/core/#731-resource-addressing-with-relative-roots)
147-
enabled, the file archive will contain a folder named `rawr`. This folder contains all
148-
RawR-content uploaded by the actor to that server. The files in this folder are named after
149-
the resource ID. File extensions are only added if they were known to the server. An
150-
example file name might be `2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`,
151-
referencing the file which was hosted at `<server_url>/.p2/core/resource/2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`.
115+
See the `P2Export` schema for more information.
152116
- `204` if the server needs time to gather the data. A `Retry-After` header is included in
153117
the response, indicating to the actor the point in time at which they should query this
154118
endpoint again. If this point in time is after the expiry timestamp of the completed key trial,
@@ -653,17 +617,22 @@ paths:
653617
post:
654618
operationId: Registered_importData
655619
summary: Import data to server
656-
description: //TODO
657-
parameters: []
620+
description: |-
621+
Import a `P2Export` file. `messages` in this file must have been re-signed to the current
622+
actor. Only messages classified as ["Information not tied to a specific context"](https://docs.polyphony.chat/Protocol%20Specifications/core/#:~:text=Example%3A%20Information%20not,without%0Aany%20issues.)
623+
can be imported.
624+
parameters:
625+
- name: X-P2-Sensitive-Solution
626+
in: header
627+
required: true
628+
description: Sensitive actions require a second factor of authentication to be executed. Read [section 4.1.2 of the protocol definition](https://docs.polyphony.chat/Protocol%20Specifications/core/#412-sensitive-actions) for more information.
629+
schema:
630+
type: string
658631
responses:
659632
'202':
660-
description: The request has been accepted for processing, but processing has not yet completed.
661-
content:
662-
application/json:
663-
schema:
664-
$ref: '#/components/schemas/polyproto.core.models.KeyTrial'
665-
'204':
666-
description: 'There is no content to send for this request, but the headers may be useful. '
633+
description: |-
634+
- `202`: The content has been accepted for processing, but processing has not been
635+
completed or may not have started.
667636
headers:
668637
Content-Length:
669638
required: true
@@ -673,41 +642,13 @@ paths:
673642
- 0
674643
tags:
675644
- Migration - Registration required
645+
- Sensitive Actions
676646
requestBody:
677647
required: false
678648
content:
679649
application/json:
680650
schema:
681-
type: array
682-
items:
683-
type: object
684-
required:
685-
- idCert
686-
- messages
687-
properties:
688-
idCert:
689-
type: string
690-
description: The ID-Cert that the following messages' signatures correspond to.
691-
messages:
692-
type: array
693-
items:
694-
type: object
695-
properties:
696-
signature:
697-
type: string
698-
description: Signature of the whole message
699-
content:
700-
type: string
701-
description: Arbitrary content `T`. This depends on the specific implementation or extension of the protocol.
702-
required:
703-
- signature
704-
- content
705-
description: The actual message.
706-
description: |-
707-
A message batch, as received from and sent to the server in the context of re-signing messages.
708-
This type is generic over `T`, where `T` represents the content of the actual message. This
709-
means, that the specific message content depends on the concrete implementation or extension
710-
of the polyproto protocol.
651+
$ref: '#/components/schemas/polyproto.core.models.P2Export'
711652
security:
712653
- BearerAuth: []
713654
/.p2/core/v1/migration/redirect:
@@ -1250,18 +1191,6 @@ paths:
12501191
- {}
12511192
components:
12521193
schemas:
1253-
TypeSpec.Http.File:
1254-
type: object
1255-
required:
1256-
- contents
1257-
properties:
1258-
contentType:
1259-
type: string
1260-
filename:
1261-
type: string
1262-
contents:
1263-
type: string
1264-
format: byte
12651194
Version:
12661195
type: string
12671196
enum:
@@ -1389,6 +1318,25 @@ components:
13891318
This type is generic over `T`, where `T` represents the content of the actual message. This
13901319
means, that the specific message content depends on the concrete implementation or extension
13911320
of the polyproto protocol.
1321+
polyproto.core.models.P2Export:
1322+
type: object
1323+
description: |-
1324+
The data is a gzipped tarball (.tar.gz) named `[email protected]`, where
1325+
- `export[numbers]` is the word `export` with 20 random digits appended to it
1326+
- `user` is the actors' name
1327+
- `subdomain.example.com` is the FQDN of the server the actor is registered on.
1328+
This file archive contains a file `messages.json` which is a JSON `MessageBatch` of all
1329+
messages sent by the user. Note the [definition of the word "message" in polyproto](https://docs.polyphony.chat/Protocol%20Specifications/core/#:~:text=software%20for%20clients.-,message%2C%20messages,-%3A%20In%20the%20context).
1330+
If the server where the data export was requested from has [RawR](https://docs.polyphony.chat/Protocol%20Specifications/core/#731-resource-addressing-with-relative-roots)
1331+
enabled, the file archive will contain a folder named `rawr`. This folder contains all
1332+
RawR-content uploaded by the actor to that server. The files in this folder are named after
1333+
the resource ID. File extensions are only added if they were known to the server. An
1334+
example file name might be `2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`,
1335+
referencing the file which was hosted at `<server_url>/.p2/core/resource/2c851bfb6daffa944fa1723c7bd4d362ffbc9defe292f2daaf05e895989d179b.jxl`.
1336+
If the server where the data export was requested from is the actors' home server, the
1337+
archive will contain two folders `certs` and `crypt_certs`. `certs` will contain all ID-Certs
1338+
the server has stored of the actor. `crypt_certs` will contain all encrypted private key
1339+
material that the actor has uploaded to the server.
13921340
polyproto.core.models.Service:
13931341
type: object
13941342
required:

0 commit comments

Comments
 (0)