Converting Postman to YAML to Call API-Using Fluvio

Converting Postman to YAML to Call API-Using Fluvio

2 by akerj | 0 comments on Hacker News.

I was wondering how to properly format the following keys and values into the YAML document so that I can connect to Fluvio's managing connector. I was able to use Postman to get HTTP responses from Indeed API using POST Request URL, Indeed API Key, Request Payload (converted JSON format to YAML), and two parameters (co and locale). The Request Payload also put other key values automatically into the YAML. So far I have been using the following format for YAML but I keep getting Running Status Failed for the connector. How should the YAML be formatted with these keys and values so that I can use the connector? (YAML format below) Also, is it necessary to put in all the Request Headers for YAML if I have the POST Request URL? It wasn't needed when using Postman. I was also able to get the bearer token using Indeed documentation and get a response from Indeed's API and also using another method which was utilizing the indeed API key found in the network tab in dev tools. version: 0.3.0 name: indeed-api-test type: http-source topic: indeed-api-test create_topic: true direction: source parameters: endpoint: 'https://ift.tt/ymfLkw7' method: GET interval: 5s output_parts: full output_type: json co: US locale: en-US indeed-api-key: 9e8a2fd82bf5e73386b6c07f12a8a80d... query: | query SalaryInfo($country: String!, $language: String!, $locationForSalaryQuery: String!, $jobTitle: String, $employerKeys: [ID!]!, $jobKey: ID!, $includeIndeedSalaries: Boolean!) { employers(country: $country, language: $language, keys: $employerKeys) { key name relativeCompanyPageUrl compJobCitySalaries: salaries( filter: {jobTitle: $jobTitle, location: $locationForSalaryQuery, useLatestTimeRange: true, minCountForTimeRange: 5} ) @include(if: $includeIndeedSalaries) { ...SalaryInfoFields __typename } compJobSalaries: salaries( filter: {jobTitle: $jobTitle, location: $country, useLatestTimeRange: true, minCountForTimeRange: 5} ) @include(if: $includeIndeedSalaries) { ...SalaryInfoFields __typename } __typename } jobCitySalaries: salaries( filter: {jobTitle: $jobTitle, location: $locationForSalaryQuery, useLatestTimeRange: true, minCountForTimeRange: 5} ) @include(if: $includeIndeedSalaries) { ...SalaryInfoFields __typename } jobData(jobKeys: [$jobKey]) { ...JobDataFields __typename } } fragment SalaryInfoFields on SalaryInfo { salary { totalCount main { type mean count __typename } __typename } } fragment JobDataFields on JobDataPayload { results { job { compensation { formattedText salarySource __typename } benefits: attributes(customClass: "SXMYH") { key label __typename } __typename } __typename } } operationName: SalaryInfo variables: country: US language: en locationForSalaryQuery: US/IL/Chicago jobTitle: Software Engineer includeIndeedSalaries: false employerKeys: - d3bc74b389807635 jobKey: e0a56644cb03643a



Comments

Popular posts from this blog

Intentional dark pattern by Coinbase or just terrible UI?