POST
/serving/inference/{inference_id}/security-groups/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/serving/inference/{inference_id}/security-groups/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "security_groups_ids": [ 7245 ]}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/serving/inference/{inference_id}/security-groups/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "security_groups_ids": [ 7245, ], },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/serving/inference/{inference_id}/security-groups/");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({ "security_groups_ids": [ 7245 ] }),});console.log(await response.json());Attach one or more security groups to the model endpoint.
Note: To get a list of available security groups, use the Security Groups section of the API (
GET /projects/{Project_Id}/security_groups/).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”inference_id
required
integer
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID
active_iam
integer
Active IAM ID (To access contact person account) Find your Active IAM ID here
location
required
string
Location
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
security_groups_ids
required
List of security group IDs to attach to the model endpoint.
Array<integer>
Example
{ "security_groups_ids": [ 7245 ]}Responses
Section titled “Responses”Security group attach or detach operation result.
Media typeapplication/json
object
code
integer
data
string
errors
object
message
string
Example
{ "code": 200, "message": "Success"}