Skip to content

Commit 2c2a55f

Browse files
Merge pull request #318 from kinde-oss/Fix/Export-data-update
Fix/Updated export topic new code examples
2 parents 8bf0c4b + 83cbdf8 commit 2c2a55f

File tree

1 file changed

+118
-142
lines changed

1 file changed

+118
-142
lines changed

src/content/docs/manage-your-account/your-data/exporting-data.mdx

Lines changed: 118 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -94,152 +94,128 @@ At any time, the person who made the export request can cancel it by going to th
9494

9595
## What the exported data looks like
9696

97-
Data is exported in JSON format as separate user and business data files. If you have many records, there may be several JSON files in the batch.
97+
Data is exported in NDJSON format, with separate data files for users and organizations.
9898

99-
Here’s what an exported record looks like.
99+
Here’s an example of `users.ndjson`.
100100

101101
```json
102102
{
103-
"type": "object",
104-
"properties": {
105-
"users": {
106-
"type": "array",
107-
"items": {
108-
"type": "object",
109-
"properties": {
110-
"id": {
111-
"type": "string",
112-
"description": "Unique identifier for user"
113-
},
114-
"external_id": {
115-
"type": "string",
116-
"description": "Imported external system id"
117-
},
118-
"first_name": {
119-
"type": "string",
120-
"description": "First name"
121-
},
122-
"last_name": {
123-
"type": "string",
124-
"description": "Last name"
125-
},
126-
"email": {
127-
"type": "string",
128-
"description": "Email address",
129-
"format": "email"
130-
},
131-
"email_verified": {
132-
"type": "boolean",
133-
"default": false,
134-
"description": "Indicates if the user has confirmed their email address"
135-
},
136-
"social_logins": {
137-
"type": "object",
138-
"description": "Social login ids",
139-
"patternProperties": {
140-
".*": {
141-
"type": "string"
142-
}
143-
}
144-
},
145-
"business_code": {
146-
"type": "string",
147-
"description": "The business that the user belongs to"
148-
},
149-
"organizations": {
150-
"type": "array",
151-
"description": "Organization codes that the user belongs to",
152-
"items": {
153-
"type": "string"
154-
}
155-
},
156-
"created_on": {
157-
"type": "string",
158-
"description": "Timestamp that the user was created"
159-
}
160-
"password": {
161-
"type": "object",
162-
"description": "Hashed password",
163-
"properties": {
164-
"password_hash": {
165-
"type": "string",
166-
"description": "Hashed password"
167-
},
168-
"hashing_algorithm": {
169-
"type": "string",
170-
"description": "Hashing algorithm"
171-
},
172-
"hashing_config": {
173-
"type": "object",
174-
"description": "Algorithm specific configuration"
175-
},
176-
}
177-
}
178-
}
179-
}
180-
},
181-
"business": {
182-
"type": "object",
183-
"properties": {
184-
"code": {
185-
"type": "string",
186-
"description": "Unique identifier for business"
187-
},
188-
"name": {
189-
"type": "string",
190-
"description": "Business name"
191-
},
192-
"industry": {
193-
"type": "string",
194-
"description": "Industry that the business belongs to"
195-
},
196-
"terms_url": {
197-
"type": "string",
198-
"description": "URL for business terms"
199-
},
200-
"privacy_url": {
201-
"type": "string",
202-
"description": "URL for business privacy policy"
203-
},
204-
"partner_code": {
205-
"type": "string",
206-
"description": "Partner code"
207-
},
208-
"primary_email": {
209-
"type": "string",
210-
"description": "Primary email address for business"
211-
},
212-
"primary_phone": {
213-
"type": "string",
214-
"description": "Primary phone number for business"
215-
}
216-
}
217-
},
218-
"organizations": {
219-
"type": "array",
220-
"items": {
221-
"type": "object",
222-
"properties": {
223-
"organization_code": {
224-
"type": "string",
225-
"description": "Unique identifier for business"
226-
},
227-
"name": {
228-
"type": "string",
229-
"description": "Organization name"
230-
},
231-
"created_on": {
232-
"type": "string",
233-
"description": "Timestamp that the organization was created"
234-
},
235-
"business_code": {
236-
"type": "string",
237-
"description": "Business code that the organization belongs to"
238-
}
239-
}
240-
}
241-
}
242-
}
103+
"$schema": "http://json-schema.org/draft-07/schema#",
104+
"type": "object",
105+
"properties": {
106+
"id": {
107+
"type": "string",
108+
"description": "Unique identifier for the object"
109+
},
110+
"email": {
111+
"type": ["string", "null"],
112+
"format": "email",
113+
"description": "Email address of the user"
114+
},
115+
"phone": {
116+
"type": ["string", "null"],
117+
"description": "Phone number of the user, if available"
118+
},
119+
"username": {
120+
"type": ["string", "null"],
121+
"description": "Username of the user, if available"
122+
},
123+
"last_name": {
124+
"type": ["string", "null"],
125+
"description": "Last name of the user, if available"
126+
},
127+
"created_on": {
128+
"type": "string",
129+
"format": "date-time",
130+
"description": "Timestamp when the user was created"
131+
},
132+
"first_name": {
133+
"type": ["string", "null"],
134+
"description": "First name of the user, if available"
135+
},
136+
"identities": {
137+
"type": "array",
138+
"items": {
139+
"type": "object",
140+
"properties": {
141+
"type": {
142+
"type": "string",
143+
"description": "Type of identity (e.g., email)"
144+
},
145+
"identity": {
146+
"type": "string",
147+
"description": "Identity value (e.g., email address)"
148+
},
149+
"provider": {
150+
"type": ["string", "null"],
151+
"description": "Provider associated with the identity, if any"
152+
}
153+
},
154+
"required": ["type", "identity"]
155+
},
156+
"description": "List of identities associated with the user"
157+
},
158+
"external_id": {
159+
"type": ["string", "null"],
160+
"description": "External identifier for the user, if available"
161+
},
162+
"business_code": {
163+
"type": "string",
164+
"description": "Code representing the associated business"
165+
},
166+
"organizations": {
167+
"type": "array",
168+
"items": {
169+
"type": "string"
170+
},
171+
"description": "List of organizations the user belongs to"
172+
},
173+
"email_verified": {
174+
"type": "boolean",
175+
"description": "Indicates if the email address is verified"
176+
},
177+
"password": {
178+
"type": "object",
179+
"properties": {
180+
"hashing_config": { "type": "object" },
181+
"hashed_password": { "type": "string" },
182+
"hashing_algorithm": { "type": ["string", "null"] }
183+
},
184+
"required": ["hashing_config", "hashed_password"]
185+
}
186+
},
187+
"required": ["id", "email", "created_on", "identities", "business_code", "organizations", "email_verified"],
188+
"additionalProperties": false
189+
}
190+
```
191+
192+
Here's an example of `organizations.ndjson`.
193+
194+
```json
195+
{
196+
"$schema": "http://json-schema.org/draft-07/schema#",
197+
"type": "object",
198+
"properties": {
199+
"name": {
200+
"type": "string",
201+
"description": "Name of the organization"
202+
},
203+
"created_on": {
204+
"type": "string",
205+
"format": "date-time",
206+
"description": "Timestamp when the organization was created"
207+
},
208+
"business_code": {
209+
"type": "string",
210+
"description": "Code representing the associated business"
211+
},
212+
"organization_code": {
213+
"type": "string",
214+
"description": "Code representing the organization"
215+
}
216+
},
217+
"required": ["name", "created_on", "business_code", "organization_code"],
218+
"additionalProperties": false
243219
}
244220
```
245221

0 commit comments

Comments
 (0)