### Get HFS Space and Usage Data (JSON Example) Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-hfs-by-unix-account Provides an example of the JSON response when successfully retrieving a member's HFS space settings and used data. This example illustrates the expected format and data types for each field. ```json { "unix_account": "member_unix_account", "work_quota_gb": 1587200, "home_quota_gb": 2867200, "latest_quota_modify_time": "2020-01-07 16:07:49", "home_used_gb": 0, "home_used_last_update_time": "2020-01-16 09:09:17", "work_used_gb": 0, "work_used_last_update_time": "2020-01-16 10:01:14" } ``` -------------------------------- ### Example TWS Project System Codes Response (JSON) Source: https://docs.twcloud.ai/docs/api/UPAG/%E5%8F%96%E5%BE%97-tws-%E5%B0%88%E6%A1%88 An example of a successful JSON response when querying for TWS project system codes. The array contains sample project system codes, illustrating the expected format. ```json [ "ENTXXXXXX", "ENTXXXXXX", "ENTXXXXXX", "ENTXXXXXX", "ENTXXXXXX" ] ``` -------------------------------- ### Get Solution Detail API Request Example (cURL) Source: https://docs.twcloud.ai/docs/api/Common/get-solution-detail This snippet shows how to make a GET request to retrieve the details of a specific solution using cURL. It includes the base URL, the endpoint for solutions, and required headers such as Accept and x-api-key. The project ID is passed as a query parameter. ```cURL curl -L -X GET 'https://apigateway.twcc.ai/api/v3/solutions/:solutions_id/?project=' \ -H 'Accept: application/json' \ -H 'x-api-key: ' \ -H 'x-api-host: goc' ``` -------------------------------- ### Get Multiple Project Messages Example Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-propertys Provides an example of the JSON response when successfully retrieving multiple project messages. It showcases sample data for project details. ```json [ { "project_sys_code": "TRIXXXXXX", "project_uuid": "15c8861a-e233-4368-95b9-8010f2b5b095", "project_status": "草稿", "project_type_id": "6", "project_type": "XXX計畫", "project_name": "XXX部計畫XXXXXX", "owner_account": "xxx@xxx.xxx", "su_qouta": "0.0000", "start_time": "2017-12-26", "end_time": "2018-12-26", "belong_to": "twsc" }, { "project_sys_code": "TRIXXXXXX", "project_uuid": "15c8861a-e233-4368-95b9-8010f2b5b095", "project_status": "草稿", "project_type_id": "6", "project_type": "XXX計畫", "project_name": "XXX部計畫XXXXXX", "owner_account": "xxx@xxx.xxx", "su_qouta": "0.0000", "start_time": "2017-12-26", "end_time": "2018-12-26", "belong_to": "twsc" }, { "project_sys_code": "TRIXXXXXX", "project_uuid": "15c8861a-e233-4368-95b9-8010f2b5b095", "project_status": "草稿", "project_type_id": "6", "project_type": "XXX計畫", "project_name": "XXX部計畫XXXXXX", "owner_account": "xxx@xxx.xxx", "su_qouta": "0.0000", "start_time": "2017-12-26", "end_time": "2018-12-26", "belong_to": "nchc" } ] ``` -------------------------------- ### Get Member Projects (JSON Example) Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-projects-by-account Provides an example of the JSON response for the 'Get Member Projects' endpoint, illustrating how project data is formatted, including service details and the service provider. ```json { "1": { "prj_member_type": "建立者", "prj_name": "我的研究計畫", "prj_sys_code": "MST107001", "prj_status": "approved", "prj_start_time": "2018-01-08", "prj_end_time": "2019-01-08", "service": [ { "iservice_name": "twcc", "is_enable": "1" }, { "iservice_name": "twgc", "is_enable": "99" } ], "belong_to": "twsc" }, "2": { "prj_member_type": "建立者", "prj_name": "我的研究計畫", "prj_sys_code": "MST107001", "prj_status": "approved", "prj_start_time": "2018-01-08", "prj_end_time": "2019-01-08", "service": [ { "iservice_name": "twcc", "is_enable": "1" }, { "iservice_name": "twgc", "is_enable": "99" } ], "belong_to": "nchc" } } ``` -------------------------------- ### cURL Request Example (Get Project Members) Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-members Provides a cURL command to make a GET request to the 'Get Project Members' endpoint. It includes necessary headers for authorization and content type. ```curl curl -L -X GET 'https://docs.twcloud.ai/api/projects/:prj_sys_code/members' \ -H 'Accept: application/json' \ -H 'Authorization: ' ``` -------------------------------- ### Example Product Data Response Source: https://docs.twcloud.ai/docs/api/UPAG/get-products-by-produc-system-code An example of a JSON response containing data for a 'Taiwan Fir Personal Directory Space' product. This illustrates the structure and typical values for product details and pricing. ```json [ { "id": "1", "uuid": "2e03ac07-c335-4fd2-912e-a83aa4e53c9b", "serial_number": "PETA-QUOTA-HOME01", "name": "台灣杉個人目錄空間", "desc": "台灣杉個人目錄空間", "spec": "", "max": "1000", "min": "50", "start": "50", "increment": "50", "unit_text": "GB", "pay_period": "year", "resource_day": "1 year", "other_content": "", "is_open": "1", "display_order": "0", "resource_package": "", "default_pay_limit": "1 month", "service_type": "Peta", "service_code": "Peta storage", "service_name": "台灣杉", "product_main_type": "storage", "product_sub_type": "home", "product_sub_code": "home", "sub_type_name": "個人目錄空間", "price_result": [ { "start_date": "0000-00-00 00:00:00", "end_date": "2099-12-31 23:59:59", "price": "250", "price_order": "1", "price_package": "{CPU:0,GPU:5}", "desc": "台灣杉二號-科技部", "short": "MST" }, { "start_date": "0000-00-00 00:00:00", "end_date": "2099-12-31 23:59:59", "price": "500", "price_order": "1", "price_package": "{\"CPU\": 0,\"GPU\":5}", "desc": "台灣杉二號-科技部", "short": "MST" }, { "start_date": "0000-00-00 00:00:00", "end_date": "2099-12-31 23:59:59", "price": "500", "price_order": "0", "price_package": "{\"CPU\": 0,\"GPU\":5}", "desc": "台灣杉二號-科技部", "short": "MST" } ] }, { "id": "2", "uuid": "0dba72a4-d34e-469d-afdf-705c8231c972", "serial_number": "PETA-QUOTA-WORK01", "name": "台灣杉工作區目錄空間", "desc": "台灣杉工作目錄空間", "spec": "", "max": "100", "min": "1", "start": "1", "increment": "1", "unit_text": "TB", "pay_period": "year", "resource_day": "1 year", "other_content": "", "is_open": "1", "display_order": "0", "resource_package": "", "default_pay_limit": "1 month", "service_type": "Peta", "service_code": "Peta storage", "service_name": "台灣杉", "product_main_type": "storage", "product_sub_type": "work", "product_sub_code": "work", "sub_type_name": "工作區目錄空間", "price_result": [ { "start_date": "0000-00-00 00:00:00", "end_date": "2099-12-31 23:59:59", "price": "2500", "price_order": "1", ``` -------------------------------- ### Example Product Price Response (JSON) Source: https://docs.twcloud.ai/docs/api/UPAG/get-products-price An example of a JSON response for a product price query. This demonstrates the actual data structure and values returned by the API for a specific product. ```JSON { "id": "69", "uuid": "bff62100-962a-4750-b5eb-7bcd8cb2223c", "serial_number": "flavor-119", "name": "AI-K8S-Flavor-119", "desc": "8GPU+32cores+640GB memory", "spec": "8GPU+32cores+640GB memory", "max": "1", "min": "1", "start": "1", "increment": "1", "unit_text": null, "pay_period": "day", "resource_day": "1 day", "other_content": "{\"flavor_id\":\"119\"}", "is_open": "1", "display_order": "99", "resource_package": "{\"GPU\":{\"amount\":\"8\",\"unit\":\"Core\"},\"CPU\":{\"amount\":\"32\",\"unit\":\"Core\"},\"RAM\":{\"amount\":\"640\",\"unit\":\"GB\"}}", "default_pay_limit": "1 month", "service_type": "AI", "service_code": "AI", "service_name": "人工智慧", "product_main_type": "vm_k8s", "product_sub_type": "AI K8s", "product_sub_code": "AI K8s", "sub_type_name": "作業系統K8S", "price_result": [ { "start_date": "0000-00-00 00:00:00", "end_date": "2099-12-31 23:59:59", "price": "120", "price_order": "0", "price_package": "{\"CPU\": 0,\"GPU\":5}", "desc": "台灣杉二號-科技部", "short": "MST" } ] } ``` -------------------------------- ### Successful Response Example (JSON) Source: https://docs.twcloud.ai/docs/api/UPAG/get-wallet-property Provides an example of a successful JSON response for fetching single project wallet information. This illustrates the format and typical values returned by the API. ```json { "project_sys_code": "MSTXXXXXX", "project_name": "XXX部計畫XXXXXX", "wallet_code": "XXXXXXXX", "wallet_name": "母錢包", "is_mother": "是", "owner_account": "xxx@xxx.xxx", "owner_name": "XXX", "su_qouta": "0.0000", "wallet_type": "mother", "wallet_id": "83", "original_quota": "X.XXXX", "prj_credit_quota": "XXXXX", "prj_poc_quota": "XXXXX", "prj_su_quota": "X.XXXX", "prj_obtained_su": "XXXXX" } ``` -------------------------------- ### Example Member Basic Info Response (JSON) Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-by-unix-account An example of a successful JSON response containing a member's basic information. This illustrates the data format and typical values returned by the API. ```json { "member_account": "test@example.org.tw", "member_unix_account": "example", "member_name": "XXX", "member_eng_name": "", "google_email": "XXXXXXXXX", "fb_id": "XXXXXXXXX", "nation": "XXXX", "unit": "XX大學", "department": "XX系", "title_type": "學生職", "title": "大學生", "phone": 900000000, "contact_phone": "xxxxxxxxxx", "contact_email": "test@example.org.tw", "second_email": "test@example.org.tw", "status": "帳號已開通" } ``` -------------------------------- ### Example Response: Project Wallets (JSON) Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-wallets An example JSON response containing wallet data for a project. This includes details for mother wallets, child wallets, and potentially removed wallets. ```json { "1": { "wallet_uuid": "4df42a41-1931-476a-9234-267134e59c54", "wallet_desc": "XXXXXXXXXX", "prj_start_date": "XXXX-XX-XX", "prj_end_date": "XXXX-XX-XX", "wallet_code": "XXXXXXXX", "wallet_name": "母錢包", "owner_account": "test@example.org.tw", "owner_name": "XXX", "is_mother": "1", "su_qouta": "X.XXXX", "wallet_type": "mother", "wallet_id": "83", "obtained_su": "X.XXXX", "used_su": "X.XXXX", "original_quota": "X.XXXX", "prj_credit_quota": "XXXXX", "prj_poc_quota": "XXXXX", "prj_su_quota": "X.XXXX", "prj_obtained_su": "XXXXX" }, "2": { "wallet_uuid": "4df42a41-1931-476a-9234-267134e59c54", "wallet_desc": "XXXXXXXXXX", "prj_start_date": "XXXX-XX-XX", "prj_end_date": "XXXX-XX-XX", "wallet_code": "XXXXXXXX", "wallet_name": "子錢包", "owner_account": "test@example.org.tw", "owner_name": "XXX", "is_mother": "1", "su_qouta": "X.XXXX", "wallet_type": "child", "wallet_id": "83", "obtained_su": "X.XXXX", "used_su": "X.XXXX", "original_quota": "X.XXXX", "prj_credit_quota": "XXXXX", "prj_poc_quota": "XXXXX", "prj_su_quota": "X.XXXX", "prj_obtained_su": "XXXXX" }, "3": { "wallet_uuid": "", "wallet_desc": "已被移除的子錢包", "prj_start_date": "0000-00-00", "prj_end_date": "0000-00-00", "wallet_code": "", "wallet_name": "已被移除的子錢包額度總和", "owner_account": "system", "owner_name": "system", "is_mother": "0", "su_qouta": "0.0000", "wallet_type": "", "wallet_id": "", "obtained_su": "0.0000", "used_su": "0.0000", "original_quota": "X.XXXX", "prj_credit_quota": "XXXXX", "prj_poc_quota": "XXXXX", "prj_su_quota": "X.XXXX", "prj_obtained_su": "XXXXX" } } ``` -------------------------------- ### Get Multiple Member Basic Information - Example JSON Response Source: https://docs.twcloud.ai/docs/api/UPAG/get-many-member-by-account An example of a successful JSON response for the 'Get Multiple Member Basic Information' endpoint, showcasing populated fields for several members. ```json [ { "member_account": "morganxxx@gmail.com", "member_unix_account": "d00atoxxx", "member_name": "xxx", "member_eng_name": "", "google_email": null, "fb_id": null, "nation": null, "unit": "國立交通大學", "department": "設施服務組", "title_type": "工程管理職", "title": "行政助理、管理師", "phone": 988888555, "contact_phone": "0357444#442", "contact_email": "morganxxx@gmail.com", "second_email": "accountxxx@nchc.narl.org.tw", "status": "帳號已開通" }, { "member_account": "wesley@xxxx.com", "member_unix_account": "wesley.xxxx", "member_name": "黃XX", "member_eng_name": "", "google_email": null, "fb_id": null, "nation": null, "unit": "XXX科技股份有限公司", "department": "資訊室", "title_type": "教師職", "title": "教授", "phone": 985555526, "contact_phone": 7856668, "contact_email": "wesley@xxxx.com", "second_email": "", "status": "帳號已開通" }, { "member_account": "5ba55d6g@narlabs.org.tw", "member_unix_account": "rogerCCC", "member_name": "曾XX", "member_eng_name": "", "google_email": null, "fb_id": null, "nation": null, "unit": "國立台灣大學", "department": "資訊管理系", "title_type": "學生職", "title": "大學生", "phone": 977777779, "contact_phone": 9777779, "contact_email": "5ba55d6g@narlabs.org.tw", "second_email": "", "status": "帳號已開通" } ] ``` -------------------------------- ### Example Response: Single Wallet (JSON) Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-wallets An example JSON response for a single wallet associated with a project. This typically represents a mother wallet or a specific child wallet. ```json { "wallet_uuid": "4df42a41-1931-476a-9234-267134e59c54", "wallet_desc": "XXXXXXXXXX", "prj_start_date": "XXXX-XX-XX", "prj_end_date": "XXXX-XX-XX", "wallet_code": "XXXXXXXX", "wallet_name": "母錢包", "owner_account": "test@example.org.tw", "owner_name": "XXX", "is_mother": "1", "su_qouta": "X.XXXX", "wallet_type": "mother", "wallet_id": "83", "obtained_su": "X.XXXX", "used_su": "X.XXXX", "original_quota": "X.XXXX", "prj_credit_quota": "XXXXX", "prj_poc_quota": "XXXXX", "prj_su_quota": "X.XXXX", "prj_obtained_su": "XXXXX" } ``` -------------------------------- ### Successful Response Example (Project Members) Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-members An example of a successful response when retrieving project members. It returns a JSON array where each object represents a project member with their details. ```json [ { "member_account": "test@example.org.tw", "member_type": "建立者", "member_email": "test@example.org.tw", "member_name": "XXX" }, { "member_account": "test@example.org.tw", "member_type": "建立者", "member_email": "test@example.org.tw", "member_name": "XXX" } ] ``` -------------------------------- ### Example Response: Project Service Enablement Status Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-service-list Provides an example of a successful response when querying the service enablement status. It demonstrates the structure of the returned JSON object, including sample data for different projects and services. ```json [ { "project_sys_code": "MSTXXXXXX", "service_name": "twcc", "is_enable": 1 }, { "project_sys_code": "GOVXXXXXX", "service_name": "twcc", "is_enable": -90 }, { "project_sys_code": "ACDXXXXXX", "service_name": "twcc", "is_enable": 0 } ] ``` -------------------------------- ### List Projects API Response Example (JSON) Source: https://docs.twcloud.ai/docs/api/CCS/list-projects This snippet shows an example JSON response for the 'ListProjects' API endpoint. It outlines the structure of the project data returned, including matchLabels, id, name, platform, and transparent_mode. ```json [ { "matchLabels": [ "string" ], "id": 0, "name": "string", "platform": "string", "transparent_mode": true } ] ``` -------------------------------- ### Get Single Project Wallet Information (cURL) Source: https://docs.twcloud.ai/docs/api/UPAG/get-wallet-property Example cURL command to fetch single project wallet information. This command requires the API key for authorization and the project and wallet codes in the URL. It specifies the desired response format as JSON. ```curl curl -L -X GET 'https://docs.twcloud.ai/api/projects/:prj_sys_code/wallets/:wallet_code' \ -H 'Accept: application/json' \ -H 'Authorization: ' ``` -------------------------------- ### Retrieve Products API Request (cURL) Source: https://docs.twcloud.ai/docs/api/UPAG/get-products-by-produc-system-code Example cURL command to retrieve a list of products from the TWCloud AI API. It includes the endpoint, HTTP method, and required headers for authentication and content type. ```shell curl -L -X GET 'https://docs.twcloud.ai/api/products' \ -H 'Accept: application/json' \ -H 'Authorization: ' ``` -------------------------------- ### Get Project Detail Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves detailed information about a specific project. ```APIDOC ## GET /websites/twcloud_ai_api/projects/{projectId} ### Description Retrieves detailed information for a specific project. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects/{projectId} ### Parameters #### Path Parameters - **projectId** (string) - Required - The unique identifier of the project. #### Query Parameters - **VCS-proj-0074** (string) - Optional - Identifier for getting project details. ### Response #### Success Response (200) - **projectDetail** (object) - An object containing the project's details. - **id** (string) - The unique identifier of the project. - **name** (string) - The name of the project. - **description** (string) - A description of the project. #### Response Example ```json { "projectDetail": { "id": "proj-123", "name": "My Project", "description": "This is a sample project." } } ``` ``` -------------------------------- ### Get Solutions of Project Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves the solutions associated with a specific project. ```APIDOC ## GET /websites/twcloud_ai_api/projects/{projectId}/solutions ### Description Retrieves the solutions associated with a specific project. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects/{projectId}/solutions ### Parameters #### Path Parameters - **projectId** (string) - Required - The unique identifier of the project. #### Query Parameters - **VCS-proj-0077** (string) - Optional - Identifier for getting solutions of a project. ### Response #### Success Response (200) - **solutions** (array) - A list of solution objects associated with the project. - **id** (string) - The unique identifier of the solution. - **name** (string) - The name of the solution. #### Response Example ```json { "solutions": [ { "id": "sol-abc", "name": "Solution A" } ] } ``` ``` -------------------------------- ### Get Properties of Solution for Project Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves extra properties of a specific solution within a project. ```APIDOC ## GET /websites/twcloud_ai_api/projects/{projectId}/solutions/{solutionId}/properties ### Description Retrieves extra properties of a specific solution for a given project. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects/{projectId}/solutions/{solutionId}/properties ### Parameters #### Path Parameters - **projectId** (string) - Required - The unique identifier of the project. - **solutionId** (string) - Required - The unique identifier of the solution. #### Query Parameters - **VCS-proj-0078** (string) - Optional - Identifier for getting solution properties. ### Response #### Success Response (200) - **properties** (object) - An object containing the extra properties of the solution. #### Response Example ```json { "properties": { "key1": "value1", "key2": "value2" } } ``` ``` -------------------------------- ### Example API Response for Project List Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-list This is an example of a successful JSON response from the TWCloud AI API when requesting a list of projects. It shows an array containing objects, each with a 'project_sys_code' property populated with sample project codes. ```JSON [ { "project_sys_code": "TRIXXXXXX" }, { "project_sys_code": "ACDXXXXXX" } ] ``` -------------------------------- ### API Error Response Example (User Not Found) Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-hfs-by-unix-account An example of a JSON response indicating a 'User not found' error. This demonstrates the format of the error object, including a specific error code and message for this case. ```json { "errors": [ { "code": 50, "message": "User not found." } ] } ``` -------------------------------- ### Get Member Projects (cURL Request) Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-projects-by-account Demonstrates how to make a GET request to the API endpoint for retrieving a member's projects using cURL. It includes necessary headers for authorization and content acceptance. ```bash curl -L -X GET 'https://docs.twcloud.ai/api/members/:app_user_login_id/projects' \ -H 'Accept: application/json' \ -H 'Authorization: ' ``` -------------------------------- ### Example API Error Response (No Data Found) Source: https://docs.twcloud.ai/docs/api/UPAG/get-project-list This JSON object shows an example of a 'No data found' error response from the TWCloud AI API. It includes an error code (2001) and a message indicating that no matching data was retrieved. ```JSON { "errors": [ { "code": 2001, "message": "No data found." } ] } ``` -------------------------------- ### Get Favorite Context of a Specific Project Name Source: https://docs.twcloud.ai/docs/api/Common/project Retrieves the favorite context associated with a given project name. ```APIDOC ## GET /websites/twcloud_ai_api/Comm-proj-0120 ### Description Retrieves the favorite context of a specific project name. ### Method GET ### Endpoint /websites/twcloud_ai_api/Comm-proj-0120 ### Parameters #### Query Parameters - **projectName** (string) - Required - The name of the project to retrieve the favorite context for. ### Response #### Success Response (200) - **favoriteContext** (object) - The favorite context of the project. - **contextId** (string) - The ID of the context. - **contextName** (string) - The name of the context. #### Response Example ```json { "favoriteContext": { "contextId": "ctx-12345", "contextName": "Default Context" } } ``` ``` -------------------------------- ### Get Load Balancer Detail Source: https://docs.twcloud.ai/docs/api/VCS/load-balancer Retrieves detailed information about a specific load balancer. ```APIDOC ## GET /websites/twcloud_ai_api/loadbalancers/{loadBalancerId} ### Description Retrieves detailed information for a specific load balancer. ### Method GET ### Endpoint /websites/twcloud_ai_api/loadbalancers/{loadBalancerId} ### Parameters #### Path Parameters - **loadBalancerId** (string) - Required - The ID of the load balancer to retrieve details for. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the load balancer. - **name** (string) - The name of the load balancer. - **ipAddress** (string) - The IP address of the load balancer. - **status** (string) - The current status of the load balancer. - **healthCheck** (object) - Configuration for health checks. - **protocol** (string) - The protocol used for health checks. - **port** (integer) - The port used for health checks. #### Response Example ```json { "id": "lb-12345", "name": "my-load-balancer", "ipAddress": "192.168.1.100", "status": "active", "healthCheck": { "protocol": "TCP", "port": 80 } } ``` ``` -------------------------------- ### Get Assets Reports for Projects Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves asset reports for specified projects. ```APIDOC ## GET /websites/twcloud_ai_api/projects/reports/assets ### Description Retrieves asset reports for the specified projects. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects/reports/assets ### Parameters #### Query Parameters - **projectIds** (array of strings) - Required - A list of project IDs for which to retrieve reports. - **VCS-proj-0082** (string) - Optional - Identifier for getting assets reports. ### Response #### Success Response (200) - **reports** (object) - An object containing asset reports keyed by project ID. - **projectId** (object) - Report details for a specific project. #### Response Example ```json { "reports": { "proj-123": { "totalAssets": 100, "activeAssets": 90 } } } ``` ``` -------------------------------- ### Get Project Quotas Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves the quotas associated with a specific project. ```APIDOC ## GET /websites/twcloud_ai_api/projects/{projectId}/quotas ### Description Retrieves the quotas for a specific project. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects/{projectId}/quotas ### Parameters #### Path Parameters - **projectId** (string) - Required - The unique identifier of the project. #### Query Parameters - **VCS-proj_quota-0072** (string) - Optional - Identifier for getting project quotas. ### Response #### Success Response (200) - **quotas** (object) - An object containing the project's quota information. #### Response Example ```json { "quotas": { "cpuLimit": 1000, "memoryLimit": 2048 } } ``` ``` -------------------------------- ### Get Business Network Info Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves business network information for an OpenStack project. Only tenant admins can access this. ```APIDOC ## GET /websites/twcloud_ai_api/projects/{projectId}/business-network ### Description Retrieves business network information for an OpenStack project. This endpoint is restricted to tenant administrators. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects/{projectId}/business-network ### Parameters #### Path Parameters - **projectId** (string) - Required - The unique identifier of the OpenStack project (tenant). #### Query Parameters - **VCS-proj-0075** (string) - Optional - Identifier for getting business network info. ### Response #### Success Response (200) - **businessNetworkInfo** (object) - An object containing the business network details. #### Response Example ```json { "businessNetworkInfo": { "networkName": "internal-net", "subnetMask": "255.255.255.0" } } ``` ``` -------------------------------- ### Get Auto Scaling Policy Detail Source: https://docs.twcloud.ai/docs/api/VCS/auto-scaling-policy Retrieves detailed information about a specific auto scaling policy. ```APIDOC ## GET /websites/twcloud_ai_api/autoscaling/policies/{policy_id} ### Description Retrieves detailed information about a specific auto scaling policy. ### Method GET ### Endpoint /websites/twcloud_ai_api/autoscaling/policies/{policy_id} ### Parameters #### Path Parameters - **policy_id** (string) - Required - The unique identifier of the auto scaling policy to retrieve. ### Request Example ``` GET /websites/twcloud_ai_api/autoscaling/policies/as_pcy_0044 ``` ### Response #### Success Response (200) - **policy_id** (string) - The unique identifier for the auto scaling policy. - **name** (string) - The name of the auto scaling policy. - **min_replicas** (integer) - The minimum number of replicas. - **max_replicas** (integer) - The maximum number of replicas. - **target_metric** (object) - The metric to scale on. - **type** (string) - The type of metric. - **value** (number) - The target value for the metric. - **creation_timestamp** (string) - The timestamp when the policy was created. #### Response Example ```json { "policy_id": "as_pcy_0044", "name": "DetailedPolicy", "min_replicas": 1, "max_replicas": 5, "target_metric": { "type": "memory_utilization", "value": 80 }, "creation_timestamp": "2023-10-27T11:00:00Z" } ``` ``` -------------------------------- ### StartJob Source: https://docs.twcloud.ai/docs/api/CCS/start-job Initiates a job execution using the provided job ID and authentication headers. ```APIDOC ## POST /websites/twcloud_ai_api/jobs/{job_id}/start ### Description Starts a job execution identified by its unique job ID. ### Method POST ### Endpoint /websites/twcloud_ai_api/jobs/{job_id}/start ### Parameters #### Path Parameters - **job_id** (int32) - Required - The unique identifier for the job to be started. #### Header Parameters - **x-api-host** (string) - Required - Specifies the host for the API request. Default value: `k8s-D-twcc`. ### Request Example ```json { "job_id": 12345 } ``` ### Response #### Success Response (201) - **message** (string) - Indicates that the job has been created successfully. #### Response Example ```json { "message": "Job started successfully" } ``` ``` -------------------------------- ### List Projects Source: https://docs.twcloud.ai/docs/api/VCS/project Retrieves a list of all projects available. ```APIDOC ## GET /websites/twcloud_ai_api/projects ### Description Retrieves a list of all projects. ### Method GET ### Endpoint /websites/twcloud_ai_api/projects ### Parameters #### Query Parameters - **VCS-proj-0073** (string) - Optional - Identifier for listing projects. ### Response #### Success Response (200) - **projects** (array) - A list of project objects. - **id** (string) - The unique identifier of the project. - **name** (string) - The name of the project. #### Response Example ```json { "projects": [ { "id": "proj-123", "name": "My Project" } ] } ``` ``` -------------------------------- ### GetSolutionDetail API Source: https://docs.twcloud.ai/docs/api/Common/solution Retrieves detailed information about a specific solution. ```APIDOC ## GET /websites/twcloud_ai_api/solutions/{solution_id} ### Description Retrieves detailed information for a specific solution identified by its ID. ### Method GET ### Endpoint /websites/twcloud_ai_api/solutions/{solution_id} ### Parameters #### Path Parameters - **solution_id** (string) - Required - The unique identifier of the solution. ### Request Example None ### Response #### Success Response (200) - **id** (string) - The unique identifier of the solution. - **name** (string) - The name of the solution. - **description** (string) - A detailed description of the solution. #### Response Example { "id": "Comm-sol-0123", "name": "Detailed Solution Name", "description": "This is a comprehensive description of the solution, outlining its features and benefits." } ``` -------------------------------- ### cURL Request to Get Single Member Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-by-account Example cURL command to fetch single member basic information from the Twcloud AI API. It includes the necessary HTTP method, endpoint, and authorization header. ```bash curl -L -X GET 'https://docs.twcloud.ai/api/members/:app_user_login_id' \ -H 'Accept: application/json' \ -H 'Authorization: ' ``` -------------------------------- ### Create Load Balancer Source: https://docs.twcloud.ai/docs/api/VCS/load-balancer Creates a new load balancer with the specified configuration. ```APIDOC ## POST /websites/twcloud_ai_api/loadbalancers ### Description Creates a new load balancer. ### Method POST ### Endpoint /websites/twcloud_ai_api/loadbalancers ### Parameters #### Request Body - **name** (string) - Required - The name for the new load balancer. - **ipAddress** (string) - Required - The IP address to assign to the load balancer. - **algorithm** (string) - Optional - The load balancing algorithm (e.g., 'round-robin', 'least-connections'). ### Request Example ```json { "name": "new-lb", "ipAddress": "192.168.1.101", "algorithm": "round-robin" } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the newly created load balancer. - **name** (string) - The name of the load balancer. - **ipAddress** (string) - The IP address of the load balancer. - **status** (string) - The initial status of the load balancer. #### Response Example ```json { "id": "lb-67890", "name": "new-lb", "ipAddress": "192.168.1.101", "status": "pending" } ``` ``` -------------------------------- ### Get HFS Space and Usage Data (cURL Request) Source: https://docs.twcloud.ai/docs/api/UPAG/get-member-hfs-by-unix-account Example cURL command to retrieve HFS space and usage data from the TWCC API. It includes the necessary endpoint, HTTP method, and headers for authorization and content type. ```bash curl -L -X GET 'https://docs.twcloud.ai/api/services/twcc/hfs' \ -H 'Accept: application/json' \ -H 'Authorization: ' ```