forked-synapse/docs/client-server/swagger_matrix/api-docs-registration

121 lines
3.5 KiB
Plaintext
Raw Normal View History

2014-08-22 08:40:37 -04:00
{
"apiVersion": "1.0.0",
"apis": [
{
"operations": [
{
"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 08:40:37 -04:00
{
"method": "POST",
"nickname": "submit_registration",
"notes": "If this is part of a multi-stage registration, there MUST be a 'session' key.",
2014-08-22 08:40:37 -04:00
"parameters": [
{
"description": "A registration submission",
2014-08-22 08:40:37 -04:00
"name": "body",
"paramType": "body",
"required": true,
"type": "RegistrationSubmission"
2014-08-22 08:40:37 -04:00
}
],
"responseMessages": [
{
"code": 400,
"message": "Bad login type"
2014-08-22 08:40:37 -04:00
},
{
"code": 400,
"message": "Missing JSON keys"
2014-08-22 08:40:37 -04:00
}
],
"summary": "Submit a registration action.",
"type": "RegistrationResult"
2014-08-22 08:40:37 -04:00
}
],
"path": "/register"
}
],
2014-09-03 05:47:00 -04:00
"basePath": "http://localhost:8008/_matrix/client/api/v1",
2014-08-22 08:40:37 -04:00
"consumes": [
"application/json"
],
"models": {
"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 08:40:37 -04:00
"properties": {
"access_token": {
"description": "The access token for this user's registration if this is the final stage of the registration process.",
2014-08-22 08:40:37 -04:00
"type": "string"
},
2014-08-22 08:40:37 -04:00
"user_id": {
"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 08:40:37 -04:00
"type": "string"
},
"session": {
"description": "Multi-stage registration only: The session token to send when submitting the next registration type.",
"type": "string"
2014-08-22 08:40:37 -04:00
}
}
},
"RegistrationSubmission": {
"id": "RegistrationSubmission",
2014-08-22 08:40:37 -04:00
"properties": {
"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 08:40:37 -04:00
}
}
}
},
"produces": [
"application/json"
],
"resourcePath": "/register",
"swaggerVersion": "1.2"
}