summary refs log tree commit diff
path: root/docs/client-server/swagger_matrix/api-docs-registration
blob: 2048aec1d2505ae5ea8d0f17cf21002f955f17f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
  "apiVersion": "1.0.0", 
  "apis": [
    {
      "operations": [
        {
          "method": "POST", 
          "nickname": "register", 
          "notes": "Volatile: This API is likely to change.", 
          "parameters": [
            {
              "description": "A registration request", 
              "name": "body", 
              "paramType": "body", 
              "required": true, 
              "type": "RegistrationRequest"
            }
          ], 
          "responseMessages": [
            {
              "code": 400, 
              "message": "No JSON object."
            }, 
            {
              "code": 400, 
              "message": "User ID must only contain characters which do not require url encoding."
            },
            {
              "code": 400, 
              "message": "User ID already taken."
            }
          ], 
          "summary": "Register with the home server.", 
          "type": "RegistrationResponse"
        }
      ], 
      "path": "/register"
    }
  ], 
  "basePath": "http://localhost:8080/_matrix/client/api/v1", 
  "consumes": [
    "application/json"
  ], 
  "models": {
    "RegistrationResponse": {
      "id": "RegistrationResponse", 
      "properties": {
        "access_token": {
          "description": "The access token for this user.", 
          "type": "string"
        }, 
        "user_id": {
          "description": "The fully-qualified user ID.", 
          "type": "string"
        }
      }
    }, 
    "RegistrationRequest": {
      "id": "RegistrationRequest", 
      "properties": {
        "user_id": {
          "description": "The desired user ID. If not specified, a random user ID will be allocated.", 
          "type": "string",
          "required": false
        }
      }
    }
  }, 
  "produces": [
    "application/json"
  ], 
  "resourcePath": "/register", 
  "swaggerVersion": "1.2"
}