Get a file source
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"createdAt": "2026-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"kind": "sftp",
"name": "daily-deliveries",
"updatedAt": "2026-01-01T00:00:00Z",
"ftp": {
"host": "ftp.example.com",
"port": 21,
"tls": "explicit",
"user": "reporter",
"caCertPem": "-----BEGIN CERTIFICATE-----"
},
"lastConnection": {
"checkedAt": "2026-01-01T00:00:00Z",
"latencyMs": 42,
"message": "connection successful",
"status": "connected"
},
"s3": {
"bucket": "deliveries",
"region": "us-east-1",
"accessKeyId": "AKIAEXAMPLE",
"endpoint": "https://storage.example.com",
"externalId": "3f2c9a1e",
"roleArn": "arn:aws:iam::123456789012:role/reader",
"trustPrincipal": "arn:aws:iam::123456789012:role/reporter",
"usePathStyle": false
},
"sftp": {
"auth": "password",
"host": "sftp.example.com",
"knownHosts": "sftp.example.com ssh-ed25519 AAAAC3Nza",
"port": 22,
"user": "reporter"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Get a file source
Returns one file source. The stored credential is never returned.
GET
/
v1
/
file-sources
/
{fileSourceId}
Get a file source
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://reporter.sandbox.lerian.net/v1/file-sources/{fileSourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"createdAt": "2026-01-01T00:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"kind": "sftp",
"name": "daily-deliveries",
"updatedAt": "2026-01-01T00:00:00Z",
"ftp": {
"host": "ftp.example.com",
"port": 21,
"tls": "explicit",
"user": "reporter",
"caCertPem": "-----BEGIN CERTIFICATE-----"
},
"lastConnection": {
"checkedAt": "2026-01-01T00:00:00Z",
"latencyMs": 42,
"message": "connection successful",
"status": "connected"
},
"s3": {
"bucket": "deliveries",
"region": "us-east-1",
"accessKeyId": "AKIAEXAMPLE",
"endpoint": "https://storage.example.com",
"externalId": "3f2c9a1e",
"roleArn": "arn:aws:iam::123456789012:role/reader",
"trustPrincipal": "arn:aws:iam::123456789012:role/reporter",
"usePathStyle": false
},
"sftp": {
"auth": "password",
"host": "sftp.example.com",
"knownHosts": "sftp.example.com ssh-ed25519 AAAAC3Nza",
"port": 22,
"user": "reporter"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "body.templateId",
"message": "expected string to match 'uuid' format",
"value": "not-a-uuid"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Resposta
OK
Esta página foi útil?

