Skip to content

Instantly share code, notes, and snippets.

@sgassmann-skedulo
Created September 12, 2022 13:16
Show Gist options
  • Save sgassmann-skedulo/967496354c6c7919881a689ee2f0f981 to your computer and use it in GitHub Desktop.
Save sgassmann-skedulo/967496354c6c7919881a689ee2f0f981 to your computer and use it in GitHub Desktop.
Custom Data Sources - Space Launchers - Part 1
{
"resource": { "name": "spacelaunchers",
"userId": "",
"tenantId": "Your_Tenant_ID_Here",
"domainId": "",
"resource": "spacelaunchers",
"datasource": "CUSTOM",
"datasourceParamsCustom": {
"getObjects": {
"request": {
"request": {
"url": "{{\"https://ll.thespacedevs.com/2.2.0/config/launcher/\" | add_query_param (\"limit\",limit,\"mode\",\"detailed\") | add_conditional_query_param(\"offset\", (cursor | to_number - 1) * limit | to_number, cursor) }}",
"method": "GET",
"body": "",
"headers": [
"Accept: application/json",
"Content-Type: application/json"
]
},
"luceneQueryKey": "",
"cursorQueryKey": "",
"order": [],
"filterMapping": {
}
},
"jsonpathResponse": {
"results": "$.results",
"total": "$.count"
},
"recordMappings": {
"outgoing": [],
"incoming": [
{
"schemaField": "UID",
"inputPath": "$.id"
},
{
"schemaField": "name",
"inputPath": "$.name"
},
{
"schemaField": "imageURL",
"inputPath": "$.image_url"
},
{
"schemaField": "description",
"inputPath": "$.description"
},
{
"schemaField": "url",
"inputPath": "$.url"
},
{
"schemaField": "family",
"inputPath": "$.family"
},
{
"schemaField": "fullName",
"inputPath": "$.full_name"
},
{
"schemaField": "variant",
"inputPath": "$.variant"
},
{
"schemaField": "totalLaunchCount",
"inputPath": "$.total_launch_count"
}
,
{
"schemaField": "successfulLaunches",
"inputPath": "$.successful_launches"
},
{
"schemaField": "manufacturerLogo",
"inputPath": "$.manufacturer.logo_url"
}
]
}
},
"deleteObject": null,
"updateObject": null,
"createObject": null,
"getDataSchema": {
"static": {
"resourceId": "",
"fields": [
{
"name": "UID",
"label": "UID",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": true,
"kind": "INT",
"isSystem": false,
"int": {
"precision": 0,
"isDuration": false
}
},
{
"name": "name",
"label": "Name",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": true,
"kind": "STRING",
"isSystem": false
},
{
"name": "imageURL",
"label": "Image URL",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "flightProven",
"label": "Flight Proven",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "BOOL",
"isSystem": false
},
{
"name": "description",
"label": "Description",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "status",
"label": "Status",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "details",
"label": "Details",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "url",
"label": "URL",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "family",
"label": "Family",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "fullName",
"label": "Full Name",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "variant",
"label": "Variant",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
},
{
"name": "totalLaunchCount",
"label": "Total launch count",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"isSystem": false,
"kind": "INT",
"int": {
"precision": 0,
"isDuration": false
}
},
{
"name": "successfulLaunches",
"label": "Successful launches",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"isSystem": false,
"kind": "INT",
"int": {
"precision": 0,
"isDuration": false
}
}
,
{
"name": "manufacturerLogo",
"label": "Manufacturer logo",
"isList": false,
"isNullable": false,
"isSortable": false,
"isFilterable": false,
"isPrimaryKey": false,
"kind": "STRING",
"isSystem": false
}
],
"relationships": [
]
}
},
"getObject": null
},
"datasourceCapabilities": {
"paging": {
"method": "PAGE"
},
"definer": ""
},
"definer": "",
"isSystemGenerated": false}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment