[Source feeds] Read a source configuration.
https://api.staging.wetransform.com/sender/source/{sourceId}
| Parameter | Description | Type/Regex |
|---|---|---|
{sourceId} |
The source UUID to read |
[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12} |
Responses
| Property / Description |
|---|
|
success
boolean
|
|
Always
Sample value:
true
|
|
payload
object
|
|
Payload of the requested resource. |
|
payload.source_id
*
string
|
|
The source ID. |
|
payload.name
*
string
|
|
The name of the source. |
|
payload.data_extractor
*
string
|
|
The selected data extractor. Possible values:
Sample value:
"url"
|
|
Describes the URL data extractor. |
|
payload.url.url
string
|
|
The URL to which the request is sent.
Sample value:
"https:\/\/example.com"
|
|
payload.url.method
string
|
|
The HTTP method to use for the request. Possible values:
Sample value:
"GET"
|
|
payload.url.headers
array
|
|
Headers to send along with the request. Should be an array of hashes, where the key is the header name and the value is the header value.
Can be useful if an Authorization header is required. |
|
payload.url.cookies
array
|
|
Cookies to send along with the request. Should be an array of hashes, where the key is the cookie name and the value is the cookie value.
Please note that cookies are stateless, we won't change their value based on the response. |
|
payload.url.content_type
*
string
|
|
The content type of the body. Possible values:
Sample value:
"application\/json"
|
|
payload.url.body
*
string
|
|
The body of the request, encoded in the right format.
Sample value:
"{\"foo\":\"bar\"}"
|
|
Describes the FTP data extractor. |
|
payload.ftp.host
string
|
|
The FTP host.
Sample value:
"ftp.example.com"
|
|
payload.ftp.port
*
integer
|
|
The FTP port.
Sample value:
21
|
|
payload.ftp.username
string
|
|
The FTP username.
Sample value:
"username"
|
|
payload.ftp.password
string
|
|
The FTP password.
Sample value:
"password"
|
|
payload.ftp.path
string
|
|
The FTP path. It can contain wildcards, we will take the first matching file.
Sample value:
"*.csv"
|
|
payload.ftp.is_ssl
*
boolean
|
|
Whether to use SSL or not.
Sample value:
false
|
|
Describes the SFTP data extractor. |
|
payload.sftp.host
string
|
|
The SFTP host to connect to.
Sample value:
"example.com"
|
|
payload.sftp.port
integer
|
|
The SFTP port to connect to.
Sample value:
22
|
|
payload.sftp.username
string
|
|
The username to use for the SFTP connection.
Sample value:
"username"
|
|
payload.sftp.password
*
string
|
|
The password to use for the SFTP connection.
Sample value:
"password"
|
|
payload.sftp.path
string
|
|
The path to the file or directory to send. The path can contain wildcards, e.g. /path/to/files/*.csv, we will take the first file that matches the pattern.
Sample value:
"\/path\/to\/files\/file.csv"
|
|
payload.sftp.private_key
*
string
|
|
The key to use for the SFTP connection. |
|
payload.custom
*
object
Always null if not granted Can import files from a custom data extractor X_IMPORT_CUSTOM |
|
Describes the custom data extractor. |
|
payload.custom.custom_data_extractor_id
*
string
|
|
The custom data extractor's ID. This or handle must be set.
Sample value:
"a13b2630-8ea5-46b8-879a-63824f078b9a"
|
|
payload.custom.handle
*
string
|
|
The custom data extractor's handle. This or customDataExtractorId must be set.
Sample value:
"my-export"
|
|
payload.custom.metadata
array
|
|
Metadata attached to the custom data extractor. |
|
payload.custom.metadata[].name
string
|
|
Sample value:
"date"
|
|
payload.custom.metadata[].value
*
string
|
|
Sample value:
"2023-01-01"
|
|
product
*
object
|
|
A product needed. Not null if user requires to buy a specific product (permission or limitation) in order to access a feature. |
|
product.requirement
*
string
|
|
Whether the user requested a features s/he doesn't have access to,
or the user needs greater limits.
Possible values:
Sample value:
"permission"
|
|
product.permission
*
object
|
|
The required permission. You will need to know which permission is needed in order to fill up search filters in the shop. |
|
product.permission.description
*
string
|
|
A human-understandable name for the permission. |
|
product.permission.name
string
|
|
A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS). Possible values depend on the context, check the domain's metadata endpoint.
Sample value:
"X_SOURCE_FORMAT_XML"
|
|
product.limitation_type
*
string
|
|
The limitation that needs to be increased (ex: number of columns). |
|
product.limitation_needed_value
*
integer
|
|
The needed resource quantity (if receiver uses 9 columns in a template, this value is 9). |
|
product.limitation_current_value
*
integer
|
|
The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10). |
|
product.limitation_object
*
object
|
|
The limitation type in a readable format, for example, "lines per file". |
|
product.is_cta
*
boolean
|
|
Whether a Call To Action should be displayed. It may not be displayed if:
|
|
debug
array
|
|
Debug information. Contains logs about business logic explaining state of the response payload. Provided in development & admin modes only. |
Properties suffixed with * are nullable.
{
"success": true,
"payload": {
"source_id": null,
"name": null,
"data_extractor": "url",
"url": {
"url": "https:\/\/example.com",
"method": "GET",
"headers": {
"Authorization": "Bearer 1234567890"
},
"cookies": {
"secret": "0987654321"
},
"content_type": "application\/json",
"body": "{\"foo\":\"bar\"}"
},
"ftp": {
"host": "ftp.example.com",
"port": 21,
"username": "username",
"password": "password",
"path": "*.csv",
"is_ssl": false
},
"sftp": {
"host": "example.com",
"port": 22,
"username": "username",
"password": "password",
"path": "\/path\/to\/files\/file.csv",
"private_key": null
},
"custom": null
},
"product": {
"requirement": "permission",
"permission": {
"name": "X_SOURCE_FORMAT_XML",
"description": "Can import XML files"
},
"limitation_type": null,
"limitation_needed_value": null,
"limitation_current_value": null,
"limitation_object": null,
"is_cta": false
},
"debug": []
}
User is well authenticated, but not authorized to access the resource.
It can happen if user is trying to use a feature that s/he didn't pay for, access someone else's resource, etc.
These issues are normally fixed by the frontend, which should render features and resources user has access to.
| Property / Description |
|---|
|
success
boolean
|
|
Always
Sample value:
false
|
|
payload
object
|
|
Context about the error, if any. |
|
product
*
object
|
|
A product needed. Not null if user requires to buy a specific product (permission or limitation) in order to access a feature. |
|
product.requirement
*
string
|
|
Whether the user requested a features s/he doesn't have access to,
or the user needs greater limits.
Possible values:
Sample value:
"permission"
|
|
product.permission
*
object
|
|
The required permission. You will need to know which permission is needed in order to fill up search filters in the shop. |
|
product.permission.description
*
string
|
|
A human-understandable name for the permission. |
|
product.permission.name
string
|
|
A technical permission name (ex: ORGANISATION_UPDATE_SETTINGS). Possible values depend on the context, check the domain's metadata endpoint.
Sample value:
"X_SOURCE_FORMAT_XML"
|
|
product.limitation_type
*
string
|
|
The limitation that needs to be increased (ex: number of columns). |
|
product.limitation_needed_value
*
integer
|
|
The needed resource quantity (if receiver uses 9 columns in a template, this value is 9). |
|
product.limitation_current_value
*
integer
|
|
The current value of the limitation (if receiver is allowed to use 10 columns, this value is 10). |
|
product.limitation_object
*
object
|
|
The limitation type in a readable format, for example, "lines per file". |
|
product.is_cta
*
boolean
|
|
Whether a Call To Action should be displayed. It may not be displayed if:
|
|
debug
array
|
|
Debug information. Contains logs about business logic explaining state of the response payload. Provided in development & admin modes only. |
Properties suffixed with * are nullable.
{
"success": false,
"payload": [],
"product": {
"requirement": "permission",
"permission": {
"name": "X_SOURCE_FORMAT_XML",
"description": "Can import XML files"
},
"limitation_type": null,
"limitation_needed_value": null,
"limitation_current_value": null,
"limitation_object": null,
"is_cta": false
},
"debug": []
}