You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: api/build/core-openapi3.yaml
+39-91Lines changed: 39 additions & 91 deletions
Original file line number
Diff line number
Diff line change
@@ -84,19 +84,7 @@ paths:
84
84
description: |-
85
85
- `202` and a key trial, if one still needs to be passed
86
86
- `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.
100
88
- `204` if the server needs time to gather the data. A `Retry-After` header is included in
101
89
the response, indicating to the actor the point in time at which they should query this
102
90
endpoint again. If this point in time is after the expiry timestamp of the completed key trial,
- `202` and a key trial, if one still needs to be passed
112
100
- `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.
126
102
- `204` if the server needs time to gather the data. A `Retry-After` header is included in
127
103
the response, indicating to the actor the point in time at which they should query this
128
104
endpoint again. If this point in time is after the expiry timestamp of the completed key trial,
@@ -136,19 +112,7 @@ paths:
136
112
description: |-
137
113
- `202` and a key trial, if one still needs to be passed
138
114
- `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.
152
116
- `204` if the server needs time to gather the data. A `Retry-After` header is included in
153
117
the response, indicating to the actor the point in time at which they should query this
154
118
endpoint again. If this point in time is after the expiry timestamp of the completed key trial,
@@ -653,17 +617,22 @@ paths:
653
617
post:
654
618
operationId: Registered_importData
655
619
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
658
631
responses:
659
632
'202':
660
-
description: The request has been accepted for processing, but processing has not yet completed.
This type is generic over `T`, where `T` represents the content of the actual message. This
1390
1319
means, that the specific message content depends on the concrete implementation or extension
1391
1320
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.
0 commit comments