2014-08-22 06:40:37 -06:00
|
|
|
{
|
|
|
|
"apiVersion": "1.0.0",
|
|
|
|
"apis": [
|
|
|
|
{
|
|
|
|
"operations": [
|
2014-09-08 12:07:52 -06:00
|
|
|
{
|
|
|
|
"method": "GET",
|
|
|
|
"nickname": "get_registration_info",
|
|
|
|
"notes": "All login stages MUST be mentioned if there is >1 login type.",
|
|
|
|
"summary": "Get the login mechanism to use when registering.",
|
|
|
|
"type": "RegistrationFlows"
|
|
|
|
},
|
2014-08-22 06:40:37 -06:00
|
|
|
{
|
|
|
|
"method": "POST",
|
2014-09-08 12:07:52 -06:00
|
|
|
"nickname": "submit_registration",
|
|
|
|
"notes": "If this is part of a multi-stage registration, there MUST be a 'session' key.",
|
2014-08-22 06:40:37 -06:00
|
|
|
"parameters": [
|
|
|
|
{
|
2014-09-08 12:07:52 -06:00
|
|
|
"description": "A registration submission",
|
2014-08-22 06:40:37 -06:00
|
|
|
"name": "body",
|
|
|
|
"paramType": "body",
|
|
|
|
"required": true,
|
2014-09-08 12:07:52 -06:00
|
|
|
"type": "RegistrationSubmission"
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
2014-09-08 12:07:52 -06:00
|
|
|
"message": "Bad login type"
|
2014-08-22 06:40:37 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
2014-09-08 12:07:52 -06:00
|
|
|
"message": "Missing JSON keys"
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
],
|
2014-09-08 12:07:52 -06:00
|
|
|
"summary": "Submit a registration action.",
|
|
|
|
"type": "RegistrationResult"
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"path": "/register"
|
|
|
|
}
|
|
|
|
],
|
2014-09-03 03:47:00 -06:00
|
|
|
"basePath": "http://localhost:8008/_matrix/client/api/v1",
|
2014-08-22 06:40:37 -06:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"models": {
|
2014-09-08 12:07:52 -06:00
|
|
|
"RegistrationFlows": {
|
|
|
|
"id": "RegistrationFlows",
|
|
|
|
"properties": {
|
|
|
|
"flows": {
|
|
|
|
"description": "A list of valid registration flows.",
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "RegistrationInfo"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"RegistrationInfo": {
|
|
|
|
"id": "RegistrationInfo",
|
|
|
|
"properties": {
|
|
|
|
"stages": {
|
|
|
|
"description": "Multi-stage registration only: An array of all the login types required to registration.",
|
|
|
|
"items": {
|
|
|
|
"$ref": "string"
|
|
|
|
},
|
|
|
|
"type": "array"
|
|
|
|
},
|
|
|
|
"type": {
|
|
|
|
"description": "The first login type that must be used when logging in.",
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"RegistrationResult": {
|
|
|
|
"id": "RegistrationResult",
|
2014-08-22 06:40:37 -06:00
|
|
|
"properties": {
|
|
|
|
"access_token": {
|
2014-09-08 12:07:52 -06:00
|
|
|
"description": "The access token for this user's registration if this is the final stage of the registration process.",
|
2014-08-22 06:40:37 -06:00
|
|
|
"type": "string"
|
2014-09-08 12:07:52 -06:00
|
|
|
},
|
2014-08-22 06:40:37 -06:00
|
|
|
"user_id": {
|
2014-09-08 12:07:52 -06:00
|
|
|
"description": "The user's fully-qualified user ID.",
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"next": {
|
|
|
|
"description": "Multi-stage registration only: The next registration type to submit.",
|
2014-08-22 06:40:37 -06:00
|
|
|
"type": "string"
|
2014-09-03 03:58:53 -06:00
|
|
|
},
|
2014-09-08 12:07:52 -06:00
|
|
|
"session": {
|
|
|
|
"description": "Multi-stage registration only: The session token to send when submitting the next registration type.",
|
2014-09-03 03:58:53 -06:00
|
|
|
"type": "string"
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2014-09-08 12:07:52 -06:00
|
|
|
"RegistrationSubmission": {
|
|
|
|
"id": "RegistrationSubmission",
|
2014-08-22 06:40:37 -06:00
|
|
|
"properties": {
|
2014-09-08 12:07:52 -06:00
|
|
|
"type": {
|
|
|
|
"description": "The type of registration being submitted.",
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"session": {
|
|
|
|
"description": "Multi-stage registration only: The session token from an earlier registration stage.",
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"_registration_type_defined_keys_": {
|
|
|
|
"description": "Keys as defined by the specified registration type, e.g. \"user\", \"password\""
|
2014-08-22 06:40:37 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"resourcePath": "/register",
|
|
|
|
"swaggerVersion": "1.2"
|
|
|
|
}
|
|
|
|
|