POST/minds

Create Mind

This endpoint creates a Mind.

Path parameters

None.

Authorization

Request body

  • Name
    name
    Type
    string
    Required
    Description

    Provide a unique name for the Mind.

  • Name
    datasources
    Type
    array
    Required
    Description

    Provide a list of data sources to be connected to the Mind. Use this endpoint to create data sources.

Request

POST
/minds
curl --request POST \
--url 'https://mdb.ai/api/projects/mindsdb/minds' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer MINDS_API_KEY' \
--data '{
    "name": "mind_name",
    "datasources": ["datasource_name"]
}'

Response

200 OK


GET/minds

List Minds

This endpoint lists all created Minds.

Path parameters

None.

Authorization

Request body

None.

Request

GET
/minds
curl --request GET \
--url 'https://mdb.ai/api/projects/mindsdb/minds' \
--header 'Authorization: Bearer MINDS_API_KEY'

Response

[
    {
        "created_at": "Wed, 07 Aug 2024 10:50:31 GMT",
        "datasources": [
        "datasource_name"
        ],
        "model_name": "gpt-4o",
        "name": "mind_name",
        "parameters": {},
        "provider": "openai",
        "updated_at": "Wed, 07 Aug 2024 16:43:21 GMT"
    },
    ...
]


GET/minds/{mind_name}

Get Mind

This endpoint lists details about a Mind.

Path parameters

  • Name
    mind_name
    Type
    string
    Required
    Description

    Provide the name of the Mind.

Authorization

Request body

None.

Request

GET
/minds/{mind_name}
curl --request GET \
--url 'https://mdb.ai/api/projects/mindsdb/minds/mind_name' \
--header 'Authorization: Bearer MINDS_API_KEY'

Response

{
    "created_at": "Thu, 12 Sep 2024 12:37:16 GMT",
    "datasources": [],
    "model_name": "gpt-4o",
    "name": "mind_name",
    "parameters": null,
    "provider": "openai",
    "updated_at": "Thu, 12 Sep 2024 12:37:16 GMT"
}


PATCH/minds/{mind_name}

Update Mind

This enpoint updates the Mind name and/or the connected data sources.

Path parameters

  • Name
    mind_name
    Type
    string
    Required
    Description

    Provide the name of the Mind.

Authorization

Request body

  • Name
    name
    Type
    string
    Required
    Description

    Provide a new name for the Mind.

  • Name
    datasources
    Type
    array
    Required
    Description

    Provide an updated list of data sources to be connected to the Mind. Use this endpoint to create data sources.

Request

PATCH
/minds/{mind_name}
curl --request PATCH \
--url 'https://mdb.ai/api/projects/mindsdb/minds/mind_name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer MINDS_API_KEY' \
--data '{
    "name": "mind_name_new",
    "datasources": ["datasource_name"]
}'

Response

200 OK


POST/minds/{mind_name}/datasources

Add Datasource to Mind

This endpoint adds a data source to the Mind.

Path parameters

  • Name
    mind_name
    Type
    string
    Required
    Description

    Provide the name of the Mind.

Authorization

Request body

  • Name
    name
    Type
    string
    Required
    Description

    The name of the data source to be added to the Mind. Use this endpoint to create data sources.

  • Name
    check_connection
    Type
    string
    Description

    Set this value to true to check the connection to the data source.

Request

POST
/minds/{mind_name}/datasources
curl --request POST \
--url 'https://mdb.ai/api/projects/mindsdb/minds/mind_name_new/datasources' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer MINDS_API_KEY' \
--data '{
    "name": "datasource_name",
    "check_connection": true
}'

Response

{
  "success": true
}


DELETE/minds/{mind_name}

Delete Mind

This endpoint deletes a Mind.

Path parameters

  • Name
    mind_name
    Type
    string
    Required
    Description

    Provide the name of the Mind.

Authorization

Request body

None.

Request

DELETE
/minds/{mind_name}
curl --request DELETE \
--url 'https://mdb.ai/api/projects/mindsdb/minds/mind_name' \
--header 'Authorization: Bearer MINDS_API_KEY'

Response

200 OK

Was this page helpful?