Replicated networks API
The networks API from Replicated — 3 operation(s) for networks.
The networks API from Replicated — 3 operation(s) for networks.
swagger: '2.0'
info:
description: Manage enterprise portal users, install options, branding, documentation, email templates, and access control.
title: Vendor API V3 apps networks API
contact:
name: Replicated, Inc.
url: http://www.replicated.com/
email: info@replicated.com
version: 3.0.0
host: api.replicated.com
basePath: /vendor/v3
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: networks
paths:
/network/{network_id}:
get:
security:
- api_key: []
description: 'The resources field contains a historical list of all clusters and VMs that have ever been
associated with this network. Resources remain in the list even after deletion to preserve
history for network report correlation.
Required RBAC Policy: kots/network/[:clusterid]'
produces:
- application/json
schemes:
- https
tags:
- networks
summary: Get the details for a test network.
operationId: getNetwork
parameters:
- type: string
x-go-name: NetworkID
description: Network identifier
name: network_id
in: path
required: true
responses:
'200':
$ref: '#/responses/getNetworkResponse'
'400':
$ref: '#/responses/responseErrBadRequest'
'401':
$ref: '#/responses/responseErrUnauthorized'
'403':
$ref: '#/responses/responseErrForbidden'
'404':
$ref: '#/responses/responseErrNotFound'
/network/{network_id}/update:
put:
security:
- api_key: []
description: 'Required RBAC Policy: kots/network/[:networkid]/update'
produces:
- application/json
schemes:
- https
tags:
- networks
summary: Update network settings (policy and/or collect report).
operationId: updateNetwork
parameters:
- type: string
x-go-name: NetworkID
description: Network identifier
name: network_id
in: path
required: true
- name: Body
in: body
schema:
type: object
properties:
policy:
type: string
x-go-name: Policy
responses:
'200':
$ref: '#/responses/updateNetworkResponse'
'400':
$ref: '#/responses/updateNetworkErrorResponse'
'401':
$ref: '#/responses/responseErrUnauthorized'
'403':
$ref: '#/responses/responseErrForbidden'
'404':
$ref: '#/responses/responseErrNotFound'
/networks:
get:
security:
- api_key: []
description: 'Each network includes a resources field containing a historical list of all clusters and VMs
that have ever been associated with the network. Resources remain in the list even after
deletion to preserve history for network report correlation.
Required RBAC Policy: kots/network/list'
produces:
- application/json
schemes:
- https
tags:
- networks
summary: List test networks.
operationId: listNetworks
parameters:
- type: integer
format: int64
default: 20
x-go-name: PageSize
description: Page size
name: pageSize
in: query
- type: integer
format: int64
x-go-name: CurrentPage
description: Current page
name: currentPage
in: query
- type: string
x-go-name: SortColumn
description: Sort column
name: sortColumn
in: query
- type: boolean
x-go-name: SortDesc
description: Sort descending
name: sortDesc
in: query
- type: boolean
x-go-name: ShowTerminated
description: Show terminated networks
name: show-terminated
in: query
- type: string
x-go-name: TerminatedFilter
description: 'Filter terminated networks. Allowed values: "all" (default, no filter) or
"with-report" (only include terminated networks that have a report).'
name: terminated-filter
in: query
- type: string
x-go-name: StartTimeStr
description: Specify a start time in the format "YYYY-MM-DDTHH:MM:SSZ"
name: start-time
in: query
- type: string
x-go-name: EndTimeStr
description: Specify an end time in the format "YYYY-MM-DDTHH:MM:SSZ"
name: end-time
in: query
responses:
'200':
$ref: '#/responses/listNetworksResponse'
'400':
$ref: '#/responses/responseErrBadRequest'
'401':
$ref: '#/responses/responseErrUnauthorized'
'403':
$ref: '#/responses/responseErrForbidden'
'404':
$ref: '#/responses/responseErrNotFound'
definitions:
NetworkResource:
type: object
properties:
distribution:
type: string
x-go-name: Distribution
id:
type: string
x-go-name: ID
name:
type: string
x-go-name: Name
x-go-package: github.com/replicatedhq/vandoor/pkg/vendor-api/network/types
NetworkStatus:
type: string
x-go-package: github.com/replicatedhq/vandoor/pkg/vendor-api/network/types
Network:
type: object
properties:
assigned_at:
type: string
format: date-time
x-go-name: AssignedAt
collect_report:
type: boolean
x-go-name: CollectReport
created_at:
type: string
format: date-time
x-go-name: CreatedAt
distribution:
type: string
x-go-name: Distribution
expires_at:
type: string
format: date-time
x-go-name: ExpiresAt
guid:
type: string
x-go-name: GUID
has_report:
type: boolean
x-go-name: HasReport
id:
type: string
x-go-name: ShortID
last_scheduling_status:
type: string
x-go-name: LastSchedulingStatus
name:
type: string
x-go-name: Name
policy:
type: string
x-go-name: Policy
resources:
description: Resources contains the clusters and VMs associated with this network
type: array
items:
$ref: '#/definitions/NetworkResource'
x-go-name: Resources
running_at:
type: string
format: date-time
x-go-name: RunningAt
status:
$ref: '#/definitions/NetworkStatus'
team_id:
type: string
x-go-name: TeamID
ttl:
type: string
x-go-name: TTL
version:
type: string
x-go-name: Version
x-go-package: github.com/replicatedhq/vandoor/pkg/vendor-api/network/types
responses:
getNetworkResponse:
description: GetNetworkResponse contains the response to get network details
schema:
type: object
properties:
error:
type: string
x-go-name: Error
network:
$ref: '#/definitions/Network'
responseErrUnauthorized:
description: Return if the caller is not authorized
schema:
type: object
properties:
message:
type: string
x-go-name: Message
listNetworksResponse:
description: ListNetworksResponse contains the response to list networks
schema:
type: object
properties:
error:
type: string
x-go-name: Error
networks:
type: array
items:
$ref: '#/definitions/Network'
x-go-name: Networks
totalNetworks:
type: integer
format: int64
x-go-name: TotalNetworks
updateNetworkErrorResponse:
description: UpdateNetworkErrorResponse contains error information
schema:
type: object
properties:
message:
type: string
x-go-name: Message
responseErrBadRequest:
description: Returned on bad input
schema:
type: object
properties:
error_code:
description: Error code if available
type: string
x-go-name: ErrorCode
message:
description: Error message text if available
type: string
x-go-name: Message
updateNetworkResponse:
description: UpdateNetworkResponse contains the response to update a network
schema:
type: object
properties:
error:
type: string
x-go-name: Error
network:
$ref: '#/definitions/Network'
responseErrNotFound:
description: Returned on resource not found
schema:
type: object
properties:
message:
type: string
x-go-name: Message
responseErrForbidden:
description: Returned if the caller does not have the needed permission
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
x-go-name: Message
messageCode:
type: string
x-go-name: MessageCode
x-go-name: Error
securityDefinitions:
api_key:
type: apiKey
name: Authorization
in: header