Sources API
This API allows managing sources in the system. It provides endpoints to create, read, update, and delete sources, as well as perform specific operations such as creating alternative data sources.
The base URL for this API is /v1/stores/sources.
The Source Object
The Source object represents a data source in the system.
Attributes
| Attribute | Description | Type |
|---|---|---|
id | Unique identifier of the source | String |
label | Label or name of the source | String |
tags | List of tags associated with the source | Array of String |
transformerConfig | Data transformer configuration | Object |
createdAt | Date and time of source creation | String (ISO 8601) |
updatedAt | Date and time of the last source update | String (ISO 8601) |
Endpoints
Create a New Source
Creates a new source in the system.
Input Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
id | Source identifier | String | Yes |
label | Label or name of the source | String | No |
tags | List of tags associated with the source | Array of String | No |
transformerConfig | Data transformer configuration | Object | No |
Example Request:
Successful Response:
Create an Alternative Data Source
Creates a new alternative data source in the system.
Input Parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
label | Label or name of the source | String | No |
altdataSourceId | ID of the alternative data source | String | Yes |
altdataSourceVersion | Version of the alternative data source | String | Yes |
Example Request:
Successful Response:
Retrieve a Source
Retrieves information about a specific source.
Path Parameters:
| Parameter | Description |
|---|---|
source_id | ID of the source to retrieve |
Successful Response:
The response will be a complete Source object, as described above.
Update a Source
Updates information for an existing source.
Path Parameters:
| Parameter | Description |
|---|---|
source_id | ID of the source to update |
Input Parameters:
The same as for creating a source.
Example Request:
Successful Response:
The response will be the updated Source object.
Delete a Source
Deletes a source from the system.
Path Parameters:
| Parameter | Description |
|---|---|
source_id | ID of the source to delete |
Successful Response:
Status code 204 (No Content) if the deletion was successful.
List Sources
Retrieves a paginated list of sources with filtering and sorting options.
Query Parameters:
| Parameter | Description | Type |
|---|---|---|
search | Text to search within sources | String |
page | Page number (default: 1) | Integer |
per-page | Items per page (default: 10) | Integer |
sort-by | Field to sort by | String |
sort-direction | Sorting direction (asc or desc) | String |
Successful Response:
The response will be a paginated list of Source objects.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body.