TODO for AI Logo
TODOforAI API

Datasources

Endpoint:/api/v1

Data source operations


List data sources

GET
/api/v1
/datasources

Returns a list of data sources for the authenticated user

List data sources Responses

Successful operation

  • idstring
    Example: datasource-123
  • namestring
    Example: My Data Source
  • ownerIdstring
    Example: user-123
  • createdAtinteger · int64
    Example: 1625097600000

Create a data source

POST
/api/v1
/datasources

Creates a new data source for the authenticated user

Create a data source Request Body

  • namestring · required
    Example: My Data Source
  • contentstring · required
    Example: Data source content

Create a data source Responses

Data source created successfully

  • idstring
    Example: datasource-123
  • namestring
    Example: My Data Source
  • contentstring

Update a data source

PUT
/api/v1
/datasources/{dataSourceId}

Updates a data source by ID

Update a data sourcepath Parameters

  • dataSourceIdstring · required

    ID of the data source

Update a data source Request Body

  • namestring · required
    Example: My Data Source
  • contentstring · required
    Example: Data source content

Update a data source Responses

Data source updated successfully

  • successboolean
    Example: true
  • messagestring
    Example: Operation completed successfully

List project data sources

GET
/api/v1
/datasources/projects/{projectId}

Returns a list of data sources for a specific project

List project data sourcespath Parameters

  • projectIdstring · required

    ID of the project

List project data sources Responses

Successful operation

  • idstring
    Example: datasource-123
  • namestring
    Example: My Data Source
  • projectIdstring
    Example: project-123
  • createdAtinteger · int64
    Example: 1625097600000

Create a project data source

POST
/api/v1
/datasources/projects/{projectId}

Creates a new data source for a specific project

Create a project data sourcepath Parameters

  • projectIdstring · required

    ID of the project

Create a project data source Request Body

  • namestring · required
    Example: My Data Source
  • contentstring · required
    Example: Data source content

Create a project data source Responses

Project data source created successfully

  • idstring
    Example: datasource-123
  • namestring
    Example: My Data Source
  • contentstring

Update project data source

PUT
/api/v1
/datasources/projects/{projectId}/{dataSourceId}

Updates a data source for a specific project

Update project data sourcepath Parameters

  • projectIdstring · required

    ID of the project

  • dataSourceIdstring · required

    ID of the data source

Update project data source Request Body

  • namestring · required
    Example: My Data Source
  • contentstring · required
    Example: Data source content

Update project data source Responses

Project data source updated successfully

  • successboolean
    Example: true
  • messagestring
    Example: Operation completed successfully