grab-api-sentinel-mocks/tfc-api-functions.js
2022-12-30 16:08:25 -08:00

12 lines
421 B
JavaScript

import axios from 'axios';
// This will use the TFC get run details API, and return the response
// https://developer.hashicorp.com/terraform/cloud-docs/api-docs/run#get-run-details
export const get_run_details = async (base_url, run_id, token) => {
const response = await axios.get(
`${base_url}/api/v2/runs/${run_id}`,
{
headers: {Authorization :`Bearer ${token}`},
}
);
};