Create a database source
POST {{baseUrl}}/api/datasources
Create a new database source. You obtain the authorization token needed to execute the request using POST /auth/login; you pass the authorization token in the request header. You provide the information needed to create the new database source in the body parameter of the request; you must provide a name, but you can also provide a description, the ID of the database management system (DBMS), the ID of the database connection, and the type of database source.
Body
PARAM
Key | Datatype | Required | Description |
fields
|
null | Comma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. If specified, extra filtering is applied, and for top-level object (if root model is an array, each array element), only the listed fields are kept in the response. For example, "id,elements" keeps only the "id" field and whole "elements" array field, omitting all other fields in the top-level response model. |
HEADERS
Key | Datatype | Required | Description |
X-MSTR-AuthToken
|
string | (Required) Authorization token | |
Content-Type
|
string |
RESPONSES
status Created
{
"id": "AAC7D9BC5C494AD2A38366B6ABD666C7",
"name": "Test Datasource",
"description": "Test Datasource",
"dateCreated": "2022-03-11T16:16:00.000+0000",
"dateModified": "2022-03-11T16:16:00.000+0000",
"acg": 255,
"datasourceType": "normal",
"database": {
"type": "postgre_sql",
"version": "postgre_sql_90",
"connection": {
"name": "ADVDW_WH",
"id": "B192E3014BDB4B81D44A30BA6CB57A29",
"isEmbedded": false
}
},
"tablePrefix": "public.",
"odbcVersion": "version3x",
"intermediateStoreDbName": "",
"intermediateStoreTableSpaceName": "",
"dbms": {
"name": "PostgreSQL",
"id": "702780F3E3594D95AD4C85CE8F803306"
},
"owner": {
"name": "MSTR User",
"id": "7FC05A65473CE2FD845CE6A1D3F13233"
}
} |
ENDPOINTS