I am new to Matilion (Even Matillion is a new tool). I am able to export an existing environment into a JSON file using REST API.
But I observed that there is no REST API endpoint for importing an environment. Rather there is an option for updating an existing environment.
Any help/pointers will be appreciated.
Matillion REST API reference link : https://redshift-support.matillion.com/s/article/2920263
Regards,
Neeraj
I got the solution. No need to specify the environment name in API URL. It will automatically pick the name from JSON file. Below is an example.
curl -X POST -u <user_name>:<password> http://<Matillion Instance IP>/rest/v1/group/name/icm/project/name/<>/environment/import -H "Content-Type: application/json" --data-binary "<path to exported JSON file>"
Related
I created a public repository within my personal account, created a PAT w/ the workflow permissions checked, but am unable to disable the workflow via the API as I receive a message stating that I must have admin rights to the repository. I believe the PAT has the correct permissions so I’m unsure as to why this isn’t working.
Here is the command I am attempting to use (based on the documentation):
curl -s christronyxyocum:MY-PAT -X PUT -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/MY-USERNAME/MY-REPO/actions/workflows/workflow.yml/disable
I can retrieve information about the workflow without any issues so I believe that I have the correct URL and formatting, etc. I have even tried creating a new PAT with the same permissions and that one experiences the same error.
I have figured this out. Rather than using the username:token format like they show repeatedly in their documentation, you must use the -H "Authorization: bearer TOKEN" header with the curl command.
Well, i'm building an application in rails and i'm locked in a task.
The issue is that i need to upload a json file containing the result of a SQL query to this url: http://api-segura.herokuapp.com/consultaPetianos, where the view of my application will get the data requested.
I already have the json string, but my question is, how can I submit this string(or file) to the given url?
Obs: the application is hosted in Heroku.
If this is a one time deal, one easy option is to use curl.
There are quite a few questions on here about posting json using curl.
Check here for more info.
curl -X POST -H "Content-Type: application/json" -d '{"key":"val"}' URL
Hi I'm attempting to pull data from the Apple Ads API into a Google sheet, and I'm getting completely stuck on providing the security certificates. I've been able to successfully pull my data using Postman, so I'm comfortable that I can structure the request properly.
I'm trying to use URLFetchApp, but I can't see any means of including the PEM and KEY file, or even using the curl example provided by Apple of combining to the P12 file. Am I missing something here or is URLFetchApp unable to complete this?
It doesn't appear to me that this would fit into any of the existing headers for URLFetchApp https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app#fetchurl-params
curl \
--cert ./<FILENAME>.p12 \
--pass <PASSWORD> \
-H "Authorization: orgId=<ORG_ID>" \
-H "Content-Type: application/json" \
-d "<CAMPAIGN_DATA_FILE>.json" \
-X POST "https://api.searchads.apple.com/api/v1/campaigns"
You're right in that Google Apps Script (GAS) does not support client-side SSL certificates in their UrlFetchApp class, which appears to be their only way to make outbound HTTP(S) requests.
Your best bet is probably to make a custom Google Apps Engine (GAE) in a language of your choice and expose an endpoint from there which when called from GAS will make a new request to your destination and provide the needed certificates. However, GAE is not free like GAS (since Google changed their cloud terms of service a couple years back), so that's something to keep in mind.
We use Ansible to configure build agent for different technology stacks like: frontend builder(Nodejs, libs, Dart SDK), backend builder(JDK), etc with Ansible orchestration tool and that easy to replace one linux with another be configuring new one from zero with orchestration except new teamcity agent registration.
Is it piossible to generate new authorizationToken for new agent with API call which can be used in programming language or register new agent via API call to be able to connect new linux box without Admin/human ?
There's REST API call to achieve this, just pass true or false string as request data via PUT request to the /httpAuth/app/rest/agents/<agentLocator>/authorized, <agentLocator> syntax is described here.
Here's an example of a curl command:
curl -X PUT "http://teamcity/httpAuth/app/rest/agents/id:3/authorized" --data true --header "Content-Type: text/plain" -u user:pass
PUT method should be used and Content-Type: text/plain header should be provided.
I wanted to use mule ESB to access a rest api periodically, and save the response JSON to disk.
Basically, I need to use https:inbound-endpoint to perform something like:
curl -H "Authorization: Bearer XXXXX" -k https://somehost.com/api
in mule.
Any working example for me to start with?
Basically you need to configure the https connector and create a keystore or use the one on the JDK.
The mule documentation page contains a very simple example with step-by-step settings.