Workspace data source accounts API

Update workspace credentials

PUT /api/workspaces/:workspace_id/data_source_account

Parameters

Name Description
workspace_id The id of a workspace
data_source_id The id of a data source
db_username User name for connection
db_password Password for connection

Request

Headers

Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: _session_id=VndqSnY2UGZ3TjlBSUVvR1hKQ1NPQkFuK2Z6KzN6Rm5oY25mclh0bkF4b2hIT1h5UTJyakJpUWwwV3pvVzdOMjczYlhja3VCc0EwRWdEZ0JsektsK3RVejRWTmFFYjVyMXdvMTlDUzB2Ukg1NWsybTJFL05xblpDRnZGSXNReXRlRE1mbytubG1LSVFtdVYrRk94K09IU0lucmp1TmluREp1a3p6c2pHb25mZjF2cmcyWFRCOWNKbGJmaW5UVmdwOVovc2Jwc2xqWS9jbndRaDJES3VQVmlmS0tsTU1uSjNZTDk4WTJiaHhMcFFOTlk3U2RraVg3RXJEbW9IdU1tck53UXNnRG14bUFmVHhXdnZ6ekZZVE9BVGpNSTJ4ZVZUK2ZUNzFSU0RyVnRrZmt5ODJvdnRrZ05iYjkvZ1BxWkFBY3J6RWEzeGRpeXYyaDJGY1B0MHlhdzZoSlYrV1gzR0VCa2tqczJZdzIwbHUxeDk3MmVPUVp6V2Y1T0JEczhYd2tZTkRhZ2c0ODMrczk4STRTZ1JlZEF0MGZFZDllKzNEL0RqRWFTRks5OD0tLUlJUzVZSFhvNE1UUUkwVGgrZjByd2c9PQ%3D%3D--ca9af13ac0e7c8bcc776939dd1dbfec685294c51

Route

PUT /api/workspaces/1000008/data_source_account

Body

1
 
data_source_id=1000002&db_username=snuffle&db_password=upagus

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
ETag: W/"5cbde40fa8879cb907159f86dccce6b6"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _session_id=dWNzeGJHMWhNSW43Ry9VQWp3azU5Qzh4M3d2eVR0MVo5Ni9PUy9LSXNpYlpyaTl6dno3WW9XSHJoK3Exc1kwblUyWjBUZ3VhbXp4dDBoelY1QXNFMVJmOXd5UUljcEJzRkcxMG5CQWFrSTRzaUlPY1lENGJWbTVxUzc1ZzdFM3FoV0ZpOENnamJyUGx4UUl0aXNtRzhJSEJhaEtXR1JsQW1hRG5aazRDNVAwMzZoMU1odzNJS1RHclVBZFJYajZDcEdzRWlCdEtFUFBMZFVjNTN4TXg1ZGhYRVBmQ0hTbU1RTGp2RlJic2NKZGpDcFIrQm9vNStkQ2JFbFdTaHVSRjFaOWl6dHVacytBMUFWSldrc1Y4UGtwSjV0MzBsK2NPbWlKSXpRT2d0SzdLbWhsa0poRFFvL0lKNThETUswT2FHa0pidkRmQVkwZm9zNmd6K3VvSDJCengydVlDNkVjK3pmV3o2ZjRVV3FlTHhOQXBmS1BZSy80OFNXQVEzY1FkWDZsa2dvdDhVNldTOWlBMVc5UlEwdHhaTzd0RnJmUkJwY3NpZ3pqNE90OENRWXF5OC9odEdLZ21NSTBibjNLUXhkdVArVmI0aXYrRXBIY0RmN1lZNUE9PS0tMmp5aHlRWW9OWERudjg5alNQNjlHdz09--e473b331b6ff66cbd8c079fb65fd970656e0c90f; path=/; HttpOnly
X-Request-Id: e48ed8e8-b2b4-4358-83de-1a62c37e40b9
X-Runtime: 0.079579
Content-Length: 3226

Status

200 OK

Body

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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
 
