Skip to main content
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

REST API endpoints for network configurations

Use the REST API to interact with network configurations.

List hosted compute network configurations for an organization

Lists all hosted compute network configurations configured in an organization.

OAuth app tokens and personal access tokens (classic) need the read:network_configurations scope to use this endpoint.

"List hosted compute network configurations for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:

  • "Network configurations" organization permissions (read)

"List hosted compute network configurations for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

쿼리 매개 변수
속성, 형식, 설명
per_page integer

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

기본값: 30

page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

기본값: 1

"List hosted compute network configurations for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

"List hosted compute network configurations for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/orgs/{org}/settings/network-configurations
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/settings/network-configurations

Response

Status: 200
{ "total_count": 2, "network_configurations": [ { "id": "123456789ABCDEF", "name": "My network configuration", "compute_service": "actions", "network_settings_ids": [ "23456789ABDCEF1", "3456789ABDCEF12" ], "created_on": "2022-10-09T23:39:01Z" }, { "id": "456789ABDCEF123", "name": "My other configuration", "compute_service": "none", "network_settings_ids": [ "56789ABDCEF1234", "6789ABDCEF12345" ], "created_on": "2023-04-26T15:23:37Z" } ] }

Create a hosted compute network configuration for an organization

Creates a hosted compute network configuration for an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.

"Create a hosted compute network configuration for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:

  • "Network configurations" organization permissions (write)

"Create a hosted compute network configuration for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

본문 매개 변수
속성, 형식, 설명
name string Required

Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.

compute_service string

The hosted compute service to use for the network configuration.

다음 중 하나일 수 있습니다.: none, actions

network_settings_ids array of strings Required

The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified.

"Create a hosted compute network configuration for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
201

Created

"Create a hosted compute network configuration for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

post/orgs/{org}/settings/network-configurations
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/settings/network-configurations \ -d '{"name":"my-network-configuration","network_settings_ids":["23456789ABDCEF1"],"compute_service":"actions"}'

Response

Status: 201
{ "id": "123456789ABCDEF", "name": "My network configuration", "compute_service": "actions", "network_settings_ids": [ "23456789ABDCEF1", "3456789ABDCEF12" ], "created_on": "2022-10-09T23:39:01Z" }

Get a hosted compute network configuration for an organization

Gets a hosted compute network configuration configured in an organization.

OAuth app tokens and personal access tokens (classic) need the read:network_configurations scope to use this endpoint.

"Get a hosted compute network configuration for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:

  • "Network configurations" organization permissions (read)

"Get a hosted compute network configuration for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

network_configuration_id string Required

Unique identifier of the hosted compute network configuration.

"Get a hosted compute network configuration for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

"Get a hosted compute network configuration for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/orgs/{org}/settings/network-configurations/{network_configuration_id}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/settings/network-configurations/NETWORK_CONFIGURATION_ID

Response

Status: 200
{ "id": "123456789ABCDEF", "name": "My network configuration", "compute_service": "actions", "network_settings_ids": [ "23456789ABDCEF1", "3456789ABDCEF12" ], "created_on": "2022-10-09T23:39:01Z" }

Update a hosted compute network configuration for an organization

Updates a hosted compute network configuration for an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.

"Update a hosted compute network configuration for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:

  • "Network configurations" organization permissions (write)

"Update a hosted compute network configuration for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

network_configuration_id string Required

Unique identifier of the hosted compute network configuration.

본문 매개 변수
속성, 형식, 설명
name string

Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.

compute_service string

The hosted compute service to use for the network configuration.

다음 중 하나일 수 있습니다.: none, actions

network_settings_ids array of strings

The identifier of the network settings to use for the network configuration. Exactly one network settings must be specified.

"Update a hosted compute network configuration for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

"Update a hosted compute network configuration for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

patch/orgs/{org}/settings/network-configurations/{network_configuration_id}
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/settings/network-configurations/NETWORK_CONFIGURATION_ID \ -d '{"name":"my-network-configuration","network_settings_ids":["23456789ABDCEF1"],"compute_service":"actions"}'

Response

Status: 200
{ "id": "123456789ABCDEF", "name": "My network configuration", "compute_service": "actions", "network_settings_ids": [ "23456789ABDCEF1", "3456789ABDCEF12" ], "created_on": "2022-10-09T23:39:01Z" }

Delete a hosted compute network configuration from an organization

Deletes a hosted compute network configuration from an organization.

OAuth app tokens and personal access tokens (classic) need the write:network_configurations scope to use this endpoint.

"Delete a hosted compute network configuration from an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:

  • "Network configurations" organization permissions (write)

"Delete a hosted compute network configuration from an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

network_configuration_id string Required

Unique identifier of the hosted compute network configuration.

"Delete a hosted compute network configuration from an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
204

No Content

"Delete a hosted compute network configuration from an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

delete/orgs/{org}/settings/network-configurations/{network_configuration_id}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/settings/network-configurations/NETWORK_CONFIGURATION_ID

Response

Status: 204

Get a hosted compute network settings resource for an organization

Gets a hosted compute network settings resource configured for an organization.

OAuth app tokens and personal access tokens (classic) need the read:network_configurations scope to use this endpoint.

"Get a hosted compute network settings resource for an organization"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:

  • "Network configurations" organization permissions (read)

"Get a hosted compute network settings resource for an organization"에 대한 매개 변수

머리글
속성, 형식, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
속성, 형식, 설명
org string Required

The organization name. The name is not case sensitive.

network_settings_id string Required

Unique identifier of the hosted compute network settings.

"Get a hosted compute network settings resource for an organization"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

"Get a hosted compute network settings resource for an organization"에 대한 코드 샘플

GHE.com에서 GitHub에 액세스하는 경우 api.github.comapi.SUBDOMAIN.ghe.com의 엔터프라이즈 전용 하위 도메인으로 바꾸세요.

요청 예제

get/orgs/{org}/settings/network-settings/{network_settings_id}
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/ORG/settings/network-settings/NETWORK_SETTINGS_ID

Response

Status: 200
{ "id": "220F78DACB92BBFBC5E6F22DE1CCF52309D", "network_configuration_id": "934E208B3EE0BD60CF5F752C426BFB53562", "name": "my_network_settings", "subnet_id": "/subscriptions/14839728-3ad9-43ab-bd2b-fa6ad0f75e2a/resourceGroups/my-rg/providers/Microsoft.Network/virtualNetworks/my-vnet/subnets/my-subnet", "region": "eastus" }