get_run_details up to testable state
This commit is contained in:
parent
5f836c35f2
commit
5bb1c35783
12
tfc-api-functions.js
Normal file
12
tfc-api-functions.js
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
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}`},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
Loading…
Reference in a new issue