curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/integrations/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "integration_type": "hugging_face", "name": "string", "integration_details": { "hugging_face_token": "string", "github_token": "string", "wandb_username": "string", "wandb_key": "string", "project_name": "string" }}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/integrations/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "integration_type": "hugging_face", "name": "string", "integration_details": { "hugging_face_token": "string", "github_token": "string", "wandb_username": "string", "wandb_key": "string", "project_name": "string", }, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/integrations/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "integration_type": "hugging_face", "name": "string", "integration_details": { "hugging_face_token": "string", "github_token": "string", "wandb_username": "string", "wandb_key": "string", "project_name": "string" } }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Request Bodyrequired
Section titled “Request Bodyrequired”object
The type of integration
A label to identify this integration
Integration-specific credentials. The required fields vary by integration_type: - hugging_face: hugging_face_token - github: github_token - weights_and_biases: wandb_username, wandb_key, project_name
object
Hugging Face user access token (required for hugging_face)
GitHub personal access token (required for github)
Weights & Biases account username (required for weights_and_biases)
Weights & Biases API key (required for weights_and_biases)
W&B project where runs will be logged (required for weights_and_biases)
Responses
Section titled “Responses”Successfully created a new integration
object
object
object
object
object
Example
{ "code": 201, "message": "Created Successfully", "data": { "id": 421, "name": "fakeff", "integration_type": "hugging_face", "created_by": { "id": 3573, "name": "Nipun", "email": "nipun.arora@e2enetworks.com", "username": "nipun.arora@e2enetworks.com" }, "created_at": "2024-11-14T07:20:43.119393Z", "updated_at": "2024-11-14T07:20:43.119459Z", "project_id": 124, "integration_details": {} }, "errors": {}}