{
  "response": {
    "id": 1000030,
    "db_username": "snuffle",
    "owner_id": 1000019,
    "data_source_id": 1000002,
    "owner": {
      "id": 1000019,
      "username": "user432932",
      "first_name": "Chorus",
      "last_name": "User",
      "image": {
        "original": "",
        "icon": "",
        "entity_type": "image",
        "complete_json": true
      },
      "is_deleted": null,
      "auth_method": "internal",
      "ldap_group_id": null,
      "user_type": "analytics_developer",
      "entity_type": "user",
      "using_default_image": false,
      "active_license": true,
      "is_siteadmin": false,
      "roles": [],
      "email": "chorususer87894@alpinenow.com",
      "title": "Chief Data Scientist",
      "dept": "Corporation Corp., Inc.",
      "notes": "One of our top performers",
      "admin": false,
      "subscribed_to_emails": true,
      "tags": [],
      "deactivated_at": null,
      "complete_json": true
    },
    "workspace": {
      "id": 1000008,
      "name": "Public",
      "is_deleted": null,
      "entity_type": "workspace",
      "archived": false,
      "public": true,
      "archived_at": null,
      "summary": "searchquery",
      "permission": [
        "read",
        "commenting"
      ],
      "datasets_count": 5,
      "members_count": 2,
      "workfiles_count": 17,
      "insights_count": 1,
      "recent_insights_count": 1,
      "recent_comments_count": 9,
      "has_recent_comments": true,
      "has_milestones": true,
      "workspace_stage": {
        "default": true,
        "id": 1000000,
        "name": "Define",
        "position": 0,
        "description_long": "Define the essential components of the project.",
        "description_short": "Define the two essential components of a machine learning project. What business problem are we solving? How should the solution change the way our business operates? Locate or acquire all necessary data.",
        "complete_json": true
      },
      "workspace_stage_id": 1000000,
      "archiver": null,
      "image": {
        "original": "",
        "icon": "",
        "entity_type": "image",
        "complete_json": true
      },
      "tags": [],
      "has_added_member": false,
      "has_added_workfile": true,
      "has_added_sandbox": true,
      "has_changed_settings": false,
      "sandbox_info": {
        "id": 1000006,
        "name": "default",
        "dataset_count": 0,
        "refreshed_at": "2019-04-03T22:09:24Z",
        "entity_type": "gpdb_schema",
        "is_deleted": null,
        "stale": false,
        "database": {
          "id": 1000001,
          "name": "default",
          "data_source": {
            "id": 1000002,
            "name": "Owners",
            "entity_type": "gpdb_data_source",
            "is_deleted": null,
            "shared": false,
            "owner_id": 1000006,
            "version": "9.1.2 - FactoryVersion",
            "is_hawq": null,
            "state": "online",
            "public": false
          },
          "entity_type": "gpdb_database",
          "complete_json": true
        },
        "complete_json": true
      },
      "show_sandbox_datasets": true,
      "owner": {
        "id": 1000006,
        "username": "owner",
        "first_name": "searchquery",
        "last_name": "User_1",
        "image": {
          "original": "/paperclip/users/images/001/000/006/original/User.png?1554329366",
          "icon": "/paperclip/users/images/001/000/006/icon/User.png?1554329366",
          "entity_type": "image",
          "complete_json": true
        },
        "is_deleted": null,
        "auth_method": "internal",
        "ldap_group_id": null,
        "user_type": "analytics_developer",
        "entity_type": "user",
        "using_default_image": false,
        "active_license": true,
        "is_siteadmin": false,
        "roles": [
          "data_admin"
        ],
        "email": "chorususer282295@alpinenow.com",
        "title": "Chief Data Scientist",
        "dept": "Corporation Corp., Inc.",
        "notes": "One of our top performers",
        "admin": false,
        "subscribed_to_emails": true,
        "tags": [],
        "deactivated_at": null,
        "complete_json": true
      },
      "is_member": false,
      "is_project": true,
      "project_status": "on_track",
      "project_status_reason": null,
      "milestone_count": 3,
      "milestone_completed_count": 0,
      "project_target_date": "2019-04-28T00:00:00Z",
      "complete_json": true
    },
    "entity_type": "data_source_account",
    "complete_json": true
  }
}