File Coverage

blib/lib/Net/Async/WebService/lxd.pm
Criterion Covered Total %
statement 78 235 33.1
branch 4 68 5.8
condition 0 20 0.0
subroutine 23 231 9.9
pod 0 2 0.0
total 105 556 18.8


line stmt bran cond sub pod time code
1              
2             use strict;
3 3     3   348036 use warnings;
  3         26  
  3         78  
4 3     3   13  
  3         6  
  3         61  
5             use JSON;
6 3     3   12 use Data::Dumper;
  3         8  
  3         12  
7 3     3   228  
  3         4  
  3         787  
8             my ($elf, $lxd, %params) = @_;
9             my $wait = delete $params{wait} // 1;
10 0     0   0 my $f = $lxd->instance_state( project => $elf->{project}, name => $elf->{name} );
11 0   0     0  
12 0         0 if ($wait) {
13             return $f->get;
14 0 0       0 } else {
15 0         0 return $f;
16             }
17 0         0 }
18              
19             return _action(shift, shift, "restart", @_);
20             }
21             return _action(shift, shift, "start", @_);
22 0     0   0 }
23             return _action(shift, shift, "stop", @_);
24             }
25 0     0   0 return _action(shift, shift, "freeze", @_);
26             }
27             return _action(shift, shift, "unfreeze", @_);
28 0     0   0 }
29              
30             my ($elf, $lxd, $action, %params) = @_;
31 0     0   0 $params{stateful} //= JSON::false;
32             $params{force} //= JSON::false;
33             $params{timeout} //= 30;
34 0     0   0 my $wait = delete $params{wait} // 1;
35              
36             my $f = $lxd->instance_state( project => $elf->{project},
37             name => $elf->{name},
38 0     0   0 body => {
39 0   0     0 action => $action,
40 0   0     0 %params,
41 0   0     0 } );
42 0   0     0 if ($wait) {
43             return $f->get;
44             } else {
45             return $f;
46 0         0 }
47             }
48              
49             1;
50 0 0       0  
51 0         0  
52             use strict;
53 0         0 use warnings;
54              
55             use Data::Dumper;
56             $Data::Dumper::Indent = 1;
57              
58             our $VERSION = '0.02';
59              
60             use Encode qw(encode_utf8);
61 3     3   17 use JSON;
  3         5  
  3         52  
62 3     3   10 use HTTP::Status qw(:constants);
  3         5  
  3         63  
63              
64 3     3   12 use Moose;
  3         4  
  3         145  
65              
66              
67             use Log::Log4perl qw(:easy);
68             Log::Log4perl->easy_init($DEBUG);
69 3     3   1271 no warnings 'once';
  3         36286  
  3         195  
70 3     3   17 our $log = Log::Log4perl->get_logger("nawl");
  3         6  
  3         13  
71 3     3   1434  
  3         11570  
  3         934  
72              
73 3     3   1371 has 'loop' => (isa => 'IO::Async::Loop', is => 'ro' );
  3         1200125  
  3         18  
74             has '_http' => (isa => 'Net::Async::HTTP', is => 'ro' );
75             has 'endpoint' => (isa => 'Str', is => 'ro' );
76 3     3   23252 has '_SSL_' => (isa => 'HashRef', default => sub { {} }, is => 'rw');
  3         149576  
  3         14  
77             has 'polling_time' => (isa => 'Int', default => 1, is => 'rw' );
78 3     3   1995 has '_timer' => (isa => 'IO::Async::Timer::Periodic', is => 'ro' );
  3         6  
  3         952  
79             has '_pendings' => (isa => 'HashRef', default => sub { {} }, is => 'rw');
80              
81             # need it for now
82             has 'project' => (isa => 'Str', is => 'ro');
83              
84             around BUILDARGS => sub {
85             my $orig = shift;
86             my $class = shift;
87              
88             my %options = @_; # capture all options
89             my %SSL = map { $_ => delete $options{$_} } # remove any SSL_ related ones
90             grep { $_ =~ m/^SSL_/ }
91             keys %options;
92             return $class->$orig (%options,
93             '_SSL_' => \%SSL, # tuck them into ONE hash
94             );
95             };
96              
97              
98             my $elf = shift;
99            
100             use Net::Async::HTTP;
101             my $http = Net::Async::HTTP->new(
102             %{ $elf->{'_SSL_'} } # expand all SSL related options
103             );
104             #-- add http resolver
105             $elf->{loop}->add( $http );
106             $elf->{_http} = $http; # keep it handy
107             #-- add timer for background operation
108 0     0 0 0 use IO::Async::Timer::Periodic;
109             my $timer = IO::Async::Timer::Periodic->new(
110 3     3   1761 interval => $elf->{polling_time},
  3         305142  
  3         220  
111             on_tick => sub {
112 0         0 my $pendings = $elf->{_pendings};
  0         0  
113             #warn "current pendings ".Dumper [ keys %$pendings ];
114             if (scalar %$pendings) { # only if we have open issues
115 0         0 my $ops = $elf->operations_recursion1( $elf->{project}? (project => $elf->{project}) : () )->get;
116 0         0 #warn "analyzing operations ".Dumper $ops;
117             foreach my $op (@{ $ops->{success} }, @{ $ops->{failure} }) {
118 3     3   2056 next unless $pendings->{ $op->{id} }; # we must be waiting for it, others will be ignored
  3         2739  
  3         2058  
119             if ($op->{status} eq 'Success') { # the good guys
120             my $res;
121             if (my $outs = $op->{metadata}->{output}) { # if there is something which produced some output
122 0     0   0 foreach my $log (values %$outs) { # iterate over all the REST uris
123             $log =~ m{/instances/(.+?)/logs/(.+\.(stdout|stderr))}; # fetch container and log file from it # TODO: relax?
124 0 0       0 my $name = $1;
125 0 0       0 my $logfile = $2;
126             my $key = $3;
127 0         0 $res->{$key} = $elf->instance_log( # fetch the actual contents
  0         0  
  0         0  
128 0 0       0 $elf->{project} ? (project => $elf->{project}) : (),
129 0 0       0 name => $name,
    0          
130 0         0 filename => $logfile,
131 0 0       0 )->get;
132 0         0 $elf->delete_instance_log( # clean up
133 0         0 $elf->{project} ? (project => $elf->{project}) : (),
134 0         0 name => $name,
135 0         0 filename => $logfile,
136 0         0 )->get;
137             }
138 0 0       0 # } elsif ($op->{metadata} && scalar %{ $op->{metadata} }) { # if there is something interesting here
139             # $res = $op->{metadata}; # not sure whether we ever arrive here
140             } else {
141             $res = 'success'; # boring
142             }
143 0 0       0 $pendings->{ $op->{id} }->{future}->done( $res ); # now it's done
144              
145             } elsif ($op->{status} eq 'Failure') {
146             $pendings->{ $op->{id} }->{future}->fail( $op->{err} );
147              
148             } else {
149             $log->die("we should not be here");
150             }
151 0         0 delete $pendings->{ $op->{id} }; # delete this id from the local pendings
152             # $elf->delete_operation( id => $op->{id} )->get; # purge operation from server
153 0         0 }
154              
155              
156 0         0 # map { delete $pendings->{ $_->{id} } } # delete this id from the local pendings
157             # map { $pendings->{ $_->{id} }->{future}->done( 'success' ) && $_ } # tunnel id, and set the future to done
158             # grep { $pendings->{ $_->{id} } } # only look at those pendings we have open
159 0         0 # #map { warn Dumper $_ && $_ }
160             # @{ $ops->{success} }; # iterate over all recent success
161 0         0  
162             # map { delete $pendings->{ $_->{id} } } # delete this id from the local pendings
163             # #map { warn Dumper $_ }
164             # map { $pendings->{ $_->{id} }->{future}->fail( $_->{err} ) && $_ } # tunnel id, and set the future to fail
165             # grep { $pendings->{$_->{id}} } # only look at those pendings we have open
166             # @{ $ops->{failure} }; # iterate over all recent failures
167             # # ignore the running ops
168             }
169              
170             },
171             );
172             $elf->{loop}->add( $timer );
173             $timer->start;
174             $elf->{_timer} = $timer;
175             }
176              
177             my $yaml = shift;
178              
179             $yaml =~ s|(\S+?(\{\S+?\}\S*?)+?):|"$1":|msg;
180             # $yaml =~ s|(x-go-name)|"$1"|g;
181 0         0 $yaml =~ s{( +- )(description)}{"$1\n" . " " x length($1) . $2 }esg;
182 0         0 foreach my $attr (qw(description title example)) {
183 0         0 $yaml =~ s{((\ +)($attr):([^\n]+?))(\n(\ +)(.+?)\n)}
184 0         0 { $1
185             . ( $4 eq ' |-' # or length($2) == 1
186             ? ( $5 )
187             :
188 3     3   6 # length($2)." ".length($6). " for $3 $5 $7".
189             ( length($2) >= length($6)
190 3         19598442 ? $5
191             : " $7\n"
192 3         6812 )
  990         11369  
193 3         35 )
194 9 100       1005 }xegs;
  9552 100       77717  
195             }
196             $yaml =~ s/^-/ -/msg;
197             $yaml = "---\n$yaml";
198             }
199              
200             my $data = do { local $/; <DATA> };
201             my $yaml = _fix_broken_YAML( $data );
202             # write_file('/tmp/xxx.yaml', $yaml);
203              
204             use YAML;
205             our $rest_api = YAML::Load( $yaml );
206 3         483 #warn Dumper [ sort keys %{ $rest_api->{paths} } ];
207 3         2495 #warn scalar keys %{ $rest_api->{paths} }; #exit;
208              
209             my $POST_translations = {
210             instances_post => 'create_instance' , # Creates a new instance on LXD.
211             images_aliases_post => 'add_images_alias' , # Creates a new image alias.
212             storage_pool_volumes_type_snapshot_post => 'rename_storage_pool_volumes_type_snapshot' , # Renames a storage volume snapshot.
213             storage_pools_post => 'create_storage_pool' , # Creates a new storage pool.
214 3     3   1471 instance_snapshot_post => 'migrate_instance_snapshot' , # Renames or migrates an instance snapshot to another server.
  3         21719  
  3         4486  
215             storage_pool_volumes_type_backup_post => 'rename_storage_pool_volumes_type_backup' , # Renames a storage volume backup.
216             images_secret_post => 'initiate_image_upload' , # This generates a background operation including a secret one time key
217             images_post_untrusted => 'push_image_untrusted' , # Pushes the data to the target image server.
218             instance_snapshots_post => 'create_instance_snapshot' , # Creates a new snapshot.
219             profiles_post => 'create_profile' , # Creates a new profile.
220             instance_files_post => 'create_instance_file' , # Creates a new file in the instance.
221             instance_post => 'migrate_instance' , # Renames, moves an instance between pools or migrates an instance to another server.
222             cluster_members_post => 'add_cluster_member' , # Requests a join token to add a cluster member.
223             instance_console_post => 'connect_instance_console' , # Connects to the console of an instance.
224             cluster_group_post => 'rename_cluster_group' , # Renames an existing cluster group.
225             network_zone_records_post => 'create_network_zone_record' , # Creates a new network zone record.
226             storage_pool_volume_type_post => 'migrate_storage_pool_volume_type' , # Renames, moves a storage volume between pools or migrates an instance to another server.
227             storage_pool_volumes_post => 'create_storage_pool_volume' , # Creates a new storage volume.
228             profile_post => 'rename_profile' , # Renames an existing profile.
229             images_export_post => 'push_images_export' , # Gets LXD to connect to a remote server and push the image to it.
230             certificates_post => 'add_certificate' , # Adds a certificate to the trust store.
231             network_zones_post => 'create_network_zone' , # Creates a new network zone.
232             certificates_post_untrusted => 'add_certificate_untrusted' , # Adds a certificate to the trust store as an untrusted user.
233             instance_backup_post => 'rename_instance_backup' , # Renames an instance backup.
234             instance_metadata_templates_post => 'create_instance_metadata_template' , # Creates a new image template file for the instance.
235             cluster_groups_post => 'create_cluster_group' , # Creates a new cluster group.
236             project_post => 'rename_project' , # Renames an existing project.
237             network_post => 'rename_network' , # Renames an existing network.
238             instance_exec_post => 'execute_in_instance' , # Executes a command inside an instance.
239             instance_backups_post => 'create_instance_backup' , # Creates a new backup.
240             cluster_member_state_post => 'restore_cluster_member_state' , # Evacuates or restores a cluster member.
241             images_post => 'create_image' , # Adds a new image to the image store.
242             cluster_member_post => 'rename_cluster_member' , # Renames an existing cluster member.
243             network_peers_post => 'create_network_peer' , # Initiates/creates a new network peering.
244             networks_post => 'create_network' , # Creates a new network.
245             images_alias_post => 'rename_images_alias' , # Renames an existing image alias.
246             projects_post => 'create_project' , # Creates a new project.
247             network_forwards_post => 'create_network_forward' , # Creates a new network address forward.
248             storage_pool_volumes_type_backups_post => 'create_storage_pool_volumes_backup' , # Creates a new storage volume backup.
249             network_acl_post => 'rename_network_acl' , # Renames an existing network ACL.
250             storage_pool_volumes_type_snapshots_post => 'create_storage_pool_volumes_snapshot' , # Creates a new storage volume snapshot.
251             storage_pool_volumes_type_post => 'create_storage_pool_volumes_type' , # Creates a new storage volume (type specific endpoint).
252             images_refresh_post => 'update_images_refresh' , # This causes LXD to check the image source server for an updated
253             network_acls_post => 'create_network_acl' , # Creates a new network ACL.
254             };
255              
256             my $meta = __PACKAGE__->meta;
257             our $META; # association between methods and what is in the spec
258              
259             my %uniq_methods; # make sure we do not duplicate method by name
260             foreach my $path ( keys %{ $rest_api->{paths} } ) {
261             my $op = $rest_api->{paths}->{ $path };
262             my @path_fields = $path =~ m/\{(.+?)\}/g; # name, id, etc.
263              
264            
265             if ($op->{get} && $op->{put}) { # possibly both can be mapped to ONE method
266             my %get_params = map { $_->{name} => $_ }
267             grep { $_->{in} eq 'query' }
268             @{ $op->{get}->{parameters} };
269             my %put_params = map { $_->{name} => $_ }
270             grep { $_->{in} eq 'query' }
271             @{ $op->{put}->{parameters} };
272             my %body_params = map { $_->{name} => $_ }
273             grep { $_->{in} eq 'body' }
274             @{ $op->{put}->{parameters} };
275             # TODO test params
276             my $opId = $op->{get}->{operationId}; $opId =~ s/_get//;
277             #warn "$opId ".Dumper \%body_params;
278             $meta->add_method( $opId => _generate_method( $path, $opId, \%get_params, $op->{get}, 'GET' ));
279             $META->{$opId} = { path => $path,
280             name => $opId,
281             opid => [ $op->{get}->{operationId}, $op->{put}->{operationId} ],
282             params => \%get_params,
283             body => \%body_params,
284             fields => \@path_fields,
285             op => [ $op->{get}, $op->{put} ],
286             tags => $op->{get}->{tags},
287             method => 'GETPUT' };
288             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
289              
290             } elsif ($op->{get}) { # only GET
291             my %get_params = map { $_->{name} => $_ }
292             grep { $_->{in} eq 'query' }
293             @{ $op->{get}->{parameters} };
294             my $opId = $op->{get}->{operationId}; $opId =~ s/_get//;
295             $meta->add_method( $opId => _generate_method( $path, $opId, \%get_params, $op->{get}, 'GET') );
296             $META->{$opId} = { path => $path,
297             name => $opId,
298             opid => $op->{get}->{operationId},
299             params => \%get_params,
300             fields => \@path_fields,
301             op => $op,
302             tags => $op->{get}->{tags},
303             method => 'GET' };
304             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
305              
306             } elsif ($op->{put}) { # only PUT
307             my %put_params = map { $_->{name} => $_ }
308             grep { $_->{in} eq 'query' }
309             @{ $op->{put}->{parameters} };
310             my %body_params = map { $_->{name} => $_ }
311             grep { $_->{in} eq 'body' }
312             @{ $op->{put}->{parameters} };
313             my $opId = $op->{put}->{operationId}; $opId =~ s/(.+)_put/update_$1/;
314             $meta->add_method( $opId => _generate_method( $path, $opId, \%put_params, $op->{put}, 'PUT') );
315             $META->{$opId} = { path => $path,
316             name => $opId,
317             opid => $op->{put}->{operationId},
318             params => \%put_params,
319             body => \%body_params,
320             fields => \@path_fields,
321             op => $op,
322             tags => $op->{put}->{tags},
323             method => 'PUT' };
324             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
325              
326             } else { # neither nor
327             }
328              
329             if ($op->{post}) {
330             my %post_params = map { $_->{name} => $_ }
331             grep { $_->{in} eq 'query' }
332             @{ $op->{post}->{parameters} };
333             my %body_params = map { $_->{name} => $_ }
334             grep { $_->{in} eq 'body' }
335             @{ $op->{post}->{parameters} };
336             my $opId = $POST_translations->{$op->{post}->{operationId}}
337             or $log->logdie( "no post translation for $op->{post}->{operationId}" );
338             #my $description = $op->{post}->{description}; $description =~ s/\n.+//s;
339             #warn sprintf "%45s => %-50s, # %-60s", $op->{post}->{operationId}, $opId, $description;
340             $meta->add_method( $opId => _generate_method( $path, $opId, \%post_params, $op->{post}, 'POST') );
341             $META->{$opId} = { path => $path,
342             name => $opId,
343             opid => $op->{post}->{operationId},
344             params => \%post_params,
345             body => \%body_params,
346             fields => \@path_fields,
347             op => $op,
348             tags => $op->{post}->{tags},
349             method => 'POST' };
350             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
351             }
352             if ($op->{delete}) {
353             my %params = map { $_->{name} => $_ }
354             grep { $_->{in} eq 'query' }
355             @{ $op->{delete}->{parameters} };
356             my $opId = $op->{delete}->{operationId}; $opId =~ s/(.+)_delete/delete_$1/;
357             #my $description = $op->{post}->{description}; $description =~ s/\n.+//s;
358             #warn sprintf "%45s => %-50s, # %-60s", $op->{post}->{operationId}, $opId, $description;
359             $meta->add_method( $opId => _generate_method( $path, $opId, \%params, $op->{delete}, 'DELETE') );
360             $META->{$opId} = { path => $path,
361             name => $opId,
362             opid => $op->{delete}->{operationId},
363             params => \%params,
364             fields => \@path_fields,
365             op => $op,
366             tags => $op->{delete}->{tags},
367             method => 'DELETE' };
368             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
369             }
370             if ($op->{patch}) {
371             my %params = map { $_->{name} => $_ }
372             grep { $_->{in} eq 'query' }
373             @{ $op->{patch}->{parameters} };
374             my %body_params = map { $_->{name} => $_ }
375             grep { $_->{in} eq 'body' }
376             @{ $op->{patch}->{parameters} };
377             my $opId = $op->{patch}->{operationId}; $opId =~ s/(.+)_patch/modify_$1/;
378             #my $description = $op->{post}->{description}; $description =~ s/\n.+//s;
379             #warn sprintf "%45s => %-50s, # %-60s", $op->{post}->{operationId}, $opId, $description;
380             $meta->add_method( $opId => _generate_method( $path, $opId, \%params, $op->{patch}, 'PATCH') );
381             $META->{$opId} = { path => $path,
382             name => $opId,
383             opid => $op->{patch}->{operationId},
384             params => \%params,
385             body => \%body_params,
386             fields => \@path_fields,
387             op => $op,
388             tags => $op->{patch}->{tags},
389             method => 'PATCH' };
390             $uniq_methods{ $opId }++ and $log->logdie( "Internal error: duplicated $opId" );
391             }
392             }
393             #warn Dumper \%uniq_methods;
394              
395             my $path = shift;
396             my $id = shift;
397             my $params = shift;
398             my $op = shift;
399             my $method = shift;
400              
401             #warn Dumper [ caller ] unless $method;
402             #warn "generate $method $path -> $id";
403             #warn Dumper [ $path, $op ] if $path eq '/1.0/instances/{name}'; # =~ /instance/;
404             return sub {
405             my $elf = shift;
406 582     582   806 my %options = @_;
407 582         731 #warn "sub options".Dumper \%options;
408 582         624  
409 582         660 my $fullpath = $path;
410 582         692 $fullpath =~ s/{(\w+)}/ delete $options{$1} /eg;
411             #warn "$path -> $fullpath";
412             # $params->{$_} or die "parameter '$_' not valid for '$path'" for keys %options; # TODO validation
413             #warn "params ".Dumper $params;
414              
415             my $wantheaders = delete $options{wantheaders};
416 0     0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
        0      
417 0           use URI;
418             my $uri = URI->new( $elf->{endpoint} . $fullpath );
419             #warn ">>> uri $uri";
420 0           $uri->query_form( $uri->query_form, # if we already have params (it happens)
421 0           # add _query_ params we received
  0            
422             map { $_ => $options{$_} }
423             grep { $params->{$_} or $_ eq 'recursion' } # allow also any recursion
424             grep { $_ ne 'body' } # body param does not go into the uri
425             keys %options
426 0           );
427              
428 3     3   28 my $req = HTTP::Request->new( ($options{body} && $method eq 'GET' ? 'PUT' : $method),
  3         7  
  3         424  
429 0           $uri );
430              
431             $options{headers}->{'Content-Type'} //= 'application/json; charset=UTF-8'; # if none is given, we assume that JSON is meant
432             $req->headers->header( %{ $options{headers} }); # set all headers
433 0            
434 0 0         # work on content body
435 0           if ($options{body}) {
  0            
436             use feature 'switch';
437             no warnings 'experimental';
438             for ($options{headers}->{'Content-Type'}) {
439 0 0 0       when ('application/json; charset=UTF-8') {
440             $req->content( encode_utf8(encode_json( $options{body} )) ) }
441              
442 0   0       when ('application/octet-stream') {
443 0           $req->content_ref( \ $options{body} ) } # pass in reference to avoid copying
  0            
444              
445             default {
446 0 0         $log->logdie( "cannot handle body with ".$options{headers}->{'Content-Type'} ) }
447 3     3   24 }
  3         5  
  3         419  
448 3     3   18 }
  3         9  
  3         2021  
449 0            
450 0           $log->debug( ">>> "._substr($req->as_string, 2000, '...') );
451 0            
452             my $f = $elf->{loop}->new_future;
453 0           $elf->{_http}->do_request( request => $req,
454 0           on_response => sub {
455             my $resp = $_[0];
456 0           $log->debug( "<<< "._substr($resp->as_string, 2000, '...') );
457 0           if ($resp->is_success) { # the HTTP req was handled ok
458             if ($resp->content_type eq 'application/json') {
459             my $data = from_json ($resp->content); # so there should be a solid json
460             if ($data->{type} eq 'sync') { # we are finished with the operation
461 0           if ($data->{status_code} == 200) { # and everything is ok from the lxd side
462             $f->done( ($data->{metadata} // lc($data->{status})), # that would be the result
463 0           ($wantheaders ? $resp->headers : ())); # and headers if required by the caller
464             } else {
465             $f->fail( $data->{error} ); # lxd sent an error
466 0     0     }
467 0           } else { # the only other option: we are not finished on the lxd server
468 0 0         #warn "not sync response ".Dumper $data;
    0          
469 0 0         $log->debug( "pending operation: ".$data->{metadata}->{description} );
    0          
    0          
470 0            
471 0 0         # my @ws = _create_websockets( $elf, $data->{metadata}->{metadata}->{fds}, $data->{operation} )
472 0 0         # if ($data->{metadata}->{class} eq 'websocket');
473 0 0 0        
474             $elf->{_pendings}->{ $data->{metadata}->{id} } = {
475             operation => $data->{operation},
476 0           future => $f,
477             # websockets => \@ws,
478             };
479             }
480 0           } elsif ($resp->content_type =~ qr/multipart/) {
481             # use File::Slurp;
482             # write_file('/tmp/mime.txt', $resp->content);
483              
484             # use MIME::Parser;
485             # my $parser = new MIME::Parser;
486             # eval {
487 0           # my $entity = $parser->parse_data($msg);
488             # $entity->dump_skeleton;
489              
490             # my %data;
491             # foreach my $p ($entity->parts) {
492             # my $dispo = $p->head->get('Content-Disposition');
493             # $dispo =~ /name="(.+?)"/;
494             # my $name = $1;
495             # if ($p->effective_type eq 'application/octet-stream') {
496             # $data{$name} = $p->body;
497             # } else {
498             # die;
499             # }
500             # }
501              
502             die "for now";
503             $f->done("whatever");
504            
505             } elsif ($resp->content_type eq 'application/octet-stream') {
506             $f->done( $resp->content, # that would be the result,
507             $wantheaders ? $resp->headers : ()); # and headers if required by the caller
508              
509             } else {
510             $log->logdie( "unhandled content type: ".$resp->content_type );
511             }
512              
513 0           } elsif (my $c = $resp->content) {
514 0           my $data = from_json ($c);
515             $f->fail( $data->{error} );
516              
517 0 0         } else {
518             $f->fail( $resp->status_line ); # something happened on the transport level
519             }
520             },
521 0           );
522             return $f;
523             }
524             }
525 0            
526 0           # sub _create_websockets {
527             # my $elf = shift;
528             # my $fds = shift;
529 0           # my $op = shift;
530            
531             # my $HOST = "192.168.3.50";
532 0           # my $PORT = 8443;
533 0            
534             # my @ws;
535 582         4018 # foreach my $key (keys %$fds) {
536              
537             # use Net::Async::WebSocket::Client;
538             # my $ws = Net::Async::WebSocket::Client->new(
539             # on_raw_frame => sub {
540             # my ( $self, $frame ) = @_;
541             # warn "XXXXXXXXXXXXXXXX recv $key $self $frame ";
542             # warn Dumper $frame;
543             # },
544             # );
545             # $elf->{loop}->add( $ws );
546             # push @ws, $ws;
547              
548             # my $url = "wss://$HOST:$PORT".$op.'/websocket?secret='.$fds->{$key};
549             # warn "ws $key $op -> $url";
550             # $ws->connect(
551             # SSL_cert_file => $elf->client_cert_file,
552             # SSL_key_file => $elf->client_key_file,
553             # SSL_fingerprint => $elf->server_fingerprint,
554             # url => $url,
555             # on_connected => sub { warn "connected websocket $key"; });
556             # }
557             # return @ws;
558             # }
559              
560              
561              
562             my ($s, $l, $r) = @_;
563             #warn "<<<$s<<< $l, $r";
564             return $s unless length($s) > $l;
565             substr($s, $l, 10000000, $r);
566             #warn " >>>$s<<<";
567             return $s;
568             }
569              
570             # warn "###########";
571             # for my $method ( $meta->get_all_methods ) {
572             # warn $method->fully_qualified_name;
573             # }
574 0     0      
575             my $SPEC_base = 'https://linuxcontainers.org/lxd/api/master/#';
576 0 0          
577 0           # print Dumper $rest_api;
578             my %tags;
579 0           map { $tags{$_}++ }
580             map { @{ $_->{tags} } } values %$META;
581             my @tags = keys %tags;
582              
583             use File::Slurp;
584              
585             my $pod = q{
586             =head1 NAME
587              
588             Net::Async::WebService::lxd - REST client (asynchronous) for lxd Linux containers
589              
590             =head1 SYNOPSIS
591 0     0 0    
592 0           use IO::Async::Loop;
593 0           my $loop = IO::Async::Loop->new;
  0            
  0            
594 0            
595             use Net::Async::WebService::lxd;
596 3     3   2588 my $lxd = Net::Async::WebService::lxd->new( loop => $loop,
  3         39464  
  3         1586  
597             endpoint => 'https://192.168.0.50:8443',
598 0           SSL_cert_file => "t/client.crt",
599             SSL_key_file => "t/client.key",
600             SSL_fingerprint => 'sha1$92:DD:63:F8:99:C4:5F:82:59:52:82:A9:09:C8:57:F0:67:56:B0:1B',
601             );
602             $lxd->create_instance(
603             body => {
604             architecture => 'x86_64',
605             profiles => [ 'default' ],
606             name => 'test1',
607             source => { type => 'image',
608             fingerprint => '6dc6aa7c8c00' }, # image already exists in image store
609             config => {},
610             } )->get; # wait for it
611             # container is still stopped
612             $lxd->instance_state( name => 'test1',
613             body => {
614             action => "start",
615             force => JSON::false,
616             stateful => JSON::false,
617             timeout => 30,
618             } )->get; # wait for it
619              
620              
621             =head1 INTERFACE
622              
623             =head2 Constructor
624              
625             The constructor returns a handle to one LXD server. It's address is specified via an B<endpoint>
626             parameter, be it of an HTTPS or of a UNIX socket kind.
627              
628             If you are working with a non-default LXD project in mind, then you should also provide that
629             project's name with the B<project> parameter. Background operation polling will make use of
630             that. Note, that when invoking any of the methods here, you will still have to specify that project,
631             unless it is the C<default> one, of course.
632              
633             As we are operating under an L<IO::Async> regime here, the handle also needs a B<loop> parameter to
634             the central event loop. The handle will also regularily poll autonomously the server which
635             operations are still running or have completed. The optional parameter B<polling_time> controls how
636             often that will occur; it will default to 1 sec, if not provided.
637              
638             As LXC can be accessed remotely only via HTTPS, TLS (SSL) parameters must be provided. These will be
639             forwarded directly to
640             L<IO::Socket::SSL|https://metacpan.org/pod/IO::Socket::SSL#Description-Of-Methods>. But, specifically,
641             one should consider to provide:
642              
643             =over
644              
645             =item * B<client certificate>, via a proper subset of C<SSL_cert_file>, C<SSL_key_file>, C<SSL_cert> and C<SSL_key>.
646             (Look at the L</HINTS> section to generate such a certificate for LXD.)
647              
648             =item * B<server fingerprint>, via C<SSL_fingerprint>
649             (Look at the L</HINTS> section how to figure this out.)
650              
651             =back
652              
653             =head2 Methods
654              
655             All methods below are automatically generated from the L<LXD REST API Spec|https://raw.githubusercontent.com/lxc/lxd/master/doc/rest-api.yaml>.
656             They should work with API version 1.0.
657              
658              
659             Let's dissect method invocations with this example:
660              
661             my $f = $lxd->instance_state( name => 'test1' );
662             my $r = $f->get;
663              
664             =over
665              
666             =item *
667              
668             All invocations return a L<Future>. Thus they can be combined, sequenced, run in "parallel", etc. If
669             you need to wait for a definite result, then you will block the flow with C<-E<gt>get>.
670              
671             Polling is done behind the scenes and will watch for all operations which either succeeded or
672             failed. Those will mark the associated future as C<done> or C<failed>. Normally, you will never need
673             to use the methods for 'Operations' yourself; they are still offered as fallback.
674              
675             =item *
676              
677             The result of each fully completed invocation is either
678              
679             =over
680              
681             =item *
682              
683             the string C<success>, or
684              
685             =item *
686              
687             a Perl HASH ref which reflects the JSON data sent from the LXD server. Note, that Booleans have to
688             be treated special, by using C<JSON::false> and C<JSON::true>. Otherwise, they follow B<exactly> the
689             structure in the specification.
690              
691             =item *
692              
693             or a HASH ref with keys C<stdin> and C<stdout> if this is a result of the C<execute_in_instance>
694             method.
695              
696             =back
697              
698             =item *
699              
700             If an operation failed, then the associated future will be failed, together with the reason of the
701             failure from the server. If you do not cater with that, then this will - as usual with C<IO::Async>
702             - raise an exception, with the failure as string.
703              
704             =item *
705              
706             Methods named like the type of server object (e.g. C<cluster>, C<certificate>, C<image>) are
707             normally "getter/setter" methods. The getter obviously returns the state of the object. The method
708             becomes a setter, if the additional C<body> field together with a Perl HASH ref is passed:
709              
710             my $f = $lxd->instance_state( name => 'test1',
711             body => {
712             action => "start",
713             force => JSON::false,
714             stateful => JSON::false,
715             timeout => 30,
716             } );
717              
718             How a specific object is addressed, is detailed in each method below; usually you provide a C<name>,
719             C<id>, C<fingerprint>, or similar. You may also have to provide a C<project>, if not being the
720             I<default project>.
721              
722             That HASH ref also follows the structure outlined in the specification for that particular endpoint.
723              
724             =item *
725              
726             Methods named like a type of server object (e.g. C<certificates>) normally return a list of
727             identifiers for such objects.
728              
729             =item *
730              
731             Many methods request changes in the LXD server. The names are taken from the specification, but are
732             adapted to better reflect what is intended:
733              
734             =over
735              
736             =item *
737              
738             Methods which change the state of the remote object usually are called C<modify>_I<something>.
739              
740             =item *
741              
742             Methods which add a new object to a collection are usually called C<add>_I<something>, or
743             C<create>_I<something>, depending on how it sounds better.
744              
745             =item *
746              
747             Methods which remove an object from a collection are usually called C<delete>_I<something>.
748              
749             =back
750              
751             =back
752              
753             };
754              
755             foreach my $tag (sort @tags) {
756             my $Tag = ucfirst( $tag );
757             $Tag =~ s/-/ /g;
758             $Tag =~ s/acl/ACL/;
759             $Tag =~ s/( \S)/ uc($1)/ge;
760              
761             $pod .= qq{=head2 $Tag
762              
763             =over
764              
765             };
766              
767             foreach my $method (sort { $a->{name} cmp $b->{name} }
768 0           grep { $_->{tags}->[0] eq $tag } # this chapter
769 0           values %$META ) { # all
770 0           $pod .= qq{=item * B<$method->{name}>
771 0            
772 0           };
  0            
773             #$pod .= Dumper $method;
774 0           if ($method->{method} eq 'GETPUT') {
775             $pod .= $method->{op}->[0]->{description};
776             # $pod .= qq{ [L <Spec|${SPEC_base}/$method->{tags}->[0]/$method->{opid}->[0]> ]};
777             $pod .= "\n\n";
778             $pod .= $method->{op}->[1]->{description};
779             # $pod .= qq{ [L <Spec|${SPEC_base}/$method->{tags}->[0]/$method->{opid}->[1]> ]};
780 0           $pod .= "\n\n";
  0            
781 0           } else {
782             $pod .= $method->{op}->{ lc( $method->{method} ) }->{description};
783 0            
784             $log->debug( "XXXX $method->{opid} ") unless $method->{tags}->[0];
785             $log->debug( "YYYY $method->{opid} ".Dumper $method) unless $method->{opid};
786              
787 0 0         # $pod .= qq{ [L <Spec|${SPEC_base}/$method->{tags}->[0]/$method->{opid}> ]};
788 0           $pod .= "\n\n";
789             }
790 0           $pod .= q{=over
791 0            
792             };
793 0           foreach my $p (sort @{ $method->{fields} }) {
794             $pod .= qq{=item C<$p>: string, required
795 0            
796             };
797 0 0         }
798 0 0         foreach my $p (sort keys %{ $method->{params} }) {
799             # my $params = ref($method->{op}) eq 'ARRAY' ? $method->{op}->[1]->{parameters} : $method->{op}->{parameters};
800             #$pod .= Dumper $params;
801 0           my $docp = $method->{params}->{$p};
802             #$pod .= Dumper $docp;
803 0           $pod .= qq{=item C<$p>: } . ($docp->{type} ? $docp->{type} : "see Spec") . ', ' . ($docp->{required} ? "required" : "optional") . q{
804              
805             };
806 0           }
  0            
807 0           #warn "xxxx".Dumper $method->{body};
808             foreach my $p (sort keys %{ $method->{body} }) {
809             #warn "\\_ $p";
810             # my $params = ref($method->{op}) eq 'ARRAY' ? $method->{op}->[1]->{parameters} : $method->{op}->{parameters};
811 0           #$pod .= Dumper $params;
  0            
812             my $docp = $method->{body}->{$p};
813             #warn "\\_ ".Dumper $docp;
814 0           #$pod .= Dumper $docp;
815             $pod .= qq{=item C<body>: $p};
816 0 0         $pod .= ', ' . ($docp->{required} ? "required" : "optional");
    0          
817             if ($docp->{type}) {
818             $pod .= ", ".$docp->{type};
819             } elsif ($docp->{schema}) {
820             if (my $s = $docp->{schema}->{'$ref'}) {
821 0           $s =~ s{\#/definitions/}{};
  0            
822              
823             my $h = shift;
824             use YAML qw(Dump);
825 0           return
826             "\n\n"
827             # ."=begin text\n"
828 0           .( join "\n",
829 0 0         map { " $_" }
830 0 0         grep { $_ !~ /x-go-/ }
    0          
831 0           grep { $_ !~ /---/ }
832             split /\n/,
833 0 0         Dump ($h)
834 0           )
835             # ."\n=end text\n"
836             ;
837 0     0     }
838 3     3   24  
  3         8  
  3         1654  
839             $pod .= _format_yaml_pod( $rest_api->{definitions}->{$s} );
840             } else {
841             $pod .= _format_yaml_pod( $docp->{schema} );
842             }
843 0           } else {
844 0           $pod .= "see Spec";
845 0           }
  0            
846             $pod .= "\n\n";
847             }
848              
849             $pod .= q{
850              
851             =back
852              
853 0           };
854             }
855 0          
856             $pod .= q{
857              
858 0           =back
859              
860 0           };
861              
862             }
863 0            
864             $pod .= q{
865              
866             =head1 PSEUDO OBJECT ORIENTATION
867              
868             Just for the sake of experimentation, I added a sub-package C<lxd::instance>. To add OO-flavour, you
869             simply bless the instance HASH with it:
870 0            
871             my $r = $lxd->instance( name => "my-container" )->get;
872             my $i = bless $r, 'lxd::instance';
873              
874             From then on, the following methods can operate on it:
875              
876             =over
877              
878 0           =item * C<restart>
879              
880             =item * C<start>
881              
882             =item * C<freeze>
883              
884             =item * C<unfreeze>
885              
886             =item * C<stop>
887              
888             =item * C<state>
889              
890             =back
891              
892             Well, I'm not a big fan of objects.
893              
894              
895             =head1 EXAMPLES
896              
897             I encourage you to look at the C<02_instances.t> test suite. It will show a complete life cycle for
898             containers.
899              
900             =head1 SEE ALSO
901              
902             =over
903              
904             =item * L<Linux::LXC>
905              
906             uses actually the existing lxc client to get the information
907              
908             =item * L<https://github.com/jipipayo/Linux-REST-LXD>
909              
910             pretty old, never persued
911              
912             =back
913              
914              
915             =head1 HINTS
916              
917             =over
918              
919             =item * How to generate an SSL client certificate for LXD
920              
921             First, I found one client certificate (plus the key) in my installation at:
922              
923             /root/snap/lxd/common/config/
924              
925             Alternatively, L<you can run your own small CA, generate a .crt and .key for a client, and then
926             add it to lxd to trust it|https://serverfault.com/questions/882880/authenticate-to-lxd-rest-api-over-network-certificate-auth-keeps-failing>.
927              
928             More on this topic is L<here|https://linuxcontainers.org/lxd/docs/master/authentication/>
929              
930             =item * How to find the SSL fingerprint for an LXD server
931              
932             With recent versions of LXD this is fairly easy:
933              
934             $ lxc info|grep fingerprint
935              
936             It is a SHA265 hash, so you will have to prefix it with C<sha256$> (no blanks) when you pass it to C<SSL_fingerprint>.
937              
938             Alternatively, you can try to find the server certificate and use C<openssl> to derive a fingerprint of your choice.
939              
940             =back
941              
942             =head1 ISSUES
943              
944             Open issues are probably best put onto L<Github|https://github.com/drrrho/net-async-webservice-lxd>
945              
946             =head1 AUTHOR
947              
948             Robert Barta, C<< <rho at devc.at> >>
949              
950             =head1 CREDITS
951              
952             L<IO::Async>, L<Net::Async::HTTP>, L<IO::Socket::SSL> and friends are amazing.
953              
954             =head1 LICENSE AND COPYRIGHT
955              
956             Copyright 2022 Robert Barta.
957              
958             }
959             .
960             read_file("LICENSE")
961             ;
962             print $pod;
963             }
964              
965              
966             1; # End of Net::Async::WebService::lxd
967              
968             definitions:
969             Certificate:
970             description: Certificate represents a LXD certificate
971             properties:
972             certificate:
973             description: The certificate itself, as PEM encoded X509
974             example: X509 PEM certificate
975             type: string
976 0           x-go-name: Certificate
977             fingerprint:
978             description: SHA256 fingerprint of the certificate
979             example: fd200419b271f1dc2a5591b693cc5774b7f234e1ff8c6b78ad703b6888fe2b69
980             readOnly: true
981             type: string
982             x-go-name: Fingerprint
983             name:
984             description: Name associated with the certificate
985             example: castiana
986             type: string
987             x-go-name: Name
988             projects:
989             description: List of allowed projects (applies when restricted)
990             example:
991             - default
992             - foo
993             - bar
994             items:
995             type: string
996             type: array
997             x-go-name: Projects
998             restricted:
999             description: Whether to limit the certificate to listed projects
1000             example: true
1001             type: boolean
1002             x-go-name: Restricted
1003             type:
1004             description: Usage type for the certificate (only client currently)
1005             example: client
1006             type: string
1007             x-go-name: Type
1008             type: object
1009             x-go-package: github.com/lxc/lxd/shared/api
1010             CertificateAddToken:
1011             properties:
1012             addresses:
1013             description: The addresses of the server
1014             example:
1015             - 10.98.30.229:8443
1016             items:
1017             type: string
1018             type: array
1019             x-go-name: Addresses
1020             client_name:
1021             description: The name of the new client
1022             example: user@host
1023             type: string
1024             x-go-name: ClientName
1025             fingerprint:
1026             description: The fingerprint of the network certificate
1027             example: 57bb0ff4340b5bb28517e062023101adf788c37846dc8b619eb2c3cb4ef29436
1028             type: string
1029             x-go-name: Fingerprint
1030             secret:
1031             description: The random join secret
1032             example: 2b2284d44db32675923fe0d2020477e0e9be11801ff70c435e032b97028c35cd
1033             type: string
1034             x-go-name: Secret
1035             title: CertificateAddToken represents the fields contained within an encoded certificate
1036             add token.
1037             type: object
1038             x-go-package: github.com/lxc/lxd/shared/api
1039             CertificatePut:
1040             description: CertificatePut represents the modifiable fields of a LXD certificate
1041             properties:
1042             certificate:
1043             description: The certificate itself, as PEM encoded X509
1044             example: X509 PEM certificate
1045             type: string
1046             x-go-name: Certificate
1047             name:
1048             description: Name associated with the certificate
1049             example: castiana
1050             type: string
1051             x-go-name: Name
1052             projects:
1053             description: List of allowed projects (applies when restricted)
1054             example:
1055             - default
1056             - foo
1057             - bar
1058             items:
1059             type: string
1060             type: array
1061             x-go-name: Projects
1062             restricted:
1063             description: Whether to limit the certificate to listed projects
1064             example: true
1065             type: boolean
1066             x-go-name: Restricted
1067             type:
1068             description: Usage type for the certificate (only client currently)
1069             example: client
1070             type: string
1071             x-go-name: Type
1072             type: object
1073             x-go-package: github.com/lxc/lxd/shared/api
1074             CertificatesPost:
1075             description: CertificatesPost represents the fields of a new LXD certificate
1076             properties:
1077             certificate:
1078             description: The certificate itself, as PEM encoded X509
1079             example: X509 PEM certificate
1080             type: string
1081             x-go-name: Certificate
1082             name:
1083             description: Name associated with the certificate
1084             example: castiana
1085             type: string
1086             x-go-name: Name
1087             password:
1088             description: Server trust password (used to add an untrusted client)
1089             example: blah
1090             type: string
1091             x-go-name: Password
1092             projects:
1093             description: List of allowed projects (applies when restricted)
1094             example:
1095             - default
1096             - foo
1097             - bar
1098             items:
1099             type: string
1100             type: array
1101             x-go-name: Projects
1102             restricted:
1103             description: Whether to limit the certificate to listed projects
1104             example: true
1105             type: boolean
1106             x-go-name: Restricted
1107             token:
1108             description: Whether to create a certificate add token
1109             example: true
1110             type: boolean
1111             x-go-name: Token
1112             type:
1113             description: Usage type for the certificate (only client currently)
1114             example: client
1115             type: string
1116             x-go-name: Type
1117             type: object
1118             x-go-package: github.com/lxc/lxd/shared/api
1119             Cluster:
1120             properties:
1121             enabled:
1122             description: Whether clustering is enabled
1123             example: true
1124             type: boolean
1125             x-go-name: Enabled
1126             member_config:
1127             description: List of member configuration keys (used during join)
1128             example: []
1129             items:
1130             $ref: '#/definitions/ClusterMemberConfigKey'
1131             type: array
1132             x-go-name: MemberConfig
1133             server_name:
1134             description: Name of the cluster member answering the request
1135             example: lxd01
1136             type: string
1137             x-go-name: ServerName
1138             title: Cluster represents high-level information about a LXD cluster.
1139             type: object
1140             x-go-package: github.com/lxc/lxd/shared/api
1141             ClusterCertificatePut:
1142             description: ClusterCertificatePut represents the certificate and key pair for
1143             all members in a LXD Cluster
1144             properties:
1145             cluster_certificate:
1146             description: The new certificate (X509 PEM encoded) for the cluster
1147             example: X509 PEM certificate
1148             type: string
1149             x-go-name: ClusterCertificate
1150             cluster_certificate_key:
1151             description: The new certificate key (X509 PEM encoded) for the cluster
1152             example: X509 PEM certificate key
1153             type: string
1154             x-go-name: ClusterCertificateKey
1155             type: object
1156             x-go-package: github.com/lxc/lxd/shared/api
1157             ClusterGroup:
1158             properties:
1159             description:
1160             description: The description of the cluster group
1161             example: amd64 servers
1162             type: string
1163             x-go-name: Description
1164             members:
1165             description: List of members in this group
1166             example:
1167             - node1
1168             - node3
1169             items:
1170             type: string
1171             type: array
1172             x-go-name: Members
1173             name:
1174             description: The new name of the cluster group
1175             example: group1
1176             type: string
1177             x-go-name: Name
1178             title: ClusterGroup represents a cluster group.
1179             type: object
1180             x-go-package: github.com/lxc/lxd/shared/api
1181             ClusterGroupPost:
1182             properties:
1183             name:
1184             description: The new name of the cluster group
1185             example: group1
1186             type: string
1187             x-go-name: Name
1188             title: ClusterGroupPost represents the fields required to rename a cluster group.
1189             type: object
1190             x-go-package: github.com/lxc/lxd/shared/api
1191             ClusterGroupPut:
1192             properties:
1193             description:
1194             description: The description of the cluster group
1195             example: amd64 servers
1196             type: string
1197             x-go-name: Description
1198             members:
1199             description: List of members in this group
1200             example:
1201             - node1
1202             - node3
1203             items:
1204             type: string
1205             type: array
1206             x-go-name: Members
1207             title: ClusterGroupPut represents the modifiable fields of a cluster group.
1208             type: object
1209             x-go-package: github.com/lxc/lxd/shared/api
1210             ClusterGroupsPost:
1211             properties:
1212             description:
1213             description: The description of the cluster group
1214             example: amd64 servers
1215             type: string
1216             x-go-name: Description
1217             members:
1218             description: List of members in this group
1219             example:
1220             - node1
1221             - node3
1222             items:
1223             type: string
1224             type: array
1225             x-go-name: Members
1226             name:
1227             description: The new name of the cluster group
1228             example: group1
1229             type: string
1230             x-go-name: Name
1231             title: ClusterGroupsPost represents the fields available for a new cluster group.
1232             type: object
1233             x-go-package: github.com/lxc/lxd/shared/api
1234             ClusterMember:
1235             properties:
1236             architecture:
1237             description: The primary architecture of the cluster member
1238             example: x86_64
1239             type: string
1240             x-go-name: Architecture
1241             config:
1242             additionalProperties:
1243             type: string
1244             description: Additional configuration information
1245             example:
1246             scheduler.instance: all
1247             type: object
1248             x-go-name: Config
1249             database:
1250             description: Whether the cluster member is a database server
1251             example: true
1252             type: boolean
1253             x-go-name: Database
1254             description:
1255             description: Cluster member description
1256             example: AMD Epyc 32c/64t
1257             type: string
1258             x-go-name: Description
1259             failure_domain:
1260             description: Name of the failure domain for this cluster member
1261             example: rack1
1262             type: string
1263             x-go-name: FailureDomain
1264             groups:
1265             description: List of cluster groups this member belongs to
1266             example:
1267             - group1
1268             - group2
1269             items:
1270             type: string
1271             type: array
1272             x-go-name: Groups
1273             message:
1274             description: Additional status information
1275             example: fully operational
1276             type: string
1277             x-go-name: Message
1278             roles:
1279             description: List of roles held by this cluster member
1280             example:
1281             - database
1282             items:
1283             type: string
1284             type: array
1285             x-go-name: Roles
1286             server_name:
1287             description: Name of the cluster member
1288             example: lxd01
1289             type: string
1290             x-go-name: ServerName
1291             status:
1292             description: Current status
1293             example: Online
1294             type: string
1295             x-go-name: Status
1296             url:
1297             description: URL at which the cluster member can be reached
1298             example: https://10.0.0.1:8443
1299             type: string
1300             x-go-name: URL
1301             title: ClusterMember represents the a LXD node in the cluster.
1302             type: object
1303             x-go-package: github.com/lxc/lxd/shared/api
1304             ClusterMemberConfigKey:
1305             description: |-
1306             The Value field is empty when getting clustering information with GET
1307             1.0/cluster, and should be filled by the joining node when performing a PUT
1308             1.0/cluster join request.
1309             properties:
1310             description:
1311             description: A human friendly description key
1312             example: '"source" property for storage pool "local"'
1313             type: string
1314             x-go-name: Description
1315             entity:
1316             description: The kind of configuration key (network, storage-pool, ...)
1317             example: storage-pool
1318             type: string
1319             x-go-name: Entity
1320             key:
1321             description: The name of the key
1322             example: source
1323             type: string
1324             x-go-name: Key
1325             name:
1326             description: The name of the object requiring this key
1327             example: local
1328             type: string
1329             x-go-name: Name
1330             value:
1331             description: The value on the answering cluster member
1332             example: /dev/sdb
1333             type: string
1334             x-go-name: Value
1335             title: |-
1336             ClusterMemberConfigKey represents a single config key that a new member of
1337             the cluster is required to provide when joining.
1338             type: object
1339             x-go-package: github.com/lxc/lxd/shared/api
1340             ClusterMemberJoinToken:
1341             properties:
1342             addresses:
1343             description: The addresses of existing online cluster members
1344             example:
1345             - 10.98.30.229:8443
1346             items:
1347             type: string
1348             type: array
1349             x-go-name: Addresses
1350             fingerprint:
1351             description: The fingerprint of the network certificate
1352             example: 57bb0ff4340b5bb28517e062023101adf788c37846dc8b619eb2c3cb4ef29436
1353             type: string
1354             x-go-name: Fingerprint
1355             secret:
1356             description: The random join secret.
1357             example: 2b2284d44db32675923fe0d2020477e0e9be11801ff70c435e032b97028c35cd
1358             type: string
1359             x-go-name: Secret
1360             server_name:
1361             description: The name of the new cluster member
1362             example: lxd02
1363             type: string
1364             x-go-name: ServerName
1365             title: ClusterMemberJoinToken represents the fields contained within an encoded
1366             cluster member join token.
1367             type: object
1368             x-go-package: github.com/lxc/lxd/shared/api
1369             ClusterMemberPost:
1370             properties:
1371             server_name:
1372             description: The new name of the cluster member
1373             example: lxd02
1374             type: string
1375             x-go-name: ServerName
1376             title: ClusterMemberPost represents the fields required to rename a LXD node.
1377             type: object
1378             x-go-package: github.com/lxc/lxd/shared/api
1379             ClusterMemberPut:
1380             description: ClusterMemberPut represents the the modifiable fields of a LXD cluster
1381             member
1382             properties:
1383             config:
1384             additionalProperties:
1385             type: string
1386             description: Additional configuration information
1387             example:
1388             scheduler.instance: all
1389             type: object
1390             x-go-name: Config
1391             description:
1392             description: Cluster member description
1393             example: AMD Epyc 32c/64t
1394             type: string
1395             x-go-name: Description
1396             failure_domain:
1397             description: Name of the failure domain for this cluster member
1398             example: rack1
1399             type: string
1400             x-go-name: FailureDomain
1401             groups:
1402             description: List of cluster groups this member belongs to
1403             example:
1404             - group1
1405             - group2
1406             items:
1407             type: string
1408             type: array
1409             x-go-name: Groups
1410             roles:
1411             description: List of roles held by this cluster member
1412             example:
1413             - database
1414             items:
1415             type: string
1416             type: array
1417             x-go-name: Roles
1418             type: object
1419             x-go-package: github.com/lxc/lxd/shared/api
1420             ClusterMemberStatePost:
1421             properties:
1422             action:
1423             description: The action to be performed. Valid actions are "evacuate" and
1424             "restore".
1425             example: evacuate
1426             type: string
1427             x-go-name: Action
1428             title: ClusterMemberStatePost represents the fields required to evacuate a cluster
1429             member.
1430             type: object
1431             x-go-package: github.com/lxc/lxd/shared/api
1432             ClusterMembersPost:
1433             properties:
1434             server_name:
1435             description: The name of the new cluster member
1436             example: lxd02
1437             type: string
1438             x-go-name: ServerName
1439             title: ClusterMembersPost represents the fields required to request a join token
1440             to add a member to the cluster.
1441             type: object
1442             x-go-package: github.com/lxc/lxd/shared/api
1443             ClusterPut:
1444             description: |-
1445             ClusterPut represents the fields required to bootstrap or join a LXD
1446             cluster.
1447             properties:
1448             cluster_address:
1449             description: The address of the cluster you wish to join
1450             example: 10.0.0.1:8443
1451             type: string
1452             x-go-name: ClusterAddress
1453             cluster_certificate:
1454             description: The expected certificate (X509 PEM encoded) for the cluster
1455             example: X509 PEM certificate
1456             type: string
1457             x-go-name: ClusterCertificate
1458             cluster_password:
1459             description: The trust password of the cluster you're trying to join
1460             example: blah
1461             type: string
1462             x-go-name: ClusterPassword
1463             enabled:
1464             description: Whether clustering is enabled
1465             example: true
1466             type: boolean
1467             x-go-name: Enabled
1468             member_config:
1469             description: List of member configuration keys (used during join)
1470             example: []
1471             items:
1472             $ref: '#/definitions/ClusterMemberConfigKey'
1473             type: array
1474             x-go-name: MemberConfig
1475             server_address:
1476             description: The local address to use for cluster communication
1477             example: 10.0.0.2:8443
1478             type: string
1479             x-go-name: ServerAddress
1480             server_name:
1481             description: Name of the cluster member answering the request
1482             example: lxd01
1483             type: string
1484             x-go-name: ServerName
1485             type: object
1486             x-go-package: github.com/lxc/lxd/shared/api
1487             Event:
1488             description: Event represents an event entry (over websocket)
1489             properties:
1490             location:
1491             description: Originating cluster member
1492             example: lxd01
1493             type: string
1494             x-go-name: Location
1495             metadata:
1496             description: JSON encoded metadata (see EventLogging, EventLifecycle or Operation)
1497             example:
1498             action: instance-started
1499             context: {}
1500             source: /1.0/instances/c1
1501             type: object
1502             x-go-name: Metadata
1503             project:
1504             description: Project the event belongs to.
1505             example: default
1506             type: string
1507             x-go-name: Project
1508             timestamp:
1509             description: Time at which the event was sent
1510             example: "2021-02-24T19:00:45.452649098-05:00"
1511             format: date-time
1512             type: string
1513             x-go-name: Timestamp
1514             type:
1515             description: Event type (one of operation, logging or lifecycle)
1516             example: lifecycle
1517             type: string
1518             x-go-name: Type
1519             type: object
1520             x-go-package: github.com/lxc/lxd/shared/api
1521             Image:
1522             description: Image represents a LXD image
1523             properties:
1524             aliases:
1525             description: List of aliases
1526             items:
1527             $ref: '#/definitions/ImageAlias'
1528             type: array
1529             x-go-name: Aliases
1530             architecture:
1531             description: Architecture
1532             example: x86_64
1533             type: string
1534             x-go-name: Architecture
1535             auto_update:
1536             description: Whether the image should auto-update when a new build is available
1537             example: true
1538             type: boolean
1539             x-go-name: AutoUpdate
1540             cached:
1541             description: Whether the image is an automatically cached remote image
1542             example: true
1543             type: boolean
1544             x-go-name: Cached
1545             created_at:
1546             description: When the image was originally created
1547             example: "2021-03-23T20:00:00-04:00"
1548             format: date-time
1549             type: string
1550             x-go-name: CreatedAt
1551             expires_at:
1552             description: When the image becomes obsolete
1553             example: "2025-03-23T20:00:00-04:00"
1554             format: date-time
1555             type: string
1556             x-go-name: ExpiresAt
1557             filename:
1558             description: Original filename
1559             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb.rootfs
1560             type: string
1561             x-go-name: Filename
1562             fingerprint:
1563             description: Full SHA-256 fingerprint
1564             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1565             type: string
1566             x-go-name: Fingerprint
1567             last_used_at:
1568             description: Last time the image was used
1569             example: "2021-03-22T20:39:00.575185384-04:00"
1570             format: date-time
1571             type: string
1572             x-go-name: LastUsedAt
1573             profiles:
1574             description: List of profiles to use when creating from this image (if none
1575             provided by user)
1576             example:
1577             - default
1578             items:
1579             type: string
1580             type: array
1581             x-go-name: Profiles
1582             properties:
1583             additionalProperties:
1584             type: string
1585             description: Descriptive properties
1586             example:
1587             os: Ubuntu
1588             release: focal
1589             variant: cloud
1590             type: object
1591             x-go-name: Properties
1592             public:
1593             description: Whether the image is available to unauthenticated users
1594             example: false
1595             type: boolean
1596             x-go-name: Public
1597             size:
1598             description: Size of the image in bytes
1599             example: 272237676
1600             format: int64
1601             type: integer
1602             x-go-name: Size
1603             type:
1604             description: Type of image (container or virtual-machine)
1605             example: container
1606             type: string
1607             x-go-name: Type
1608             update_source:
1609             $ref: '#/definitions/ImageSource'
1610             uploaded_at:
1611             description: When the image was added to this LXD server
1612             example: "2021-03-24T14:18:15.115036787-04:00"
1613             format: date-time
1614             type: string
1615             x-go-name: UploadedAt
1616             type: object
1617             x-go-package: github.com/lxc/lxd/shared/api
1618             ImageAlias:
1619             description: ImageAlias represents an alias from the alias list of a LXD image
1620             properties:
1621             description:
1622             description: Description of the alias
1623             example: Our preferred Ubuntu image
1624             type: string
1625             x-go-name: Description
1626             name:
1627             description: Name of the alias
1628             example: ubuntu-20.04
1629             type: string
1630             x-go-name: Name
1631             type: object
1632             x-go-package: github.com/lxc/lxd/shared/api
1633             ImageAliasesEntry:
1634             description: ImageAliasesEntry represents a LXD image alias
1635             properties:
1636             description:
1637             description: Alias description
1638             example: Our preferred Ubuntu image
1639             type: string
1640             x-go-name: Description
1641             name:
1642             description: Alias name
1643             example: ubuntu-20.04
1644             type: string
1645             x-go-name: Name
1646             target:
1647             description: Target fingerprint for the alias
1648             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1649             type: string
1650             x-go-name: Target
1651             type:
1652             description: Alias type (container or virtual-machine)
1653             example: container
1654             type: string
1655             x-go-name: Type
1656             type: object
1657             x-go-package: github.com/lxc/lxd/shared/api
1658             ImageAliasesEntryPost:
1659             description: ImageAliasesEntryPost represents the required fields to rename a
1660             LXD image alias
1661             properties:
1662             name:
1663             description: Alias name
1664             example: ubuntu-20.04
1665             type: string
1666             x-go-name: Name
1667             type: object
1668             x-go-package: github.com/lxc/lxd/shared/api
1669             ImageAliasesEntryPut:
1670             description: ImageAliasesEntryPut represents the modifiable fields of a LXD image
1671             alias
1672             properties:
1673             description:
1674             description: Alias description
1675             example: Our preferred Ubuntu image
1676             type: string
1677             x-go-name: Description
1678             target:
1679             description: Target fingerprint for the alias
1680             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1681             type: string
1682             x-go-name: Target
1683             type: object
1684             x-go-package: github.com/lxc/lxd/shared/api
1685             ImageAliasesPost:
1686             description: ImageAliasesPost represents a new LXD image alias
1687             properties:
1688             description:
1689             description: Alias description
1690             example: Our preferred Ubuntu image
1691             type: string
1692             x-go-name: Description
1693             name:
1694             description: Alias name
1695             example: ubuntu-20.04
1696             type: string
1697             x-go-name: Name
1698             target:
1699             description: Target fingerprint for the alias
1700             example: 06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb
1701             type: string
1702             x-go-name: Target
1703             type:
1704             description: Alias type (container or virtual-machine)
1705             example: container
1706             type: string
1707             x-go-name: Type
1708             type: object
1709             x-go-package: github.com/lxc/lxd/shared/api
1710             ImageExportPost:
1711             description: ImageExportPost represents the fields required to export a LXD image
1712             properties:
1713             aliases:
1714             description: List of aliases to set on the image
1715             items:
1716             $ref: '#/definitions/ImageAlias'
1717             type: array
1718             x-go-name: Aliases
1719             certificate:
1720             description: Remote server certificate
1721             example: X509 PEM certificate
1722             type: string
1723             x-go-name: Certificate
1724             secret:
1725             description: Image receive secret
1726             example: RANDOM-STRING
1727             type: string
1728             x-go-name: Secret
1729             target:
1730             description: Target server URL
1731             example: https://1.2.3.4:8443
1732             type: string
1733             x-go-name: Target
1734             type: object
1735             x-go-package: github.com/lxc/lxd/shared/api
1736             ImageMetadata:
1737             description: ImageMetadata represents LXD image metadata (used in image tarball)
1738             properties:
1739             architecture:
1740             description: Architecture name
1741             example: x86_64
1742             type: string
1743             x-go-name: Architecture
1744             creation_date:
1745             description: Image creation data (as UNIX epoch)
1746             example: 1620655439
1747             format: int64
1748             type: integer
1749             x-go-name: CreationDate
1750             expiry_date:
1751             description: Image expiry data (as UNIX epoch)
1752             example: 1620685757
1753             format: int64
1754             type: integer
1755             x-go-name: ExpiryDate
1756             properties:
1757             additionalProperties:
1758             type: string
1759             description: Descriptive properties
1760             example:
1761             os: Ubuntu
1762             release: focal
1763             variant: cloud
1764             type: object
1765             x-go-name: Properties
1766             templates:
1767             additionalProperties:
1768             $ref: '#/definitions/ImageMetadataTemplate'
1769             description: Template for files in the image
1770             type: object
1771             x-go-name: Templates
1772             type: object
1773             x-go-package: github.com/lxc/lxd/shared/api
1774             ImageMetadataTemplate:
1775             description: ImageMetadataTemplate represents a template entry in image metadata
1776             (used in image tarball)
1777             properties:
1778             create_only:
1779             description: Whether to trigger only if the file is missing
1780             example: false
1781             type: boolean
1782             x-go-name: CreateOnly
1783             properties:
1784             additionalProperties:
1785             type: string
1786             description: Key/value properties to pass to the template
1787             example:
1788             foo: bar
1789             type: object
1790             x-go-name: Properties
1791             template:
1792             description: The template itself as a valid pongo2 template
1793             example: pongo2-template
1794             type: string
1795             x-go-name: Template
1796             when:
1797             description: When to trigger the template (create, copy or start)
1798             example: create
1799             items:
1800             type: string
1801             type: array
1802             x-go-name: When
1803             type: object
1804             x-go-package: github.com/lxc/lxd/shared/api
1805             ImagePut:
1806             description: ImagePut represents the modifiable fields of a LXD image
1807             properties:
1808             auto_update:
1809             description: Whether the image should auto-update when a new build is available
1810             example: true
1811             type: boolean
1812             x-go-name: AutoUpdate
1813             expires_at:
1814             description: When the image becomes obsolete
1815             example: "2025-03-23T20:00:00-04:00"
1816             format: date-time
1817             type: string
1818             x-go-name: ExpiresAt
1819             profiles:
1820             description: List of profiles to use when creating from this image (if none
1821             provided by user)
1822             example:
1823             - default
1824             items:
1825             type: string
1826             type: array
1827             x-go-name: Profiles
1828             properties:
1829             additionalProperties:
1830             type: string
1831             description: Descriptive properties
1832             example:
1833             os: Ubuntu
1834             release: focal
1835             variant: cloud
1836             type: object
1837             x-go-name: Properties
1838             public:
1839             description: Whether the image is available to unauthenticated users
1840             example: false
1841             type: boolean
1842             x-go-name: Public
1843             type: object
1844             x-go-package: github.com/lxc/lxd/shared/api
1845             ImageSource:
1846             description: ImageSource represents the source of a LXD image
1847             properties:
1848             alias:
1849             description: Source alias to download from
1850             example: focal
1851             type: string
1852             x-go-name: Alias
1853             certificate:
1854             description: Source server certificate (if not trusted by system CA)
1855             example: X509 PEM certificate
1856             type: string
1857             x-go-name: Certificate
1858             image_type:
1859             description: Type of image (container or virtual-machine)
1860             example: container
1861             type: string
1862             x-go-name: ImageType
1863             protocol:
1864             description: Source server protocol
1865             example: simplestreams
1866             type: string
1867             x-go-name: Protocol
1868             server:
1869             description: URL of the source server
1870             example: https://images.linuxcontainers.org
1871             type: string
1872             x-go-name: Server
1873             type: object
1874             x-go-package: github.com/lxc/lxd/shared/api
1875             ImagesPost:
1876             description: ImagesPost represents the fields available for a new LXD image
1877             properties:
1878             aliases:
1879             description: Aliases to add to the image
1880             example:
1881             - name: foo
1882             - name: bar
1883             items:
1884             $ref: '#/definitions/ImageAlias'
1885             type: array
1886             x-go-name: Aliases
1887             auto_update:
1888             description: Whether the image should auto-update when a new build is available
1889             example: true
1890             type: boolean
1891             x-go-name: AutoUpdate
1892             compression_algorithm:
1893             description: Compression algorithm to use when turning an instance into an
1894             image
1895             example: gzip
1896             type: string
1897             x-go-name: CompressionAlgorithm
1898             expires_at:
1899             description: When the image becomes obsolete
1900             example: "2025-03-23T20:00:00-04:00"
1901             format: date-time
1902             type: string
1903             x-go-name: ExpiresAt
1904             filename:
1905             description: Original filename of the image
1906             example: lxd.tar.xz
1907             type: string
1908             x-go-name: Filename
1909             profiles:
1910             description: List of profiles to use when creating from this image (if none
1911             provided by user)
1912             example:
1913             - default
1914             items:
1915             type: string
1916             type: array
1917             x-go-name: Profiles
1918             properties:
1919             additionalProperties:
1920             type: string
1921             description: Descriptive properties
1922             example:
1923             os: Ubuntu
1924             release: focal
1925             variant: cloud
1926             type: object
1927             x-go-name: Properties
1928             public:
1929             description: Whether the image is available to unauthenticated users
1930             example: false
1931             type: boolean
1932             x-go-name: Public
1933             source:
1934             $ref: '#/definitions/ImagesPostSource'
1935             type: object
1936             x-go-package: github.com/lxc/lxd/shared/api
1937             ImagesPostSource:
1938             description: ImagesPostSource represents the source of a new LXD image
1939             properties:
1940             alias:
1941             description: Source alias to download from
1942             example: focal
1943             type: string
1944             x-go-name: Alias
1945             certificate:
1946             description: Source server certificate (if not trusted by system CA)
1947             example: X509 PEM certificate
1948             type: string
1949             x-go-name: Certificate
1950             fingerprint:
1951             description: Source image fingerprint (for type "image")
1952             example: 8ae945c52bb2f2df51c923b04022312f99bbb72c356251f54fa89ea7cf1df1d0
1953             type: string
1954             x-go-name: Fingerprint
1955             image_type:
1956             description: Type of image (container or virtual-machine)
1957             example: container
1958             type: string
1959             x-go-name: ImageType
1960             mode:
1961             description: Transfer mode (push or pull)
1962             example: pull
1963             type: string
1964             x-go-name: Mode
1965             name:
1966             description: Instance name (for type "instance" or "snapshot")
1967             example: c1/snap0
1968             type: string
1969             x-go-name: Name
1970             project:
1971             description: Source project name
1972             example: project1
1973             type: string
1974             x-go-name: Project
1975             protocol:
1976             description: Source server protocol
1977             example: simplestreams
1978             type: string
1979             x-go-name: Protocol
1980             secret:
1981             description: Source image server secret token (when downloading private images)
1982             example: RANDOM-STRING
1983             type: string
1984             x-go-name: Secret
1985             server:
1986             description: URL of the source server
1987             example: https://images.linuxcontainers.org
1988             type: string
1989             x-go-name: Server
1990             type:
1991             description: Type of image source (instance, snapshot, image or url)
1992             example: instance
1993             type: string
1994             x-go-name: Type
1995             url:
1996             description: Source URL (for type "url")
1997             example: https://some-server.com/some-directory/
1998             type: string
1999             x-go-name: URL
2000             type: object
2001             x-go-package: github.com/lxc/lxd/shared/api
2002             Instance:
2003             properties:
2004             architecture:
2005             description: Architecture name
2006             example: x86_64
2007             type: string
2008             x-go-name: Architecture
2009             config:
2010             additionalProperties:
2011             type: string
2012             description: Instance configuration (see doc/instances.md)
2013             example:
2014             security.nesting: "true"
2015             type: object
2016             x-go-name: Config
2017             created_at:
2018             description: Instance creation timestamp
2019             example: "2021-03-23T20:00:00-04:00"
2020             format: date-time
2021             type: string
2022             x-go-name: CreatedAt
2023             description:
2024             description: Instance description
2025             example: My test instance
2026             type: string
2027             x-go-name: Description
2028             devices:
2029             additionalProperties:
2030             additionalProperties:
2031             type: string
2032             type: object
2033             description: Instance devices (see doc/instances.md)
2034             example:
2035             root:
2036             path: /
2037             pool: default
2038             type: disk
2039             type: object
2040             x-go-name: Devices
2041             ephemeral:
2042             description: Whether the instance is ephemeral (deleted on shutdown)
2043             example: false
2044             type: boolean
2045             x-go-name: Ephemeral
2046             expanded_config:
2047             additionalProperties:
2048             type: string
2049             description: Expanded configuration (all profiles and local config merged)
2050             example:
2051             security.nesting: "true"
2052             type: object
2053             x-go-name: ExpandedConfig
2054             expanded_devices:
2055             additionalProperties:
2056             additionalProperties:
2057             type: string
2058             type: object
2059             description: Expanded devices (all profiles and local devices merged)
2060             example:
2061             root:
2062             path: /
2063             pool: default
2064             type: disk
2065             type: object
2066             x-go-name: ExpandedDevices
2067             last_used_at:
2068             description: Last start timestamp
2069             example: "2021-03-23T20:00:00-04:00"
2070             format: date-time
2071             type: string
2072             x-go-name: LastUsedAt
2073             location:
2074             description: What cluster member this instance is located on
2075             example: lxd01
2076             type: string
2077             x-go-name: Location
2078             name:
2079             description: Instance name
2080             example: foo
2081             type: string
2082             x-go-name: Name
2083             profiles:
2084             description: List of profiles applied to the instance
2085             example:
2086             - default
2087             items:
2088             type: string
2089             type: array
2090             x-go-name: Profiles
2091             project:
2092             description: Instance project name
2093             example: foo
2094             type: string
2095             x-go-name: Project
2096             restore:
2097             description: If set, instance will be restored to the provided snapshot name
2098             example: snap0
2099             type: string
2100             x-go-name: Restore
2101             stateful:
2102             description: Whether the instance currently has saved state on disk
2103             example: false
2104             type: boolean
2105             x-go-name: Stateful
2106             status:
2107             description: Instance status (see instance_state)
2108             example: Running
2109             type: string
2110             x-go-name: Status
2111             status_code:
2112             $ref: '#/definitions/StatusCode'
2113             type:
2114             description: The type of instance (container or virtual-machine)
2115             example: container
2116             type: string
2117             x-go-name: Type
2118             title: Instance represents a LXD instance.
2119             type: object
2120             x-go-package: github.com/lxc/lxd/shared/api
2121             InstanceBackup:
2122             properties:
2123             container_only:
2124             description: Whether to ignore snapshots (deprecated, use instance_only)
2125             example: false
2126             type: boolean
2127             x-go-name: ContainerOnly
2128             created_at:
2129             description: When the backup was cerated
2130             example: "2021-03-23T16:38:37.753398689-04:00"
2131             format: date-time
2132             type: string
2133             x-go-name: CreatedAt
2134             expires_at:
2135             description: When the backup expires (gets auto-deleted)
2136             example: "2021-03-23T17:38:37.753398689-04:00"
2137             format: date-time
2138             type: string
2139             x-go-name: ExpiresAt
2140             instance_only:
2141             description: Whether to ignore snapshots
2142             example: false
2143             type: boolean
2144             x-go-name: InstanceOnly
2145             name:
2146             description: Backup name
2147             example: backup0
2148             type: string
2149             x-go-name: Name
2150             optimized_storage:
2151             description: Whether to use a pool-optimized binary format (instead of plain
2152             tarball)
2153             example: true
2154             type: boolean
2155             x-go-name: OptimizedStorage
2156             title: InstanceBackup represents a LXD instance backup.
2157             type: object
2158             x-go-package: github.com/lxc/lxd/shared/api
2159             InstanceBackupPost:
2160             properties:
2161             name:
2162             description: New backup name
2163             example: backup1
2164             type: string
2165             x-go-name: Name
2166             title: InstanceBackupPost represents the fields available for the renaming of
2167             a instance backup.
2168             type: object
2169             x-go-package: github.com/lxc/lxd/shared/api
2170             InstanceBackupsPost:
2171             properties:
2172             compression_algorithm:
2173             description: What compression algorithm to use
2174             example: gzip
2175             type: string
2176             x-go-name: CompressionAlgorithm
2177             container_only:
2178             description: Whether to ignore snapshots (deprecated, use instance_only)
2179             example: false
2180             type: boolean
2181             x-go-name: ContainerOnly
2182             expires_at:
2183             description: When the backup expires (gets auto-deleted)
2184             example: "2021-03-23T17:38:37.753398689-04:00"
2185             format: date-time
2186             type: string
2187             x-go-name: ExpiresAt
2188             instance_only:
2189             description: Whether to ignore snapshots
2190             example: false
2191             type: boolean
2192             x-go-name: InstanceOnly
2193             name:
2194             description: Backup name
2195             example: backup0
2196             type: string
2197             x-go-name: Name
2198             optimized_storage:
2199             description: Whether to use a pool-optimized binary format (instead of plain
2200             tarball)
2201             example: true
2202             type: boolean
2203             x-go-name: OptimizedStorage
2204             title: InstanceBackupsPost represents the fields available for a new LXD instance
2205             backup.
2206             type: object
2207             x-go-package: github.com/lxc/lxd/shared/api
2208             InstanceConsolePost:
2209             properties:
2210             height:
2211             description: Console height in rows (console type only)
2212             example: 24
2213             format: int64
2214             type: integer
2215             x-go-name: Height
2216             type:
2217             description: Type of console to attach to (console or vga)
2218             example: console
2219             type: string
2220             x-go-name: Type
2221             width:
2222             description: Console width in columns (console type only)
2223             example: 80
2224             format: int64
2225             type: integer
2226             x-go-name: Width
2227             title: InstanceConsolePost represents a LXD instance console request.
2228             type: object
2229             x-go-package: github.com/lxc/lxd/shared/api
2230             InstanceExecPost:
2231             properties:
2232             command:
2233             description: Command and its arguments
2234             example:
2235             - bash
2236             items:
2237             type: string
2238             type: array
2239             x-go-name: Command
2240             cwd:
2241             description: Current working directory for the command
2242             example: /home/foo/
2243             type: string
2244             x-go-name: Cwd
2245             environment:
2246             additionalProperties:
2247             type: string
2248             description: Additional environment to pass to the command
2249             example:
2250             FOO: BAR
2251             type: object
2252             x-go-name: Environment
2253             group:
2254             description: GID of the user to spawn the command as
2255             example: 1000
2256             format: uint32
2257             type: integer
2258             x-go-name: Group
2259             height:
2260             description: Terminal height in rows (for interactive)
2261             example: 24
2262             format: int64
2263             type: integer
2264             x-go-name: Height
2265             interactive:
2266             description: Whether the command is to be spawned in interactive mode (singled
2267             PTY instead of 3 PIPEs)
2268             example: true
2269             type: boolean
2270             x-go-name: Interactive
2271             record-output:
2272             description: Whether to capture the output for later download (requires non-interactive)
2273             type: boolean
2274             x-go-name: RecordOutput
2275             user:
2276             description: UID of the user to spawn the command as
2277             example: 1000
2278             format: uint32
2279             type: integer
2280             x-go-name: User
2281             wait-for-websocket:
2282             description: Whether to wait for all websockets to be connected before spawning
2283             the command
2284             example: true
2285             type: boolean
2286             x-go-name: WaitForWS
2287             width:
2288             description: Terminal width in characters (for interactive)
2289             example: 80
2290             format: int64
2291             type: integer
2292             x-go-name: Width
2293             title: InstanceExecPost represents a LXD instance exec request.
2294             type: object
2295             x-go-package: github.com/lxc/lxd/shared/api
2296             InstanceFull:
2297             properties:
2298             architecture:
2299             description: Architecture name
2300             example: x86_64
2301             type: string
2302             x-go-name: Architecture
2303             backups:
2304             description: List of backups.
2305             items:
2306             $ref: '#/definitions/InstanceBackup'
2307             type: array
2308             x-go-name: Backups
2309             config:
2310             additionalProperties:
2311             type: string
2312             description: Instance configuration (see doc/instances.md)
2313             example:
2314             security.nesting: "true"
2315             type: object
2316             x-go-name: Config
2317             created_at:
2318             description: Instance creation timestamp
2319             example: "2021-03-23T20:00:00-04:00"
2320             format: date-time
2321             type: string
2322             x-go-name: CreatedAt
2323             description:
2324             description: Instance description
2325             example: My test instance
2326             type: string
2327             x-go-name: Description
2328             devices:
2329             additionalProperties:
2330             additionalProperties:
2331             type: string
2332             type: object
2333             description: Instance devices (see doc/instances.md)
2334             example:
2335             root:
2336             path: /
2337             pool: default
2338             type: disk
2339             type: object
2340             x-go-name: Devices
2341             ephemeral:
2342             description: Whether the instance is ephemeral (deleted on shutdown)
2343             example: false
2344             type: boolean
2345             x-go-name: Ephemeral
2346             expanded_config:
2347             additionalProperties:
2348             type: string
2349             description: Expanded configuration (all profiles and local config merged)
2350             example:
2351             security.nesting: "true"
2352             type: object
2353             x-go-name: ExpandedConfig
2354             expanded_devices:
2355             additionalProperties:
2356             additionalProperties:
2357             type: string
2358             type: object
2359             description: Expanded devices (all profiles and local devices merged)
2360             example:
2361             root:
2362             path: /
2363             pool: default
2364             type: disk
2365             type: object
2366             x-go-name: ExpandedDevices
2367             last_used_at:
2368             description: Last start timestamp
2369             example: "2021-03-23T20:00:00-04:00"
2370             format: date-time
2371             type: string
2372             x-go-name: LastUsedAt
2373             location:
2374             description: What cluster member this instance is located on
2375             example: lxd01
2376             type: string
2377             x-go-name: Location
2378             name:
2379             description: Instance name
2380             example: foo
2381             type: string
2382             x-go-name: Name
2383             profiles:
2384             description: List of profiles applied to the instance
2385             example:
2386             - default
2387             items:
2388             type: string
2389             type: array
2390             x-go-name: Profiles
2391             project:
2392             description: Instance project name
2393             example: foo
2394             type: string
2395             x-go-name: Project
2396             restore:
2397             description: If set, instance will be restored to the provided snapshot name
2398             example: snap0
2399             type: string
2400             x-go-name: Restore
2401             snapshots:
2402             description: List of snapshots.
2403             items:
2404             $ref: '#/definitions/InstanceSnapshot'
2405             type: array
2406             x-go-name: Snapshots
2407             state:
2408             $ref: '#/definitions/InstanceState'
2409             stateful:
2410             description: Whether the instance currently has saved state on disk
2411             example: false
2412             type: boolean
2413             x-go-name: Stateful
2414             status:
2415             description: Instance status (see instance_state)
2416             example: Running
2417             type: string
2418             x-go-name: Status
2419             status_code:
2420             $ref: '#/definitions/StatusCode'
2421             type:
2422             description: The type of instance (container or virtual-machine)
2423             example: container
2424             type: string
2425             x-go-name: Type
2426             title: InstanceFull is a combination of Instance, InstanceBackup, InstanceState
2427             and InstanceSnapshot.
2428             type: object
2429             x-go-package: github.com/lxc/lxd/shared/api
2430             InstancePost:
2431             properties:
2432             container_only:
2433             description: Whether snapshots should be discarded (migration only, deprecated,
2434             use instance_only)
2435             example: false
2436             type: boolean
2437             x-go-name: ContainerOnly
2438             instance_only:
2439             description: Whether snapshots should be discarded (migration only)
2440             example: false
2441             type: boolean
2442             x-go-name: InstanceOnly
2443             live:
2444             description: Whether to perform a live migration (migration only)
2445             example: false
2446             type: boolean
2447             x-go-name: Live
2448             migration:
2449             description: Whether the instance is being migrated to another server
2450             example: false
2451             type: boolean
2452             x-go-name: Migration
2453             name:
2454             description: New name for the instance
2455             example: bar
2456             type: string
2457             x-go-name: Name
2458             pool:
2459             description: Target pool for local cross-pool move
2460             example: baz
2461             type: string
2462             x-go-name: Pool
2463             project:
2464             description: Target project for local cross-project move
2465             example: foo
2466             type: string
2467             x-go-name: Project
2468             target:
2469             $ref: '#/definitions/InstancePostTarget'
2470             title: InstancePost represents the fields required to rename/move a LXD instance.
2471             type: object
2472             x-go-package: github.com/lxc/lxd/shared/api
2473             InstancePostTarget:
2474             properties:
2475             certificate:
2476             description: The certificate of the migration target
2477             example: X509 PEM certificate
2478             type: string
2479             x-go-name: Certificate
2480             operation:
2481             description: The operation URL on the remote target
2482             example: https://1.2.3.4:8443/1.0/operations/5e8e1638-5345-4c2d-bac9-2c79c8577292
2483             type: string
2484             x-go-name: Operation
2485             secrets:
2486             additionalProperties:
2487             type: string
2488             description: Migration websockets credentials
2489             example:
2490             criu: random-string
2491             migration: random-string
2492             type: object
2493             x-go-name: Websockets
2494             title: InstancePostTarget represents the migration target host and operation.
2495             type: object
2496             x-go-package: github.com/lxc/lxd/shared/api
2497             InstancePut:
2498             properties:
2499             architecture:
2500             description: Architecture name
2501             example: x86_64
2502             type: string
2503             x-go-name: Architecture
2504             config:
2505             additionalProperties:
2506             type: string
2507             description: Instance configuration (see doc/instances.md)
2508             example:
2509             security.nesting: "true"
2510             type: object
2511             x-go-name: Config
2512             description:
2513             description: Instance description
2514             example: My test instance
2515             type: string
2516             x-go-name: Description
2517             devices:
2518             additionalProperties:
2519             additionalProperties:
2520             type: string
2521             type: object
2522             description: Instance devices (see doc/instances.md)
2523             example:
2524             root:
2525             path: /
2526             pool: default
2527             type: disk
2528             type: object
2529             x-go-name: Devices
2530             ephemeral:
2531             description: Whether the instance is ephemeral (deleted on shutdown)
2532             example: false
2533             type: boolean
2534             x-go-name: Ephemeral
2535             profiles:
2536             description: List of profiles applied to the instance
2537             example:
2538             - default
2539             items:
2540             type: string
2541             type: array
2542             x-go-name: Profiles
2543             restore:
2544             description: If set, instance will be restored to the provided snapshot name
2545             example: snap0
2546             type: string
2547             x-go-name: Restore
2548             stateful:
2549             description: Whether the instance currently has saved state on disk
2550             example: false
2551             type: boolean
2552             x-go-name: Stateful
2553             title: InstancePut represents the modifiable fields of a LXD instance.
2554             type: object
2555             x-go-package: github.com/lxc/lxd/shared/api
2556             InstanceSnapshot:
2557             properties:
2558             architecture:
2559             description: Architecture name
2560             example: x86_64
2561             type: string
2562             x-go-name: Architecture
2563             config:
2564             additionalProperties:
2565             type: string
2566             description: Instance configuration (see doc/instances.md)
2567             example:
2568             security.nesting: "true"
2569             type: object
2570             x-go-name: Config
2571             created_at:
2572             description: Instance creation timestamp
2573             example: "2021-03-23T20:00:00-04:00"
2574             format: date-time
2575             type: string
2576             x-go-name: CreatedAt
2577             devices:
2578             additionalProperties:
2579             additionalProperties:
2580             type: string
2581             type: object
2582             description: Instance devices (see doc/instances.md)
2583             example:
2584             root:
2585             path: /
2586             pool: default
2587             type: disk
2588             type: object
2589             x-go-name: Devices
2590             ephemeral:
2591             description: Whether the instance is ephemeral (deleted on shutdown)
2592             example: false
2593             type: boolean
2594             x-go-name: Ephemeral
2595             expanded_config:
2596             additionalProperties:
2597             type: string
2598             description: Expanded configuration (all profiles and local config merged)
2599             example:
2600             security.nesting: "true"
2601             type: object
2602             x-go-name: ExpandedConfig
2603             expanded_devices:
2604             additionalProperties:
2605             additionalProperties:
2606             type: string
2607             type: object
2608             description: Expanded devices (all profiles and local devices merged)
2609             example:
2610             root:
2611             path: /
2612             pool: default
2613             type: disk
2614             type: object
2615             x-go-name: ExpandedDevices
2616             expires_at:
2617             description: When the snapshot expires (gets auto-deleted)
2618             example: "2021-03-23T17:38:37.753398689-04:00"
2619             format: date-time
2620             type: string
2621             x-go-name: ExpiresAt
2622             last_used_at:
2623             description: Last start timestamp
2624             example: "2021-03-23T20:00:00-04:00"
2625             format: date-time
2626             type: string
2627             x-go-name: LastUsedAt
2628             name:
2629             description: Snapshot name
2630             example: foo
2631             type: string
2632             x-go-name: Name
2633             profiles:
2634             description: List of profiles applied to the instance
2635             example:
2636             - default
2637             items:
2638             type: string
2639             type: array
2640             x-go-name: Profiles
2641             size:
2642             description: Size of the snapshot in bytes
2643             example: 143360
2644             format: int64
2645             type: integer
2646             x-go-name: Size
2647             stateful:
2648             description: Whether the instance currently has saved state on disk
2649             example: false
2650             type: boolean
2651             x-go-name: Stateful
2652             title: InstanceSnapshot represents a LXD instance snapshot.
2653             type: object
2654             x-go-package: github.com/lxc/lxd/shared/api
2655             InstanceSnapshotPost:
2656             properties:
2657             live:
2658             description: Whether to perform a live migration (requires migration)
2659             example: false
2660             type: boolean
2661             x-go-name: Live
2662             migration:
2663             description: Whether this is a migration request
2664             example: false
2665             type: boolean
2666             x-go-name: Migration
2667             name:
2668             description: New name for the snapshot
2669             example: foo
2670             type: string
2671             x-go-name: Name
2672             target:
2673             $ref: '#/definitions/InstancePostTarget'
2674             title: InstanceSnapshotPost represents the fields required to rename/move a LXD
2675             instance snapshot.
2676             type: object
2677             x-go-package: github.com/lxc/lxd/shared/api
2678             InstanceSnapshotPut:
2679             properties:
2680             expires_at:
2681             description: When the snapshot expires (gets auto-deleted)
2682             example: "2021-03-23T17:38:37.753398689-04:00"
2683             format: date-time
2684             type: string
2685             x-go-name: ExpiresAt
2686             title: InstanceSnapshotPut represents the modifiable fields of a LXD instance
2687             snapshot.
2688             type: object
2689             x-go-package: github.com/lxc/lxd/shared/api
2690             InstanceSnapshotsPost:
2691             properties:
2692             expires_at:
2693             description: When the snapshot expires (gets auto-deleted)
2694             example: "2021-03-23T17:38:37.753398689-04:00"
2695             format: date-time
2696             type: string
2697             x-go-name: ExpiresAt
2698             name:
2699             description: Snapshot name
2700             example: snap0
2701             type: string
2702             x-go-name: Name
2703             stateful:
2704             description: Whether the snapshot should include runtime state
2705             example: false
2706             type: boolean
2707             x-go-name: Stateful
2708             title: InstanceSnapshotsPost represents the fields available for a new LXD instance
2709             snapshot.
2710             type: object
2711             x-go-package: github.com/lxc/lxd/shared/api
2712             InstanceSource:
2713             properties:
2714             alias:
2715             description: Image alias name (for image source)
2716             example: ubuntu/20.04
2717             type: string
2718             x-go-name: Alias
2719             allow_inconsistent:
2720             description: Whether to ignore errors when copying (e.g. for volatile files)
2721             example: false
2722             type: boolean
2723             x-go-name: AllowInconsistent
2724             base-image:
2725             description: Base image fingerprint (for faster migration)
2726             example: ed56997f7c5b48e8d78986d2467a26109be6fb9f2d92e8c7b08eb8b6cec7629a
2727             type: string
2728             x-go-name: BaseImage
2729             certificate:
2730             description: Certificate (for remote images or migration)
2731             example: X509 PEM certificate
2732             type: string
2733             x-go-name: Certificate
2734             container_only:
2735             description: Whether the copy should skip the snapshots (for copy, deprecated,
2736             use instance_only)
2737             example: false
2738             type: boolean
2739             x-go-name: ContainerOnly
2740             fingerprint:
2741             description: Image fingerprint (for image source)
2742             example: ed56997f7c5b48e8d78986d2467a26109be6fb9f2d92e8c7b08eb8b6cec7629a
2743             type: string
2744             x-go-name: Fingerprint
2745             instance_only:
2746             description: Whether the copy should skip the snapshots (for copy)
2747             example: false
2748             type: boolean
2749             x-go-name: InstanceOnly
2750             live:
2751             description: Whether this is a live migration (for migration)
2752             example: false
2753             type: boolean
2754             x-go-name: Live
2755             mode:
2756             description: Whether to use pull or push mode (for migration)
2757             example: pull
2758             type: string
2759             x-go-name: Mode
2760             operation:
2761             description: Remote operation URL (for migration)
2762             example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1
2763             type: string
2764             x-go-name: Operation
2765             project:
2766             description: Source project name (for copy and local image)
2767             example: blah
2768             type: string
2769             x-go-name: Project
2770             properties:
2771             additionalProperties:
2772             type: string
2773             description: Image filters (for image source)
2774             example:
2775             os: Ubuntu
2776             release: focal
2777             variant: cloud
2778             type: object
2779             x-go-name: Properties
2780             protocol:
2781             description: Protocol name (for remote image)
2782             example: simplestreams
2783             type: string
2784             x-go-name: Protocol
2785             refresh:
2786             description: Whether this is refreshing an existing instance (for migration
2787             and copy)
2788             example: false
2789             type: boolean
2790             x-go-name: Refresh
2791             secret:
2792             description: Remote server secret (for remote private images)
2793             example: RANDOM-STRING
2794             type: string
2795             x-go-name: Secret
2796             secrets:
2797             additionalProperties:
2798             type: string
2799             description: Map of migration websockets (for migration)
2800             example:
2801             criu: RANDOM-STRING
2802             rsync: RANDOM-STRING
2803             type: object
2804             x-go-name: Websockets
2805             server:
2806             description: Remote server URL (for remote images)
2807             example: https://images.linuxcontainers.org
2808             type: string
2809             x-go-name: Server
2810             source:
2811             description: Existing instance name or snapshot (for copy)
2812             example: foo/snap0
2813             type: string
2814             x-go-name: Source
2815             type:
2816             description: Source type
2817             example: image
2818             type: string
2819             x-go-name: Type
2820             title: InstanceSource represents the creation source for a new instance.
2821             type: object
2822             x-go-package: github.com/lxc/lxd/shared/api
2823             InstanceState:
2824             properties:
2825             cpu:
2826             $ref: '#/definitions/InstanceStateCPU'
2827             disk:
2828             additionalProperties:
2829             $ref: '#/definitions/InstanceStateDisk'
2830             description: Dict of disk usage
2831             type: object
2832             x-go-name: Disk
2833             memory:
2834             $ref: '#/definitions/InstanceStateMemory'
2835             network:
2836             additionalProperties:
2837             $ref: '#/definitions/InstanceStateNetwork'
2838             description: Dict of network usage
2839             type: object
2840             x-go-name: Network
2841             pid:
2842             description: PID of the runtime
2843             example: 7281
2844             format: int64
2845             type: integer
2846             x-go-name: Pid
2847             processes:
2848             description: Number of processes in the instance
2849             example: 50
2850             format: int64
2851             type: integer
2852             x-go-name: Processes
2853             status:
2854             description: Current status (Running, Stopped, Frozen or Error)
2855             example: Running
2856             type: string
2857             x-go-name: Status
2858             status_code:
2859             $ref: '#/definitions/StatusCode'
2860             title: InstanceState represents a LXD instance's state.
2861             type: object
2862             x-go-package: github.com/lxc/lxd/shared/api
2863             InstanceStateCPU:
2864             properties:
2865             usage:
2866             description: CPU usage in nanoseconds
2867             example: 3637691016
2868             format: int64
2869             type: integer
2870             x-go-name: Usage
2871             title: InstanceStateCPU represents the cpu information section of a LXD instance's
2872             state.
2873             type: object
2874             x-go-package: github.com/lxc/lxd/shared/api
2875             InstanceStateDisk:
2876             properties:
2877             usage:
2878             description: Disk usage in bytes
2879             example: 502239232
2880             format: int64
2881             type: integer
2882             x-go-name: Usage
2883             title: InstanceStateDisk represents the disk information section of a LXD instance's
2884             state.
2885             type: object
2886             x-go-package: github.com/lxc/lxd/shared/api
2887             InstanceStateMemory:
2888             properties:
2889             swap_usage:
2890             description: SWAP usage in bytes
2891             example: 12297557
2892             format: int64
2893             type: integer
2894             x-go-name: SwapUsage
2895             swap_usage_peak:
2896             description: Peak SWAP usage in bytes
2897             example: 12297557
2898             format: int64
2899             type: integer
2900             x-go-name: SwapUsagePeak
2901             usage:
2902             description: Memory usage in bytes
2903             example: 73248768
2904             format: int64
2905             type: integer
2906             x-go-name: Usage
2907             usage_peak:
2908             description: Peak memory usage in bytes
2909             example: 73785344
2910             format: int64
2911             type: integer
2912             x-go-name: UsagePeak
2913             title: InstanceStateMemory represents the memory information section of a LXD
2914             instance's state.
2915             type: object
2916             x-go-package: github.com/lxc/lxd/shared/api
2917             InstanceStateNetwork:
2918             properties:
2919             addresses:
2920             description: List of IP addresses
2921             items:
2922             $ref: '#/definitions/InstanceStateNetworkAddress'
2923             type: array
2924             x-go-name: Addresses
2925             counters:
2926             $ref: '#/definitions/InstanceStateNetworkCounters'
2927             host_name:
2928             description: Name of the interface on the host
2929             example: vethbbcd39c7
2930             type: string
2931             x-go-name: HostName
2932             hwaddr:
2933             description: MAC address
2934             example: 00:16:3e:0c:ee:dd
2935             type: string
2936             x-go-name: Hwaddr
2937             mtu:
2938             description: MTU (maximum transmit unit) for the interface
2939             example: 1500
2940             format: int64
2941             type: integer
2942             x-go-name: Mtu
2943             state:
2944             description: Administrative state of the interface (up/down)
2945             example: up
2946             type: string
2947             x-go-name: State
2948             type:
2949             description: Type of interface (broadcast, loopback, point-to-point, ...)
2950             example: broadcast
2951             type: string
2952             x-go-name: Type
2953             title: InstanceStateNetwork represents the network information section of a LXD
2954             instance's state.
2955             type: object
2956             x-go-package: github.com/lxc/lxd/shared/api
2957             InstanceStateNetworkAddress:
2958             description: |-
2959             InstanceStateNetworkAddress represents a network address as part of the network section of a LXD
2960             instance's state.
2961             properties:
2962             address:
2963             description: IP address
2964             example: fd42:4c81:5770:1eaf:216:3eff:fe0c:eedd
2965             type: string
2966             x-go-name: Address
2967             family:
2968             description: Network family (inet or inet6)
2969             example: inet6
2970             type: string
2971             x-go-name: Family
2972             netmask:
2973             description: Network mask
2974             example: "64"
2975             type: string
2976             x-go-name: Netmask
2977             scope:
2978             description: Address scope (local, link or global)
2979             example: global
2980             type: string
2981             x-go-name: Scope
2982             type: object
2983             x-go-package: github.com/lxc/lxd/shared/api
2984             InstanceStateNetworkCounters:
2985             description: |-
2986             InstanceStateNetworkCounters represents packet counters as part of the network section of a LXD
2987             instance's state.
2988             properties:
2989             bytes_received:
2990             description: Number of bytes received
2991             example: 192021
2992             format: int64
2993             type: integer
2994             x-go-name: BytesReceived
2995             bytes_sent:
2996             description: Number of bytes sent
2997             example: 10888579
2998             format: int64
2999             type: integer
3000             x-go-name: BytesSent
3001             errors_received:
3002             description: Number of errors received
3003             example: 14
3004             format: int64
3005             type: integer
3006             x-go-name: ErrorsReceived
3007             errors_sent:
3008             description: Number of errors sent
3009             example: 41
3010             format: int64
3011             type: integer
3012             x-go-name: ErrorsSent
3013             packets_dropped_inbound:
3014             description: Number of inbound packets dropped
3015             example: 179
3016             format: int64
3017             type: integer
3018             x-go-name: PacketsDroppedInbound
3019             packets_dropped_outbound:
3020             description: Number of outbound packets dropped
3021             example: 541
3022             format: int64
3023             type: integer
3024             x-go-name: PacketsDroppedOutbound
3025             packets_received:
3026             description: Number of packets received
3027             example: 1748
3028             format: int64
3029             type: integer
3030             x-go-name: PacketsReceived
3031             packets_sent:
3032             description: Number of packets sent
3033             example: 964
3034             format: int64
3035             type: integer
3036             x-go-name: PacketsSent
3037             type: object
3038             x-go-package: github.com/lxc/lxd/shared/api
3039             InstanceStatePut:
3040             properties:
3041             action:
3042             description: State change action (start, stop, restart, freeze, unfreeze)
3043             example: start
3044             type: string
3045             x-go-name: Action
3046             force:
3047             description: Whether to force the action (for stop and restart)
3048             example: false
3049             type: boolean
3050             x-go-name: Force
3051             stateful:
3052             description: Whether to store the runtime state (for stop)
3053             example: false
3054             type: boolean
3055             x-go-name: Stateful
3056             timeout:
3057             description: How long to wait (in s) before giving up (when force isn't set)
3058             example: 30
3059             format: int64
3060             type: integer
3061             x-go-name: Timeout
3062             title: InstanceStatePut represents the modifiable fields of a LXD instance's state.
3063             type: object
3064             x-go-package: github.com/lxc/lxd/shared/api
3065             InstanceType:
3066             title: InstanceType represents the type if instance being returned or requested
3067             via the API.
3068             type: string
3069             x-go-package: github.com/lxc/lxd/shared/api
3070             InstancesPost:
3071             properties:
3072             architecture:
3073             description: Architecture name
3074             example: x86_64
3075             type: string
3076             x-go-name: Architecture
3077             config:
3078             additionalProperties:
3079             type: string
3080             description: Instance configuration (see doc/instances.md)
3081             example:
3082             security.nesting: "true"
3083             type: object
3084             x-go-name: Config
3085             description:
3086             description: Instance description
3087             example: My test instance
3088             type: string
3089             x-go-name: Description
3090             devices:
3091             additionalProperties:
3092             additionalProperties:
3093             type: string
3094             type: object
3095             description: Instance devices (see doc/instances.md)
3096             example:
3097             root:
3098             path: /
3099             pool: default
3100             type: disk
3101             type: object
3102             x-go-name: Devices
3103             ephemeral:
3104             description: Whether the instance is ephemeral (deleted on shutdown)
3105             example: false
3106             type: boolean
3107             x-go-name: Ephemeral
3108             instance_type:
3109             description: Cloud instance type (AWS, GCP, Azure, ...) to emulate with limits
3110             example: t1.micro
3111             type: string
3112             x-go-name: InstanceType
3113             name:
3114             description: Instance name
3115             example: foo
3116             type: string
3117             x-go-name: Name
3118             profiles:
3119             description: List of profiles applied to the instance
3120             example:
3121             - default
3122             items:
3123             type: string
3124             type: array
3125             x-go-name: Profiles
3126             restore:
3127             description: If set, instance will be restored to the provided snapshot name
3128             example: snap0
3129             type: string
3130             x-go-name: Restore
3131             source:
3132             $ref: '#/definitions/InstanceSource'
3133             stateful:
3134             description: Whether the instance currently has saved state on disk
3135             example: false
3136             type: boolean
3137             x-go-name: Stateful
3138             type:
3139             $ref: '#/definitions/InstanceType'
3140             title: InstancesPost represents the fields available for a new LXD instance.
3141             type: object
3142             x-go-package: github.com/lxc/lxd/shared/api
3143             InstancesPut:
3144             properties:
3145             state:
3146             $ref: '#/definitions/InstanceStatePut'
3147             title: InstancesPut represents the fields available for a mass update.
3148             type: object
3149             x-go-package: github.com/lxc/lxd/shared/api
3150             Network:
3151             description: Network represents a LXD network
3152             properties:
3153             config:
3154             additionalProperties:
3155             type: string
3156             description: Network configuration map (refer to doc/networks.md)
3157             example:
3158             ipv4.address: 10.0.0.1/24
3159             ipv4.nat: "true"
3160             ipv6.address: none
3161             type: object
3162             x-go-name: Config
3163             description:
3164             description: Description of the profile
3165             example: My new LXD bridge
3166             type: string
3167             x-go-name: Description
3168             locations:
3169             description: Cluster members on which the network has been defined
3170             example:
3171             - lxd01
3172             - lxd02
3173             - lxd03
3174             items:
3175             type: string
3176             readOnly: true
3177             type: array
3178             x-go-name: Locations
3179             managed:
3180             description: Whether this is a LXD managed network
3181             example: true
3182             readOnly: true
3183             type: boolean
3184             x-go-name: Managed
3185             name:
3186             description: The network name
3187             example: lxdbr0
3188             readOnly: true
3189             type: string
3190             x-go-name: Name
3191             status:
3192             description: The state of the network (for managed network in clusters)
3193             example: Created
3194             readOnly: true
3195             type: string
3196             x-go-name: Status
3197             type:
3198             description: The network type
3199             example: bridge
3200             readOnly: true
3201             type: string
3202             x-go-name: Type
3203             used_by:
3204             description: List of URLs of objects using this profile
3205             example:
3206             - /1.0/profiles/default
3207             - /1.0/instances/c1
3208             items:
3209             type: string
3210             readOnly: true
3211             type: array
3212             x-go-name: UsedBy
3213             type: object
3214             x-go-package: github.com/lxc/lxd/shared/api
3215             NetworkACL:
3216             properties:
3217             config:
3218             additionalProperties:
3219             type: string
3220             description: ACL configuration map (refer to doc/network-acls.md)
3221             example:
3222             user.mykey: foo
3223             type: object
3224             x-go-name: Config
3225             description:
3226             description: Description of the ACL
3227             example: Web servers
3228             type: string
3229             x-go-name: Description
3230             egress:
3231             description: List of egress rules (order independent)
3232             items:
3233             $ref: '#/definitions/NetworkACLRule'
3234             type: array
3235             x-go-name: Egress
3236             ingress:
3237             description: List of ingress rules (order independent)
3238             items:
3239             $ref: '#/definitions/NetworkACLRule'
3240             type: array
3241             x-go-name: Ingress
3242             name:
3243             description: The new name for the ACL
3244             example: bar
3245             type: string
3246             x-go-name: Name
3247             used_by:
3248             description: List of URLs of objects using this profile
3249             example:
3250             - /1.0/instances/c1
3251             - /1.0/instances/v1
3252             - /1.0/networks/lxdbr0
3253             items:
3254             type: string
3255             readOnly: true
3256             type: array
3257             x-go-name: UsedBy
3258             title: NetworkACL used for displaying an ACL.
3259             type: object
3260             x-go-package: github.com/lxc/lxd/shared/api
3261             NetworkACLPost:
3262             properties:
3263             name:
3264             description: The new name for the ACL
3265             example: bar
3266             type: string
3267             x-go-name: Name
3268             title: NetworkACLPost used for renaming an ACL.
3269             type: object
3270             x-go-package: github.com/lxc/lxd/shared/api
3271             NetworkACLPut:
3272             properties:
3273             config:
3274             additionalProperties:
3275             type: string
3276             description: ACL configuration map (refer to doc/network-acls.md)
3277             example:
3278             user.mykey: foo
3279             type: object
3280             x-go-name: Config
3281             description:
3282             description: Description of the ACL
3283             example: Web servers
3284             type: string
3285             x-go-name: Description
3286             egress:
3287             description: List of egress rules (order independent)
3288             items:
3289             $ref: '#/definitions/NetworkACLRule'
3290             type: array
3291             x-go-name: Egress
3292             ingress:
3293             description: List of ingress rules (order independent)
3294             items:
3295             $ref: '#/definitions/NetworkACLRule'
3296             type: array
3297             x-go-name: Ingress
3298             title: NetworkACLPut used for updating an ACL.
3299             type: object
3300             x-go-package: github.com/lxc/lxd/shared/api
3301             NetworkACLRule:
3302             description: Refer to doc/network-acls.md for details.
3303             properties:
3304             action:
3305             description: Action to perform on rule match
3306             example: allow
3307             type: string
3308             x-go-name: Action
3309             description:
3310             description: Description of the rule
3311             example: Allow DNS queries to Google DNS
3312             type: string
3313             x-go-name: Description
3314             destination:
3315             description: Destination address
3316             example: 8.8.8.8/32,8.8.4.4/32
3317             type: string
3318             x-go-name: Destination
3319             destination_port:
3320             description: Destination port
3321             example: "53"
3322             type: string
3323             x-go-name: DestinationPort
3324             icmp_code:
3325             description: ICMP message code (for ICMP protocol)
3326             example: "0"
3327             type: string
3328             x-go-name: ICMPCode
3329             icmp_type:
3330             description: Type of ICMP message (for ICMP protocol)
3331             example: "8"
3332             type: string
3333             x-go-name: ICMPType
3334             protocol:
3335             description: Protocol
3336             example: udp
3337             type: string
3338             x-go-name: Protocol
3339             source:
3340             description: Source address
3341             example: '@internal'
3342             type: string
3343             x-go-name: Source
3344             source_port:
3345             description: Source port
3346             example: "1234"
3347             type: string
3348             x-go-name: SourcePort
3349             state:
3350             description: State of the rule
3351             example: enabled
3352             type: string
3353             x-go-name: State
3354             title: NetworkACLRule represents a single rule in an ACL ruleset.
3355             type: object
3356             x-go-package: github.com/lxc/lxd/shared/api
3357             NetworkACLsPost:
3358             properties:
3359             config:
3360             additionalProperties:
3361             type: string
3362             description: ACL configuration map (refer to doc/network-acls.md)
3363             example:
3364             user.mykey: foo
3365             type: object
3366             x-go-name: Config
3367             description:
3368             description: Description of the ACL
3369             example: Web servers
3370             type: string
3371             x-go-name: Description
3372             egress:
3373             description: List of egress rules (order independent)
3374             items:
3375             $ref: '#/definitions/NetworkACLRule'
3376             type: array
3377             x-go-name: Egress
3378             ingress:
3379             description: List of ingress rules (order independent)
3380             items:
3381             $ref: '#/definitions/NetworkACLRule'
3382             type: array
3383             x-go-name: Ingress
3384             name:
3385             description: The new name for the ACL
3386             example: bar
3387             type: string
3388             x-go-name: Name
3389             title: NetworkACLsPost used for creating an ACL.
3390             type: object
3391             x-go-package: github.com/lxc/lxd/shared/api
3392             NetworkForward:
3393             properties:
3394             config:
3395             additionalProperties:
3396             type: string
3397             description: Forward configuration map (refer to doc/network-forwards.md)
3398             example:
3399             user.mykey: foo
3400             type: object
3401             x-go-name: Config
3402             description:
3403             description: Description of the forward listen IP
3404             example: My public IP forward
3405             type: string
3406             x-go-name: Description
3407             listen_address:
3408             description: The listen address of the forward
3409             example: 192.0.2.1
3410             type: string
3411             x-go-name: ListenAddress
3412             location:
3413             description: What cluster member this record was found on
3414             example: lxd01
3415             type: string
3416             x-go-name: Location
3417             ports:
3418             description: Port forwards (optional)
3419             items:
3420             $ref: '#/definitions/NetworkForwardPort'
3421             type: array
3422             x-go-name: Ports
3423             title: NetworkForward used for displaying an network address forward.
3424             type: object
3425             x-go-package: github.com/lxc/lxd/shared/api
3426             NetworkForwardPort:
3427             description: NetworkForwardPort represents a port specification in a network address
3428             forward
3429             properties:
3430             description:
3431             description: Description of the forward port
3432             example: My web server forward
3433             type: string
3434             x-go-name: Description
3435             listen_port:
3436             description: ListenPort(s) to forward (comma delimited ranges)
3437             example: 80,81,8080-8090
3438             type: string
3439             x-go-name: ListenPort
3440             protocol:
3441             description: Protocol for port forward (either tcp or udp)
3442             example: tcp
3443             type: string
3444             x-go-name: Protocol
3445             target_address:
3446             description: TargetAddress to forward ListenPorts to
3447             example: 198.51.100.2
3448             type: string
3449             x-go-name: TargetAddress
3450             target_port:
3451             description: TargetPort(s) to forward ListenPorts to (allows for many-to-one)
3452             example: 80,81,8080-8090
3453             type: string
3454             x-go-name: TargetPort
3455             type: object
3456             x-go-package: github.com/lxc/lxd/shared/api
3457             NetworkForwardPut:
3458             description: NetworkForwardPut represents the modifiable fields of a LXD network
3459             address forward
3460             properties:
3461             config:
3462             additionalProperties:
3463             type: string
3464             description: Forward configuration map (refer to doc/network-forwards.md)
3465             example:
3466             user.mykey: foo
3467             type: object
3468             x-go-name: Config
3469             description:
3470             description: Description of the forward listen IP
3471             example: My public IP forward
3472             type: string
3473             x-go-name: Description
3474             ports:
3475             description: Port forwards (optional)
3476             items:
3477             $ref: '#/definitions/NetworkForwardPort'
3478             type: array
3479             x-go-name: Ports
3480             type: object
3481             x-go-package: github.com/lxc/lxd/shared/api
3482             NetworkForwardsPost:
3483             description: NetworkForwardsPost represents the fields of a new LXD network address
3484             forward
3485             properties:
3486             config:
3487             additionalProperties:
3488             type: string
3489             description: Forward configuration map (refer to doc/network-forwards.md)
3490             example:
3491             user.mykey: foo
3492             type: object
3493             x-go-name: Config
3494             description:
3495             description: Description of the forward listen IP
3496             example: My public IP forward
3497             type: string
3498             x-go-name: Description
3499             listen_address:
3500             description: The listen address of the forward
3501             example: 192.0.2.1
3502             type: string
3503             x-go-name: ListenAddress
3504             ports:
3505             description: Port forwards (optional)
3506             items:
3507             $ref: '#/definitions/NetworkForwardPort'
3508             type: array
3509             x-go-name: Ports
3510             type: object
3511             x-go-package: github.com/lxc/lxd/shared/api
3512             NetworkLease:
3513             description: NetworkLease represents a DHCP lease
3514             properties:
3515             address:
3516             description: The IP address
3517             example: 10.0.0.98
3518             type: string
3519             x-go-name: Address
3520             hostname:
3521             description: The hostname associated with the record
3522             example: c1
3523             type: string
3524             x-go-name: Hostname
3525             hwaddr:
3526             description: The MAC address
3527             example: 00:16:3e:2c:89:d9
3528             type: string
3529             x-go-name: Hwaddr
3530             location:
3531             description: What cluster member this record was found on
3532             example: lxd01
3533             type: string
3534             x-go-name: Location
3535             type:
3536             description: The type of record (static or dynamic)
3537             example: dynamic
3538             type: string
3539             x-go-name: Type
3540             type: object
3541             x-go-package: github.com/lxc/lxd/shared/api
3542             NetworkPeer:
3543             properties:
3544             config:
3545             additionalProperties:
3546             type: string
3547             description: Peer configuration map (refer to doc/network-peers.md)
3548             example:
3549             user.mykey: foo
3550             type: object
3551             x-go-name: Config
3552             description:
3553             description: Description of the peer
3554             example: Peering with network1 in project1
3555             type: string
3556             x-go-name: Description
3557             name:
3558             description: Name of the peer
3559             example: project1-network1
3560             readOnly: true
3561             type: string
3562             x-go-name: Name
3563             status:
3564             description: The state of the peering
3565             example: Pending
3566             readOnly: true
3567             type: string
3568             x-go-name: Status
3569             target_network:
3570             description: Name of the target network
3571             example: network1
3572             readOnly: true
3573             type: string
3574             x-go-name: TargetNetwork
3575             target_project:
3576             description: Name of the target project
3577             example: project1
3578             readOnly: true
3579             type: string
3580             x-go-name: TargetProject
3581             used_by:
3582             description: List of URLs of objects using this network peering
3583             example:
3584             - /1.0/network-acls/test
3585             - /1.0/network-acls/foo
3586             items:
3587             type: string
3588             readOnly: true
3589             type: array
3590             x-go-name: UsedBy
3591             title: NetworkPeer used for displaying a LXD network peering.
3592             type: object
3593             x-go-package: github.com/lxc/lxd/shared/api
3594             NetworkPeerPut:
3595             description: NetworkPeerPut represents the modifiable fields of a LXD network
3596             peering
3597             properties:
3598             config:
3599             additionalProperties:
3600             type: string
3601             description: Peer configuration map (refer to doc/network-peers.md)
3602             example:
3603             user.mykey: foo
3604             type: object
3605             x-go-name: Config
3606             description:
3607             description: Description of the peer
3608             example: Peering with network1 in project1
3609             type: string
3610             x-go-name: Description
3611             type: object
3612             x-go-package: github.com/lxc/lxd/shared/api
3613             NetworkPeersPost:
3614             description: NetworkPeersPost represents the fields of a new LXD network peering
3615             properties:
3616             config:
3617             additionalProperties:
3618             type: string
3619             description: Peer configuration map (refer to doc/network-peers.md)
3620             example:
3621             user.mykey: foo
3622             type: object
3623             x-go-name: Config
3624             description:
3625             description: Description of the peer
3626             example: Peering with network1 in project1
3627             type: string
3628             x-go-name: Description
3629             name:
3630             description: Name of the peer
3631             example: project1-network1
3632             type: string
3633             x-go-name: Name
3634             target_network:
3635             description: Name of the target network
3636             example: network1
3637             type: string
3638             x-go-name: TargetNetwork
3639             target_project:
3640             description: Name of the target project
3641             example: project1
3642             type: string
3643             x-go-name: TargetProject
3644             type: object
3645             x-go-package: github.com/lxc/lxd/shared/api
3646             NetworkPost:
3647             description: NetworkPost represents the fields required to rename a LXD network
3648             properties:
3649             name:
3650             description: The new name for the network
3651             example: lxdbr1
3652             type: string
3653             x-go-name: Name
3654             type: object
3655             x-go-package: github.com/lxc/lxd/shared/api
3656             NetworkPut:
3657             description: NetworkPut represents the modifiable fields of a LXD network
3658             properties:
3659             config:
3660             additionalProperties:
3661             type: string
3662             description: Network configuration map (refer to doc/networks.md)
3663             example:
3664             ipv4.address: 10.0.0.1/24
3665             ipv4.nat: "true"
3666             ipv6.address: none
3667             type: object
3668             x-go-name: Config
3669             description:
3670             description: Description of the profile
3671             example: My new LXD bridge
3672             type: string
3673             x-go-name: Description
3674             type: object
3675             x-go-package: github.com/lxc/lxd/shared/api
3676             NetworkState:
3677             description: NetworkState represents the network state
3678             properties:
3679             addresses:
3680             description: List of addresses
3681             items:
3682             $ref: '#/definitions/NetworkStateAddress'
3683             type: array
3684             x-go-name: Addresses
3685             bond:
3686             $ref: '#/definitions/NetworkStateBond'
3687             bridge:
3688             $ref: '#/definitions/NetworkStateBridge'
3689             counters:
3690             $ref: '#/definitions/NetworkStateCounters'
3691             hwaddr:
3692             description: MAC address
3693             example: 00:16:3e:5a:83:57
3694             type: string
3695             x-go-name: Hwaddr
3696             mtu:
3697             description: MTU
3698             example: 1500
3699             format: int64
3700             type: integer
3701             x-go-name: Mtu
3702             ovn:
3703             $ref: '#/definitions/NetworkStateOVN'
3704             state:
3705             description: Link state
3706             example: up
3707             type: string
3708             x-go-name: State
3709             type:
3710             description: Interface type
3711             example: broadcast
3712             type: string
3713             x-go-name: Type
3714             vlan:
3715             $ref: '#/definitions/NetworkStateVLAN'
3716             type: object
3717             x-go-package: github.com/lxc/lxd/shared/api
3718             NetworkStateAddress:
3719             description: NetworkStateAddress represents a network address
3720             properties:
3721             address:
3722             description: IP address
3723             example: 10.0.0.1
3724             type: string
3725             x-go-name: Address
3726             family:
3727             description: Address family
3728             example: inet
3729             type: string
3730             x-go-name: Family
3731             netmask:
3732             description: IP netmask (CIDR)
3733             example: "24"
3734             type: string
3735             x-go-name: Netmask
3736             scope:
3737             description: Address scope
3738             example: global
3739             type: string
3740             x-go-name: Scope
3741             type: object
3742             x-go-package: github.com/lxc/lxd/shared/api
3743             NetworkStateBond:
3744             description: NetworkStateBond represents bond specific state
3745             properties:
3746             down_delay:
3747             description: Delay on link down (ms)
3748             example: 0
3749             format: uint64
3750             type: integer
3751             x-go-name: DownDelay
3752             lower_devices:
3753             description: List of devices that are part of the bond
3754             example:
3755             - eth0
3756             - eth1
3757             items:
3758             type: string
3759             type: array
3760             x-go-name: LowerDevices
3761             mii_frequency:
3762             description: How often to check for link state (ms)
3763             example: 100
3764             format: uint64
3765             type: integer
3766             x-go-name: MIIFrequency
3767             mii_state:
3768             description: Bond link state
3769             example: up
3770             type: string
3771             x-go-name: MIIState
3772             mode:
3773             description: Bonding mode
3774             example: 802.3ad
3775             type: string
3776             x-go-name: Mode
3777             transmit_policy:
3778             description: Transmit balancing policy
3779             example: layer3+4
3780             type: string
3781             x-go-name: TransmitPolicy
3782             up_delay:
3783             description: Delay on link up (ms)
3784             example: 0
3785             format: uint64
3786             type: integer
3787             x-go-name: UpDelay
3788             type: object
3789             x-go-package: github.com/lxc/lxd/shared/api
3790             NetworkStateBridge:
3791             description: NetworkStateBridge represents bridge specific state
3792             properties:
3793             forward_delay:
3794             description: Delay on port join (ms)
3795             example: 1500
3796             format: uint64
3797             type: integer
3798             x-go-name: ForwardDelay
3799             id:
3800             description: Bridge ID
3801             example: 8000.0a0f7c6edbd9
3802             type: string
3803             x-go-name: ID
3804             stp:
3805             description: Whether STP is enabled
3806             example: false
3807             type: boolean
3808             x-go-name: STP
3809             upper_devices:
3810             description: List of devices that are in the bridge
3811             example:
3812             - eth0
3813             - eth1
3814             items:
3815             type: string
3816             type: array
3817             x-go-name: UpperDevices
3818             vlan_default:
3819             description: Default VLAN ID
3820             example: 1
3821             format: uint64
3822             type: integer
3823             x-go-name: VLANDefault
3824             vlan_filtering:
3825             description: Whether VLAN filtering is enabled
3826             example: false
3827             type: boolean
3828             x-go-name: VLANFiltering
3829             type: object
3830             x-go-package: github.com/lxc/lxd/shared/api
3831             NetworkStateCounters:
3832             description: NetworkStateCounters represents packet counters
3833             properties:
3834             bytes_received:
3835             description: Number of bytes received
3836             example: 250542118
3837             format: int64
3838             type: integer
3839             x-go-name: BytesReceived
3840             bytes_sent:
3841             description: Number of bytes sent
3842             example: 17524040140
3843             format: int64
3844             type: integer
3845             x-go-name: BytesSent
3846             packets_received:
3847             description: Number of packets received
3848             example: 1182515
3849             format: int64
3850             type: integer
3851             x-go-name: PacketsReceived
3852             packets_sent:
3853             description: Number of packets sent
3854             example: 1567934
3855             format: int64
3856             type: integer
3857             x-go-name: PacketsSent
3858             type: object
3859             x-go-package: github.com/lxc/lxd/shared/api
3860             NetworkStateOVN:
3861             description: NetworkStateOVN represents OVN specific state
3862             properties:
3863             chassis:
3864             description: OVN network chassis name
3865             type: string
3866             x-go-name: Chassis
3867             type: object
3868             x-go-package: github.com/lxc/lxd/shared/api
3869             NetworkStateVLAN:
3870             description: NetworkStateVLAN represents VLAN specific state
3871             properties:
3872             lower_device:
3873             description: Parent device
3874             example: eth0
3875             type: string
3876             x-go-name: LowerDevice
3877             vid:
3878             description: VLAN ID
3879             example: 100
3880             format: uint64
3881             type: integer
3882             x-go-name: VID
3883             type: object
3884             x-go-package: github.com/lxc/lxd/shared/api
3885             NetworkZone:
3886             properties:
3887             config:
3888             additionalProperties:
3889             type: string
3890             description: Zone configuration map (refer to doc/network-zones.md)
3891             example:
3892             user.mykey: foo
3893             type: object
3894             x-go-name: Config
3895             description:
3896             description: Description of the network zone
3897             example: Internal domain
3898             type: string
3899             x-go-name: Description
3900             name:
3901             description: The name of the zone (DNS domain name)
3902             example: example.net
3903             type: string
3904             x-go-name: Name
3905             used_by:
3906             description: List of URLs of objects using this network zone
3907             example:
3908             - /1.0/networks/foo
3909             - /1.0/networks/bar
3910             items:
3911             type: string
3912             readOnly: true
3913             type: array
3914             x-go-name: UsedBy
3915             title: NetworkZone represents a network zone (DNS).
3916             type: object
3917             x-go-package: github.com/lxc/lxd/shared/api
3918             NetworkZonePut:
3919             description: NetworkZonePut represents the modifiable fields of a LXD network
3920             zone
3921             properties:
3922             config:
3923             additionalProperties:
3924             type: string
3925             description: Zone configuration map (refer to doc/network-zones.md)
3926             example:
3927             user.mykey: foo
3928             type: object
3929             x-go-name: Config
3930             description:
3931             description: Description of the network zone
3932             example: Internal domain
3933             type: string
3934             x-go-name: Description
3935             type: object
3936             x-go-package: github.com/lxc/lxd/shared/api
3937             NetworkZoneRecord:
3938             properties:
3939             config:
3940             additionalProperties:
3941             type: string
3942             description: Advanced configuration for the record
3943             example:
3944             user.mykey: foo
3945             type: object
3946             x-go-name: Config
3947             description:
3948             description: Description of the record
3949             example: SPF record
3950             type: string
3951             x-go-name: Description
3952             entries:
3953             description: Entries in the record
3954             items:
3955             $ref: '#/definitions/NetworkZoneRecordEntry'
3956             type: array
3957             x-go-name: Entries
3958             name:
3959             description: The name of the record
3960             example: '@'
3961             type: string
3962             x-go-name: Name
3963             title: NetworkZoneRecord represents a network zone (DNS) record.
3964             type: object
3965             x-go-package: github.com/lxc/lxd/shared/api
3966             NetworkZoneRecordEntry:
3967             description: NetworkZoneRecordEntry represents the fields in a record entry
3968             properties:
3969             ttl:
3970             description: TTL for the entry
3971             example: 3600
3972             format: uint64
3973             type: integer
3974             x-go-name: TTL
3975             type:
3976             description: Type of DNS entry
3977             example: TXT
3978             type: string
3979             x-go-name: Type
3980             value:
3981             description: Value for the record
3982             example: v=spf1 mx ~all
3983             type: string
3984             x-go-name: Value
3985             type: object
3986             x-go-package: github.com/lxc/lxd/shared/api
3987             NetworkZoneRecordPut:
3988             description: NetworkZoneRecordPut represents the modifiable fields of a LXD network
3989             zone record
3990             properties:
3991             config:
3992             additionalProperties:
3993             type: string
3994             description: Advanced configuration for the record
3995             example:
3996             user.mykey: foo
3997             type: object
3998             x-go-name: Config
3999             description:
4000             description: Description of the record
4001             example: SPF record
4002             type: string
4003             x-go-name: Description
4004             entries:
4005             description: Entries in the record
4006             items:
4007             $ref: '#/definitions/NetworkZoneRecordEntry'
4008             type: array
4009             x-go-name: Entries
4010             type: object
4011             x-go-package: github.com/lxc/lxd/shared/api
4012             NetworkZoneRecordsPost:
4013             description: NetworkZoneRecordsPost represents the fields of a new LXD network
4014             zone record
4015             properties:
4016             config:
4017             additionalProperties:
4018             type: string
4019             description: Advanced configuration for the record
4020             example:
4021             user.mykey: foo
4022             type: object
4023             x-go-name: Config
4024             description:
4025             description: Description of the record
4026             example: SPF record
4027             type: string
4028             x-go-name: Description
4029             entries:
4030             description: Entries in the record
4031             items:
4032             $ref: '#/definitions/NetworkZoneRecordEntry'
4033             type: array
4034             x-go-name: Entries
4035             name:
4036             description: The record name in the zone
4037             example: '@'
4038             type: string
4039             x-go-name: Name
4040             type: object
4041             x-go-package: github.com/lxc/lxd/shared/api
4042             NetworkZonesPost:
4043             description: NetworkZonesPost represents the fields of a new LXD network zone
4044             properties:
4045             config:
4046             additionalProperties:
4047             type: string
4048             description: Zone configuration map (refer to doc/network-zones.md)
4049             example:
4050             user.mykey: foo
4051             type: object
4052             x-go-name: Config
4053             description:
4054             description: Description of the network zone
4055             example: Internal domain
4056             type: string
4057             x-go-name: Description
4058             name:
4059             description: The name of the zone (DNS domain name)
4060             example: example.net
4061             type: string
4062             x-go-name: Name
4063             type: object
4064             x-go-package: github.com/lxc/lxd/shared/api
4065             NetworksPost:
4066             description: NetworksPost represents the fields of a new LXD network
4067             properties:
4068             config:
4069             additionalProperties:
4070             type: string
4071             description: Network configuration map (refer to doc/networks.md)
4072             example:
4073             ipv4.address: 10.0.0.1/24
4074             ipv4.nat: "true"
4075             ipv6.address: none
4076             type: object
4077             x-go-name: Config
4078             description:
4079             description: Description of the profile
4080             example: My new LXD bridge
4081             type: string
4082             x-go-name: Description
4083             name:
4084             description: The name of the new network
4085             example: lxdbr1
4086             type: string
4087             x-go-name: Name
4088             type:
4089             description: The network type (refer to doc/networks.md)
4090             example: bridge
4091             type: string
4092             x-go-name: Type
4093             type: object
4094             x-go-package: github.com/lxc/lxd/shared/api
4095             Operation:
4096             description: Operation represents a LXD background operation
4097             properties:
4098             class:
4099             description: Type of operation (task, token or websocket)
4100             example: websocket
4101             type: string
4102             x-go-name: Class
4103             created_at:
4104             description: Operation creation time
4105             example: "2021-03-23T17:38:37.753398689-04:00"
4106             format: date-time
4107             type: string
4108             x-go-name: CreatedAt
4109             description:
4110             description: Description of the operation
4111             example: Executing command
4112             type: string
4113             x-go-name: Description
4114             err:
4115             description: Operation error mesage
4116             example: Some error message
4117             type: string
4118             x-go-name: Err
4119             id:
4120             description: UUID of the operation
4121             example: 6916c8a6-9b7d-4abd-90b3-aedfec7ec7da
4122             type: string
4123             x-go-name: ID
4124             location:
4125             description: What cluster member this record was found on
4126             example: lxd01
4127             type: string
4128             x-go-name: Location
4129             may_cancel:
4130             description: Whether the operation can be canceled
4131             example: false
4132             type: boolean
4133             x-go-name: MayCancel
4134             metadata:
4135             additionalProperties:
4136             type: object
4137             description: Operation specific metadata
4138             example:
4139             command:
4140             - bash
4141             environment:
4142             HOME: /root
4143             LANG: C.UTF-8
4144             PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4145             TERM: xterm
4146             USER: root
4147             fds:
4148             "0": da3046cf02c0116febf4ef3fe4eaecdf308e720c05e5a9c730ce1a6f15417f66
4149             "1": 05896879d8692607bd6e4a09475667da3b5f6714418ab0ee0e5720b4c57f754b
4150             interactive: true
4151             type: object
4152             x-go-name: Metadata
4153             resources:
4154             additionalProperties:
4155             items:
4156             type: string
4157             type: array
4158             description: Affected resourcs
4159             example:
4160             containers:
4161             - /1.0/containers/foo
4162             instances:
4163             - /1.0/instances/foo
4164             type: object
4165             x-go-name: Resources
4166             status:
4167             description: Status name
4168             example: Running
4169             type: string
4170             x-go-name: Status
4171             status_code:
4172             $ref: '#/definitions/StatusCode'
4173             updated_at:
4174             description: Operation last change
4175             example: "2021-03-23T17:38:37.753398689-04:00"
4176             format: date-time
4177             type: string
4178             x-go-name: UpdatedAt
4179             type: object
4180             x-go-package: github.com/lxc/lxd/shared/api
4181             Profile:
4182             description: Profile represents a LXD profile
4183             properties:
4184             config:
4185             additionalProperties:
4186             type: string
4187             description: Instance configuration map (refer to doc/instances.md)
4188             example:
4189             limits.cpu: "4"
4190             limits.memory: 4GiB
4191             type: object
4192             x-go-name: Config
4193             description:
4194             description: Description of the profile
4195             example: Medium size instances
4196             type: string
4197             x-go-name: Description
4198             devices:
4199             additionalProperties:
4200             additionalProperties:
4201             type: string
4202             type: object
4203             description: List of devices
4204             example:
4205             eth0:
4206             name: eth0
4207             network: lxdbr0
4208             type: nic
4209             root:
4210             path: /
4211             pool: default
4212             type: disk
4213             type: object
4214             x-go-name: Devices
4215             name:
4216             description: The profile name
4217             example: foo
4218             readOnly: true
4219             type: string
4220             x-go-name: Name
4221             used_by:
4222             description: List of URLs of objects using this profile
4223             example:
4224             - /1.0/instances/c1
4225             - /1.0/instances/v1
4226             items:
4227             type: string
4228             readOnly: true
4229             type: array
4230             x-go-name: UsedBy
4231             type: object
4232             x-go-package: github.com/lxc/lxd/shared/api
4233             ProfilePost:
4234             description: ProfilePost represents the fields required to rename a LXD profile
4235             properties:
4236             name:
4237             description: The new name for the profile
4238             example: bar
4239             type: string
4240             x-go-name: Name
4241             type: object
4242             x-go-package: github.com/lxc/lxd/shared/api
4243             ProfilePut:
4244             description: ProfilePut represents the modifiable fields of a LXD profile
4245             properties:
4246             config:
4247             additionalProperties:
4248             type: string
4249             description: Instance configuration map (refer to doc/instances.md)
4250             example:
4251             limits.cpu: "4"
4252             limits.memory: 4GiB
4253             type: object
4254             x-go-name: Config
4255             description:
4256             description: Description of the profile
4257             example: Medium size instances
4258             type: string
4259             x-go-name: Description
4260             devices:
4261             additionalProperties:
4262             additionalProperties:
4263             type: string
4264             type: object
4265             description: List of devices
4266             example:
4267             eth0:
4268             name: eth0
4269             network: lxdbr0
4270             type: nic
4271             root:
4272             path: /
4273             pool: default
4274             type: disk
4275             type: object
4276             x-go-name: Devices
4277             type: object
4278             x-go-package: github.com/lxc/lxd/shared/api
4279             ProfilesPost:
4280             description: ProfilesPost represents the fields of a new LXD profile
4281             properties:
4282             config:
4283             additionalProperties:
4284             type: string
4285             description: Instance configuration map (refer to doc/instances.md)
4286             example:
4287             limits.cpu: "4"
4288             limits.memory: 4GiB
4289             type: object
4290             x-go-name: Config
4291             description:
4292             description: Description of the profile
4293             example: Medium size instances
4294             type: string
4295             x-go-name: Description
4296             devices:
4297             additionalProperties:
4298             additionalProperties:
4299             type: string
4300             type: object
4301             description: List of devices
4302             example:
4303             eth0:
4304             name: eth0
4305             network: lxdbr0
4306             type: nic
4307             root:
4308             path: /
4309             pool: default
4310             type: disk
4311             type: object
4312             x-go-name: Devices
4313             name:
4314             description: The name of the new profile
4315             example: foo
4316             type: string
4317             x-go-name: Name
4318             type: object
4319             x-go-package: github.com/lxc/lxd/shared/api
4320             Project:
4321             description: Project represents a LXD project
4322             properties:
4323             config:
4324             additionalProperties:
4325             type: string
4326             description: Project configuration map (refer to doc/projects.md)
4327             example:
4328             features.networks: "false"
4329             features.profiles: "true"
4330             type: object
4331             x-go-name: Config
4332             description:
4333             description: Description of the project
4334             example: My new project
4335             type: string
4336             x-go-name: Description
4337             name:
4338             description: The project name
4339             example: foo
4340             readOnly: true
4341             type: string
4342             x-go-name: Name
4343             used_by:
4344             description: List of URLs of objects using this project
4345             example:
4346             - /1.0/images/0e60015346f06627f10580d56ac7fffd9ea775f6d4f25987217d5eed94910a20
4347             - /1.0/instances/c1
4348             - /1.0/networks/lxdbr0
4349             - /1.0/profiles/default
4350             - /1.0/storage-pools/default/volumes/custom/blah
4351             items:
4352             type: string
4353             readOnly: true
4354             type: array
4355             x-go-name: UsedBy
4356             type: object
4357             x-go-package: github.com/lxc/lxd/shared/api
4358             ProjectPost:
4359             description: ProjectPost represents the fields required to rename a LXD project
4360             properties:
4361             name:
4362             description: The new name for the project
4363             example: bar
4364             type: string
4365             x-go-name: Name
4366             type: object
4367             x-go-package: github.com/lxc/lxd/shared/api
4368             ProjectPut:
4369             description: ProjectPut represents the modifiable fields of a LXD project
4370             properties:
4371             config:
4372             additionalProperties:
4373             type: string
4374             description: Project configuration map (refer to doc/projects.md)
4375             example:
4376             features.networks: "false"
4377             features.profiles: "true"
4378             type: object
4379             x-go-name: Config
4380             description:
4381             description: Description of the project
4382             example: My new project
4383             type: string
4384             x-go-name: Description
4385             type: object
4386             x-go-package: github.com/lxc/lxd/shared/api
4387             ProjectState:
4388             description: ProjectState represents the current running state of a LXD project
4389             properties:
4390             resources:
4391             additionalProperties:
4392             $ref: '#/definitions/ProjectStateResource'
4393             description: Allocated and used resources
4394             example:
4395             containers:
4396             limit: 10
4397             usage: 4
4398             cpu:
4399             limit: 20
4400             usage: 16
4401             readOnly: true
4402             type: object
4403             x-go-name: Resources
4404             type: object
4405             x-go-package: github.com/lxc/lxd/shared/api
4406             ProjectStateResource:
4407             description: ProjectStateResource represents the state of a particular resource
4408             in a LXD project
4409             properties:
4410             Limit:
4411             description: Limit for the resource (-1 if none)
4412             example: 10
4413             format: int64
4414             type: integer
4415             Usage:
4416             description: Current usage for the resource
4417             example: 4
4418             format: int64
4419             type: integer
4420             type: object
4421             x-go-package: github.com/lxc/lxd/shared/api
4422             ProjectsPost:
4423             description: ProjectsPost represents the fields of a new LXD project
4424             properties:
4425             config:
4426             additionalProperties:
4427             type: string
4428             description: Project configuration map (refer to doc/projects.md)
4429             example:
4430             features.networks: "false"
4431             features.profiles: "true"
4432             type: object
4433             x-go-name: Config
4434             description:
4435             description: Description of the project
4436             example: My new project
4437             type: string
4438             x-go-name: Description
4439             name:
4440             description: The name of the new project
4441             example: foo
4442             type: string
4443             x-go-name: Name
4444             type: object
4445             x-go-package: github.com/lxc/lxd/shared/api
4446             Resources:
4447             description: Resources represents the system resources available for LXD
4448             properties:
4449             cpu:
4450             $ref: '#/definitions/ResourcesCPU'
4451             gpu:
4452             $ref: '#/definitions/ResourcesGPU'
4453             memory:
4454             $ref: '#/definitions/ResourcesMemory'
4455             network:
4456             $ref: '#/definitions/ResourcesNetwork'
4457             pci:
4458             $ref: '#/definitions/ResourcesPCI'
4459             storage:
4460             $ref: '#/definitions/ResourcesStorage'
4461             system:
4462             $ref: '#/definitions/ResourcesSystem'
4463             usb:
4464             $ref: '#/definitions/ResourcesUSB'
4465             type: object
4466             x-go-package: github.com/lxc/lxd/shared/api
4467             ResourcesCPU:
4468             description: ResourcesCPU represents the cpu resources available on the system
4469             properties:
4470             architecture:
4471             description: Architecture name
4472             example: x86_64
4473             type: string
4474             x-go-name: Architecture
4475             sockets:
4476             description: List of CPU sockets
4477             items:
4478             $ref: '#/definitions/ResourcesCPUSocket'
4479             type: array
4480             x-go-name: Sockets
4481             total:
4482             description: Total number of CPU threads (from all sockets and cores)
4483             example: 1
4484             format: uint64
4485             type: integer
4486             x-go-name: Total
4487             type: object
4488             x-go-package: github.com/lxc/lxd/shared/api
4489             ResourcesCPUCache:
4490             description: ResourcesCPUCache represents a CPU cache
4491             properties:
4492             level:
4493             description: Cache level (usually a number from 1 to 3)
4494             example: 1
4495             format: uint64
4496             type: integer
4497             x-go-name: Level
4498             size:
4499             description: Size of the cache (in bytes)
4500             example: 32768
4501             format: uint64
4502             type: integer
4503             x-go-name: Size
4504             type:
4505             description: Type of cache (Data, Instruction, Unified, ...)
4506             example: Data
4507             type: string
4508             x-go-name: Type
4509             type: object
4510             x-go-package: github.com/lxc/lxd/shared/api
4511             ResourcesCPUCore:
4512             description: ResourcesCPUCore represents a CPU core on the system
4513             properties:
4514             core:
4515             description: Core identifier within the socket
4516             example: 0
4517             format: uint64
4518             type: integer
4519             x-go-name: Core
4520             die:
4521             description: What die the CPU is a part of (for chiplet designs)
4522             example: 0
4523             format: uint64
4524             type: integer
4525             x-go-name: Die
4526             frequency:
4527             description: Current frequency
4528             example: 3500
4529             format: uint64
4530             type: integer
4531             x-go-name: Frequency
4532             threads:
4533             description: List of threads
4534             items:
4535             $ref: '#/definitions/ResourcesCPUThread'
4536             type: array
4537             x-go-name: Threads
4538             type: object
4539             x-go-package: github.com/lxc/lxd/shared/api
4540             ResourcesCPUSocket:
4541             description: ResourcesCPUSocket represents a CPU socket on the system
4542             properties:
4543             cache:
4544             description: List of CPU caches
4545             items:
4546             $ref: '#/definitions/ResourcesCPUCache'
4547             type: array
4548             x-go-name: Cache
4549             cores:
4550             description: List of CPU cores
4551             items:
4552             $ref: '#/definitions/ResourcesCPUCore'
4553             type: array
4554             x-go-name: Cores
4555             frequency:
4556             description: Current CPU frequency (Mhz)
4557             example: 3499
4558             format: uint64
4559             type: integer
4560             x-go-name: Frequency
4561             frequency_minimum:
4562             description: Minimum CPU frequency (Mhz)
4563             example: 400
4564             format: uint64
4565             type: integer
4566             x-go-name: FrequencyMinimum
4567             frequency_turbo:
4568             description: Maximum CPU frequency (Mhz)
4569             example: 3500
4570             format: uint64
4571             type: integer
4572             x-go-name: FrequencyTurbo
4573             name:
4574             description: Product name
4575             example: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
4576             type: string
4577             x-go-name: Name
4578             socket:
4579             description: Socket number
4580             example: 0
4581             format: uint64
4582             type: integer
4583             x-go-name: Socket
4584             vendor:
4585             description: Vendor name
4586             example: GenuineIntel
4587             type: string
4588             x-go-name: Vendor
4589             type: object
4590             x-go-package: github.com/lxc/lxd/shared/api
4591             ResourcesCPUThread:
4592             description: ResourcesCPUThread represents a CPU thread on the system
4593             properties:
4594             id:
4595             description: Thread ID (used for CPU pinning)
4596             example: 0
4597             format: int64
4598             type: integer
4599             x-go-name: ID
4600             isolated:
4601             description: Whether the thread has been isolated (outside of normal scheduling)
4602             example: false
4603             type: boolean
4604             x-go-name: Isolated
4605             numa_node:
4606             description: NUMA node the thread is a part of
4607             example: 0
4608             format: uint64
4609             type: integer
4610             x-go-name: NUMANode
4611             online:
4612             description: Whether the thread is online (enabled)
4613             example: true
4614             type: boolean
4615             x-go-name: Online
4616             thread:
4617             description: Thread identifier within the core
4618             example: 0
4619             format: uint64
4620             type: integer
4621             x-go-name: Thread
4622             type: object
4623             x-go-package: github.com/lxc/lxd/shared/api
4624             ResourcesGPU:
4625             description: ResourcesGPU represents the GPU resources available on the system
4626             properties:
4627             cards:
4628             description: List of GPUs
4629             items:
4630             $ref: '#/definitions/ResourcesGPUCard'
4631             type: array
4632             x-go-name: Cards
4633             total:
4634             description: Total number of GPUs
4635             example: 1
4636             format: uint64
4637             type: integer
4638             x-go-name: Total
4639             type: object
4640             x-go-package: github.com/lxc/lxd/shared/api
4641             ResourcesGPUCard:
4642             description: ResourcesGPUCard represents a GPU card on the system
4643             properties:
4644             driver:
4645             description: Kernel driver currently associated with the GPU
4646             example: i915
4647             type: string
4648             x-go-name: Driver
4649             driver_version:
4650             description: Version of the kernel driver
4651             example: 5.8.0-36-generic
4652             type: string
4653             x-go-name: DriverVersion
4654             drm:
4655             $ref: '#/definitions/ResourcesGPUCardDRM'
4656             mdev:
4657             additionalProperties:
4658             $ref: '#/definitions/ResourcesGPUCardMdev'
4659             description: Map of available mediated device profiles
4660             example: null
4661             type: object
4662             x-go-name: Mdev
4663             numa_node:
4664             description: NUMA node the GPU is a part of
4665             example: 0
4666             format: uint64
4667             type: integer
4668             x-go-name: NUMANode
4669             nvidia:
4670             $ref: '#/definitions/ResourcesGPUCardNvidia'
4671             pci_address:
4672             description: PCI address
4673             example: "0000:00:02.0"
4674             type: string
4675             x-go-name: PCIAddress
4676             product:
4677             description: Name of the product
4678             example: HD Graphics 620
4679             type: string
4680             x-go-name: Product
4681             product_id:
4682             description: PCI ID of the product
4683             example: "5916"
4684             type: string
4685             x-go-name: ProductID
4686             sriov:
4687             $ref: '#/definitions/ResourcesGPUCardSRIOV'
4688             usb_address:
4689             description: USB address (for USB cards)
4690             example: "2:7"
4691             type: string
4692             x-go-name: USBAddress
4693             vendor:
4694             description: Name of the vendor
4695             example: Intel Corporation
4696             type: string
4697             x-go-name: Vendor
4698             vendor_id:
4699             description: PCI ID of the vendor
4700             example: "8086"
4701             type: string
4702             x-go-name: VendorID
4703             type: object
4704             x-go-package: github.com/lxc/lxd/shared/api
4705             ResourcesGPUCardDRM:
4706             description: ResourcesGPUCardDRM represents the Linux DRM configuration of the
4707             GPU
4708             properties:
4709             card_device:
4710             description: Card device number
4711             example: "226:0"
4712             type: string
4713             x-go-name: CardDevice
4714             card_name:
4715             description: Card device name
4716             example: card0
4717             type: string
4718             x-go-name: CardName
4719             control_device:
4720             description: Control device number
4721             example: "226:0"
4722             type: string
4723             x-go-name: ControlDevice
4724             control_name:
4725             description: Control device name
4726             example: controlD64
4727             type: string
4728             x-go-name: ControlName
4729             id:
4730             description: DRM card ID
4731             example: 0
4732             format: uint64
4733             type: integer
4734             x-go-name: ID
4735             render_device:
4736             description: Render device number
4737             example: 226:128
4738             type: string
4739             x-go-name: RenderDevice
4740             render_name:
4741             description: Render device name
4742             example: renderD128
4743             type: string
4744             x-go-name: RenderName
4745             type: object
4746             x-go-package: github.com/lxc/lxd/shared/api
4747             ResourcesGPUCardMdev:
4748             description: ResourcesGPUCardMdev represents the mediated devices configuration
4749             of the GPU
4750             properties:
4751             api:
4752             description: The mechanism used by this device
4753             example: vfio-pci
4754             type: string
4755             x-go-name: API
4756             available:
4757             description: Number of available devices of this profile
4758             example: 2
4759             format: uint64
4760             type: integer
4761             x-go-name: Available
4762             description:
4763             description: Profile description
4764             example: 'low_gm_size: 128MB\nhigh_gm_size: 512MB\nfence: 4\nresolution: 1920x1200\nweight:
4765             4'
4766             type: string
4767             x-go-name: Description
4768             devices:
4769             description: List of active devices (UUIDs)
4770             example:
4771             - 42200aac-0977-495c-8c9e-6c51b9092a01
4772             - b4950c00-1437-41d9-88f6-28d61cf9b9ef
4773             items:
4774             type: string
4775             type: array
4776             x-go-name: Devices
4777             name:
4778             description: Profile name
4779             example: i915-GVTg_V5_8
4780             type: string
4781             x-go-name: Name
4782             type: object
4783             x-go-package: github.com/lxc/lxd/shared/api
4784             ResourcesGPUCardNvidia:
4785             description: ResourcesGPUCardNvidia represents additional information for NVIDIA
4786             GPUs
4787             properties:
4788             architecture:
4789             description: Architecture (generation)
4790             example: "3.5"
4791             type: string
4792             x-go-name: Architecture
4793             brand:
4794             description: Brand name
4795             example: GeForce
4796             type: string
4797             x-go-name: Brand
4798             card_device:
4799             description: Card device number
4800             example: "195:0"
4801             type: string
4802             x-go-name: CardDevice
4803             card_name:
4804             description: Card device name
4805             example: nvidia0
4806             type: string
4807             x-go-name: CardName
4808             cuda_version:
4809             description: Version of the CUDA API
4810             example: "11.0"
4811             type: string
4812             x-go-name: CUDAVersion
4813             model:
4814             description: Model name
4815             example: GeForce GT 730
4816             type: string
4817             x-go-name: Model
4818             nvrm_version:
4819             description: Version of the NVRM (usually driver version)
4820             example: 450.102.04
4821             type: string
4822             x-go-name: NVRMVersion
4823             uuid:
4824             description: GPU UUID
4825             example: GPU-6ddadebd-dafe-2db9-f10f-125719770fd3
4826             type: string
4827             x-go-name: UUID
4828             type: object
4829             x-go-package: github.com/lxc/lxd/shared/api
4830             ResourcesGPUCardSRIOV:
4831             description: ResourcesGPUCardSRIOV represents the SRIOV configuration of the GPU
4832             properties:
4833             current_vfs:
4834             description: Number of VFs currently configured
4835             example: 0
4836             format: uint64
4837             type: integer
4838             x-go-name: CurrentVFs
4839             maximum_vfs:
4840             description: Maximum number of supported VFs
4841             example: 0
4842             format: uint64
4843             type: integer
4844             x-go-name: MaximumVFs
4845             vfs:
4846             description: List of VFs (as additional GPU devices)
4847             example: null
4848             items:
4849             $ref: '#/definitions/ResourcesGPUCard'
4850             type: array
4851             x-go-name: VFs
4852             type: object
4853             x-go-package: github.com/lxc/lxd/shared/api
4854             ResourcesMemory:
4855             description: ResourcesMemory represents the memory resources available on the
4856             system
4857             properties:
4858             hugepages_size:
4859             description: Size of memory huge pages (bytes)
4860             example: 2097152
4861             format: uint64
4862             type: integer
4863             x-go-name: HugepagesSize
4864             hugepages_total:
4865             description: Total of memory huge pages (bytes)
4866             example: 429284917248
4867             format: uint64
4868             type: integer
4869             x-go-name: HugepagesTotal
4870             hugepages_used:
4871             description: Used memory huge pages (bytes)
4872             example: 429284917248
4873             format: uint64
4874             type: integer
4875             x-go-name: HugepagesUsed
4876             nodes:
4877             description: List of NUMA memory nodes
4878             example: null
4879             items:
4880             $ref: '#/definitions/ResourcesMemoryNode'
4881             type: array
4882             x-go-name: Nodes
4883             total:
4884             description: Total system memory (bytes)
4885             example: 687194767360
4886             format: uint64
4887             type: integer
4888             x-go-name: Total
4889             used:
4890             description: Used system memory (bytes)
4891             example: 557450502144
4892             format: uint64
4893             type: integer
4894             x-go-name: Used
4895             type: object
4896             x-go-package: github.com/lxc/lxd/shared/api
4897             ResourcesMemoryNode:
4898             description: ResourcesMemoryNode represents the node-specific memory resources
4899             available on the system
4900             properties:
4901             hugepages_total:
4902             description: Total of memory huge pages (bytes)
4903             example: 214536552448
4904             format: uint64
4905             type: integer
4906             x-go-name: HugepagesTotal
4907             hugepages_used:
4908             description: Used memory huge pages (bytes)
4909             example: 214536552448
4910             format: uint64
4911             type: integer
4912             x-go-name: HugepagesUsed
4913             numa_node:
4914             description: NUMA node identifier
4915             example: 0
4916             format: uint64
4917             type: integer
4918             x-go-name: NUMANode
4919             total:
4920             description: Total system memory (bytes)
4921             example: 343597383680
4922             format: uint64
4923             type: integer
4924             x-go-name: Total
4925             used:
4926             description: Used system memory (bytes)
4927             example: 264880439296
4928             format: uint64
4929             type: integer
4930             x-go-name: Used
4931             type: object
4932             x-go-package: github.com/lxc/lxd/shared/api
4933             ResourcesNetwork:
4934             description: ResourcesNetwork represents the network cards available on the system
4935             properties:
4936             cards:
4937             description: List of network cards
4938             items:
4939             $ref: '#/definitions/ResourcesNetworkCard'
4940             type: array
4941             x-go-name: Cards
4942             total:
4943             description: Total number of network cards
4944             example: 1
4945             format: uint64
4946             type: integer
4947             x-go-name: Total
4948             type: object
4949             x-go-package: github.com/lxc/lxd/shared/api
4950             ResourcesNetworkCard:
4951             description: ResourcesNetworkCard represents a network card on the system
4952             properties:
4953             driver:
4954             description: Kernel driver currently associated with the card
4955             example: atlantic
4956             type: string
4957             x-go-name: Driver
4958             driver_version:
4959             description: Version of the kernel driver
4960             example: 5.8.0-36-generic
4961             type: string
4962             x-go-name: DriverVersion
4963             firmware_version:
4964             description: Current firmware version
4965             example: 3.1.100
4966             type: string
4967             x-go-name: FirmwareVersion
4968             numa_node:
4969             description: NUMA node the card is a part of
4970             example: 0
4971             format: uint64
4972             type: integer
4973             x-go-name: NUMANode
4974             pci_address:
4975             description: PCI address (for PCI cards)
4976             example: 0000:0d:00.0
4977             type: string
4978             x-go-name: PCIAddress
4979             ports:
4980             description: List of ports on the card
4981             items:
4982             $ref: '#/definitions/ResourcesNetworkCardPort'
4983             type: array
4984             x-go-name: Ports
4985             product:
4986             description: Name of the product
4987             example: AQC107 NBase-T/IEEE
4988             type: string
4989             x-go-name: Product
4990             product_id:
4991             description: PCI ID of the product
4992             example: 87b1
4993             type: string
4994             x-go-name: ProductID
4995             sriov:
4996             $ref: '#/definitions/ResourcesNetworkCardSRIOV'
4997             usb_address:
4998             description: USB address (for USB cards)
4999             example: "2:7"
5000             type: string
5001             x-go-name: USBAddress
5002             vendor:
5003             description: Name of the vendor
5004             example: Aquantia Corp.
5005             type: string
5006             x-go-name: Vendor
5007             vendor_id:
5008             description: PCI ID of the vendor
5009             example: 1d6a
5010             type: string
5011             x-go-name: VendorID
5012             type: object
5013             x-go-package: github.com/lxc/lxd/shared/api
5014             ResourcesNetworkCardPort:
5015             description: ResourcesNetworkCardPort represents a network port on the system
5016             properties:
5017             address:
5018             description: MAC address
5019             example: 00:23:a4:01:01:6f
5020             type: string
5021             x-go-name: Address
5022             auto_negotiation:
5023             description: Whether auto negotiation is used
5024             example: true
5025             type: boolean
5026             x-go-name: AutoNegotiation
5027             id:
5028             description: Port identifier (interface name)
5029             example: eth0
5030             type: string
5031             x-go-name: ID
5032             infiniband:
5033             $ref: '#/definitions/ResourcesNetworkCardPortInfiniband'
5034             link_detected:
5035             description: Whether a link was detected
5036             example: true
5037             type: boolean
5038             x-go-name: LinkDetected
5039             link_duplex:
5040             description: Duplex type
5041             example: full
5042             type: string
5043             x-go-name: LinkDuplex
5044             link_speed:
5045             description: Current speed (Mbit/s)
5046             example: 10000
5047             format: uint64
5048             type: integer
5049             x-go-name: LinkSpeed
5050             port:
5051             description: Port number
5052             example: 0
5053             format: uint64
5054             type: integer
5055             x-go-name: Port
5056             port_type:
5057             description: Current port type
5058             example: twisted pair
5059             type: string
5060             x-go-name: PortType
5061             protocol:
5062             description: Transport protocol
5063             example: ethernet
5064             type: string
5065             x-go-name: Protocol
5066             supported_modes:
5067             description: List of supported modes
5068             example:
5069             - 100baseT/Full
5070             - 1000baseT/Full
5071             - 2500baseT/Full
5072             - 5000baseT/Full
5073             - 10000baseT/Full
5074             items:
5075             type: string
5076             type: array
5077             x-go-name: SupportedModes
5078             supported_ports:
5079             description: List of supported port types
5080             example:
5081             - twisted pair
5082             items:
5083             type: string
5084             type: array
5085             x-go-name: SupportedPorts
5086             transceiver_type:
5087             description: Type of transceiver used
5088             example: internal
5089             type: string
5090             x-go-name: TransceiverType
5091             type: object
5092             x-go-package: github.com/lxc/lxd/shared/api
5093             ResourcesNetworkCardPortInfiniband:
5094             description: ResourcesNetworkCardPortInfiniband represents the Linux Infiniband
5095             configuration for the port
5096             properties:
5097             issm_device:
5098             description: ISSM device number
5099             example: 231:64
5100             type: string
5101             x-go-name: IsSMDevice
5102             issm_name:
5103             description: ISSM device name
5104             example: issm0
5105             type: string
5106             x-go-name: IsSMName
5107             mad_device:
5108             description: MAD device number
5109             example: "231:0"
5110             type: string
5111             x-go-name: MADDevice
5112             mad_name:
5113             description: MAD device name
5114             example: umad0
5115             type: string
5116             x-go-name: MADName
5117             verb_device:
5118             description: Verb device number
5119             example: 231:192
5120             type: string
5121             x-go-name: VerbDevice
5122             verb_name:
5123             description: Verb device name
5124             example: uverbs0
5125             type: string
5126             x-go-name: VerbName
5127             type: object
5128             x-go-package: github.com/lxc/lxd/shared/api
5129             ResourcesNetworkCardSRIOV:
5130             description: ResourcesNetworkCardSRIOV represents the SRIOV configuration of the
5131             network card
5132             properties:
5133             current_vfs:
5134             description: Number of VFs currently configured
5135             example: 0
5136             format: uint64
5137             type: integer
5138             x-go-name: CurrentVFs
5139             maximum_vfs:
5140             description: Maximum number of supported VFs
5141             example: 0
5142             format: uint64
5143             type: integer
5144             x-go-name: MaximumVFs
5145             vfs:
5146             description: List of VFs (as additional Network devices)
5147             example: null
5148             items:
5149             $ref: '#/definitions/ResourcesNetworkCard'
5150             type: array
5151             x-go-name: VFs
5152             type: object
5153             x-go-package: github.com/lxc/lxd/shared/api
5154             ResourcesPCI:
5155             description: ResourcesPCI represents the PCI devices available on the system
5156             properties:
5157             devices:
5158             description: List of PCI devices
5159             items:
5160             $ref: '#/definitions/ResourcesPCIDevice'
5161             type: array
5162             x-go-name: Devices
5163             total:
5164             description: Total number of PCI devices
5165             example: 1
5166             format: uint64
5167             type: integer
5168             x-go-name: Total
5169             type: object
5170             x-go-package: github.com/lxc/lxd/shared/api
5171             ResourcesPCIDevice:
5172             description: ResourcesPCIDevice represents a PCI device
5173             properties:
5174             driver:
5175             description: Kernel driver currently associated with the GPU
5176             example: mgag200
5177             type: string
5178             x-go-name: Driver
5179             driver_version:
5180             description: Version of the kernel driver
5181             example: 5.8.0-36-generic
5182             type: string
5183             x-go-name: DriverVersion
5184             iommu_group:
5185             description: IOMMU group number
5186             example: 20
5187             format: uint64
5188             type: integer
5189             x-go-name: IOMMUGroup
5190             numa_node:
5191             description: NUMA node the card is a part of
5192             example: 0
5193             format: uint64
5194             type: integer
5195             x-go-name: NUMANode
5196             pci_address:
5197             description: PCI address
5198             example: "0000:07:03.0"
5199             type: string
5200             x-go-name: PCIAddress
5201             product:
5202             description: Name of the product
5203             example: MGA G200eW WPCM450
5204             type: string
5205             x-go-name: Product
5206             product_id:
5207             description: PCI ID of the product
5208             example: "0532"
5209             type: string
5210             x-go-name: ProductID
5211             vendor:
5212             description: Name of the vendor
5213             example: Matrox Electronics Systems Ltd.
5214             type: string
5215             x-go-name: Vendor
5216             vendor_id:
5217             description: PCI ID of the vendor
5218             example: 102b
5219             type: string
5220             x-go-name: VendorID
5221             type: object
5222             x-go-package: github.com/lxc/lxd/shared/api
5223             ResourcesStorage:
5224             description: ResourcesStorage represents the local storage
5225             properties:
5226             disks:
5227             description: List of disks
5228             items:
5229             $ref: '#/definitions/ResourcesStorageDisk'
5230             type: array
5231             x-go-name: Disks
5232             total:
5233             description: Total number of partitions
5234             example: 1
5235             format: uint64
5236             type: integer
5237             x-go-name: Total
5238             type: object
5239             x-go-package: github.com/lxc/lxd/shared/api
5240             ResourcesStorageDisk:
5241             description: ResourcesStorageDisk represents a disk
5242             properties:
5243             block_size:
5244             description: Block size
5245             example: 512
5246             format: uint64
5247             type: integer
5248             x-go-name: BlockSize
5249             device:
5250             description: Device number
5251             example: "259:0"
5252             type: string
5253             x-go-name: Device
5254             device_id:
5255             description: Device by-id identifier
5256             example: nvme-eui.0000000001000000e4d25cafae2e4c00
5257             type: string
5258             x-go-name: DeviceID
5259             device_path:
5260             description: Device by-path identifier
5261             example: pci-0000:05:00.0-nvme-1
5262             type: string
5263             x-go-name: DevicePath
5264             firmware_version:
5265             description: Current firmware version
5266             example: PSF121C
5267             type: string
5268             x-go-name: FirmwareVersion
5269             id:
5270             description: ID of the disk (device name)
5271             example: nvme0n1
5272             type: string
5273             x-go-name: ID
5274             model:
5275             description: Disk model name
5276             example: INTEL SSDPEKKW256G7
5277             type: string
5278             x-go-name: Model
5279             numa_node:
5280             description: NUMA node the disk is a part of
5281             example: 0
5282             format: uint64
5283             type: integer
5284             x-go-name: NUMANode
5285             partitions:
5286             description: List of partitions
5287             items:
5288             $ref: '#/definitions/ResourcesStorageDiskPartition'
5289             type: array
5290             x-go-name: Partitions
5291             pci_address:
5292             description: PCI address
5293             example: "0000:05:00.0"
5294             type: string
5295             x-go-name: PCIAddress
5296             read_only:
5297             description: Whether the disk is read-only
5298             example: false
5299             type: boolean
5300             x-go-name: ReadOnly
5301             removable:
5302             description: Whether the disk is removable (hot-plug)
5303             example: false
5304             type: boolean
5305             x-go-name: Removable
5306             rpm:
5307             description: Rotation speed (RPM)
5308             example: 0
5309             format: uint64
5310             type: integer
5311             x-go-name: RPM
5312             serial:
5313             description: Serial number
5314             example: BTPY63440ARH256D
5315             type: string
5316             x-go-name: Serial
5317             size:
5318             description: Total size of the disk (bytes)
5319             example: 256060514304
5320             format: uint64
5321             type: integer
5322             x-go-name: Size
5323             type:
5324             description: Storage type
5325             example: nvme
5326             type: string
5327             x-go-name: Type
5328             usb_address:
5329             description: USB address
5330             example: "3:5"
5331             type: string
5332             x-go-name: USBAddress
5333             wwn:
5334             description: WWN identifier
5335             example: eui.0000000001000000e4d25cafae2e4c00
5336             type: string
5337             x-go-name: WWN
5338             type: object
5339             x-go-package: github.com/lxc/lxd/shared/api
5340             ResourcesStorageDiskPartition:
5341             description: ResourcesStorageDiskPartition represents a partition on a disk
5342             properties:
5343             device:
5344             description: Device number
5345             example: "259:1"
5346             type: string
5347             x-go-name: Device
5348             id:
5349             description: ID of the partition (device name)
5350             example: nvme0n1p1
5351             type: string
5352             x-go-name: ID
5353             partition:
5354             description: Partition number
5355             example: 1
5356             format: uint64
5357             type: integer
5358             x-go-name: Partition
5359             read_only:
5360             description: Whether the partition is read-only
5361             example: false
5362             type: boolean
5363             x-go-name: ReadOnly
5364             size:
5365             description: Size of the partition (bytes)
5366             example: 254933278208
5367             format: uint64
5368             type: integer
5369             x-go-name: Size
5370             type: object
5371             x-go-package: github.com/lxc/lxd/shared/api
5372             ResourcesStoragePool:
5373             description: ResourcesStoragePool represents the resources available to a given
5374             storage pool
5375             properties:
5376             inodes:
5377             $ref: '#/definitions/ResourcesStoragePoolInodes'
5378             space:
5379             $ref: '#/definitions/ResourcesStoragePoolSpace'
5380             type: object
5381             x-go-package: github.com/lxc/lxd/shared/api
5382             ResourcesStoragePoolInodes:
5383             description: ResourcesStoragePoolInodes represents the inodes available to a given
5384             storage pool
5385             properties:
5386             total:
5387             description: Total inodes
5388             example: 30709993797
5389             format: uint64
5390             type: integer
5391             x-go-name: Total
5392             used:
5393             description: Used inodes
5394             example: 23937695
5395             format: uint64
5396             type: integer
5397             x-go-name: Used
5398             type: object
5399             x-go-package: github.com/lxc/lxd/shared/api
5400             ResourcesStoragePoolSpace:
5401             description: ResourcesStoragePoolSpace represents the space available to a given
5402             storage pool
5403             properties:
5404             total:
5405             description: Total disk space (bytes)
5406             example: 420100937728
5407             format: uint64
5408             type: integer
5409             x-go-name: Total
5410             used:
5411             description: Used disk space (bytes)
5412             example: 343537419776
5413             format: uint64
5414             type: integer
5415             x-go-name: Used
5416             type: object
5417             x-go-package: github.com/lxc/lxd/shared/api
5418             ResourcesSystem:
5419             description: ResourcesSystem represents the system
5420             properties:
5421             chassis:
5422             $ref: '#/definitions/ResourcesSystemChassis'
5423             family:
5424             description: System family
5425             example: ThinkPad X1 Carbon 5th
5426             type: string
5427             x-go-name: Family
5428             firmware:
5429             $ref: '#/definitions/ResourcesSystemFirmware'
5430             motherboard:
5431             $ref: '#/definitions/ResourcesSystemMotherboard'
5432             product:
5433             description: System model
5434             example: 20HRCTO1WW
5435             type: string
5436             x-go-name: Product
5437             serial:
5438             description: System serial number
5439             example: PY3DD4X9
5440             type: string
5441             x-go-name: Serial
5442             sku:
5443             description: |-
5444             System nanufacturer SKU
5445             LENOVO_MT_20HR_BU_Think_FM_ThinkPad X1 Carbon 5th
5446             type: string
5447             x-go-name: Sku
5448             type:
5449             description: System type (unknown, physical, virtual-machine, container, ...)
5450             example: physical
5451             type: string
5452             x-go-name: Type
5453             uuid:
5454             description: System UUID
5455             example: 7fa1c0cc-2271-11b2-a85c-aab32a05d71a
5456             type: string
5457             x-go-name: UUID
5458             vendor:
5459             description: System vendor
5460             example: LENOVO
5461             type: string
5462             x-go-name: Vendor
5463             version:
5464             description: System version
5465             example: ThinkPad X1 Carbon 5th
5466             type: string
5467             x-go-name: Version
5468             type: object
5469             x-go-package: github.com/lxc/lxd/shared/api
5470             ResourcesSystemChassis:
5471             description: ResourcesSystemChassis represents the system chassis
5472             properties:
5473             serial:
5474             description: Chassis serial number
5475             example: PY3DD4X9
5476             type: string
5477             x-go-name: Serial
5478             type:
5479             description: Chassis type
5480             example: Notebook
5481             type: string
5482             x-go-name: Type
5483             vendor:
5484             description: Chassis vendor
5485             example: Lenovo
5486             type: string
5487             x-go-name: Vendor
5488             version:
5489             description: Chassis version/revision
5490             example: None
5491             type: string
5492             x-go-name: Version
5493             type: object
5494             x-go-package: github.com/lxc/lxd/shared/api
5495             ResourcesSystemFirmware:
5496             description: ResourcesSystemFirmware represents the system firmware
5497             properties:
5498             date:
5499             description: Firmware build date
5500             example: 10/14/2020
5501             type: string
5502             x-go-name: Date
5503             vendor:
5504             description: Firmware vendor
5505             example: Lenovo
5506             type: string
5507             x-go-name: Vendor
5508             version:
5509             description: Firmware version
5510             example: N1MET64W (1.49)
5511             type: string
5512             x-go-name: Version
5513             type: object
5514             x-go-package: github.com/lxc/lxd/shared/api
5515             ResourcesSystemMotherboard:
5516             description: ResourcesSystemMotherboard represents the motherboard
5517             properties:
5518             product:
5519             description: Motherboard model
5520             example: 20HRCTO1WW
5521             type: string
5522             x-go-name: Product
5523             serial:
5524             description: Motherboard serial number
5525             example: L3CF4FX003A
5526             type: string
5527             x-go-name: Serial
5528             vendor:
5529             description: Motherboard vendor
5530             example: Lenovo
5531             type: string
5532             x-go-name: Vendor
5533             version:
5534             description: Motherboard version/revision
5535             example: None
5536             type: string
5537             x-go-name: Version
5538             type: object
5539             x-go-package: github.com/lxc/lxd/shared/api
5540             ResourcesUSB:
5541             description: ResourcesUSB represents the USB devices available on the system
5542             properties:
5543             devices:
5544             description: List of USB devices
5545             items:
5546             $ref: '#/definitions/ResourcesUSBDevice'
5547             type: array
5548             x-go-name: Devices
5549             total:
5550             description: Total number of USB devices
5551             example: 1
5552             format: uint64
5553             type: integer
5554             x-go-name: Total
5555             type: object
5556             x-go-package: github.com/lxc/lxd/shared/api
5557             ResourcesUSBDevice:
5558             description: ResourcesUSBDevice represents a USB device
5559             properties:
5560             bus_address:
5561             description: USB address (bus)
5562             example: 1
5563             format: uint64
5564             type: integer
5565             x-go-name: BusAddress
5566             device_address:
5567             description: USB address (device)
5568             example: 3
5569             format: uint64
5570             type: integer
5571             x-go-name: DeviceAddress
5572             interfaces:
5573             description: List of USB interfaces
5574             items:
5575             $ref: '#/definitions/ResourcesUSBDeviceInterface'
5576             type: array
5577             x-go-name: Interfaces
5578             product:
5579             description: Name of the product
5580             example: Hermon USB hidmouse Device
5581             type: string
5582             x-go-name: Product
5583             product_id:
5584             description: USB ID of the product
5585             example: "2221"
5586             type: string
5587             x-go-name: ProductID
5588             speed:
5589             description: Transfer speed (Mbit/s)
5590             example: 12
5591             format: double
5592             type: number
5593             x-go-name: Speed
5594             vendor:
5595             description: Name of the vendor
5596             example: ATEN International Co., Ltd
5597             type: string
5598             x-go-name: Vendor
5599             vendor_id:
5600             description: USB ID of the vendor
5601             example: "0557"
5602             type: string
5603             x-go-name: VendorID
5604             type: object
5605             x-go-package: github.com/lxc/lxd/shared/api
5606             ResourcesUSBDeviceInterface:
5607             description: ResourcesUSBDeviceInterface represents a USB device interface
5608             properties:
5609             class:
5610             description: Class of USB interface
5611             example: Human Interface Device
5612             type: string
5613             x-go-name: Class
5614             class_id:
5615             description: ID of the USB interface class
5616             example: 3
5617             format: uint64
5618             type: integer
5619             x-go-name: ClassID
5620             driver:
5621             description: Kernel driver currently associated with the device
5622             example: usbhid
5623             type: string
5624             x-go-name: Driver
5625             driver_version:
5626             description: Version of the kernel driver
5627             example: 5.8.0-36-generic
5628             type: string
5629             x-go-name: DriverVersion
5630             number:
5631             description: Interface number
5632             example: 0
5633             format: uint64
5634             type: integer
5635             x-go-name: Number
5636             subclass:
5637             description: Sub class of the interface
5638             example: Boot Interface Subclass
5639             type: string
5640             x-go-name: SubClass
5641             subclass_id:
5642             description: ID of the USB interface sub class
5643             example: 1
5644             format: uint64
5645             type: integer
5646             x-go-name: SubClassID
5647             type: object
5648             x-go-package: github.com/lxc/lxd/shared/api
5649             Server:
5650             description: Server represents a LXD server
5651             properties:
5652             api_extensions:
5653             description: List of supported API extensions
5654             example:
5655             - etag
5656             - patch
5657             - network
5658             - storage
5659             items:
5660             type: string
5661             readOnly: true
5662             type: array
5663             x-go-name: APIExtensions
5664             api_status:
5665             description: Support status of the current API (one of "devel", "stable" or
5666             "deprecated")
5667             example: stable
5668             readOnly: true
5669             type: string
5670             x-go-name: APIStatus
5671             api_version:
5672             description: API version number
5673             example: "1.0"
5674             readOnly: true
5675             type: string
5676             x-go-name: APIVersion
5677             auth:
5678             description: Whether the client is trusted (one of "trusted" or "untrusted")
5679             example: untrusted
5680             readOnly: true
5681             type: string
5682             x-go-name: Auth
5683             auth_methods:
5684             description: List of supported authentication methods
5685             example:
5686             - tls
5687             - candid
5688             items:
5689             type: string
5690             readOnly: true
5691             type: array
5692             x-go-name: AuthMethods
5693             config:
5694             additionalProperties:
5695             type: object
5696             description: Server configuration map (refer to doc/server.md)
5697             example:
5698             core.https_address: :8443
5699             core.trust_password: true
5700             type: object
5701             x-go-name: Config
5702             environment:
5703             $ref: '#/definitions/ServerEnvironment'
5704             public:
5705             description: Whether the server is public-only (only public endpoints are
5706             implemented)
5707             example: false
5708             readOnly: true
5709             type: boolean
5710             x-go-name: Public
5711             type: object
5712             x-go-package: github.com/lxc/lxd/shared/api
5713             ServerEnvironment:
5714             description: ServerEnvironment represents the read-only environment fields of
5715             a LXD server
5716             properties:
5717             addresses:
5718             description: List of addresses the server is listening on
5719             example:
5720             - :8443
5721             items:
5722             type: string
5723             type: array
5724             x-go-name: Addresses
5725             architectures:
5726             description: List of architectures supported by the server
5727             example:
5728             - x86_64
5729             - i686
5730             items:
5731             type: string
5732             type: array
5733             x-go-name: Architectures
5734             certificate:
5735             description: Server certificate as PEM encoded X509
5736             example: X509 PEM certificate
5737             type: string
5738             x-go-name: Certificate
5739             certificate_fingerprint:
5740             description: Server certificate fingerprint as SHA256
5741             example: fd200419b271f1dc2a5591b693cc5774b7f234e1ff8c6b78ad703b6888fe2b69
5742             type: string
5743             x-go-name: CertificateFingerprint
5744             driver:
5745             description: List of supported instance drivers (separate by " | ")
5746             example: lxc | qemu
5747             type: string
5748             x-go-name: Driver
5749             driver_version:
5750             description: List of supported instance driver versions (separate by " | ")
5751             example: 4.0.7 | 5.2.0
5752             type: string
5753             x-go-name: DriverVersion
5754             firewall:
5755             description: Current firewall driver
5756             example: nftables
5757             type: string
5758             x-go-name: Firewall
5759             kernel:
5760             description: OS kernel name
5761             example: Linux
5762             type: string
5763             x-go-name: Kernel
5764             kernel_architecture:
5765             description: OS kernel architecture
5766             example: x86_64
5767             type: string
5768             x-go-name: KernelArchitecture
5769             kernel_features:
5770             additionalProperties:
5771             type: string
5772             description: Map of kernel features that were tested on startup
5773             example:
5774             netnsid_getifaddrs: "true"
5775             seccomp_listener: "true"
5776             type: object
5777             x-go-name: KernelFeatures
5778             kernel_version:
5779             description: Kernel version
5780             example: 5.4.0-36-generic
5781             type: string
5782             x-go-name: KernelVersion
5783             lxc_features:
5784             additionalProperties:
5785             type: string
5786             description: Map of LXC features that were tested on startup
5787             example:
5788             cgroup2: "true"
5789             devpts_fd: "true"
5790             pidfd: "true"
5791             type: object
5792             x-go-name: LXCFeatures
5793             os_name:
5794             description: Name of the operating system (Linux distribution)
5795             example: Ubuntu
5796             type: string
5797             x-go-name: OSName
5798             os_version:
5799             description: Version of the operating system (Linux distribution)
5800             example: "20.04"
5801             type: string
5802             x-go-name: OSVersion
5803             project:
5804             description: Current project name
5805             example: default
5806             type: string
5807             x-go-name: Project
5808             server:
5809             description: Server implementation name
5810             example: lxd
5811             type: string
5812             x-go-name: Server
5813             server_clustered:
5814             description: Whether the server is part of a cluster
5815             example: false
5816             type: boolean
5817             x-go-name: ServerClustered
5818             server_name:
5819             description: Server hostname
5820             example: castiana
5821             type: string
5822             x-go-name: ServerName
5823             server_pid:
5824             description: PID of the LXD process
5825             example: 1453969
5826             format: int64
5827             type: integer
5828             x-go-name: ServerPid
5829             server_version:
5830             description: Server version
5831             example: "4.11"
5832             type: string
5833             x-go-name: ServerVersion
5834             storage:
5835             description: List of active storage drivers (separate by " | ")
5836             example: dir | zfs
5837             type: string
5838             x-go-name: Storage
5839             storage_supported_drivers:
5840             description: List of supported storage drivers
5841             items:
5842             $ref: '#/definitions/ServerStorageDriverInfo'
5843             type: array
5844             x-go-name: StorageSupportedDrivers
5845             storage_version:
5846             description: List of active storage driver versions (separate by " | ")
5847             example: 1 | 0.8.4-1ubuntu11
5848             type: string
5849             x-go-name: StorageVersion
5850             type: object
5851             x-go-package: github.com/lxc/lxd/shared/api
5852             ServerPut:
5853             description: ServerPut represents the modifiable fields of a LXD server configuration
5854             properties:
5855             config:
5856             additionalProperties:
5857             type: object
5858             description: Server configuration map (refer to doc/server.md)
5859             example:
5860             core.https_address: :8443
5861             core.trust_password: true
5862             type: object
5863             x-go-name: Config
5864             type: object
5865             x-go-package: github.com/lxc/lxd/shared/api
5866             ServerStorageDriverInfo:
5867             description: ServerStorageDriverInfo represents the read-only info about a storage
5868             driver
5869             properties:
5870             Name:
5871             description: Name of the driver
5872             example: zfs
5873             type: string
5874             Remote:
5875             description: Whether the driver has remote volumes
5876             example: false
5877             type: boolean
5878             Version:
5879             description: Version of the driver
5880             example: 0.8.4-1ubuntu11
5881             type: string
5882             type: object
5883             x-go-package: github.com/lxc/lxd/shared/api
5884             ServerUntrusted:
5885             description: ServerUntrusted represents a LXD server for an untrusted client
5886             properties:
5887             api_extensions:
5888             description: List of supported API extensions
5889             example:
5890             - etag
5891             - patch
5892             - network
5893             - storage
5894             items:
5895             type: string
5896             readOnly: true
5897             type: array
5898             x-go-name: APIExtensions
5899             api_status:
5900             description: Support status of the current API (one of "devel", "stable" or
5901             "deprecated")
5902             example: stable
5903             readOnly: true
5904             type: string
5905             x-go-name: APIStatus
5906             api_version:
5907             description: API version number
5908             example: "1.0"
5909             readOnly: true
5910             type: string
5911             x-go-name: APIVersion
5912             auth:
5913             description: Whether the client is trusted (one of "trusted" or "untrusted")
5914             example: untrusted
5915             readOnly: true
5916             type: string
5917             x-go-name: Auth
5918             auth_methods:
5919             description: List of supported authentication methods
5920             example:
5921             - tls
5922             - candid
5923             items:
5924             type: string
5925             readOnly: true
5926             type: array
5927             x-go-name: AuthMethods
5928             public:
5929             description: Whether the server is public-only (only public endpoints are
5930             implemented)
5931             example: false
5932             readOnly: true
5933             type: boolean
5934             x-go-name: Public
5935             type: object
5936             x-go-package: github.com/lxc/lxd/shared/api
5937             StatusCode:
5938             description: StatusCode represents a valid LXD operation and container status
5939             format: int64
5940             type: integer
5941             x-go-package: github.com/lxc/lxd/shared/api
5942             StoragePool:
5943             properties:
5944             config:
5945             additionalProperties:
5946             type: string
5947             description: Storage pool configuration map (refer to doc/storage.md)
5948             example:
5949             volume.block.filesystem: ext4
5950             volume.size: 50GiB
5951             type: object
5952             x-go-name: Config
5953             description:
5954             description: Description of the storage pool
5955             example: Local SSD pool
5956             type: string
5957             x-go-name: Description
5958             driver:
5959             description: Storage pool driver (btrfs, ceph, cephfs, dir, lvm or zfs)
5960             example: zfs
5961             type: string
5962             x-go-name: Driver
5963             locations:
5964             description: Cluster members on which the storage pool has been defined
5965             example:
5966             - lxd01
5967             - lxd02
5968             - lxd03
5969             items:
5970             type: string
5971             readOnly: true
5972             type: array
5973             x-go-name: Locations
5974             name:
5975             description: Storage pool name
5976             example: local
5977             type: string
5978             x-go-name: Name
5979             status:
5980             description: Pool status (Pending, Created, Errored or Unknown)
5981             example: Created
5982             readOnly: true
5983             type: string
5984             x-go-name: Status
5985             used_by:
5986             description: List of URLs of objects using this storage pool
5987             example:
5988             - /1.0/profiles/default
5989             - /1.0/instances/c1
5990             items:
5991             type: string
5992             type: array
5993             x-go-name: UsedBy
5994             title: StoragePool represents the fields of a LXD storage pool.
5995             type: object
5996             x-go-package: github.com/lxc/lxd/shared/api
5997             StoragePoolPut:
5998             properties:
5999             config:
6000             additionalProperties:
6001             type: string
6002             description: Storage pool configuration map (refer to doc/storage.md)
6003             example:
6004             volume.block.filesystem: ext4
6005             volume.size: 50GiB
6006             type: object
6007             x-go-name: Config
6008             description:
6009             description: Description of the storage pool
6010             example: Local SSD pool
6011             type: string
6012             x-go-name: Description
6013             title: StoragePoolPut represents the modifiable fields of a LXD storage pool.
6014             type: object
6015             x-go-package: github.com/lxc/lxd/shared/api
6016             StoragePoolVolumeBackup:
6017             description: StoragePoolVolumeBackup represents a LXD volume backup
6018             properties:
6019             created_at:
6020             description: When the backup was cerated
6021             example: "2021-03-23T16:38:37.753398689-04:00"
6022             format: date-time
6023             type: string
6024             x-go-name: CreatedAt
6025             expires_at:
6026             description: When the backup expires (gets auto-deleted)
6027             example: "2021-03-23T17:38:37.753398689-04:00"
6028             format: date-time
6029             type: string
6030             x-go-name: ExpiresAt
6031             name:
6032             description: Backup name
6033             example: backup0
6034             type: string
6035             x-go-name: Name
6036             optimized_storage:
6037             description: Whether to use a pool-optimized binary format (instead of plain
6038             tarball)
6039             example: true
6040             type: boolean
6041             x-go-name: OptimizedStorage
6042             volume_only:
6043             description: Whether to ignore snapshots
6044             example: false
6045             type: boolean
6046             x-go-name: VolumeOnly
6047             type: object
6048             x-go-package: github.com/lxc/lxd/shared/api
6049             StoragePoolVolumeBackupPost:
6050             description: StoragePoolVolumeBackupPost represents the fields available for the
6051             renaming of a volume backup
6052             properties:
6053             name:
6054             description: New backup name
6055             example: backup1
6056             type: string
6057             x-go-name: Name
6058             type: object
6059             x-go-package: github.com/lxc/lxd/shared/api
6060             StoragePoolVolumeBackupsPost:
6061             description: StoragePoolVolumeBackupsPost represents the fields available for
6062             a new LXD volume backup
6063             properties:
6064             compression_algorithm:
6065             description: What compression algorithm to use
6066             example: gzip
6067             type: string
6068             x-go-name: CompressionAlgorithm
6069             expires_at:
6070             description: When the backup expires (gets auto-deleted)
6071             example: "2021-03-23T17:38:37.753398689-04:00"
6072             format: date-time
6073             type: string
6074             x-go-name: ExpiresAt
6075             name:
6076             description: Backup name
6077             example: backup0
6078             type: string
6079             x-go-name: Name
6080             optimized_storage:
6081             description: Whether to use a pool-optimized binary format (instead of plain
6082             tarball)
6083             example: true
6084             type: boolean
6085             x-go-name: OptimizedStorage
6086             volume_only:
6087             description: Whether to ignore snapshots
6088             example: false
6089             type: boolean
6090             x-go-name: VolumeOnly
6091             type: object
6092             x-go-package: github.com/lxc/lxd/shared/api
6093             StoragePoolsPost:
6094             description: StoragePoolsPost represents the fields of a new LXD storage pool
6095             properties:
6096             config:
6097             additionalProperties:
6098             type: string
6099             description: Storage pool configuration map (refer to doc/storage.md)
6100             example:
6101             volume.block.filesystem: ext4
6102             volume.size: 50GiB
6103             type: object
6104             x-go-name: Config
6105             description:
6106             description: Description of the storage pool
6107             example: Local SSD pool
6108             type: string
6109             x-go-name: Description
6110             driver:
6111             description: Storage pool driver (btrfs, ceph, cephfs, dir, lvm or zfs)
6112             example: zfs
6113             type: string
6114             x-go-name: Driver
6115             name:
6116             description: Storage pool name
6117             example: local
6118             type: string
6119             x-go-name: Name
6120             type: object
6121             x-go-package: github.com/lxc/lxd/shared/api
6122             StorageVolume:
6123             properties:
6124             config:
6125             additionalProperties:
6126             type: string
6127             description: Storage volume configuration map (refer to doc/storage.md)
6128             example:
6129             size: 50GiB
6130             zfs.remove_snapshots: "true"
6131             type: object
6132             x-go-name: Config
6133             content_type:
6134             description: Volume content type (filesystem or block)
6135             example: filesystem
6136             type: string
6137             x-go-name: ContentType
6138             description:
6139             description: Description of the storage volume
6140             example: My custom volume
6141             type: string
6142             x-go-name: Description
6143             location:
6144             description: What cluster member this record was found on
6145             example: lxd01
6146             type: string
6147             x-go-name: Location
6148             name:
6149             description: Volume name
6150             example: foo
6151             type: string
6152             x-go-name: Name
6153             restore:
6154             description: Name of a snapshot to restore
6155             example: snap0
6156             type: string
6157             x-go-name: Restore
6158             type:
6159             description: Volume type
6160             example: custom
6161             type: string
6162             x-go-name: Type
6163             used_by:
6164             description: List of URLs of objects using this storage volume
6165             example:
6166             - /1.0/instances/blah
6167             items:
6168             type: string
6169             type: array
6170             x-go-name: UsedBy
6171             title: StorageVolume represents the fields of a LXD storage volume.
6172             type: object
6173             x-go-package: github.com/lxc/lxd/shared/api
6174             StorageVolumePost:
6175             description: StorageVolumePost represents the fields required to rename a LXD
6176             storage pool volume
6177             properties:
6178             migration:
6179             description: Initiate volume migration
6180             example: false
6181             type: boolean
6182             x-go-name: Migration
6183             name:
6184             description: New volume name
6185             example: foo
6186             type: string
6187             x-go-name: Name
6188             pool:
6189             description: New storage pool
6190             example: remote
6191             type: string
6192             x-go-name: Pool
6193             project:
6194             description: New project name
6195             example: foo
6196             type: string
6197             x-go-name: Project
6198             target:
6199             $ref: '#/definitions/StorageVolumePostTarget'
6200             volume_only:
6201             description: Whether snapshots should be discarded (migration only)
6202             example: false
6203             type: boolean
6204             x-go-name: VolumeOnly
6205             type: object
6206             x-go-package: github.com/lxc/lxd/shared/api
6207             StorageVolumePostTarget:
6208             description: StorageVolumePostTarget represents the migration target host and
6209             operation
6210             properties:
6211             certificate:
6212             description: The certificate of the migration target
6213             example: X509 PEM certificate
6214             type: string
6215             x-go-name: Certificate
6216             operation:
6217             description: Remote operation URL (for migration)
6218             example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1
6219             type: string
6220             x-go-name: Operation
6221             secrets:
6222             additionalProperties:
6223             type: string
6224             description: Migration websockets credentials
6225             example:
6226             migration: random-string
6227             type: object
6228             x-go-name: Websockets
6229             type: object
6230             x-go-package: github.com/lxc/lxd/shared/api
6231             StorageVolumePut:
6232             description: StorageVolumePut represents the modifiable fields of a LXD storage
6233             volume
6234             properties:
6235             config:
6236             additionalProperties:
6237             type: string
6238             description: Storage volume configuration map (refer to doc/storage.md)
6239             example:
6240             size: 50GiB
6241             zfs.remove_snapshots: "true"
6242             type: object
6243             x-go-name: Config
6244             description:
6245             description: Description of the storage volume
6246             example: My custom volume
6247             type: string
6248             x-go-name: Description
6249             restore:
6250             description: Name of a snapshot to restore
6251             example: snap0
6252             type: string
6253             x-go-name: Restore
6254             type: object
6255             x-go-package: github.com/lxc/lxd/shared/api
6256             StorageVolumeSnapshot:
6257             description: StorageVolumeSnapshot represents a LXD storage volume snapshot
6258             properties:
6259             config:
6260             additionalProperties:
6261             type: string
6262             description: Storage volume configuration map (refer to doc/storage.md)
6263             example:
6264             size: 50GiB
6265             zfs.remove_snapshots: "true"
6266             type: object
6267             x-go-name: Config
6268             content_type:
6269             description: The content type (filesystem or block)
6270             example: filesystem
6271             type: string
6272             x-go-name: ContentType
6273             description:
6274             description: Description of the storage volume
6275             example: My custom volume
6276             type: string
6277             x-go-name: Description
6278             expires_at:
6279             description: When the snapshot expires (gets auto-deleted)
6280             example: "2021-03-23T17:38:37.753398689-04:00"
6281             format: date-time
6282             type: string
6283             x-go-name: ExpiresAt
6284             name:
6285             description: Snapshot name
6286             example: snap0
6287             type: string
6288             x-go-name: Name
6289             type: object
6290             x-go-package: github.com/lxc/lxd/shared/api
6291             StorageVolumeSnapshotPost:
6292             description: StorageVolumeSnapshotPost represents the fields required to rename/move
6293             a LXD storage volume snapshot
6294             properties:
6295             name:
6296             description: New snapshot name
6297             example: snap1
6298             type: string
6299             x-go-name: Name
6300             type: object
6301             x-go-package: github.com/lxc/lxd/shared/api
6302             StorageVolumeSnapshotPut:
6303             description: StorageVolumeSnapshotPut represents the modifiable fields of a LXD
6304             storage volume
6305             properties:
6306             description:
6307             description: Description of the storage volume
6308             example: My custom volume
6309             type: string
6310             x-go-name: Description
6311             expires_at:
6312             description: When the snapshot expires (gets auto-deleted)
6313             example: "2021-03-23T17:38:37.753398689-04:00"
6314             format: date-time
6315             type: string
6316             x-go-name: ExpiresAt
6317             type: object
6318             x-go-package: github.com/lxc/lxd/shared/api
6319             StorageVolumeSnapshotsPost:
6320             description: StorageVolumeSnapshotsPost represents the fields available for a
6321             new LXD storage volume snapshot
6322             properties:
6323             expires_at:
6324             description: When the snapshot expires (gets auto-deleted)
6325             example: "2021-03-23T17:38:37.753398689-04:00"
6326             format: date-time
6327             type: string
6328             x-go-name: ExpiresAt
6329             name:
6330             description: Snapshot name
6331             example: snap0
6332             type: string
6333             x-go-name: Name
6334             type: object
6335             x-go-package: github.com/lxc/lxd/shared/api
6336             StorageVolumeSource:
6337             description: StorageVolumeSource represents the creation source for a new storage
6338             volume
6339             properties:
6340             certificate:
6341             description: Certificate (for migration)
6342             example: X509 PEM certificate
6343             type: string
6344             x-go-name: Certificate
6345             mode:
6346             description: Whether to use pull or push mode (for migration)
6347             example: pull
6348             type: string
6349             x-go-name: Mode
6350             name:
6351             description: Source volume name (for copy)
6352             example: foo
6353             type: string
6354             x-go-name: Name
6355             operation:
6356             description: Remote operation URL (for migration)
6357             example: https://1.2.3.4:8443/1.0/operations/1721ae08-b6a8-416a-9614-3f89302466e1
6358             type: string
6359             x-go-name: Operation
6360             pool:
6361             description: Source storage pool (for copy)
6362             example: local
6363             type: string
6364             x-go-name: Pool
6365             project:
6366             description: Source project name
6367             example: foo
6368             type: string
6369             x-go-name: Project
6370             refresh:
6371             description: Whether existing destination volume should be refreshed
6372             example: false
6373             type: boolean
6374             x-go-name: Refresh
6375             secrets:
6376             additionalProperties:
6377             type: string
6378             description: Map of migration websockets (for migration)
6379             example:
6380             rsync: RANDOM-STRING
6381             type: object
6382             x-go-name: Websockets
6383             type:
6384             description: Source type (copy or migration)
6385             example: copy
6386             type: string
6387             x-go-name: Type
6388             volume_only:
6389             description: Whether snapshots should be discarded (for migration)
6390             example: false
6391             type: boolean
6392             x-go-name: VolumeOnly
6393             type: object
6394             x-go-package: github.com/lxc/lxd/shared/api
6395             StorageVolumeState:
6396             description: StorageVolumeState represents the live state of the volume
6397             properties:
6398             usage:
6399             $ref: '#/definitions/StorageVolumeStateUsage'
6400             type: object
6401             x-go-package: github.com/lxc/lxd/shared/api
6402             StorageVolumeStateUsage:
6403             description: StorageVolumeStateUsage represents the disk usage of a volume
6404             properties:
6405             used:
6406             description: Used space in bytes
6407             example: 1693552640
6408             format: uint64
6409             type: integer
6410             x-go-name: Used
6411             type: object
6412             x-go-package: github.com/lxc/lxd/shared/api
6413             StorageVolumesPost:
6414             description: StorageVolumesPost represents the fields of a new LXD storage pool
6415             volume
6416             properties:
6417             config:
6418             additionalProperties:
6419             type: string
6420             description: Storage volume configuration map (refer to doc/storage.md)
6421             example:
6422             size: 50GiB
6423             zfs.remove_snapshots: "true"
6424             type: object
6425             x-go-name: Config
6426             content_type:
6427             description: Volume content type (filesystem or block)
6428             example: filesystem
6429             type: string
6430             x-go-name: ContentType
6431             description:
6432             description: Description of the storage volume
6433             example: My custom volume
6434             type: string
6435             x-go-name: Description
6436             name:
6437             description: Volume name
6438             example: foo
6439             type: string
6440             x-go-name: Name
6441             restore:
6442             description: Name of a snapshot to restore
6443             example: snap0
6444             type: string
6445             x-go-name: Restore
6446             source:
6447             $ref: '#/definitions/StorageVolumeSource'
6448             type:
6449             description: Volume type (container, custom, image or virtual-machine)
6450             example: custom
6451             type: string
6452             x-go-name: Type
6453             type: object
6454             x-go-package: github.com/lxc/lxd/shared/api
6455             Warning:
6456             properties:
6457             count:
6458             description: The number of times this warning occurred
6459             example: 1
6460             format: int64
6461             type: integer
6462             x-go-name: Count
6463             entity_url:
6464             description: The entity affected by this warning
6465             example: /1.0/instances/c1?project=default
6466             type: string
6467             x-go-name: EntityURL
6468             first_seen_at:
6469             description: The first time this warning occurred
6470             example: "2021-03-23T17:38:37.753398689-04:00"
6471             format: date-time
6472             type: string
6473             x-go-name: FirstSeenAt
6474             last_message:
6475             description: The warning message
6476             example: Couldn't find the CGroup blkio.weight, disk priority will be ignored
6477             type: string
6478             x-go-name: LastMessage
6479             last_seen_at:
6480             description: The last time this warning occurred
6481             example: "2021-03-23T17:38:37.753398689-04:00"
6482             format: date-time
6483             type: string
6484             x-go-name: LastSeenAt
6485             location:
6486             description: What cluster member this warning occurred on
6487             example: node1
6488             type: string
6489             x-go-name: Location
6490             project:
6491             description: The project the warning occurred in
6492             example: default
6493             type: string
6494             x-go-name: Project
6495             severity:
6496             description: The severity of this warning
6497             example: low
6498             type: string
6499             x-go-name: Severity
6500             status:
6501             description: Status of the warning (new, acknowledged, or resolved)
6502             example: new
6503             type: string
6504             x-go-name: Status
6505             type:
6506             description: Type type of warning
6507             example: Couldn't find CGroup
6508             type: string
6509             x-go-name: Type
6510             uuid:
6511             description: UUID of the warning
6512             example: e9e9da0d-2538-4351-8047-46d4a8ae4dbb
6513             type: string
6514             x-go-name: UUID
6515             title: Warning represents a warning entry.
6516             type: object
6517             x-go-package: github.com/lxc/lxd/shared/api
6518             WarningPut:
6519             properties:
6520             status:
6521             description: Status of the warning (new, acknowledged, or resolved)
6522             example: new
6523             type: string
6524             x-go-name: Status
6525             title: WarningPut represents the modifiable fields of a warning.
6526             type: object
6527             x-go-package: github.com/lxc/lxd/shared/api
6528             info:
6529             contact:
6530             email: lxc-devel@lists.linuxcontainers.org
6531             name: LXD upstream
6532             url: https://github.com/lxc/lxd
6533             description: |-
6534             This is the REST API used by all LXD clients.
6535             Internal endpoints aren't included in this documentation.
6536              
6537             The LXD API is available over both a local unix+http and remote https API.
6538             Authentication for local users relies on group membership and access to the unix socket.
6539             For remote users, the default authentication method is TLS client
6540             certificates with a macaroon based (candid) authentication method also
6541             supported.
6542             license:
6543             name: Apache-2.0
6544             url: https://www.apache.org/licenses/LICENSE-2.0
6545             title: LXD external REST API
6546             version: "1.0"
6547             paths:
6548             /:
6549             get:
6550             description: |-
6551             Returns a list of supported API versions (URLs).
6552              
6553             Internal API endpoints are not reported as those aren't versioned and
6554             should only be used by LXD itself.
6555             operationId: api_get
6556             produces:
6557             - application/json
6558             responses:
6559             "200":
6560             description: API endpoints
6561             schema:
6562             description: Sync response
6563             properties:
6564             metadata:
6565             description: List of endpoints
6566             example:
6567             - /1.0
6568             items:
6569             type: string
6570             type: array
6571             status:
6572             description: Status description
6573             example: Success
6574             type: string
6575             status_code:
6576             description: Status code
6577             example: 200
6578             type: integer
6579             type:
6580             description: Response type
6581             example: sync
6582             type: string
6583             type: object
6584             summary: Get the supported API enpoints
6585             tags:
6586             - server
6587             /1.0:
6588             get:
6589             description: Shows the full server environment and configuration.
6590             operationId: server_get
6591             parameters:
6592             - description: Cluster member name
6593             example: lxd01
6594             in: query
6595             name: target
6596             type: string
6597             - description: Project name
6598             example: default
6599             in: query
6600             name: project
6601             type: string
6602             produces:
6603             - application/json
6604             responses:
6605             "200":
6606             description: Server environment and configuration
6607             schema:
6608             description: Sync response
6609             properties:
6610             metadata:
6611             $ref: '#/definitions/Server'
6612             status:
6613             description: Status description
6614             example: Success
6615             type: string
6616             status_code:
6617             description: Status code
6618             example: 200
6619             type: integer
6620             type:
6621             description: Response type
6622             example: sync
6623             type: string
6624             type: object
6625             "500":
6626             $ref: '#/responses/InternalServerError'
6627             summary: Get the server environment and configuration
6628             tags:
6629             - server
6630             patch:
6631             consumes:
6632             - application/json
6633             description: Updates a subset of the server configuration.
6634             operationId: server_patch
6635             parameters:
6636             - description: Cluster member name
6637             example: lxd01
6638             in: query
6639             name: target
6640             type: string
6641             - description: Server configuration
6642             in: body
6643             name: server
6644             required: true
6645             schema:
6646             $ref: '#/definitions/ServerPut'
6647             produces:
6648             - application/json
6649             responses:
6650             "200":
6651             $ref: '#/responses/EmptySyncResponse'
6652             "400":
6653             $ref: '#/responses/BadRequest'
6654             "403":
6655             $ref: '#/responses/Forbidden'
6656             "412":
6657             $ref: '#/responses/PreconditionFailed'
6658             "500":
6659             $ref: '#/responses/InternalServerError'
6660             summary: Partially update the server configuration
6661             tags:
6662             - server
6663             put:
6664             consumes:
6665             - application/json
6666             description: Updates the entire server configuration.
6667             operationId: server_put
6668             parameters:
6669             - description: Cluster member name
6670             example: lxd01
6671             in: query
6672             name: target
6673             type: string
6674             - description: Server configuration
6675             in: body
6676             name: server
6677             required: true
6678             schema:
6679             $ref: '#/definitions/ServerPut'
6680             produces:
6681             - application/json
6682             responses:
6683             "200":
6684             $ref: '#/responses/EmptySyncResponse'
6685             "400":
6686             $ref: '#/responses/BadRequest'
6687             "403":
6688             $ref: '#/responses/Forbidden'
6689             "412":
6690             $ref: '#/responses/PreconditionFailed'
6691             "500":
6692             $ref: '#/responses/InternalServerError'
6693             summary: Update the server configuration
6694             tags:
6695             - server
6696             /1.0/certificates:
6697             get:
6698             description: Returns a list of trusted certificates (URLs).
6699             operationId: certificates_get
6700             produces:
6701             - application/json
6702             responses:
6703             "200":
6704             description: API endpoints
6705             schema:
6706             description: Sync response
6707             properties:
6708             metadata:
6709             description: List of endpoints
6710             example: |-
6711             [
6712             "/1.0/certificates/390fdd27ed5dc2408edc11fe602eafceb6c025ddbad9341dfdcb1056a8dd98b1",
6713             "/1.0/certificates/22aee3f051f96abe6d7756892eecabf4b4b22e2ba877840a4ca981e9ea54030a"
6714             ]
6715             items:
6716             type: string
6717             type: array
6718             status:
6719             description: Status description
6720             example: Success
6721             type: string
6722             status_code:
6723             description: Status code
6724             example: 200
6725             type: integer
6726             type:
6727             description: Response type
6728             example: sync
6729             type: string
6730             type: object
6731             "403":
6732             $ref: '#/responses/Forbidden'
6733             "500":
6734             $ref: '#/responses/InternalServerError'
6735             summary: Get the trusted certificates
6736             tags:
6737             - certificates
6738             post:
6739             consumes:
6740             - application/json
6741             description: |-
6742             Adds a certificate to the trust store.
6743             In this mode, the `password` property is always ignored.
6744             operationId: certificates_post
6745             parameters:
6746             - description: Certificate
6747             in: body
6748             name: certificate
6749             required: true
6750             schema:
6751             $ref: '#/definitions/CertificatesPost'
6752             produces:
6753             - application/json
6754             responses:
6755             "200":
6756             $ref: '#/responses/EmptySyncResponse'
6757             "400":
6758             $ref: '#/responses/BadRequest'
6759             "403":
6760             $ref: '#/responses/Forbidden'
6761             "500":
6762             $ref: '#/responses/InternalServerError'
6763             summary: Add a trusted certificate
6764             tags:
6765             - certificates
6766             /1.0/certificates/{fingerprint}:
6767             delete:
6768             description: Removes the certificate from the trust store.
6769             operationId: certificate_delete
6770             produces:
6771             - application/json
6772             responses:
6773             "200":
6774             $ref: '#/responses/EmptySyncResponse'
6775             "400":
6776             $ref: '#/responses/BadRequest'
6777             "403":
6778             $ref: '#/responses/Forbidden'
6779             "500":
6780             $ref: '#/responses/InternalServerError'
6781             summary: Delete the trusted certificate
6782             tags:
6783             - certificates
6784             get:
6785             description: Gets a specific certificate entry from the trust store.
6786             operationId: certificate_get
6787             produces:
6788             - application/json
6789             responses:
6790             "200":
6791             description: Certificate
6792             schema:
6793             description: Sync response
6794             properties:
6795             metadata:
6796             $ref: '#/definitions/Certificate'
6797             status:
6798             description: Status description
6799             example: Success
6800             type: string
6801             status_code:
6802             description: Status code
6803             example: 200
6804             type: integer
6805             type:
6806             description: Response type
6807             example: sync
6808             type: string
6809             type: object
6810             "403":
6811             $ref: '#/responses/Forbidden'
6812             "500":
6813             $ref: '#/responses/InternalServerError'
6814             summary: Get the trusted certificate
6815             tags:
6816             - certificates
6817             patch:
6818             consumes:
6819             - application/json
6820             description: Updates a subset of the certificate configuration.
6821             operationId: certificate_patch
6822             parameters:
6823             - description: Certificate configuration
6824             in: body
6825             name: certificate
6826             required: true
6827             schema:
6828             $ref: '#/definitions/CertificatePut'
6829             produces:
6830             - application/json
6831             responses:
6832             "200":
6833             $ref: '#/responses/EmptySyncResponse'
6834             "400":
6835             $ref: '#/responses/BadRequest'
6836             "403":
6837             $ref: '#/responses/Forbidden'
6838             "412":
6839             $ref: '#/responses/PreconditionFailed'
6840             "500":
6841             $ref: '#/responses/InternalServerError'
6842             summary: Partially update the trusted certificate
6843             tags:
6844             - certificates
6845             put:
6846             consumes:
6847             - application/json
6848             description: Updates the entire certificate configuration.
6849             operationId: certificate_put
6850             parameters:
6851             - description: Certificate configuration
6852             in: body
6853             name: certificate
6854             required: true
6855             schema:
6856             $ref: '#/definitions/CertificatePut'
6857             produces:
6858             - application/json
6859             responses:
6860             "200":
6861             $ref: '#/responses/EmptySyncResponse'
6862             "400":
6863             $ref: '#/responses/BadRequest'
6864             "403":
6865             $ref: '#/responses/Forbidden'
6866             "412":
6867             $ref: '#/responses/PreconditionFailed'
6868             "500":
6869             $ref: '#/responses/InternalServerError'
6870             summary: Update the trusted certificate
6871             tags:
6872             - certificates
6873             /1.0/certificates?public:
6874             post:
6875             consumes:
6876             - application/json
6877             description: |-
6878             Adds a certificate to the trust store as an untrusted user.
6879             In this mode, the `password` property must be set to the correct value.
6880              
6881             The `certificate` field can be omitted in which case the TLS client
6882             certificate in use for the connection will be retrieved and added to the
6883             trust store.
6884              
6885             The `?public` part of the URL isn't required, it's simply used to
6886             separate the two behaviors of this endpoint.
6887             operationId: certificates_post_untrusted
6888             parameters:
6889             - description: Certificate
6890             in: body
6891             name: certificate
6892             required: true
6893             schema:
6894             $ref: '#/definitions/CertificatesPost'
6895             produces:
6896             - application/json
6897             responses:
6898             "200":
6899             $ref: '#/responses/EmptySyncResponse'
6900             "400":
6901             $ref: '#/responses/BadRequest'
6902             "403":
6903             $ref: '#/responses/Forbidden'
6904             "500":
6905             $ref: '#/responses/InternalServerError'
6906             summary: Add a trusted certificate
6907             tags:
6908             - certificates
6909             /1.0/certificates?recursion=1:
6910             get:
6911             description: Returns a list of trusted certificates (structs).
6912             operationId: certificates_get_recursion1
6913             produces:
6914             - application/json
6915             responses:
6916             "200":
6917             description: API endpoints
6918             schema:
6919             description: Sync response
6920             properties:
6921             metadata:
6922             description: List of certificates
6923             items:
6924             $ref: '#/definitions/Certificate'
6925             type: array
6926             status:
6927             description: Status description
6928             example: Success
6929             type: string
6930             status_code:
6931             description: Status code
6932             example: 200
6933             type: integer
6934             type:
6935             description: Response type
6936             example: sync
6937             type: string
6938             type: object
6939             "403":
6940             $ref: '#/responses/Forbidden'
6941             "500":
6942             $ref: '#/responses/InternalServerError'
6943             summary: Get the trusted certificates
6944             tags:
6945             - certificates
6946             /1.0/cluster:
6947             get:
6948             description: Gets the current cluster configuration.
6949             operationId: cluster_get
6950             produces:
6951             - application/json
6952             responses:
6953             "200":
6954             description: Cluster configuration
6955             schema:
6956             description: Sync response
6957             properties:
6958             metadata:
6959             $ref: '#/definitions/Cluster'
6960             status:
6961             description: Status description
6962             example: Success
6963             type: string
6964             status_code:
6965             description: Status code
6966             example: 200
6967             type: integer
6968             type:
6969             description: Response type
6970             example: sync
6971             type: string
6972             type: object
6973             "403":
6974             $ref: '#/responses/Forbidden'
6975             "500":
6976             $ref: '#/responses/InternalServerError'
6977             summary: Get the cluster configuration
6978             tags:
6979             - cluster
6980             put:
6981             consumes:
6982             - application/json
6983             description: Updates the entire cluster configuration.
6984             operationId: cluster_put
6985             parameters:
6986             - description: Cluster configuration
6987             in: body
6988             name: cluster
6989             required: true
6990             schema:
6991             $ref: '#/definitions/ClusterPut'
6992             produces:
6993             - application/json
6994             responses:
6995             "200":
6996             $ref: '#/responses/EmptySyncResponse'
6997             "400":
6998             $ref: '#/responses/BadRequest'
6999             "403":
7000             $ref: '#/responses/Forbidden'
7001             "412":
7002             $ref: '#/responses/PreconditionFailed'
7003             "500":
7004             $ref: '#/responses/InternalServerError'
7005             summary: Update the cluster configuration
7006             tags:
7007             - cluster
7008             /1.0/cluster/certificate:
7009             put:
7010             consumes:
7011             - application/json
7012             description: |-
7013             Replaces existing cluster certificate and reloads LXD on each cluster
7014             member.
7015             operationId: clustering_update_cert
7016             parameters:
7017             - description: Cluster certificate replace request
7018             in: body
7019             name: cluster
7020             required: true
7021             schema:
7022             $ref: '#/definitions/ClusterCertificatePut'
7023             produces:
7024             - application/json
7025             responses:
7026             "200":
7027             $ref: '#/responses/EmptySyncResponse'
7028             "400":
7029             $ref: '#/responses/BadRequest'
7030             "403":
7031             $ref: '#/responses/Forbidden'
7032             "500":
7033             $ref: '#/responses/InternalServerError'
7034             summary: Update the certificate for the cluster
7035             tags:
7036             - cluster
7037             /1.0/cluster/groups:
7038             get:
7039             description: Returns a list of cluster groups (URLs).
7040             operationId: cluster_groups_get
7041             produces:
7042             - application/json
7043             responses:
7044             "200":
7045             description: API endpoints
7046             schema:
7047             description: Sync response
7048             properties:
7049             metadata:
7050             description: List of endpoints
7051             example: |-
7052             [
7053             "/1.0/cluster/groups/lxd01",
7054             "/1.0/cluster/groups/lxd02"
7055             ]
7056             items:
7057             type: string
7058             type: array
7059             status:
7060             description: Status description
7061             example: Success
7062             type: string
7063             status_code:
7064             description: Status code
7065             example: 200
7066             type: integer
7067             type:
7068             description: Response type
7069             example: sync
7070             type: string
7071             type: object
7072             "403":
7073             $ref: '#/responses/Forbidden'
7074             "500":
7075             $ref: '#/responses/InternalServerError'
7076             summary: Get the cluster groups
7077             tags:
7078             - cluster-groups
7079             post:
7080             consumes:
7081             - application/json
7082             description: Creates a new cluster group.
7083             operationId: cluster_groups_post
7084             parameters:
7085             - description: Cluster group to create
7086             in: body
7087             name: cluster
7088             required: true
7089             schema:
7090             $ref: '#/definitions/ClusterGroupsPost'
7091             produces:
7092             - application/json
7093             responses:
7094             "200":
7095             $ref: '#/responses/EmptySyncResponse'
7096             "400":
7097             $ref: '#/responses/BadRequest'
7098             "403":
7099             $ref: '#/responses/Forbidden'
7100             "500":
7101             $ref: '#/responses/InternalServerError'
7102             summary: Create a cluster group.
7103             tags:
7104             - cluster
7105             /1.0/cluster/groups/{name}:
7106             delete:
7107             description: Removes the cluster group.
7108             operationId: cluster_group_delete
7109             produces:
7110             - application/json
7111             responses:
7112             "200":
7113             $ref: '#/responses/EmptySyncResponse'
7114             "400":
7115             $ref: '#/responses/BadRequest'
7116             "403":
7117             $ref: '#/responses/Forbidden'
7118             "500":
7119             $ref: '#/responses/InternalServerError'
7120             summary: Delete the cluster group.
7121             tags:
7122             - cluster-groups
7123             get:
7124             description: Gets a specific cluster group.
7125             operationId: cluster_group_get
7126             produces:
7127             - application/json
7128             responses:
7129             "200":
7130             description: Cluster group
7131             schema:
7132             description: Sync response
7133             properties:
7134             metadata:
7135             $ref: '#/definitions/ClusterGroup'
7136             status:
7137             description: Status description
7138             example: Success
7139             type: string
7140             status_code:
7141             description: Status code
7142             example: 200
7143             type: integer
7144             type:
7145             description: Response type
7146             example: sync
7147             type: string
7148             type: object
7149             "403":
7150             $ref: '#/responses/Forbidden'
7151             "500":
7152             $ref: '#/responses/InternalServerError'
7153             summary: Get the cluster group
7154             tags:
7155             - cluster-groups
7156             patch:
7157             consumes:
7158             - application/json
7159             description: Updates the cluster group configuration.
7160             operationId: cluster_group_patch
7161             parameters:
7162             - description: cluster group configuration
7163             in: body
7164             name: cluster group
7165             required: true
7166             schema:
7167             $ref: '#/definitions/ClusterGroupPut'
7168             produces:
7169             - application/json
7170             responses:
7171             "200":
7172             $ref: '#/responses/EmptySyncResponse'
7173             "400":
7174             $ref: '#/responses/BadRequest'
7175             "403":
7176             $ref: '#/responses/Forbidden'
7177             "412":
7178             $ref: '#/responses/PreconditionFailed'
7179             "500":
7180             $ref: '#/responses/InternalServerError'
7181             summary: Update the cluster group
7182             tags:
7183             - cluster-groups
7184             post:
7185             consumes:
7186             - application/json
7187             description: Renames an existing cluster group.
7188             operationId: cluster_group_post
7189             parameters:
7190             - description: Cluster group rename request
7191             in: body
7192             name: name
7193             required: true
7194             schema:
7195             $ref: '#/definitions/ClusterGroupPost'
7196             produces:
7197             - application/json
7198             responses:
7199             "200":
7200             $ref: '#/responses/EmptySyncResponse'
7201             "400":
7202             $ref: '#/responses/BadRequest'
7203             "403":
7204             $ref: '#/responses/Forbidden'
7205             "500":
7206             $ref: '#/responses/InternalServerError'
7207             summary: Rename the cluster group
7208             tags:
7209             - cluster-groups
7210             put:
7211             consumes:
7212             - application/json
7213             description: Updates the entire cluster group configuration.
7214             operationId: cluster_group_put
7215             parameters:
7216             - description: cluster group configuration
7217             in: body
7218             name: cluster group
7219             required: true
7220             schema:
7221             $ref: '#/definitions/ClusterGroupPut'
7222             produces:
7223             - application/json
7224             responses:
7225             "200":
7226             $ref: '#/responses/EmptySyncResponse'
7227             "400":
7228             $ref: '#/responses/BadRequest'
7229             "403":
7230             $ref: '#/responses/Forbidden'
7231             "412":
7232             $ref: '#/responses/PreconditionFailed'
7233             "500":
7234             $ref: '#/responses/InternalServerError'
7235             summary: Update the cluster group
7236             tags:
7237             - cluster-groups
7238             /1.0/cluster/groups?recursion=1:
7239             get:
7240             description: Returns a list of cluster groups (structs).
7241             operationId: cluster_groups_get_recursion1
7242             produces:
7243             - application/json
7244             responses:
7245             "200":
7246             description: API endpoints
7247             schema:
7248             description: Sync response
7249             properties:
7250             metadata:
7251             description: List of cluster groups
7252             items:
7253             $ref: '#/definitions/ClusterGroup'
7254             type: array
7255             status:
7256             description: Status description
7257             example: Success
7258             type: string
7259             status_code:
7260             description: Status code
7261             example: 200
7262             type: integer
7263             type:
7264             description: Response type
7265             example: sync
7266             type: string
7267             type: object
7268             "403":
7269             $ref: '#/responses/Forbidden'
7270             "500":
7271             $ref: '#/responses/InternalServerError'
7272             summary: Get the cluster groups
7273             tags:
7274             - cluster-groups
7275             /1.0/cluster/members:
7276             get:
7277             description: Returns a list of cluster members (URLs).
7278             operationId: cluster_members_get
7279             produces:
7280             - application/json
7281             responses:
7282             "200":
7283             description: API endpoints
7284             schema:
7285             description: Sync response
7286             properties:
7287             metadata:
7288             description: List of endpoints
7289             example: |-
7290             [
7291             "/1.0/cluster/members/lxd01",
7292             "/1.0/cluster/members/lxd02"
7293             ]
7294             items:
7295             type: string
7296             type: array
7297             status:
7298             description: Status description
7299             example: Success
7300             type: string
7301             status_code:
7302             description: Status code
7303             example: 200
7304             type: integer
7305             type:
7306             description: Response type
7307             example: sync
7308             type: string
7309             type: object
7310             "403":
7311             $ref: '#/responses/Forbidden'
7312             "500":
7313             $ref: '#/responses/InternalServerError'
7314             summary: Get the cluster members
7315             tags:
7316             - cluster
7317             post:
7318             consumes:
7319             - application/json
7320             description: Requests a join token to add a cluster member.
7321             operationId: cluster_members_post
7322             parameters:
7323             - description: Cluster member add request
7324             in: body
7325             name: cluster
7326             required: true
7327             schema:
7328             $ref: '#/definitions/ClusterMembersPost'
7329             produces:
7330             - application/json
7331             responses:
7332             "202":
7333             $ref: '#/responses/Operation'
7334             "400":
7335             $ref: '#/responses/BadRequest'
7336             "403":
7337             $ref: '#/responses/Forbidden'
7338             "500":
7339             $ref: '#/responses/InternalServerError'
7340             summary: Request a join token
7341             tags:
7342             - cluster
7343             /1.0/cluster/members/{name}:
7344             delete:
7345             description: Removes the member from the cluster.
7346             operationId: cluster_member_delete
7347             produces:
7348             - application/json
7349             responses:
7350             "200":
7351             $ref: '#/responses/EmptySyncResponse'
7352             "400":
7353             $ref: '#/responses/BadRequest'
7354             "403":
7355             $ref: '#/responses/Forbidden'
7356             "500":
7357             $ref: '#/responses/InternalServerError'
7358             summary: Delete the cluster member
7359             tags:
7360             - cluster
7361             get:
7362             description: Gets a specific cluster member.
7363             operationId: cluster_member_get
7364             produces:
7365             - application/json
7366             responses:
7367             "200":
7368             description: Profile
7369             schema:
7370             description: Sync response
7371             properties:
7372             metadata:
7373             $ref: '#/definitions/ClusterMember'
7374             status:
7375             description: Status description
7376             example: Success
7377             type: string
7378             status_code:
7379             description: Status code
7380             example: 200
7381             type: integer
7382             type:
7383             description: Response type
7384             example: sync
7385             type: string
7386             type: object
7387             "403":
7388             $ref: '#/responses/Forbidden'
7389             "500":
7390             $ref: '#/responses/InternalServerError'
7391             summary: Get the cluster member
7392             tags:
7393             - cluster
7394             patch:
7395             consumes:
7396             - application/json
7397             description: Updates a subset of the cluster member configuration.
7398             operationId: cluster_member_patch
7399             parameters:
7400             - description: Cluster member configuration
7401             in: body
7402             name: cluster
7403             required: true
7404             schema:
7405             $ref: '#/definitions/ClusterMemberPut'
7406             produces:
7407             - application/json
7408             responses:
7409             "200":
7410             $ref: '#/responses/EmptySyncResponse'
7411             "400":
7412             $ref: '#/responses/BadRequest'
7413             "403":
7414             $ref: '#/responses/Forbidden'
7415             "412":
7416             $ref: '#/responses/PreconditionFailed'
7417             "500":
7418             $ref: '#/responses/InternalServerError'
7419             summary: Partially update the cluster member
7420             tags:
7421             - cluster
7422             post:
7423             consumes:
7424             - application/json
7425             description: Renames an existing cluster member.
7426             operationId: cluster_member_post
7427             parameters:
7428             - description: Cluster member rename request
7429             in: body
7430             name: cluster
7431             required: true
7432             schema:
7433             $ref: '#/definitions/ClusterMemberPost'
7434             produces:
7435             - application/json
7436             responses:
7437             "200":
7438             $ref: '#/responses/EmptySyncResponse'
7439             "400":
7440             $ref: '#/responses/BadRequest'
7441             "403":
7442             $ref: '#/responses/Forbidden'
7443             "500":
7444             $ref: '#/responses/InternalServerError'
7445             summary: Rename the cluster member
7446             tags:
7447             - cluster
7448             put:
7449             consumes:
7450             - application/json
7451             description: Updates the entire cluster member configuration.
7452             operationId: cluster_member_put
7453             parameters:
7454             - description: Cluster member configuration
7455             in: body
7456             name: cluster
7457             required: true
7458             schema:
7459             $ref: '#/definitions/ClusterMemberPut'
7460             produces:
7461             - application/json
7462             responses:
7463             "200":
7464             $ref: '#/responses/EmptySyncResponse'
7465             "400":
7466             $ref: '#/responses/BadRequest'
7467             "403":
7468             $ref: '#/responses/Forbidden'
7469             "412":
7470             $ref: '#/responses/PreconditionFailed'
7471             "500":
7472             $ref: '#/responses/InternalServerError'
7473             summary: Update the cluster member
7474             tags:
7475             - cluster
7476             /1.0/cluster/members/{name}/state:
7477             post:
7478             consumes:
7479             - application/json
7480             description: Evacuates or restores a cluster member.
7481             operationId: cluster_member_state_post
7482             parameters:
7483             - description: Cluster member state
7484             in: body
7485             name: cluster
7486             required: true
7487             schema:
7488             $ref: '#/definitions/ClusterMemberStatePost'
7489             produces:
7490             - application/json
7491             responses:
7492             "202":
7493             $ref: '#/responses/Operation'
7494             "400":
7495             $ref: '#/responses/BadRequest'
7496             "403":
7497             $ref: '#/responses/Forbidden'
7498             "500":
7499             $ref: '#/responses/InternalServerError'
7500             summary: Evacuate or restore a cluster member
7501             tags:
7502             - cluster
7503             /1.0/cluster/members?recursion=1:
7504             get:
7505             description: Returns a list of cluster members (structs).
7506             operationId: cluster_members_get_recursion1
7507             produces:
7508             - application/json
7509             responses:
7510             "200":
7511             description: API endpoints
7512             schema:
7513             description: Sync response
7514             properties:
7515             metadata:
7516             description: List of cluster members
7517             items:
7518             $ref: '#/definitions/ClusterMember'
7519             type: array
7520             status:
7521             description: Status description
7522             example: Success
7523             type: string
7524             status_code:
7525             description: Status code
7526             example: 200
7527             type: integer
7528             type:
7529             description: Response type
7530             example: sync
7531             type: string
7532             type: object
7533             "403":
7534             $ref: '#/responses/Forbidden'
7535             "500":
7536             $ref: '#/responses/InternalServerError'
7537             summary: Get the cluster members
7538             tags:
7539             - cluster
7540             /1.0/events:
7541             get:
7542             description: Connects to the event API using websocket.
7543             operationId: events_get
7544             parameters:
7545             - description: Project name
7546             example: default
7547             in: query
7548             name: project
7549             type: string
7550             - description: Event type(s), comma separated (valid types are logging, operation
7551             or lifecycle)
7552             example: logging,lifecycle
7553             in: query
7554             name: type
7555             type: string
7556             produces:
7557             - application/json
7558             responses:
7559             "200":
7560             description: Websocket message (JSON)
7561             schema:
7562             $ref: '#/definitions/Event'
7563             "403":
7564             $ref: '#/responses/Forbidden'
7565             "500":
7566             $ref: '#/responses/InternalServerError'
7567             summary: Get the event stream
7568             tags:
7569             - server
7570             /1.0/images:
7571             get:
7572             description: Returns a list of images (URLs).
7573             operationId: images_get
7574             parameters:
7575             - description: Project name
7576             example: default
7577             in: query
7578             name: project
7579             type: string
7580             - description: Collection filter
7581             example: default
7582             in: query
7583             name: filter
7584             type: string
7585             produces:
7586             - application/json
7587             responses:
7588             "200":
7589             description: API endpoints
7590             schema:
7591             description: Sync response
7592             properties:
7593             metadata:
7594             description: List of endpoints
7595             example: |-
7596             [
7597             "/1.0/images/06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb",
7598             "/1.0/images/084dd79dd1360fd25a2479eb46674c2a5ef3022a40fe03c91ab3603e3402b8e1"
7599             ]
7600             items:
7601             type: string
7602             type: array
7603             status:
7604             description: Status description
7605             example: Success
7606             type: string
7607             status_code:
7608             description: Status code
7609             example: 200
7610             type: integer
7611             type:
7612             description: Response type
7613             example: sync
7614             type: string
7615             type: object
7616             "403":
7617             $ref: '#/responses/Forbidden'
7618             "500":
7619             $ref: '#/responses/InternalServerError'
7620             summary: Get the images
7621             tags:
7622             - images
7623             post:
7624             consumes:
7625             - application/json
7626             description: Adds a new image to the image store.
7627             operationId: images_post
7628             parameters:
7629             - description: Project name
7630             example: default
7631             in: query
7632             name: project
7633             type: string
7634             - description: Image
7635             in: body
7636             name: image
7637             schema:
7638             $ref: '#/definitions/ImagesPost'
7639             - description: Raw image file
7640             in: body
7641             name: raw_image
7642             - description: Push secret for server to server communication
7643             example: RANDOM-STRING
7644             in: header
7645             name: X-LXD-secret
7646             schema:
7647             type: string
7648             - description: Expected fingerprint when pushing a raw image
7649             in: header
7650             name: X-LXD-fingerprint
7651             schema:
7652             type: string
7653             produces:
7654             - application/json
7655             responses:
7656             "202":
7657             $ref: '#/responses/Operation'
7658             "400":
7659             $ref: '#/responses/BadRequest'
7660             "403":
7661             $ref: '#/responses/Forbidden'
7662             "500":
7663             $ref: '#/responses/InternalServerError'
7664             summary: Add an image
7665             tags:
7666             - images
7667             /1.0/images/{fingerprint}:
7668             delete:
7669             description: Removes the image from the image store.
7670             operationId: image_delete
7671             parameters:
7672             - description: Project name
7673             example: default
7674             in: query
7675             name: project
7676             type: string
7677             produces:
7678             - application/json
7679             responses:
7680             "202":
7681             $ref: '#/responses/Operation'
7682             "400":
7683             $ref: '#/responses/BadRequest'
7684             "403":
7685             $ref: '#/responses/Forbidden'
7686             "500":
7687             $ref: '#/responses/InternalServerError'
7688             summary: Delete the image
7689             tags:
7690             - images
7691             get:
7692             description: Gets a specific image.
7693             operationId: image_get
7694             parameters:
7695             - description: Project name
7696             example: default
7697             in: query
7698             name: project
7699             type: string
7700             produces:
7701             - application/json
7702             responses:
7703             "200":
7704             description: Image
7705             schema:
7706             description: Sync response
7707             properties:
7708             metadata:
7709             $ref: '#/definitions/Image'
7710             status:
7711             description: Status description
7712             example: Success
7713             type: string
7714             status_code:
7715             description: Status code
7716             example: 200
7717             type: integer
7718             type:
7719             description: Response type
7720             example: sync
7721             type: string
7722             type: object
7723             "403":
7724             $ref: '#/responses/Forbidden'
7725             "500":
7726             $ref: '#/responses/InternalServerError'
7727             summary: Get the image
7728             tags:
7729             - images
7730             patch:
7731             consumes:
7732             - application/json
7733             description: Updates a subset of the image definition.
7734             operationId: image_patch
7735             parameters:
7736             - description: Project name
7737             example: default
7738             in: query
7739             name: project
7740             type: string
7741             - description: Image configuration
7742             in: body
7743             name: image
7744             required: true
7745             schema:
7746             $ref: '#/definitions/ImagePut'
7747             produces:
7748             - application/json
7749             responses:
7750             "200":
7751             $ref: '#/responses/EmptySyncResponse'
7752             "400":
7753             $ref: '#/responses/BadRequest'
7754             "403":
7755             $ref: '#/responses/Forbidden'
7756             "412":
7757             $ref: '#/responses/PreconditionFailed'
7758             "500":
7759             $ref: '#/responses/InternalServerError'
7760             summary: Partially update the image
7761             tags:
7762             - images
7763             put:
7764             consumes:
7765             - application/json
7766             description: Updates the entire image definition.
7767             operationId: image_put
7768             parameters:
7769             - description: Project name
7770             example: default
7771             in: query
7772             name: project
7773             type: string
7774             - description: Image configuration
7775             in: body
7776             name: image
7777             required: true
7778             schema:
7779             $ref: '#/definitions/ImagePut'
7780             produces:
7781             - application/json
7782             responses:
7783             "200":
7784             $ref: '#/responses/EmptySyncResponse'
7785             "400":
7786             $ref: '#/responses/BadRequest'
7787             "403":
7788             $ref: '#/responses/Forbidden'
7789             "412":
7790             $ref: '#/responses/PreconditionFailed'
7791             "500":
7792             $ref: '#/responses/InternalServerError'
7793             summary: Update the image
7794             tags:
7795             - images
7796             /1.0/images/{fingerprint}/export:
7797             get:
7798             description: |-
7799             Download the raw image file(s) from the server.
7800             If the image is in split format, a multipart http transfer occurs.
7801             operationId: image_export_get
7802             parameters:
7803             - description: Project name
7804             example: default
7805             in: query
7806             name: project
7807             type: string
7808             produces:
7809             - application/octet-stream
7810             - multipart/form-data
7811             responses:
7812             "200":
7813             description: Raw image data
7814             "403":
7815             $ref: '#/responses/Forbidden'
7816             "500":
7817             $ref: '#/responses/InternalServerError'
7818             summary: Get the raw image file(s)
7819             tags:
7820             - images
7821             post:
7822             description: Gets LXD to connect to a remote server and push the image to it.
7823             operationId: images_export_post
7824             parameters:
7825             - description: Project name
7826             example: default
7827             in: query
7828             name: project
7829             type: string
7830             - description: Image push request
7831             in: body
7832             name: image
7833             required: true
7834             schema:
7835             $ref: '#/definitions/ImageExportPost'
7836             produces:
7837             - application/json
7838             responses:
7839             "202":
7840             $ref: '#/responses/Operation'
7841             "403":
7842             $ref: '#/responses/Forbidden'
7843             "500":
7844             $ref: '#/responses/InternalServerError'
7845             summary: Make LXD push the image to a remote server
7846             tags:
7847             - images
7848             /1.0/images/{fingerprint}/export?public:
7849             get:
7850             description: |-
7851             Download the raw image file(s) of a public image from the server.
7852             If the image is in split format, a multipart http transfer occurs.
7853             operationId: image_export_get_untrusted
7854             parameters:
7855             - description: Project name
7856             example: default
7857             in: query
7858             name: project
7859             type: string
7860             - description: Secret token to retrieve a private image
7861             example: RANDOM-STRING
7862             in: query
7863             name: secret
7864             type: string
7865             produces:
7866             - application/octet-stream
7867             - multipart/form-data
7868             responses:
7869             "200":
7870             description: Raw image data
7871             "403":
7872             $ref: '#/responses/Forbidden'
7873             "500":
7874             $ref: '#/responses/InternalServerError'
7875             summary: Get the raw image file(s)
7876             tags:
7877             - images
7878             /1.0/images/{fingerprint}/refresh:
7879             post:
7880             description: |-
7881             This causes LXD to check the image source server for an updated
7882             version of the image and if available to refresh the local copy with the
7883             new version.
7884             operationId: images_refresh_post
7885             parameters:
7886             - description: Project name
7887             example: default
7888             in: query
7889             name: project
7890             type: string
7891             produces:
7892             - application/json
7893             responses:
7894             "202":
7895             $ref: '#/responses/Operation'
7896             "403":
7897             $ref: '#/responses/Forbidden'
7898             "500":
7899             $ref: '#/responses/InternalServerError'
7900             summary: Refresh an image
7901             tags:
7902             - images
7903             /1.0/images/{fingerprint}/secret:
7904             post:
7905             description: |-
7906             This generates a background operation including a secret one time key
7907             in its metadata which can be used to fetch this image from an untrusted
7908             client.
7909             operationId: images_secret_post
7910             parameters:
7911             - description: Project name
7912             example: default
7913             in: query
7914             name: project
7915             type: string
7916             produces:
7917             - application/json
7918             responses:
7919             "202":
7920             $ref: '#/responses/Operation'
7921             "403":
7922             $ref: '#/responses/Forbidden'
7923             "500":
7924             $ref: '#/responses/InternalServerError'
7925             summary: Generate secret for retrieval of the image by an untrusted client
7926             tags:
7927             - images
7928             /1.0/images/{fingerprint}?public:
7929             get:
7930             description: Gets a specific public image.
7931             operationId: image_get_untrusted
7932             parameters:
7933             - description: Project name
7934             example: default
7935             in: query
7936             name: project
7937             type: string
7938             - description: Secret token to retrieve a private image
7939             example: RANDOM-STRING
7940             in: query
7941             name: secret
7942             type: string
7943             produces:
7944             - application/json
7945             responses:
7946             "200":
7947             description: Image
7948             schema:
7949             description: Sync response
7950             properties:
7951             metadata:
7952             $ref: '#/definitions/Image'
7953             status:
7954             description: Status description
7955             example: Success
7956             type: string
7957             status_code:
7958             description: Status code
7959             example: 200
7960             type: integer
7961             type:
7962             description: Response type
7963             example: sync
7964             type: string
7965             type: object
7966             "403":
7967             $ref: '#/responses/Forbidden'
7968             "500":
7969             $ref: '#/responses/InternalServerError'
7970             summary: Get the public image
7971             tags:
7972             - images
7973             /1.0/images/aliases:
7974             get:
7975             description: Returns a list of image aliases (URLs).
7976             operationId: images_aliases_get
7977             parameters:
7978             - description: Project name
7979             example: default
7980             in: query
7981             name: project
7982             type: string
7983             produces:
7984             - application/json
7985             responses:
7986             "200":
7987             description: API endpoints
7988             schema:
7989             description: Sync response
7990             properties:
7991             metadata:
7992             description: List of endpoints
7993             example: |-
7994             [
7995             "/1.0/images/aliases/foo",
7996             "/1.0/images/aliases/bar1"
7997             ]
7998             items:
7999             type: string
8000             type: array
8001             status:
8002             description: Status description
8003             example: Success
8004             type: string
8005             status_code:
8006             description: Status code
8007             example: 200
8008             type: integer
8009             type:
8010             description: Response type
8011             example: sync
8012             type: string
8013             type: object
8014             "403":
8015             $ref: '#/responses/Forbidden'
8016             "500":
8017             $ref: '#/responses/InternalServerError'
8018             summary: Get the image aliases
8019             tags:
8020             - images
8021             post:
8022             consumes:
8023             - application/json
8024             description: Creates a new image alias.
8025             operationId: images_aliases_post
8026             parameters:
8027             - description: Project name
8028             example: default
8029             in: query
8030             name: project
8031             type: string
8032             - description: Image alias
8033             in: body
8034             name: image alias
8035             required: true
8036             schema:
8037             $ref: '#/definitions/ImageAliasesPost'
8038             produces:
8039             - application/json
8040             responses:
8041             "200":
8042             $ref: '#/responses/EmptySyncResponse'
8043             "400":
8044             $ref: '#/responses/BadRequest'
8045             "403":
8046             $ref: '#/responses/Forbidden'
8047             "500":
8048             $ref: '#/responses/InternalServerError'
8049             summary: Add an image alias
8050             tags:
8051             - images
8052             /1.0/images/aliases/{name}:
8053             delete:
8054             description: Deletes a specific image alias.
8055             operationId: image_alias_delete
8056             parameters:
8057             - description: Project name
8058             example: default
8059             in: query
8060             name: project
8061             type: string
8062             produces:
8063             - application/json
8064             responses:
8065             "200":
8066             $ref: '#/responses/EmptySyncResponse'
8067             "400":
8068             $ref: '#/responses/BadRequest'
8069             "403":
8070             $ref: '#/responses/Forbidden'
8071             "500":
8072             $ref: '#/responses/InternalServerError'
8073             summary: Delete the image alias
8074             tags:
8075             - images
8076             get:
8077             description: Gets a specific image alias.
8078             operationId: image_alias_get
8079             parameters:
8080             - description: Project name
8081             example: default
8082             in: query
8083             name: project
8084             type: string
8085             produces:
8086             - application/json
8087             responses:
8088             "200":
8089             description: Image alias
8090             schema:
8091             description: Sync response
8092             properties:
8093             metadata:
8094             $ref: '#/definitions/ImageAliasesEntry'
8095             status:
8096             description: Status description
8097             example: Success
8098             type: string
8099             status_code:
8100             description: Status code
8101             example: 200
8102             type: integer
8103             type:
8104             description: Response type
8105             example: sync
8106             type: string
8107             type: object
8108             "403":
8109             $ref: '#/responses/Forbidden'
8110             "500":
8111             $ref: '#/responses/InternalServerError'
8112             summary: Get the image alias
8113             tags:
8114             - images
8115             patch:
8116             consumes:
8117             - application/json
8118             description: Updates a subset of the image alias configuration.
8119             operationId: images_alias_patch
8120             parameters:
8121             - description: Project name
8122             example: default
8123             in: query
8124             name: project
8125             type: string
8126             - description: Image alias configuration
8127             in: body
8128             name: image alias
8129             required: true
8130             schema:
8131             $ref: '#/definitions/ImageAliasesEntryPut'
8132             produces:
8133             - application/json
8134             responses:
8135             "200":
8136             $ref: '#/responses/EmptySyncResponse'
8137             "400":
8138             $ref: '#/responses/BadRequest'
8139             "403":
8140             $ref: '#/responses/Forbidden'
8141             "412":
8142             $ref: '#/responses/PreconditionFailed'
8143             "500":
8144             $ref: '#/responses/InternalServerError'
8145             summary: Partially update the image alias
8146             tags:
8147             - images
8148             post:
8149             consumes:
8150             - application/json
8151             description: Renames an existing image alias.
8152             operationId: images_alias_post
8153             parameters:
8154             - description: Project name
8155             example: default
8156             in: query
8157             name: project
8158             type: string
8159             - description: Image alias rename request
8160             in: body
8161             name: image alias
8162             required: true
8163             schema:
8164             $ref: '#/definitions/ImageAliasesEntryPost'
8165             produces:
8166             - application/json
8167             responses:
8168             "200":
8169             $ref: '#/responses/EmptySyncResponse'
8170             "400":
8171             $ref: '#/responses/BadRequest'
8172             "403":
8173             $ref: '#/responses/Forbidden'
8174             "500":
8175             $ref: '#/responses/InternalServerError'
8176             summary: Rename the image alias
8177             tags:
8178             - images
8179             put:
8180             consumes:
8181             - application/json
8182             description: Updates the entire image alias configuration.
8183             operationId: images_aliases_put
8184             parameters:
8185             - description: Project name
8186             example: default
8187             in: query
8188             name: project
8189             type: string
8190             - description: Image alias configuration
8191             in: body
8192             name: image alias
8193             required: true
8194             schema:
8195             $ref: '#/definitions/ImageAliasesEntryPut'
8196             produces:
8197             - application/json
8198             responses:
8199             "200":
8200             $ref: '#/responses/EmptySyncResponse'
8201             "400":
8202             $ref: '#/responses/BadRequest'
8203             "403":
8204             $ref: '#/responses/Forbidden'
8205             "412":
8206             $ref: '#/responses/PreconditionFailed'
8207             "500":
8208             $ref: '#/responses/InternalServerError'
8209             summary: Update the image alias
8210             tags:
8211             - images
8212             /1.0/images/aliases/{name}?public:
8213             get:
8214             description: |-
8215             Gets a specific public image alias.
8216             This untrusted endpoint only works for aliases pointing to public images.
8217             operationId: image_alias_get_untrusted
8218             parameters:
8219             - description: Project name
8220             example: default
8221             in: query
8222             name: project
8223             type: string
8224             produces:
8225             - application/json
8226             responses:
8227             "200":
8228             description: Image alias
8229             schema:
8230             description: Sync response
8231             properties:
8232             metadata:
8233             $ref: '#/definitions/ImageAliasesEntry'
8234             status:
8235             description: Status description
8236             example: Success
8237             type: string
8238             status_code:
8239             description: Status code
8240             example: 200
8241             type: integer
8242             type:
8243             description: Response type
8244             example: sync
8245             type: string
8246             type: object
8247             "403":
8248             $ref: '#/responses/Forbidden'
8249             "500":
8250             $ref: '#/responses/InternalServerError'
8251             summary: Get the public image alias
8252             tags:
8253             - images
8254             /1.0/images/aliases?recursion=1:
8255             get:
8256             description: Returns a list of image aliases (structs).
8257             operationId: images_aliases_get_recursion1
8258             parameters:
8259             - description: Project name
8260             example: default
8261             in: query
8262             name: project
8263             type: string
8264             produces:
8265             - application/json
8266             responses:
8267             "200":
8268             description: API endpoints
8269             schema:
8270             description: Sync response
8271             properties:
8272             metadata:
8273             description: List of image aliases
8274             items:
8275             $ref: '#/definitions/ImageAliasesEntry'
8276             type: array
8277             status:
8278             description: Status description
8279             example: Success
8280             type: string
8281             status_code:
8282             description: Status code
8283             example: 200
8284             type: integer
8285             type:
8286             description: Response type
8287             example: sync
8288             type: string
8289             type: object
8290             "403":
8291             $ref: '#/responses/Forbidden'
8292             "500":
8293             $ref: '#/responses/InternalServerError'
8294             summary: Get the image aliases
8295             tags:
8296             - images
8297             /1.0/images?public:
8298             get:
8299             description: Returns a list of publicly available images (URLs).
8300             operationId: images_get_untrusted
8301             parameters:
8302             - description: Project name
8303             example: default
8304             in: query
8305             name: project
8306             type: string
8307             - description: Collection filter
8308             example: default
8309             in: query
8310             name: filter
8311             type: string
8312             produces:
8313             - application/json
8314             responses:
8315             "200":
8316             description: API endpoints
8317             schema:
8318             description: Sync response
8319             properties:
8320             metadata:
8321             description: List of endpoints
8322             example: |-
8323             [
8324             "/1.0/images/06b86454720d36b20f94e31c6812e05ec51c1b568cf3a8abd273769d213394bb",
8325             "/1.0/images/084dd79dd1360fd25a2479eb46674c2a5ef3022a40fe03c91ab3603e3402b8e1"
8326             ]
8327             items:
8328             type: string
8329             type: array
8330             status:
8331             description: Status description
8332             example: Success
8333             type: string
8334             status_code:
8335             description: Status code
8336             example: 200
8337             type: integer
8338             type:
8339             description: Response type
8340             example: sync
8341             type: string
8342             type: object
8343             "403":
8344             $ref: '#/responses/Forbidden'
8345             "500":
8346             $ref: '#/responses/InternalServerError'
8347             summary: Get the public images
8348             tags:
8349             - images
8350             post:
8351             consumes:
8352             - application/json
8353             description: |-
8354             Pushes the data to the target image server.
8355             This is meant for LXD to LXD communication where a new image entry is
8356             prepared on the target server and the source server is provided that URL
8357             and a secret token to push the image content over.
8358             operationId: images_post_untrusted
8359             parameters:
8360             - description: Project name
8361             example: default
8362             in: query
8363             name: project
8364             type: string
8365             - description: Image
8366             in: body
8367             name: image
8368             required: true
8369             schema:
8370             $ref: '#/definitions/ImagesPost'
8371             produces:
8372             - application/json
8373             responses:
8374             "200":
8375             $ref: '#/responses/EmptySyncResponse'
8376             "400":
8377             $ref: '#/responses/BadRequest'
8378             "403":
8379             $ref: '#/responses/Forbidden'
8380             "500":
8381             $ref: '#/responses/InternalServerError'
8382             summary: Add an image
8383             tags:
8384             - images
8385             /1.0/images?public&recursion=1:
8386             get:
8387             description: Returns a list of publicly available images (structs).
8388             operationId: images_get_recursion1_untrusted
8389             parameters:
8390             - description: Project name
8391             example: default
8392             in: query
8393             name: project
8394             type: string
8395             - description: Collection filter
8396             example: default
8397             in: query
8398             name: filter
8399             type: string
8400             produces:
8401             - application/json
8402             responses:
8403             "200":
8404             description: API endpoints
8405             schema:
8406             description: Sync response
8407             properties:
8408             metadata:
8409             description: List of images
8410             items:
8411             $ref: '#/definitions/Image'
8412             type: array
8413             status:
8414             description: Status description
8415             example: Success
8416             type: string
8417             status_code:
8418             description: Status code
8419             example: 200
8420             type: integer
8421             type:
8422             description: Response type
8423             example: sync
8424             type: string
8425             type: object
8426             "403":
8427             $ref: '#/responses/Forbidden'
8428             "500":
8429             $ref: '#/responses/InternalServerError'
8430             summary: Get the public images
8431             tags:
8432             - images
8433             /1.0/images?recursion=1:
8434             get:
8435             description: Returns a list of images (structs).
8436             operationId: images_get_recursion1
8437             parameters:
8438             - description: Project name
8439             example: default
8440             in: query
8441             name: project
8442             type: string
8443             - description: Collection filter
8444             example: default
8445             in: query
8446             name: filter
8447             type: string
8448             produces:
8449             - application/json
8450             responses:
8451             "200":
8452             description: API endpoints
8453             schema:
8454             description: Sync response
8455             properties:
8456             metadata:
8457             description: List of images
8458             items:
8459             $ref: '#/definitions/Image'
8460             type: array
8461             status:
8462             description: Status description
8463             example: Success
8464             type: string
8465             status_code:
8466             description: Status code
8467             example: 200
8468             type: integer
8469             type:
8470             description: Response type
8471             example: sync
8472             type: string
8473             type: object
8474             "403":
8475             $ref: '#/responses/Forbidden'
8476             "500":
8477             $ref: '#/responses/InternalServerError'
8478             summary: Get the images
8479             tags:
8480             - images
8481             /1.0/instances:
8482             get:
8483             description: Returns a list of instances (URLs).
8484             operationId: instances_get
8485             parameters:
8486             - description: Project name
8487             example: default
8488             in: query
8489             name: project
8490             type: string
8491             - description: Collection filter
8492             example: default
8493             in: query
8494             name: filter
8495             type: string
8496             - description: Retrieve instances from all projects
8497             in: query
8498             name: all-projects
8499             type: boolean
8500             produces:
8501             - application/json
8502             responses:
8503             "200":
8504             description: API endpoints
8505             schema:
8506             description: Sync response
8507             properties:
8508             metadata:
8509             description: List of endpoints
8510             example: |-
8511             [
8512             "/1.0/instances/foo",
8513             "/1.0/instances/bar"
8514             ]
8515             items:
8516             type: string
8517             type: array
8518             status:
8519             description: Status description
8520             example: Success
8521             type: string
8522             status_code:
8523             description: Status code
8524             example: 200
8525             type: integer
8526             type:
8527             description: Response type
8528             example: sync
8529             type: string
8530             type: object
8531             "403":
8532             $ref: '#/responses/Forbidden'
8533             "500":
8534             $ref: '#/responses/InternalServerError'
8535             summary: Get the instances
8536             tags:
8537             - instances
8538             post:
8539             consumes:
8540             - application/json
8541             description: |-
8542             Creates a new instance on LXD.
8543             Depending on the source, this can create an instance from an existing
8544             local image, remote image, existing local instance or snapshot, remote
8545             migration stream or backup file.
8546             operationId: instances_post
8547             parameters:
8548             - description: Project name
8549             example: default
8550             in: query
8551             name: project
8552             type: string
8553             - description: Cluster member
8554             example: default
8555             in: query
8556             name: target
8557             type: string
8558             - description: Instance request
8559             in: body
8560             name: instance
8561             schema:
8562             $ref: '#/definitions/InstancesPost'
8563             - description: Raw backup file
8564             in: body
8565             name: raw_backup
8566             produces:
8567             - application/json
8568             responses:
8569             "202":
8570             $ref: '#/responses/Operation'
8571             "400":
8572             $ref: '#/responses/BadRequest'
8573             "403":
8574             $ref: '#/responses/Forbidden'
8575             "500":
8576             $ref: '#/responses/InternalServerError'
8577             summary: Create a new instance
8578             tags:
8579             - instances
8580             put:
8581             consumes:
8582             - application/json
8583             description: Changes the running state of all instances.
8584             operationId: instances_put
8585             parameters:
8586             - description: Project name
8587             example: default
8588             in: query
8589             name: project
8590             type: string
8591             - description: State
8592             in: body
8593             name: state
8594             schema:
8595             $ref: '#/definitions/InstancesPut'
8596             produces:
8597             - application/json
8598             responses:
8599             "202":
8600             $ref: '#/responses/Operation'
8601             "400":
8602             $ref: '#/responses/BadRequest'
8603             "403":
8604             $ref: '#/responses/Forbidden'
8605             "500":
8606             $ref: '#/responses/InternalServerError'
8607             summary: Bulk instance state update
8608             tags:
8609             - instances
8610             /1.0/instances/{name}:
8611             delete:
8612             description: |-
8613             Deletes a specific instance.
8614              
8615             This also deletes anything owned by the instance such as snapshots and backups.
8616             operationId: instance_delete
8617             parameters:
8618             - description: Project name
8619             example: default
8620             in: query
8621             name: project
8622             type: string
8623             produces:
8624             - application/json
8625             responses:
8626             "202":
8627             $ref: '#/responses/Operation'
8628             "400":
8629             $ref: '#/responses/BadRequest'
8630             "403":
8631             $ref: '#/responses/Forbidden'
8632             "500":
8633             $ref: '#/responses/InternalServerError'
8634             summary: Delete an instance
8635             tags:
8636             - instances
8637             get:
8638             description: Gets a specific instance (basic struct).
8639             operationId: instance_get
8640             parameters:
8641             - description: Project name
8642             example: default
8643             in: query
8644             name: project
8645             type: string
8646             produces:
8647             - application/json
8648             responses:
8649             "200":
8650             description: Instance
8651             schema:
8652             description: Sync response
8653             properties:
8654             metadata:
8655             $ref: '#/definitions/Instance'
8656             status:
8657             description: Status description
8658             example: Success
8659             type: string
8660             status_code:
8661             description: Status code
8662             example: 200
8663             type: integer
8664             type:
8665             description: Response type
8666             example: sync
8667             type: string
8668             type: object
8669             "403":
8670             $ref: '#/responses/Forbidden'
8671             "500":
8672             $ref: '#/responses/InternalServerError'
8673             summary: Get the instance
8674             tags:
8675             - instances
8676             patch:
8677             consumes:
8678             - application/json
8679             description: Updates a subset of the instance configuration
8680             operationId: instance_patch
8681             parameters:
8682             - description: Project name
8683             example: default
8684             in: query
8685             name: project
8686             type: string
8687             - description: Update request
8688             in: body
8689             name: instance
8690             schema:
8691             $ref: '#/definitions/InstancePut'
8692             produces:
8693             - application/json
8694             responses:
8695             "200":
8696             $ref: '#/responses/EmptySyncResponse'
8697             "400":
8698             $ref: '#/responses/BadRequest'
8699             "403":
8700             $ref: '#/responses/Forbidden'
8701             "500":
8702             $ref: '#/responses/InternalServerError'
8703             summary: Partially update the instance
8704             tags:
8705             - instances
8706             post:
8707             consumes:
8708             - application/json
8709             description: |-
8710             Renames, moves an instance between pools or migrates an instance to another server.
8711              
8712             The returned operation metadata will vary based on what's requested.
8713             For rename or move within the same server, this is a simple background operation with progress data.
8714             For migration, in the push case, this will similarly be a background
8715             operation with progress data, for the pull case, it will be a websocket
8716             operation with a number of secrets to be passed to the target server.
8717             operationId: instance_post
8718             parameters:
8719             - description: Project name
8720             example: default
8721             in: query
8722             name: project
8723             type: string
8724             - description: Migration request
8725             in: body
8726             name: migration
8727             schema:
8728             $ref: '#/definitions/InstancePost'
8729             produces:
8730             - application/json
8731             responses:
8732             "202":
8733             $ref: '#/responses/Operation'
8734             "400":
8735             $ref: '#/responses/BadRequest'
8736             "403":
8737             $ref: '#/responses/Forbidden'
8738             "500":
8739             $ref: '#/responses/InternalServerError'
8740             summary: Rename or move/migrate an instance
8741             tags:
8742             - instances
8743             put:
8744             consumes:
8745             - application/json
8746             description: Updates the instance configuration or trigger a snapshot restore.
8747             operationId: instance_put
8748             parameters:
8749             - description: Project name
8750             example: default
8751             in: query
8752             name: project
8753             type: string
8754             - description: Update request
8755             in: body
8756             name: instance
8757             schema:
8758             $ref: '#/definitions/InstancePut'
8759             produces:
8760             - application/json
8761             responses:
8762             "202":
8763             $ref: '#/responses/Operation'
8764             "400":
8765             $ref: '#/responses/BadRequest'
8766             "403":
8767             $ref: '#/responses/Forbidden'
8768             "500":
8769             $ref: '#/responses/InternalServerError'
8770             summary: Update the instance
8771             tags:
8772             - instances
8773             /1.0/instances/{name}/backups:
8774             get:
8775             description: Returns a list of instance backups (URLs).
8776             operationId: instance_backups_get
8777             parameters:
8778             - description: Project name
8779             example: default
8780             in: query
8781             name: project
8782             type: string
8783             produces:
8784             - application/json
8785             responses:
8786             "200":
8787             description: API endpoints
8788             schema:
8789             description: Sync response
8790             properties:
8791             metadata:
8792             description: List of endpoints
8793             example: |-
8794             [
8795             "/1.0/instances/foo/backups/backup0",
8796             "/1.0/instances/foo/backups/backup1"
8797             ]
8798             items:
8799             type: string
8800             type: array
8801             status:
8802             description: Status description
8803             example: Success
8804             type: string
8805             status_code:
8806             description: Status code
8807             example: 200
8808             type: integer
8809             type:
8810             description: Response type
8811             example: sync
8812             type: string
8813             type: object
8814             "403":
8815             $ref: '#/responses/Forbidden'
8816             "500":
8817             $ref: '#/responses/InternalServerError'
8818             summary: Get the backups
8819             tags:
8820             - instances
8821             post:
8822             consumes:
8823             - application/json
8824             description: Creates a new backup.
8825             operationId: instance_backups_post
8826             parameters:
8827             - description: Project name
8828             example: default
8829             in: query
8830             name: project
8831             type: string
8832             - description: Backup request
8833             in: body
8834             name: backup
8835             schema:
8836             $ref: '#/definitions/InstanceBackupsPost'
8837             produces:
8838             - application/json
8839             responses:
8840             "202":
8841             $ref: '#/responses/Operation'
8842             "400":
8843             $ref: '#/responses/BadRequest'
8844             "403":
8845             $ref: '#/responses/Forbidden'
8846             "500":
8847             $ref: '#/responses/InternalServerError'
8848             summary: Create a backup
8849             tags:
8850             - instances
8851             /1.0/instances/{name}/backups/{backup}:
8852             delete:
8853             consumes:
8854             - application/json
8855             description: Deletes the instance backup.
8856             operationId: instance_backup_delete
8857             parameters:
8858             - description: Project name
8859             example: default
8860             in: query
8861             name: project
8862             type: string
8863             produces:
8864             - application/json
8865             responses:
8866             "202":
8867             $ref: '#/responses/Operation'
8868             "400":
8869             $ref: '#/responses/BadRequest'
8870             "403":
8871             $ref: '#/responses/Forbidden'
8872             "500":
8873             $ref: '#/responses/InternalServerError'
8874             summary: Delete a backup
8875             tags:
8876             - instances
8877             get:
8878             description: Gets a specific instance backup.
8879             operationId: instance_backup_get
8880             parameters:
8881             - description: Project name
8882             example: default
8883             in: query
8884             name: project
8885             type: string
8886             produces:
8887             - application/json
8888             responses:
8889             "200":
8890             description: Instance backup
8891             schema:
8892             description: Sync response
8893             properties:
8894             metadata:
8895             $ref: '#/definitions/InstanceBackup'
8896             status:
8897             description: Status description
8898             example: Success
8899             type: string
8900             status_code:
8901             description: Status code
8902             example: 200
8903             type: integer
8904             type:
8905             description: Response type
8906             example: sync
8907             type: string
8908             type: object
8909             "403":
8910             $ref: '#/responses/Forbidden'
8911             "500":
8912             $ref: '#/responses/InternalServerError'
8913             summary: Get the backup
8914             tags:
8915             - instances
8916             post:
8917             consumes:
8918             - application/json
8919             description: Renames an instance backup.
8920             operationId: instance_backup_post
8921             parameters:
8922             - description: Project name
8923             example: default
8924             in: query
8925             name: project
8926             type: string
8927             - description: Backup rename
8928             in: body
8929             name: backup
8930             schema:
8931             $ref: '#/definitions/InstanceBackupPost'
8932             produces:
8933             - application/json
8934             responses:
8935             "202":
8936             $ref: '#/responses/Operation'
8937             "400":
8938             $ref: '#/responses/BadRequest'
8939             "403":
8940             $ref: '#/responses/Forbidden'
8941             "500":
8942             $ref: '#/responses/InternalServerError'
8943             summary: Rename a backup
8944             tags:
8945             - instances
8946             /1.0/instances/{name}/backups/{backup}/export:
8947             get:
8948             description: Download the raw backup file(s) from the server.
8949             operationId: instance_backup_export
8950             parameters:
8951             - description: Project name
8952             example: default
8953             in: query
8954             name: project
8955             type: string
8956             produces:
8957             - application/octet-stream
8958             responses:
8959             "200":
8960             description: Raw image data
8961             "403":
8962             $ref: '#/responses/Forbidden'
8963             "500":
8964             $ref: '#/responses/InternalServerError'
8965             summary: Get the raw backup file(s)
8966             tags:
8967             - instances
8968             /1.0/instances/{name}/backups?recursion=1:
8969             get:
8970             description: Returns a list of instance backups (structs).
8971             operationId: instance_backups_get_recursion1
8972             parameters:
8973             - description: Project name
8974             example: default
8975             in: query
8976             name: project
8977             type: string
8978             produces:
8979             - application/json
8980             responses:
8981             "200":
8982             description: API endpoints
8983             schema:
8984             description: Sync response
8985             properties:
8986             metadata:
8987             description: List of instance backups
8988             items:
8989             $ref: '#/definitions/InstanceBackup'
8990             type: array
8991             status:
8992             description: Status description
8993             example: Success
8994             type: string
8995             status_code:
8996             description: Status code
8997             example: 200
8998             type: integer
8999             type:
9000             description: Response type
9001             example: sync
9002             type: string
9003             type: object
9004             "403":
9005             $ref: '#/responses/Forbidden'
9006             "500":
9007             $ref: '#/responses/InternalServerError'
9008             summary: Get the backups
9009             tags:
9010             - instances
9011             /1.0/instances/{name}/console:
9012             delete:
9013             description: Clears the console log buffer.
9014             operationId: instance_console_delete
9015             parameters:
9016             - description: Project name
9017             example: default
9018             in: query
9019             name: project
9020             type: string
9021             produces:
9022             - application/json
9023             responses:
9024             "200":
9025             $ref: '#/responses/EmptySyncResponse'
9026             "400":
9027             $ref: '#/responses/BadRequest'
9028             "403":
9029             $ref: '#/responses/Forbidden'
9030             "404":
9031             $ref: '#/responses/NotFound'
9032             "500":
9033             $ref: '#/responses/InternalServerError'
9034             summary: Clear the console log
9035             tags:
9036             - instances
9037             get:
9038             description: Gets the console log for the instance.
9039             operationId: instance_console_get
9040             parameters:
9041             - description: Project name
9042             example: default
9043             in: query
9044             name: project
9045             type: string
9046             produces:
9047             - application/json
9048             responses:
9049             "200":
9050             description: Raw console log
9051             "400":
9052             $ref: '#/responses/BadRequest'
9053             "403":
9054             $ref: '#/responses/Forbidden'
9055             "404":
9056             $ref: '#/responses/NotFound'
9057             "500":
9058             $ref: '#/responses/InternalServerError'
9059             summary: Get console log
9060             tags:
9061             - instances
9062             post:
9063             consumes:
9064             - application/json
9065             description: |-
9066             Connects to the console of an instance.
9067              
9068             The returned operation metadata will contain two websockets, one for data and one for control.
9069             operationId: instance_console_post
9070             parameters:
9071             - description: Project name
9072             example: default
9073             in: query
9074             name: project
9075             type: string
9076             - description: Console request
9077             in: body
9078             name: console
9079             schema:
9080             $ref: '#/definitions/InstanceConsolePost'
9081             produces:
9082             - application/json
9083             responses:
9084             "202":
9085             $ref: '#/responses/Operation'
9086             "400":
9087             $ref: '#/responses/BadRequest'
9088             "403":
9089             $ref: '#/responses/Forbidden'
9090             "500":
9091             $ref: '#/responses/InternalServerError'
9092             summary: Connect to console
9093             tags:
9094             - instances
9095             /1.0/instances/{name}/exec:
9096             post:
9097             consumes:
9098             - application/json
9099             description: |-
9100             Executes a command inside an instance.
9101              
9102             The returned operation metadata will contain either 2 or 4 websockets.
9103             In non-interactive mode, you'll get one websocket for each of stdin, stdout and stderr.
9104             In interactive mode, a single bi-directional websocket is used for stdin and stdout/stderr.
9105              
9106             An additional "control" socket is always added on top which can be used for out of band communication with LXD.
9107             This allows sending signals and window sizing information through.
9108             operationId: instance_exec_post
9109             parameters:
9110             - description: Project name
9111             example: default
9112             in: query
9113             name: project
9114             type: string
9115             - description: Exec request
9116             in: body
9117             name: exec
9118             schema:
9119             $ref: '#/definitions/InstanceExecPost'
9120             produces:
9121             - application/json
9122             responses:
9123             "202":
9124             $ref: '#/responses/Operation'
9125             "400":
9126             $ref: '#/responses/BadRequest'
9127             "403":
9128             $ref: '#/responses/Forbidden'
9129             "500":
9130             $ref: '#/responses/InternalServerError'
9131             summary: Run a command
9132             tags:
9133             - instances
9134             /1.0/instances/{name}/files:
9135             delete:
9136             description: Removes the file.
9137             operationId: instance_files_delete
9138             parameters:
9139             - description: Path to the file
9140             example: default
9141             in: query
9142             name: path
9143             type: string
9144             - description: Project name
9145             example: default
9146             in: query
9147             name: project
9148             type: string
9149             produces:
9150             - application/json
9151             responses:
9152             "200":
9153             $ref: '#/responses/EmptySyncResponse'
9154             "400":
9155             $ref: '#/responses/BadRequest'
9156             "403":
9157             $ref: '#/responses/Forbidden'
9158             "404":
9159             $ref: '#/responses/NotFound'
9160             "500":
9161             $ref: '#/responses/InternalServerError'
9162             summary: Delete a file
9163             tags:
9164             - instances
9165             get:
9166             description: Gets the file content. If it's a directory, a json list of files
9167             will be returned instead.
9168             operationId: instance_files_get
9169             parameters:
9170             - description: Path to the file
9171             example: default
9172             in: query
9173             name: path
9174             type: string
9175             - description: Project name
9176             example: default
9177             in: query
9178             name: project
9179             type: string
9180             produces:
9181             - application/json
9182             - application/octet-stream
9183             responses:
9184             "200":
9185             description: Raw file or directory listing
9186             headers:
9187             X-LXD-gid:
9188             description: File owner GID
9189             X-LXD-mode:
9190             description: Mode mask
9191             X-LXD-type:
9192             description: Type of file (file, symlink or directory)
9193             X-LXD-uid:
9194             description: File owner UID
9195             "400":
9196             $ref: '#/responses/BadRequest'
9197             "403":
9198             $ref: '#/responses/Forbidden'
9199             "404":
9200             $ref: '#/responses/NotFound'
9201             "500":
9202             $ref: '#/responses/InternalServerError'
9203             summary: Get a file
9204             tags:
9205             - instances
9206             post:
9207             consumes:
9208             - application/octet-stream
9209             description: Creates a new file in the instance.
9210             operationId: instance_files_post
9211             parameters:
9212             - description: Path to the file
9213             example: default
9214             in: query
9215             name: path
9216             type: string
9217             - description: Project name
9218             example: default
9219             in: query
9220             name: project
9221             type: string
9222             - description: Raw file content
9223             in: body
9224             name: raw_file
9225             - description: File owner UID
9226             example: 1000
9227             in: header
9228             name: X-LXD-uid
9229             schema:
9230             type: integer
9231             - description: File owner GID
9232             example: 1000
9233             in: header
9234             name: X-LXD-gid
9235             schema:
9236             type: integer
9237             - description: File mode
9238             example: 420
9239             in: header
9240             name: X-LXD-mode
9241             schema:
9242             type: integer
9243             - description: Type of file (file, symlink or directory)
9244             example: file
9245             in: header
9246             name: X-LXD-type
9247             schema:
9248             type: string
9249             - description: Write mode (overwrite or append)
9250             example: overwrite
9251             in: header
9252             name: X-LXD-write
9253             schema:
9254             type: string
9255             produces:
9256             - application/json
9257             responses:
9258             "200":
9259             $ref: '#/responses/EmptySyncResponse'
9260             "400":
9261             $ref: '#/responses/BadRequest'
9262             "403":
9263             $ref: '#/responses/Forbidden'
9264             "404":
9265             $ref: '#/responses/NotFound'
9266             "500":
9267             $ref: '#/responses/InternalServerError'
9268             summary: Create or replace a file
9269             tags:
9270             - instances
9271             /1.0/instances/{name}/logs:
9272             get:
9273             description: Returns a list of log files (URLs).
9274             operationId: instance_logs_get
9275             parameters:
9276             - description: Project name
9277             example: default
9278             in: query
9279             name: project
9280             type: string
9281             produces:
9282             - application/json
9283             responses:
9284             "200":
9285             description: API endpoints
9286             schema:
9287             description: Sync response
9288             properties:
9289             metadata:
9290             description: List of endpoints
9291             example: |-
9292             [
9293             "/1.0/instances/foo/logs/lxc.conf",
9294             "/1.0/instances/foo/logs/lxc.log"
9295             ]
9296             items:
9297             type: string
9298             type: array
9299             status:
9300             description: Status description
9301             example: Success
9302             type: string
9303             status_code:
9304             description: Status code
9305             example: 200
9306             type: integer
9307             type:
9308             description: Response type
9309             example: sync
9310             type: string
9311             type: object
9312             "403":
9313             $ref: '#/responses/Forbidden'
9314             "404":
9315             $ref: '#/responses/NotFound'
9316             "500":
9317             $ref: '#/responses/InternalServerError'
9318             summary: Get the log files
9319             tags:
9320             - instances
9321             /1.0/instances/{name}/logs/{filename}:
9322             delete:
9323             description: Removes the log file.
9324             operationId: instance_log_delete
9325             parameters:
9326             - description: Project name
9327             example: default
9328             in: query
9329             name: project
9330             type: string
9331             produces:
9332             - application/json
9333             responses:
9334             "200":
9335             $ref: '#/responses/EmptySyncResponse'
9336             "400":
9337             $ref: '#/responses/BadRequest'
9338             "403":
9339             $ref: '#/responses/Forbidden'
9340             "404":
9341             $ref: '#/responses/NotFound'
9342             "500":
9343             $ref: '#/responses/InternalServerError'
9344             summary: Delete the log file
9345             tags:
9346             - instances
9347             get:
9348             description: Gets the log file.
9349             operationId: instance_log_get
9350             parameters:
9351             - description: Project name
9352             example: default
9353             in: query
9354             name: project
9355             type: string
9356             produces:
9357             - application/json
9358             - application/octet-stream
9359             responses:
9360             "200":
9361             description: Raw file
9362             "400":
9363             $ref: '#/responses/BadRequest'
9364             "403":
9365             $ref: '#/responses/Forbidden'
9366             "404":
9367             $ref: '#/responses/NotFound'
9368             "500":
9369             $ref: '#/responses/InternalServerError'
9370             summary: Get the log file
9371             tags:
9372             - instances
9373             /1.0/instances/{name}/metadata:
9374             get:
9375             description: Gets the image metadata for the instance.
9376             operationId: instance_metadata_get
9377             parameters:
9378             - description: Project name
9379             example: default
9380             in: query
9381             name: project
9382             type: string
9383             produces:
9384             - application/json
9385             responses:
9386             "200":
9387             description: Image metadata
9388             schema:
9389             description: Sync response
9390             properties:
9391             metadata:
9392             $ref: '#/definitions/ImageMetadata'
9393             status:
9394             description: Status description
9395             example: Success
9396             type: string
9397             status_code:
9398             description: Status code
9399             example: 200
9400             type: integer
9401             type:
9402             description: Response type
9403             example: sync
9404             type: string
9405             type: object
9406             "403":
9407             $ref: '#/responses/Forbidden'
9408             "500":
9409             $ref: '#/responses/InternalServerError'
9410             summary: Get the instance image metadata
9411             tags:
9412             - instances
9413             patch:
9414             consumes:
9415             - application/json
9416             description: Updates a subset of the instance image metadata.
9417             operationId: instance_metadata_patch
9418             parameters:
9419             - description: Project name
9420             example: default
9421             in: query
9422             name: project
9423             type: string
9424             - description: Image metadata
9425             in: body
9426             name: metadata
9427             required: true
9428             schema:
9429             $ref: '#/definitions/ImageMetadata'
9430             produces:
9431             - application/json
9432             responses:
9433             "200":
9434             $ref: '#/responses/EmptySyncResponse'
9435             "400":
9436             $ref: '#/responses/BadRequest'
9437             "403":
9438             $ref: '#/responses/Forbidden'
9439             "412":
9440             $ref: '#/responses/PreconditionFailed'
9441             "500":
9442             $ref: '#/responses/InternalServerError'
9443             summary: Partially update the image metadata
9444             tags:
9445             - instances
9446             put:
9447             consumes:
9448             - application/json
9449             description: Updates the instance image metadata.
9450             operationId: instance_metadata_put
9451             parameters:
9452             - description: Project name
9453             example: default
9454             in: query
9455             name: project
9456             type: string
9457             - description: Image metadata
9458             in: body
9459             name: metadata
9460             required: true
9461             schema:
9462             $ref: '#/definitions/ImageMetadata'
9463             produces:
9464             - application/json
9465             responses:
9466             "200":
9467             $ref: '#/responses/EmptySyncResponse'
9468             "400":
9469             $ref: '#/responses/BadRequest'
9470             "403":
9471             $ref: '#/responses/Forbidden'
9472             "412":
9473             $ref: '#/responses/PreconditionFailed'
9474             "500":
9475             $ref: '#/responses/InternalServerError'
9476             summary: Update the image metadata
9477             tags:
9478             - instances
9479             /1.0/instances/{name}/metadata/templates:
9480             delete:
9481             description: Removes the template file.
9482             operationId: instance_metadata_templates_delete
9483             parameters:
9484             - description: Template name
9485             example: default
9486             in: query
9487             name: path
9488             type: string
9489             - description: Project name
9490             example: default
9491             in: query
9492             name: project
9493             type: string
9494             produces:
9495             - application/json
9496             responses:
9497             "200":
9498             $ref: '#/responses/EmptySyncResponse'
9499             "400":
9500             $ref: '#/responses/BadRequest'
9501             "403":
9502             $ref: '#/responses/Forbidden'
9503             "404":
9504             $ref: '#/responses/NotFound'
9505             "500":
9506             $ref: '#/responses/InternalServerError'
9507             summary: Delete a template file
9508             tags:
9509             - instances
9510             get:
9511             description: |-
9512             If no path specified, returns a list of template file names.
9513             If a path is specified, returns the file content.
9514             operationId: instance_metadata_templates_get
9515             parameters:
9516             - description: Project name
9517             example: default
9518             in: query
9519             name: project
9520             type: string
9521             - description: Template name
9522             example: hostname.tpl
9523             in: query
9524             name: path
9525             type: string
9526             produces:
9527             - application/json
9528             - application/octet-stream
9529             responses:
9530             "200":
9531             description: Raw template file or file listing
9532             "400":
9533             $ref: '#/responses/BadRequest'
9534             "403":
9535             $ref: '#/responses/Forbidden'
9536             "404":
9537             $ref: '#/responses/NotFound'
9538             "500":
9539             $ref: '#/responses/InternalServerError'
9540             summary: Get the template file names or a specific
9541             tags:
9542             - instances
9543             post:
9544             consumes:
9545             - application/octet-stream
9546             description: Creates a new image template file for the instance.
9547             operationId: instance_metadata_templates_post
9548             parameters:
9549             - description: Template name
9550             example: default
9551             in: query
9552             name: path
9553             type: string
9554             - description: Project name
9555             example: default
9556             in: query
9557             name: project
9558             type: string
9559             - description: Raw file content
9560             in: body
9561             name: raw_file
9562             produces:
9563             - application/json
9564             responses:
9565             "200":
9566             $ref: '#/responses/EmptySyncResponse'
9567             "400":
9568             $ref: '#/responses/BadRequest'
9569             "403":
9570             $ref: '#/responses/Forbidden'
9571             "404":
9572             $ref: '#/responses/NotFound'
9573             "500":
9574             $ref: '#/responses/InternalServerError'
9575             summary: Create or replace a template file
9576             tags:
9577             - instances
9578             /1.0/instances/{name}/snapshots:
9579             get:
9580             description: Returns a list of instance snapshots (URLs).
9581             operationId: instance_snapshots_get
9582             parameters:
9583             - description: Project name
9584             example: default
9585             in: query
9586             name: project
9587             type: string
9588             produces:
9589             - application/json
9590             responses:
9591             "200":
9592             description: API endpoints
9593             schema:
9594             description: Sync response
9595             properties:
9596             metadata:
9597             description: List of endpoints
9598             example: |-
9599             [
9600             "/1.0/instances/foo/snapshots/snap0",
9601             "/1.0/instances/foo/snapshots/snap1"
9602             ]
9603             items:
9604             type: string
9605             type: array
9606             status:
9607             description: Status description
9608             example: Success
9609             type: string
9610             status_code:
9611             description: Status code
9612             example: 200
9613             type: integer
9614             type:
9615             description: Response type
9616             example: sync
9617             type: string
9618             type: object
9619             "403":
9620             $ref: '#/responses/Forbidden'
9621             "500":
9622             $ref: '#/responses/InternalServerError'
9623             summary: Get the snapshots
9624             tags:
9625             - instances
9626             post:
9627             consumes:
9628             - application/json
9629             description: Creates a new snapshot.
9630             operationId: instance_snapshots_post
9631             parameters:
9632             - description: Project name
9633             example: default
9634             in: query
9635             name: project
9636             type: string
9637             - description: Snapshot request
9638             in: body
9639             name: snapshot
9640             schema:
9641             $ref: '#/definitions/InstanceSnapshotsPost'
9642             produces:
9643             - application/json
9644             responses:
9645             "202":
9646             $ref: '#/responses/Operation'
9647             "400":
9648             $ref: '#/responses/BadRequest'
9649             "403":
9650             $ref: '#/responses/Forbidden'
9651             "500":
9652             $ref: '#/responses/InternalServerError'
9653             summary: Create a snapshot
9654             tags:
9655             - instances
9656             /1.0/instances/{name}/snapshots/{snapshot}:
9657             delete:
9658             consumes:
9659             - application/json
9660             description: Deletes the instance snapshot.
9661             operationId: instance_snapshot_delete
9662             parameters:
9663             - description: Project name
9664             example: default
9665             in: query
9666             name: project
9667             type: string
9668             produces:
9669             - application/json
9670             responses:
9671             "202":
9672             $ref: '#/responses/Operation'
9673             "400":
9674             $ref: '#/responses/BadRequest'
9675             "403":
9676             $ref: '#/responses/Forbidden'
9677             "500":
9678             $ref: '#/responses/InternalServerError'
9679             summary: Delete a snapshot
9680             tags:
9681             - instances
9682             get:
9683             description: Gets a specific instance snapshot.
9684             operationId: instance_snapshot_get
9685             parameters:
9686             - description: Project name
9687             example: default
9688             in: query
9689             name: project
9690             type: string
9691             produces:
9692             - application/json
9693             responses:
9694             "200":
9695             description: Instance snapshot
9696             schema:
9697             description: Sync response
9698             properties:
9699             metadata:
9700             $ref: '#/definitions/InstanceSnapshot'
9701             status:
9702             description: Status description
9703             example: Success
9704             type: string
9705             status_code:
9706             description: Status code
9707             example: 200
9708             type: integer
9709             type:
9710             description: Response type
9711             example: sync
9712             type: string
9713             type: object
9714             "403":
9715             $ref: '#/responses/Forbidden'
9716             "500":
9717             $ref: '#/responses/InternalServerError'
9718             summary: Get the snapshot
9719             tags:
9720             - instances
9721             patch:
9722             consumes:
9723             - application/json
9724             description: Updates a subset of the snapshot config.
9725             operationId: instance_snapshot_patch
9726             parameters:
9727             - description: Project name
9728             example: default
9729             in: query
9730             name: project
9731             type: string
9732             - description: Snapshot update
9733             in: body
9734             name: snapshot
9735             schema:
9736             $ref: '#/definitions/InstanceSnapshotPut'
9737             produces:
9738             - application/json
9739             responses:
9740             "202":
9741             $ref: '#/responses/Operation'
9742             "400":
9743             $ref: '#/responses/BadRequest'
9744             "403":
9745             $ref: '#/responses/Forbidden'
9746             "500":
9747             $ref: '#/responses/InternalServerError'
9748             summary: Partially update snapshot
9749             tags:
9750             - instances
9751             post:
9752             consumes:
9753             - application/json
9754             description: |-
9755             Renames or migrates an instance snapshot to another server.
9756              
9757             The returned operation metadata will vary based on what's requested.
9758             For rename or move within the same server, this is a simple background operation with progress data.
9759             For migration, in the push case, this will similarly be a background
9760             operation with progress data, for the pull case, it will be a websocket
9761             operation with a number of secrets to be passed to the target server.
9762             operationId: instance_snapshot_post
9763             parameters:
9764             - description: Project name
9765             example: default
9766             in: query
9767             name: project
9768             type: string
9769             - description: Snapshot migration
9770             in: body
9771             name: snapshot
9772             schema:
9773             $ref: '#/definitions/InstanceSnapshotPost'
9774             produces:
9775             - application/json
9776             responses:
9777             "202":
9778             $ref: '#/responses/Operation'
9779             "400":
9780             $ref: '#/responses/BadRequest'
9781             "403":
9782             $ref: '#/responses/Forbidden'
9783             "500":
9784             $ref: '#/responses/InternalServerError'
9785             summary: Rename or move/migrate a snapshot
9786             tags:
9787             - instances
9788             put:
9789             consumes:
9790             - application/json
9791             description: Updates the snapshot config.
9792             operationId: instance_snapshot_put
9793             parameters:
9794             - description: Project name
9795             example: default
9796             in: query
9797             name: project
9798             type: string
9799             - description: Snapshot update
9800             in: body
9801             name: snapshot
9802             schema:
9803             $ref: '#/definitions/InstanceSnapshotPut'
9804             produces:
9805             - application/json
9806             responses:
9807             "202":
9808             $ref: '#/responses/Operation'
9809             "400":
9810             $ref: '#/responses/BadRequest'
9811             "403":
9812             $ref: '#/responses/Forbidden'
9813             "500":
9814             $ref: '#/responses/InternalServerError'
9815             summary: Update snapshot
9816             tags:
9817             - instances
9818             /1.0/instances/{name}/snapshots?recursion=1:
9819             get:
9820             description: Returns a list of instance snapshots (structs).
9821             operationId: instance_snapshots_get_recursion1
9822             parameters:
9823             - description: Project name
9824             example: default
9825             in: query
9826             name: project
9827             type: string
9828             produces:
9829             - application/json
9830             responses:
9831             "200":
9832             description: API endpoints
9833             schema:
9834             description: Sync response
9835             properties:
9836             metadata:
9837             description: List of instance snapshots
9838             items:
9839             $ref: '#/definitions/InstanceSnapshot'
9840             type: array
9841             status:
9842             description: Status description
9843             example: Success
9844             type: string
9845             status_code:
9846             description: Status code
9847             example: 200
9848             type: integer
9849             type:
9850             description: Response type
9851             example: sync
9852             type: string
9853             type: object
9854             "403":
9855             $ref: '#/responses/Forbidden'
9856             "500":
9857             $ref: '#/responses/InternalServerError'
9858             summary: Get the snapshots
9859             tags:
9860             - instances
9861             /1.0/instances/{name}/state:
9862             get:
9863             description: |-
9864             Gets the runtime state of the instance.
9865              
9866             This is a reasonably expensive call as it causes code to be run
9867             inside of the instance to retrieve the resource usage and network
9868             information.
9869             operationId: instance_state_get
9870             parameters:
9871             - description: Project name
9872             in: query
9873             name: project
9874             type: string
9875             produces:
9876             - application/json
9877             responses:
9878             "200":
9879             description: State
9880             schema:
9881             description: Sync response
9882             properties:
9883             metadata:
9884             $ref: '#/definitions/InstanceState'
9885             status:
9886             description: Status description
9887             example: Success
9888             type: string
9889             status_code:
9890             description: Status code
9891             example: 200
9892             type: integer
9893             type:
9894             description: Response type
9895             example: sync
9896             type: string
9897             type: object
9898             "400":
9899             $ref: '#/responses/BadRequest'
9900             "403":
9901             $ref: '#/responses/Forbidden'
9902             "500":
9903             $ref: '#/responses/InternalServerError'
9904             summary: Get the runtime state
9905             tags:
9906             - instances
9907             put:
9908             consumes:
9909             - application/json
9910             description: Changes the running state of the instance.
9911             operationId: instance_state_put
9912             parameters:
9913             - description: Project name
9914             example: default
9915             in: query
9916             name: project
9917             type: string
9918             - description: State
9919             in: body
9920             name: state
9921             schema:
9922             $ref: '#/definitions/InstanceStatePut'
9923             produces:
9924             - application/json
9925             responses:
9926             "202":
9927             $ref: '#/responses/Operation'
9928             "400":
9929             $ref: '#/responses/BadRequest'
9930             "403":
9931             $ref: '#/responses/Forbidden'
9932             "500":
9933             $ref: '#/responses/InternalServerError'
9934             summary: Change the state
9935             tags:
9936             - instances
9937             /1.0/instances/{name}?recursion=1:
9938             get:
9939             description: |-
9940             Gets a specific instance (full struct).
9941              
9942             recursion=1 also includes information about state, snapshots and backups.
9943             operationId: instance_get_recursion1
9944             parameters:
9945             - description: Project name
9946             example: default
9947             in: query
9948             name: project
9949             type: string
9950             produces:
9951             - application/json
9952             responses:
9953             "200":
9954             description: Instance
9955             schema:
9956             description: Sync response
9957             properties:
9958             metadata:
9959             $ref: '#/definitions/Instance'
9960             status:
9961             description: Status description
9962             example: Success
9963             type: string
9964             status_code:
9965             description: Status code
9966             example: 200
9967             type: integer
9968             type:
9969             description: Response type
9970             example: sync
9971             type: string
9972             type: object
9973             "403":
9974             $ref: '#/responses/Forbidden'
9975             "500":
9976             $ref: '#/responses/InternalServerError'
9977             summary: Get the instance
9978             tags:
9979             - instances
9980             /1.0/instances?recursion=1:
9981             get:
9982             description: Returns a list of instances (basic structs).
9983             operationId: instances_get_recursion1
9984             parameters:
9985             - description: Project name
9986             example: default
9987             in: query
9988             name: project
9989             type: string
9990             - description: Collection filter
9991             example: default
9992             in: query
9993             name: filter
9994             type: string
9995             - description: Retrieve instances from all projects
9996             in: query
9997             name: all-projects
9998             type: boolean
9999             produces:
10000             - application/json
10001             responses:
10002             "200":
10003             description: API endpoints
10004             schema:
10005             description: Sync response
10006             properties:
10007             metadata:
10008             description: List of instances
10009             items:
10010             $ref: '#/definitions/Instance'
10011             type: array
10012             status:
10013             description: Status description
10014             example: Success
10015             type: string
10016             status_code:
10017             description: Status code
10018             example: 200
10019             type: integer
10020             type:
10021             description: Response type
10022             example: sync
10023             type: string
10024             type: object
10025             "403":
10026             $ref: '#/responses/Forbidden'
10027             "500":
10028             $ref: '#/responses/InternalServerError'
10029             summary: Get the instances
10030             tags:
10031             - instances
10032             /1.0/instances?recursion=2:
10033             get:
10034             description: |-
10035             Returns a list of instances (full structs).
10036              
10037             The main difference between recursion=1 and recursion=2 is that the
10038             latter also includes state and snapshot information allowing for a
10039             single API call to return everything needed by most clients.
10040             operationId: instances_get_recursion2
10041             parameters:
10042             - description: Project name
10043             example: default
10044             in: query
10045             name: project
10046             type: string
10047             - description: Collection filter
10048             example: default
10049             in: query
10050             name: filter
10051             type: string
10052             - description: Retrieve instances from all projects
10053             in: query
10054             name: all-projects
10055             type: boolean
10056             produces:
10057             - application/json
10058             responses:
10059             "200":
10060             description: API endpoints
10061             schema:
10062             description: Sync response
10063             properties:
10064             metadata:
10065             description: List of instances
10066             items:
10067             $ref: '#/definitions/InstanceFull'
10068             type: array
10069             status:
10070             description: Status description
10071             example: Success
10072             type: string
10073             status_code:
10074             description: Status code
10075             example: 200
10076             type: integer
10077             type:
10078             description: Response type
10079             example: sync
10080             type: string
10081             type: object
10082             "403":
10083             $ref: '#/responses/Forbidden'
10084             "500":
10085             $ref: '#/responses/InternalServerError'
10086             summary: Get the instances
10087             tags:
10088             - instances
10089             /1.0/metrics:
10090             get:
10091             description: Gets metrics of instances.
10092             operationId: metrics_get
10093             parameters:
10094             - description: Project name
10095             example: default
10096             in: query
10097             name: project
10098             type: string
10099             produces:
10100             - text/plain
10101             responses:
10102             "200":
10103             description: Metrics
10104             schema:
10105             description: Instance metrics
10106             type: string
10107             "403":
10108             $ref: '#/responses/Forbidden'
10109             "500":
10110             $ref: '#/responses/InternalServerError'
10111             summary: Get metrics
10112             tags:
10113             - metrics
10114             /1.0/network-acls:
10115             get:
10116             description: Returns a list of network ACLs (URLs).
10117             operationId: network_acls_get
10118             parameters:
10119             - description: Project name
10120             example: default
10121             in: query
10122             name: project
10123             type: string
10124             produces:
10125             - application/json
10126             responses:
10127             "200":
10128             description: API endpoints
10129             schema:
10130             description: Sync response
10131             properties:
10132             metadata:
10133             description: List of endpoints
10134             example: |-
10135             [
10136             "/1.0/network-acls/foo",
10137             "/1.0/network-acls/bar"
10138             ]
10139             items:
10140             type: string
10141             type: array
10142             status:
10143             description: Status description
10144             example: Success
10145             type: string
10146             status_code:
10147             description: Status code
10148             example: 200
10149             type: integer
10150             type:
10151             description: Response type
10152             example: sync
10153             type: string
10154             type: object
10155             "403":
10156             $ref: '#/responses/Forbidden'
10157             "500":
10158             $ref: '#/responses/InternalServerError'
10159             summary: Get the network ACLs
10160             tags:
10161             - network-acls
10162             post:
10163             consumes:
10164             - application/json
10165             description: Creates a new network ACL.
10166             operationId: network_acls_post
10167             parameters:
10168             - description: Project name
10169             example: default
10170             in: query
10171             name: project
10172             type: string
10173             - description: ACL
10174             in: body
10175             name: acl
10176             required: true
10177             schema:
10178             $ref: '#/definitions/NetworkACLsPost'
10179             produces:
10180             - application/json
10181             responses:
10182             "200":
10183             $ref: '#/responses/EmptySyncResponse'
10184             "400":
10185             $ref: '#/responses/BadRequest'
10186             "403":
10187             $ref: '#/responses/Forbidden'
10188             "500":
10189             $ref: '#/responses/InternalServerError'
10190             summary: Add a network ACL
10191             tags:
10192             - network-acls
10193             /1.0/network-acls/{name}:
10194             delete:
10195             description: Removes the network ACL.
10196             operationId: network_acl_delete
10197             parameters:
10198             - description: Project name
10199             example: default
10200             in: query
10201             name: project
10202             type: string
10203             produces:
10204             - application/json
10205             responses:
10206             "200":
10207             $ref: '#/responses/EmptySyncResponse'
10208             "400":
10209             $ref: '#/responses/BadRequest'
10210             "403":
10211             $ref: '#/responses/Forbidden'
10212             "500":
10213             $ref: '#/responses/InternalServerError'
10214             summary: Delete the network ACL
10215             tags:
10216             - network-acls
10217             get:
10218             description: Gets a specific network ACL.
10219             operationId: network_acl_get
10220             parameters:
10221             - description: Project name
10222             example: default
10223             in: query
10224             name: project
10225             type: string
10226             produces:
10227             - application/json
10228             responses:
10229             "200":
10230             description: ACL
10231             schema:
10232             description: Sync response
10233             properties:
10234             metadata:
10235             $ref: '#/definitions/NetworkACL'
10236             status:
10237             description: Status description
10238             example: Success
10239             type: string
10240             status_code:
10241             description: Status code
10242             example: 200
10243             type: integer
10244             type:
10245             description: Response type
10246             example: sync
10247             type: string
10248             type: object
10249             "403":
10250             $ref: '#/responses/Forbidden'
10251             "500":
10252             $ref: '#/responses/InternalServerError'
10253             summary: Get the network ACL
10254             tags:
10255             - network-acls
10256             patch:
10257             consumes:
10258             - application/json
10259             description: Updates a subset of the network ACL configuration.
10260             operationId: network_acl_patch
10261             parameters:
10262             - description: Project name
10263             example: default
10264             in: query
10265             name: project
10266             type: string
10267             - description: ACL configuration
10268             in: body
10269             name: acl
10270             required: true
10271             schema:
10272             $ref: '#/definitions/NetworkACLPut'
10273             produces:
10274             - application/json
10275             responses:
10276             "200":
10277             $ref: '#/responses/EmptySyncResponse'
10278             "400":
10279             $ref: '#/responses/BadRequest'
10280             "403":
10281             $ref: '#/responses/Forbidden'
10282             "412":
10283             $ref: '#/responses/PreconditionFailed'
10284             "500":
10285             $ref: '#/responses/InternalServerError'
10286             summary: Partially update the network ACL
10287             tags:
10288             - network-acls
10289             post:
10290             consumes:
10291             - application/json
10292             description: Renames an existing network ACL.
10293             operationId: network_acl_post
10294             parameters:
10295             - description: Project name
10296             example: default
10297             in: query
10298             name: project
10299             type: string
10300             - description: ACL rename request
10301             in: body
10302             name: acl
10303             required: true
10304             schema:
10305             $ref: '#/definitions/NetworkACLPost'
10306             produces:
10307             - application/json
10308             responses:
10309             "200":
10310             $ref: '#/responses/EmptySyncResponse'
10311             "400":
10312             $ref: '#/responses/BadRequest'
10313             "403":
10314             $ref: '#/responses/Forbidden'
10315             "500":
10316             $ref: '#/responses/InternalServerError'
10317             summary: Rename the network ACL
10318             tags:
10319             - network-acls
10320             put:
10321             consumes:
10322             - application/json
10323             description: Updates the entire network ACL configuration.
10324             operationId: network_acl_put
10325             parameters:
10326             - description: Project name
10327             example: default
10328             in: query
10329             name: project
10330             type: string
10331             - description: ACL configuration
10332             in: body
10333             name: acl
10334             required: true
10335             schema:
10336             $ref: '#/definitions/NetworkACLPut'
10337             produces:
10338             - application/json
10339             responses:
10340             "200":
10341             $ref: '#/responses/EmptySyncResponse'
10342             "400":
10343             $ref: '#/responses/BadRequest'
10344             "403":
10345             $ref: '#/responses/Forbidden'
10346             "412":
10347             $ref: '#/responses/PreconditionFailed'
10348             "500":
10349             $ref: '#/responses/InternalServerError'
10350             summary: Update the network ACL
10351             tags:
10352             - network-acls
10353             /1.0/network-acls/{name}/log:
10354             get:
10355             description: Gets a specific network ACL log entries.
10356             operationId: network_acl_log_get
10357             parameters:
10358             - description: Project name
10359             example: default
10360             in: query
10361             name: project
10362             type: string
10363             produces:
10364             - application/octet-stream
10365             responses:
10366             "200":
10367             description: Raw log file
10368             "403":
10369             $ref: '#/responses/Forbidden'
10370             "500":
10371             $ref: '#/responses/InternalServerError'
10372             summary: Get the network ACL log
10373             tags:
10374             - network-acls
10375             /1.0/network-acls?recursion=1:
10376             get:
10377             description: Returns a list of network ACLs (structs).
10378             operationId: network_acls_get_recursion1
10379             parameters:
10380             - description: Project name
10381             example: default
10382             in: query
10383             name: project
10384             type: string
10385             produces:
10386             - application/json
10387             responses:
10388             "200":
10389             description: API endpoints
10390             schema:
10391             description: Sync response
10392             properties:
10393             metadata:
10394             description: List of network ACLs
10395             items:
10396             $ref: '#/definitions/NetworkACL'
10397             type: array
10398             status:
10399             description: Status description
10400             example: Success
10401             type: string
10402             status_code:
10403             description: Status code
10404             example: 200
10405             type: integer
10406             type:
10407             description: Response type
10408             example: sync
10409             type: string
10410             type: object
10411             "403":
10412             $ref: '#/responses/Forbidden'
10413             "500":
10414             $ref: '#/responses/InternalServerError'
10415             summary: Get the network ACLs
10416             tags:
10417             - network-acls
10418             /1.0/network-zones:
10419             get:
10420             description: Returns a list of network zones (URLs).
10421             operationId: network_zones_get
10422             parameters:
10423             - description: Project name
10424             example: default
10425             in: query
10426             name: project
10427             type: string
10428             produces:
10429             - application/json
10430             responses:
10431             "200":
10432             description: API endpoints
10433             schema:
10434             description: Sync response
10435             properties:
10436             metadata:
10437             description: List of endpoints
10438             example: |-
10439             [
10440             "/1.0/network-zones/example.net",
10441             "/1.0/network-zones/example.com"
10442             ]
10443             items:
10444             type: string
10445             type: array
10446             status:
10447             description: Status description
10448             example: Success
10449             type: string
10450             status_code:
10451             description: Status code
10452             example: 200
10453             type: integer
10454             type:
10455             description: Response type
10456             example: sync
10457             type: string
10458             type: object
10459             "403":
10460             $ref: '#/responses/Forbidden'
10461             "500":
10462             $ref: '#/responses/InternalServerError'
10463             summary: Get the network zones
10464             tags:
10465             - network-zones
10466             post:
10467             consumes:
10468             - application/json
10469             description: Creates a new network zone.
10470             operationId: network_zones_post
10471             parameters:
10472             - description: Project name
10473             example: default
10474             in: query
10475             name: project
10476             type: string
10477             - description: zone
10478             in: body
10479             name: zone
10480             required: true
10481             schema:
10482             $ref: '#/definitions/NetworkZonesPost'
10483             produces:
10484             - application/json
10485             responses:
10486             "200":
10487             $ref: '#/responses/EmptySyncResponse'
10488             "400":
10489             $ref: '#/responses/BadRequest'
10490             "403":
10491             $ref: '#/responses/Forbidden'
10492             "500":
10493             $ref: '#/responses/InternalServerError'
10494             summary: Add a network zone
10495             tags:
10496             - network-zones
10497             /1.0/network-zones/{name}:
10498             delete:
10499             description: Removes the network zone.
10500             operationId: network_zone_delete
10501             parameters:
10502             - description: Project name
10503             example: default
10504             in: query
10505             name: project
10506             type: string
10507             produces:
10508             - application/json
10509             responses:
10510             "200":
10511             $ref: '#/responses/EmptySyncResponse'
10512             "400":
10513             $ref: '#/responses/BadRequest'
10514             "403":
10515             $ref: '#/responses/Forbidden'
10516             "500":
10517             $ref: '#/responses/InternalServerError'
10518             summary: Delete the network zone
10519             tags:
10520             - network-zones
10521             get:
10522             description: Gets a specific network zone.
10523             operationId: network_zone_get
10524             parameters:
10525             - description: Project name
10526             example: default
10527             in: query
10528             name: project
10529             type: string
10530             produces:
10531             - application/json
10532             responses:
10533             "200":
10534             description: zone
10535             schema:
10536             description: Sync response
10537             properties:
10538             metadata:
10539             $ref: '#/definitions/NetworkZone'
10540             status:
10541             description: Status description
10542             example: Success
10543             type: string
10544             status_code:
10545             description: Status code
10546             example: 200
10547             type: integer
10548             type:
10549             description: Response type
10550             example: sync
10551             type: string
10552             type: object
10553             "403":
10554             $ref: '#/responses/Forbidden'
10555             "500":
10556             $ref: '#/responses/InternalServerError'
10557             summary: Get the network zone
10558             tags:
10559             - network-zones
10560             patch:
10561             consumes:
10562             - application/json
10563             description: Updates a subset of the network zone configuration.
10564             operationId: network_zone_patch
10565             parameters:
10566             - description: Project name
10567             example: default
10568             in: query
10569             name: project
10570             type: string
10571             - description: zone configuration
10572             in: body
10573             name: zone
10574             required: true
10575             schema:
10576             $ref: '#/definitions/NetworkZonePut'
10577             produces:
10578             - application/json
10579             responses:
10580             "200":
10581             $ref: '#/responses/EmptySyncResponse'
10582             "400":
10583             $ref: '#/responses/BadRequest'
10584             "403":
10585             $ref: '#/responses/Forbidden'
10586             "412":
10587             $ref: '#/responses/PreconditionFailed'
10588             "500":
10589             $ref: '#/responses/InternalServerError'
10590             summary: Partially update the network zone
10591             tags:
10592             - network-zones
10593             put:
10594             consumes:
10595             - application/json
10596             description: Updates the entire network zone configuration.
10597             operationId: network_zone_put
10598             parameters:
10599             - description: Project name
10600             example: default
10601             in: query
10602             name: project
10603             type: string
10604             - description: zone configuration
10605             in: body
10606             name: zone
10607             required: true
10608             schema:
10609             $ref: '#/definitions/NetworkZonePut'
10610             produces:
10611             - application/json
10612             responses:
10613             "200":
10614             $ref: '#/responses/EmptySyncResponse'
10615             "400":
10616             $ref: '#/responses/BadRequest'
10617             "403":
10618             $ref: '#/responses/Forbidden'
10619             "412":
10620             $ref: '#/responses/PreconditionFailed'
10621             "500":
10622             $ref: '#/responses/InternalServerError'
10623             summary: Update the network zone
10624             tags:
10625             - network-zones
10626             /1.0/network-zones/{zone}/records:
10627             get:
10628             description: Returns a list of network zone records (URLs).
10629             operationId: network_zone_records_get
10630             parameters:
10631             - description: Project name
10632             example: default
10633             in: query
10634             name: project
10635             type: string
10636             produces:
10637             - application/json
10638             responses:
10639             "200":
10640             description: API endpoints
10641             schema:
10642             description: Sync response
10643             properties:
10644             metadata:
10645             description: List of endpoints
10646             example: |-
10647             [
10648             "/1.0/network-zones/example.net/records/foo",
10649             "/1.0/network-zones/example.net/records/bar"
10650             ]
10651             items:
10652             type: string
10653             type: array
10654             status:
10655             description: Status description
10656             example: Success
10657             type: string
10658             status_code:
10659             description: Status code
10660             example: 200
10661             type: integer
10662             type:
10663             description: Response type
10664             example: sync
10665             type: string
10666             type: object
10667             "403":
10668             $ref: '#/responses/Forbidden'
10669             "500":
10670             $ref: '#/responses/InternalServerError'
10671             summary: Get the network zone records
10672             tags:
10673             - network-zones
10674             post:
10675             consumes:
10676             - application/json
10677             description: Creates a new network zone record.
10678             operationId: network_zone_records_post
10679             parameters:
10680             - description: Project name
10681             example: default
10682             in: query
10683             name: project
10684             type: string
10685             - description: zone
10686             in: body
10687             name: zone
10688             required: true
10689             schema:
10690             $ref: '#/definitions/NetworkZoneRecordsPost'
10691             produces:
10692             - application/json
10693             responses:
10694             "200":
10695             $ref: '#/responses/EmptySyncResponse'
10696             "400":
10697             $ref: '#/responses/BadRequest'
10698             "403":
10699             $ref: '#/responses/Forbidden'
10700             "500":
10701             $ref: '#/responses/InternalServerError'
10702             summary: Add a network zone record
10703             tags:
10704             - network-zones
10705             /1.0/network-zones/{zone}/records/{name}:
10706             delete:
10707             description: Removes the network zone record.
10708             operationId: network_zone_record_delete
10709             parameters:
10710             - description: Project name
10711             example: default
10712             in: query
10713             name: project
10714             type: string
10715             produces:
10716             - application/json
10717             responses:
10718             "200":
10719             $ref: '#/responses/EmptySyncResponse'
10720             "400":
10721             $ref: '#/responses/BadRequest'
10722             "403":
10723             $ref: '#/responses/Forbidden'
10724             "500":
10725             $ref: '#/responses/InternalServerError'
10726             summary: Delete the network zone record
10727             tags:
10728             - network-zones
10729             get:
10730             description: Gets a specific network zone record.
10731             operationId: network_zone_record_get
10732             parameters:
10733             - description: Project name
10734             example: default
10735             in: query
10736             name: project
10737             type: string
10738             produces:
10739             - application/json
10740             responses:
10741             "200":
10742             description: zone
10743             schema:
10744             description: Sync response
10745             properties:
10746             metadata:
10747             $ref: '#/definitions/NetworkZoneRecord'
10748             status:
10749             description: Status description
10750             example: Success
10751             type: string
10752             status_code:
10753             description: Status code
10754             example: 200
10755             type: integer
10756             type:
10757             description: Response type
10758             example: sync
10759             type: string
10760             type: object
10761             "403":
10762             $ref: '#/responses/Forbidden'
10763             "500":
10764             $ref: '#/responses/InternalServerError'
10765             summary: Get the network zone record
10766             tags:
10767             - network-zones
10768             patch:
10769             consumes:
10770             - application/json
10771             description: Updates a subset of the network zone record configuration.
10772             operationId: network_zone_record_patch
10773             parameters:
10774             - description: Project name
10775             example: default
10776             in: query
10777             name: project
10778             type: string
10779             - description: zone record configuration
10780             in: body
10781             name: zone
10782             required: true
10783             schema:
10784             $ref: '#/definitions/NetworkZoneRecordPut'
10785             produces:
10786             - application/json
10787             responses:
10788             "200":
10789             $ref: '#/responses/EmptySyncResponse'
10790             "400":
10791             $ref: '#/responses/BadRequest'
10792             "403":
10793             $ref: '#/responses/Forbidden'
10794             "412":
10795             $ref: '#/responses/PreconditionFailed'
10796             "500":
10797             $ref: '#/responses/InternalServerError'
10798             summary: Partially update the network zone record
10799             tags:
10800             - network-zones
10801             put:
10802             consumes:
10803             - application/json
10804             description: Updates the entire network zone record configuration.
10805             operationId: network_zone_record_put
10806             parameters:
10807             - description: Project name
10808             example: default
10809             in: query
10810             name: project
10811             type: string
10812             - description: zone record configuration
10813             in: body
10814             name: zone
10815             required: true
10816             schema:
10817             $ref: '#/definitions/NetworkZoneRecordPut'
10818             produces:
10819             - application/json
10820             responses:
10821             "200":
10822             $ref: '#/responses/EmptySyncResponse'
10823             "400":
10824             $ref: '#/responses/BadRequest'
10825             "403":
10826             $ref: '#/responses/Forbidden'
10827             "412":
10828             $ref: '#/responses/PreconditionFailed'
10829             "500":
10830             $ref: '#/responses/InternalServerError'
10831             summary: Update the network zone record
10832             tags:
10833             - network-zones
10834             /1.0/network-zones/{zone}/records?recursion=1:
10835             get:
10836             description: Returns a list of network zone records (structs).
10837             operationId: network_zone_records_get_recursion1
10838             parameters:
10839             - description: Project name
10840             example: default
10841             in: query
10842             name: project
10843             type: string
10844             produces:
10845             - application/json
10846             responses:
10847             "200":
10848             description: API endpoints
10849             schema:
10850             description: Sync response
10851             properties:
10852             metadata:
10853             description: List of network zone records
10854             items:
10855             $ref: '#/definitions/NetworkZoneRecord'
10856             type: array
10857             status:
10858             description: Status description
10859             example: Success
10860             type: string
10861             status_code:
10862             description: Status code
10863             example: 200
10864             type: integer
10865             type:
10866             description: Response type
10867             example: sync
10868             type: string
10869             type: object
10870             "403":
10871             $ref: '#/responses/Forbidden'
10872             "500":
10873             $ref: '#/responses/InternalServerError'
10874             summary: Get the network zone records
10875             tags:
10876             - network-zones
10877             /1.0/network-zones?recursion=1:
10878             get:
10879             description: Returns a list of network zones (structs).
10880             operationId: network_zones_get_recursion1
10881             parameters:
10882             - description: Project name
10883             example: default
10884             in: query
10885             name: project
10886             type: string
10887             produces:
10888             - application/json
10889             responses:
10890             "200":
10891             description: API endpoints
10892             schema:
10893             description: Sync response
10894             properties:
10895             metadata:
10896             description: List of network zones
10897             items:
10898             $ref: '#/definitions/NetworkZone'
10899             type: array
10900             status:
10901             description: Status description
10902             example: Success
10903             type: string
10904             status_code:
10905             description: Status code
10906             example: 200
10907             type: integer
10908             type:
10909             description: Response type
10910             example: sync
10911             type: string
10912             type: object
10913             "403":
10914             $ref: '#/responses/Forbidden'
10915             "500":
10916             $ref: '#/responses/InternalServerError'
10917             summary: Get the network zones
10918             tags:
10919             - network-zones
10920             /1.0/networks:
10921             get:
10922             description: Returns a list of networks (URLs).
10923             operationId: networks_get
10924             parameters:
10925             - description: Project name
10926             example: default
10927             in: query
10928             name: project
10929             type: string
10930             produces:
10931             - application/json
10932             responses:
10933             "200":
10934             description: API endpoints
10935             schema:
10936             description: Sync response
10937             properties:
10938             metadata:
10939             description: List of endpoints
10940             example: |-
10941             [
10942             "/1.0/networks/lxdbr0",
10943             "/1.0/networks/lxdbr1"
10944             ]
10945             items:
10946             type: string
10947             type: array
10948             status:
10949             description: Status description
10950             example: Success
10951             type: string
10952             status_code:
10953             description: Status code
10954             example: 200
10955             type: integer
10956             type:
10957             description: Response type
10958             example: sync
10959             type: string
10960             type: object
10961             "403":
10962             $ref: '#/responses/Forbidden'
10963             "500":
10964             $ref: '#/responses/InternalServerError'
10965             summary: Get the networks
10966             tags:
10967             - networks
10968             post:
10969             consumes:
10970             - application/json
10971             description: |-
10972             Creates a new network.
10973             When clustered, most network types require individual POST for each cluster member prior to a global POST.
10974             operationId: networks_post
10975             parameters:
10976             - description: Project name
10977             example: default
10978             in: query
10979             name: project
10980             type: string
10981             - description: Cluster member name
10982             example: lxd01
10983             in: query
10984             name: target
10985             type: string
10986             - description: Network
10987             in: body
10988             name: network
10989             required: true
10990             schema:
10991             $ref: '#/definitions/NetworksPost'
10992             produces:
10993             - application/json
10994             responses:
10995             "200":
10996             $ref: '#/responses/EmptySyncResponse'
10997             "400":
10998             $ref: '#/responses/BadRequest'
10999             "403":
11000             $ref: '#/responses/Forbidden'
11001             "500":
11002             $ref: '#/responses/InternalServerError'
11003             summary: Add a network
11004             tags:
11005             - networks
11006             /1.0/networks/{name}:
11007             delete:
11008             description: Removes the network.
11009             operationId: network_delete
11010             parameters:
11011             - description: Project name
11012             example: default
11013             in: query
11014             name: project
11015             type: string
11016             produces:
11017             - application/json
11018             responses:
11019             "200":
11020             $ref: '#/responses/EmptySyncResponse'
11021             "400":
11022             $ref: '#/responses/BadRequest'
11023             "403":
11024             $ref: '#/responses/Forbidden'
11025             "500":
11026             $ref: '#/responses/InternalServerError'
11027             summary: Delete the network
11028             tags:
11029             - networks
11030             get:
11031             description: Gets a specific network.
11032             operationId: network_get
11033             parameters:
11034             - description: Project name
11035             example: default
11036             in: query
11037             name: project
11038             type: string
11039             - description: Cluster member name
11040             example: lxd01
11041             in: query
11042             name: target
11043             type: string
11044             produces:
11045             - application/json
11046             responses:
11047             "200":
11048             description: Network
11049             schema:
11050             description: Sync response
11051             properties:
11052             metadata:
11053             $ref: '#/definitions/Network'
11054             status:
11055             description: Status description
11056             example: Success
11057             type: string
11058             status_code:
11059             description: Status code
11060             example: 200
11061             type: integer
11062             type:
11063             description: Response type
11064             example: sync
11065             type: string
11066             type: object
11067             "403":
11068             $ref: '#/responses/Forbidden'
11069             "500":
11070             $ref: '#/responses/InternalServerError'
11071             summary: Get the network
11072             tags:
11073             - networks
11074             patch:
11075             consumes:
11076             - application/json
11077             description: Updates a subset of the network configuration.
11078             operationId: network_patch
11079             parameters:
11080             - description: Project name
11081             example: default
11082             in: query
11083             name: project
11084             type: string
11085             - description: Cluster member name
11086             example: lxd01
11087             in: query
11088             name: target
11089             type: string
11090             - description: Network configuration
11091             in: body
11092             name: network
11093             required: true
11094             schema:
11095             $ref: '#/definitions/NetworkPut'
11096             produces:
11097             - application/json
11098             responses:
11099             "200":
11100             $ref: '#/responses/EmptySyncResponse'
11101             "400":
11102             $ref: '#/responses/BadRequest'
11103             "403":
11104             $ref: '#/responses/Forbidden'
11105             "412":
11106             $ref: '#/responses/PreconditionFailed'
11107             "500":
11108             $ref: '#/responses/InternalServerError'
11109             summary: Partially update the network
11110             tags:
11111             - networks
11112             post:
11113             consumes:
11114             - application/json
11115             description: Renames an existing network.
11116             operationId: network_post
11117             parameters:
11118             - description: Project name
11119             example: default
11120             in: query
11121             name: project
11122             type: string
11123             - description: Network rename request
11124             in: body
11125             name: network
11126             required: true
11127             schema:
11128             $ref: '#/definitions/NetworkPost'
11129             produces:
11130             - application/json
11131             responses:
11132             "200":
11133             $ref: '#/responses/EmptySyncResponse'
11134             "400":
11135             $ref: '#/responses/BadRequest'
11136             "403":
11137             $ref: '#/responses/Forbidden'
11138             "500":
11139             $ref: '#/responses/InternalServerError'
11140             summary: Rename the network
11141             tags:
11142             - networks
11143             put:
11144             consumes:
11145             - application/json
11146             description: Updates the entire network configuration.
11147             operationId: network_put
11148             parameters:
11149             - description: Project name
11150             example: default
11151             in: query
11152             name: project
11153             type: string
11154             - description: Cluster member name
11155             example: lxd01
11156             in: query
11157             name: target
11158             type: string
11159             - description: Network configuration
11160             in: body
11161             name: network
11162             required: true
11163             schema:
11164             $ref: '#/definitions/NetworkPut'
11165             produces:
11166             - application/json
11167             responses:
11168             "200":
11169             $ref: '#/responses/EmptySyncResponse'
11170             "400":
11171             $ref: '#/responses/BadRequest'
11172             "403":
11173             $ref: '#/responses/Forbidden'
11174             "412":
11175             $ref: '#/responses/PreconditionFailed'
11176             "500":
11177             $ref: '#/responses/InternalServerError'
11178             summary: Update the network
11179             tags:
11180             - networks
11181             /1.0/networks/{name}/leases:
11182             get:
11183             description: Returns a list of DHCP leases for the network.
11184             operationId: networks_leases_get
11185             parameters:
11186             - description: Project name
11187             example: default
11188             in: query
11189             name: project
11190             type: string
11191             - description: Cluster member name
11192             example: lxd01
11193             in: query
11194             name: target
11195             type: string
11196             produces:
11197             - application/json
11198             responses:
11199             "200":
11200             description: API endpoints
11201             schema:
11202             description: Sync response
11203             properties:
11204             metadata:
11205             description: List of DHCP leases
11206             items:
11207             $ref: '#/definitions/NetworkLease'
11208             type: array
11209             status:
11210             description: Status description
11211             example: Success
11212             type: string
11213             status_code:
11214             description: Status code
11215             example: 200
11216             type: integer
11217             type:
11218             description: Response type
11219             example: sync
11220             type: string
11221             type: object
11222             "403":
11223             $ref: '#/responses/Forbidden'
11224             "500":
11225             $ref: '#/responses/InternalServerError'
11226             summary: Get the DHCP leases
11227             tags:
11228             - networks
11229             /1.0/networks/{name}/state:
11230             get:
11231             description: Returns the current network state information.
11232             operationId: networks_state_get
11233             parameters:
11234             - description: Project name
11235             example: default
11236             in: query
11237             name: project
11238             type: string
11239             - description: Cluster member name
11240             example: lxd01
11241             in: query
11242             name: target
11243             type: string
11244             produces:
11245             - application/json
11246             responses:
11247             "200":
11248             description: API endpoints
11249             schema:
11250             description: Sync response
11251             properties:
11252             metadata:
11253             $ref: '#/definitions/NetworkState'
11254             status:
11255             description: Status description
11256             example: Success
11257             type: string
11258             status_code:
11259             description: Status code
11260             example: 200
11261             type: integer
11262             type:
11263             description: Response type
11264             example: sync
11265             type: string
11266             type: object
11267             "403":
11268             $ref: '#/responses/Forbidden'
11269             "500":
11270             $ref: '#/responses/InternalServerError'
11271             summary: Get the network state
11272             tags:
11273             - networks
11274             /1.0/networks/{networkName}/forwards:
11275             get:
11276             description: Returns a list of network address forwards (URLs).
11277             operationId: network_forwards_get
11278             parameters:
11279             - description: Project name
11280             example: default
11281             in: query
11282             name: project
11283             type: string
11284             produces:
11285             - application/json
11286             responses:
11287             "200":
11288             description: API endpoints
11289             schema:
11290             description: Sync response
11291             properties:
11292             metadata:
11293             description: List of endpoints
11294             example: |-
11295             [
11296             "/1.0/networks/lxdbr0/forwards/192.0.2.1",
11297             "/1.0/networks/lxdbr0/forwards/192.0.2.2"
11298             ]
11299             items:
11300             type: string
11301             type: array
11302             status:
11303             description: Status description
11304             example: Success
11305             type: string
11306             status_code:
11307             description: Status code
11308             example: 200
11309             type: integer
11310             type:
11311             description: Response type
11312             example: sync
11313             type: string
11314             type: object
11315             "403":
11316             $ref: '#/responses/Forbidden'
11317             "500":
11318             $ref: '#/responses/InternalServerError'
11319             summary: Get the network address forwards
11320             tags:
11321             - network-forwards
11322             post:
11323             consumes:
11324             - application/json
11325             description: Creates a new network address forward.
11326             operationId: network_forwards_post
11327             parameters:
11328             - description: Project name
11329             example: default
11330             in: query
11331             name: project
11332             type: string
11333             - description: Forward
11334             in: body
11335             name: forward
11336             required: true
11337             schema:
11338             $ref: '#/definitions/NetworkForwardsPost'
11339             produces:
11340             - application/json
11341             responses:
11342             "200":
11343             $ref: '#/responses/EmptySyncResponse'
11344             "400":
11345             $ref: '#/responses/BadRequest'
11346             "403":
11347             $ref: '#/responses/Forbidden'
11348             "500":
11349             $ref: '#/responses/InternalServerError'
11350             summary: Add a network address forward
11351             tags:
11352             - network-forwards
11353             /1.0/networks/{networkName}/forwards/{listenAddress}:
11354             delete:
11355             description: Removes the network address forward.
11356             operationId: network_forward_delete
11357             parameters:
11358             - description: Project name
11359             example: default
11360             in: query
11361             name: project
11362             type: string
11363             produces:
11364             - application/json
11365             responses:
11366             "200":
11367             $ref: '#/responses/EmptySyncResponse'
11368             "400":
11369             $ref: '#/responses/BadRequest'
11370             "403":
11371             $ref: '#/responses/Forbidden'
11372             "500":
11373             $ref: '#/responses/InternalServerError'
11374             summary: Delete the network address forward
11375             tags:
11376             - network-forwards
11377             get:
11378             description: Gets a specific network address forward.
11379             operationId: network_forward_get
11380             parameters:
11381             - description: Project name
11382             example: default
11383             in: query
11384             name: project
11385             type: string
11386             produces:
11387             - application/json
11388             responses:
11389             "200":
11390             description: Address forward
11391             schema:
11392             description: Sync response
11393             properties:
11394             metadata:
11395             $ref: '#/definitions/NetworkForward'
11396             status:
11397             description: Status description
11398             example: Success
11399             type: string
11400             status_code:
11401             description: Status code
11402             example: 200
11403             type: integer
11404             type:
11405             description: Response type
11406             example: sync
11407             type: string
11408             type: object
11409             "403":
11410             $ref: '#/responses/Forbidden'
11411             "500":
11412             $ref: '#/responses/InternalServerError'
11413             summary: Get the network address forward
11414             tags:
11415             - network-forwards
11416             patch:
11417             consumes:
11418             - application/json
11419             description: Updates a subset of the network address forward configuration.
11420             operationId: network_forward_patch
11421             parameters:
11422             - description: Project name
11423             example: default
11424             in: query
11425             name: project
11426             type: string
11427             - description: Address forward configuration
11428             in: body
11429             name: forward
11430             required: true
11431             schema:
11432             $ref: '#/definitions/NetworkForwardPut'
11433             produces:
11434             - application/json
11435             responses:
11436             "200":
11437             $ref: '#/responses/EmptySyncResponse'
11438             "400":
11439             $ref: '#/responses/BadRequest'
11440             "403":
11441             $ref: '#/responses/Forbidden'
11442             "412":
11443             $ref: '#/responses/PreconditionFailed'
11444             "500":
11445             $ref: '#/responses/InternalServerError'
11446             summary: Partially update the network address forward
11447             tags:
11448             - network-forwards
11449             put:
11450             consumes:
11451             - application/json
11452             description: Updates the entire network address forward configuration.
11453             operationId: network_forward_put
11454             parameters:
11455             - description: Project name
11456             example: default
11457             in: query
11458             name: project
11459             type: string
11460             - description: Address forward configuration
11461             in: body
11462             name: forward
11463             required: true
11464             schema:
11465             $ref: '#/definitions/NetworkForwardPut'
11466             produces:
11467             - application/json
11468             responses:
11469             "200":
11470             $ref: '#/responses/EmptySyncResponse'
11471             "400":
11472             $ref: '#/responses/BadRequest'
11473             "403":
11474             $ref: '#/responses/Forbidden'
11475             "412":
11476             $ref: '#/responses/PreconditionFailed'
11477             "500":
11478             $ref: '#/responses/InternalServerError'
11479             summary: Update the network address forward
11480             tags:
11481             - network-forwards
11482             /1.0/networks/{networkName}/forwards?recursion=1:
11483             get:
11484             description: Returns a list of network address forwards (structs).
11485             operationId: network_forward_get_recursion1
11486             parameters:
11487             - description: Project name
11488             example: default
11489             in: query
11490             name: project
11491             type: string
11492             produces:
11493             - application/json
11494             responses:
11495             "200":
11496             description: API endpoints
11497             schema:
11498             description: Sync response
11499             properties:
11500             metadata:
11501             description: List of network address forwards
11502             items:
11503             $ref: '#/definitions/NetworkForward'
11504             type: array
11505             status:
11506             description: Status description
11507             example: Success
11508             type: string
11509             status_code:
11510             description: Status code
11511             example: 200
11512             type: integer
11513             type:
11514             description: Response type
11515             example: sync
11516             type: string
11517             type: object
11518             "403":
11519             $ref: '#/responses/Forbidden'
11520             "500":
11521             $ref: '#/responses/InternalServerError'
11522             summary: Get the network address forwards
11523             tags:
11524             - network-forwards
11525             /1.0/networks/{networkName}/peers:
11526             get:
11527             description: Returns a list of network peers (URLs).
11528             operationId: network_peers_get
11529             parameters:
11530             - description: Project name
11531             example: default
11532             in: query
11533             name: project
11534             type: string
11535             produces:
11536             - application/json
11537             responses:
11538             "200":
11539             description: API endpoints
11540             schema:
11541             description: Sync response
11542             properties:
11543             metadata:
11544             description: List of endpoints
11545             example: |-
11546             [
11547             "/1.0/networks/lxdbr0/peers/my-peer-1",
11548             "/1.0/networks/lxdbr0/peers/my-peer-2"
11549             ]
11550             items:
11551             type: string
11552             type: array
11553             status:
11554             description: Status description
11555             example: Success
11556             type: string
11557             status_code:
11558             description: Status code
11559             example: 200
11560             type: integer
11561             type:
11562             description: Response type
11563             example: sync
11564             type: string
11565             type: object
11566             "403":
11567             $ref: '#/responses/Forbidden'
11568             "500":
11569             $ref: '#/responses/InternalServerError'
11570             summary: Get the network peers
11571             tags:
11572             - network-peers
11573             post:
11574             consumes:
11575             - application/json
11576             description: Initiates/creates a new network peering.
11577             operationId: network_peers_post
11578             parameters:
11579             - description: Project name
11580             example: default
11581             in: query
11582             name: project
11583             type: string
11584             - description: Peer
11585             in: body
11586             name: peer
11587             required: true
11588             schema:
11589             $ref: '#/definitions/NetworkPeersPost'
11590             produces:
11591             - application/json
11592             responses:
11593             "200":
11594             $ref: '#/responses/EmptySyncResponse'
11595             "202":
11596             $ref: '#/responses/EmptySyncResponse'
11597             "400":
11598             $ref: '#/responses/BadRequest'
11599             "403":
11600             $ref: '#/responses/Forbidden'
11601             "500":
11602             $ref: '#/responses/InternalServerError'
11603             summary: Add a network peer
11604             tags:
11605             - network-peers
11606             /1.0/networks/{networkName}/peers/{peerName}:
11607             delete:
11608             description: Removes the network peering.
11609             operationId: network_peer_delete
11610             parameters:
11611             - description: Project name
11612             example: default
11613             in: query
11614             name: project
11615             type: string
11616             produces:
11617             - application/json
11618             responses:
11619             "200":
11620             $ref: '#/responses/EmptySyncResponse'
11621             "400":
11622             $ref: '#/responses/BadRequest'
11623             "403":
11624             $ref: '#/responses/Forbidden'
11625             "500":
11626             $ref: '#/responses/InternalServerError'
11627             summary: Delete the network peer
11628             tags:
11629             - network-peers
11630             get:
11631             description: Gets a specific network peering.
11632             operationId: network_peer_get
11633             parameters:
11634             - description: Project name
11635             example: default
11636             in: query
11637             name: project
11638             type: string
11639             produces:
11640             - application/json
11641             responses:
11642             "200":
11643             description: Peer
11644             schema:
11645             description: Sync response
11646             properties:
11647             metadata:
11648             $ref: '#/definitions/NetworkPeer'
11649             status:
11650             description: Status description
11651             example: Success
11652             type: string
11653             status_code:
11654             description: Status code
11655             example: 200
11656             type: integer
11657             type:
11658             description: Response type
11659             example: sync
11660             type: string
11661             type: object
11662             "403":
11663             $ref: '#/responses/Forbidden'
11664             "500":
11665             $ref: '#/responses/InternalServerError'
11666             summary: Get the network peer
11667             tags:
11668             - network-peers
11669             patch:
11670             consumes:
11671             - application/json
11672             description: Updates a subset of the network peering configuration.
11673             operationId: network_peer_patch
11674             parameters:
11675             - description: Project name
11676             example: default
11677             in: query
11678             name: project
11679             type: string
11680             - description: Peer configuration
11681             in: body
11682             name: Peer
11683             required: true
11684             schema:
11685             $ref: '#/definitions/NetworkPeerPut'
11686             produces:
11687             - application/json
11688             responses:
11689             "200":
11690             $ref: '#/responses/EmptySyncResponse'
11691             "400":
11692             $ref: '#/responses/BadRequest'
11693             "403":
11694             $ref: '#/responses/Forbidden'
11695             "412":
11696             $ref: '#/responses/PreconditionFailed'
11697             "500":
11698             $ref: '#/responses/InternalServerError'
11699             summary: Partially update the network peer
11700             tags:
11701             - network-peers
11702             put:
11703             consumes:
11704             - application/json
11705             description: Updates the entire network peering configuration.
11706             operationId: network_peer_put
11707             parameters:
11708             - description: Project name
11709             example: default
11710             in: query
11711             name: project
11712             type: string
11713             - description: Peer configuration
11714             in: body
11715             name: peer
11716             required: true
11717             schema:
11718             $ref: '#/definitions/NetworkPeerPut'
11719             produces:
11720             - application/json
11721             responses:
11722             "200":
11723             $ref: '#/responses/EmptySyncResponse'
11724             "400":
11725             $ref: '#/responses/BadRequest'
11726             "403":
11727             $ref: '#/responses/Forbidden'
11728             "412":
11729             $ref: '#/responses/PreconditionFailed'
11730             "500":
11731             $ref: '#/responses/InternalServerError'
11732             summary: Update the network peer
11733             tags:
11734             - network-peers
11735             /1.0/networks/{networkName}/peers?recursion=1:
11736             get:
11737             description: Returns a list of network peers (structs).
11738             operationId: network_peer_get_recursion1
11739             parameters:
11740             - description: Project name
11741             example: default
11742             in: query
11743             name: project
11744             type: string
11745             produces:
11746             - application/json
11747             responses:
11748             "200":
11749             description: API endpoints
11750             schema:
11751             description: Sync response
11752             properties:
11753             metadata:
11754             description: List of network peers
11755             items:
11756             $ref: '#/definitions/NetworkPeer'
11757             type: array
11758             status:
11759             description: Status description
11760             example: Success
11761             type: string
11762             status_code:
11763             description: Status code
11764             example: 200
11765             type: integer
11766             type:
11767             description: Response type
11768             example: sync
11769             type: string
11770             type: object
11771             "403":
11772             $ref: '#/responses/Forbidden'
11773             "500":
11774             $ref: '#/responses/InternalServerError'
11775             summary: Get the network peers
11776             tags:
11777             - network-peers
11778             /1.0/networks?recursion=1:
11779             get:
11780             description: Returns a list of networks (structs).
11781             operationId: networks_get_recursion1
11782             parameters:
11783             - description: Project name
11784             example: default
11785             in: query
11786             name: project
11787             type: string
11788             produces:
11789             - application/json
11790             responses:
11791             "200":
11792             description: API endpoints
11793             schema:
11794             description: Sync response
11795             properties:
11796             metadata:
11797             description: List of networks
11798             items:
11799             $ref: '#/definitions/Network'
11800             type: array
11801             status:
11802             description: Status description
11803             example: Success
11804             type: string
11805             status_code:
11806             description: Status code
11807             example: 200
11808             type: integer
11809             type:
11810             description: Response type
11811             example: sync
11812             type: string
11813             type: object
11814             "403":
11815             $ref: '#/responses/Forbidden'
11816             "500":
11817             $ref: '#/responses/InternalServerError'
11818             summary: Get the networks
11819             tags:
11820             - networks
11821             /1.0/operations:
11822             get:
11823             description: Returns a dict of operation type to operation list (URLs).
11824             operationId: operations_get
11825             produces:
11826             - application/json
11827             responses:
11828             "200":
11829             description: API endpoints
11830             schema:
11831             description: Sync response
11832             properties:
11833             metadata:
11834             additionalProperties:
11835             items:
11836             type: string
11837             type: array
11838             description: Dict of operation types to operation URLs
11839             example: |-
11840             {
11841             "running": [
11842             "/1.0/operations/6916c8a6-9b7d-4abd-90b3-aedfec7ec7da"
11843             ]
11844             }
11845             type: object
11846             status:
11847             description: Status description
11848             example: Success
11849             type: string
11850             status_code:
11851             description: Status code
11852             example: 200
11853             type: integer
11854             type:
11855             description: Response type
11856             example: sync
11857             type: string
11858             type: object
11859             "403":
11860             $ref: '#/responses/Forbidden'
11861             "500":
11862             $ref: '#/responses/InternalServerError'
11863             summary: Get the operations
11864             tags:
11865             - operations
11866             /1.0/operations/{id}:
11867             delete:
11868             description: Cancels the operation if supported.
11869             operationId: operation_delete
11870             produces:
11871             - application/json
11872             responses:
11873             "200":
11874             $ref: '#/responses/EmptySyncResponse'
11875             "400":
11876             $ref: '#/responses/BadRequest'
11877             "403":
11878             $ref: '#/responses/Forbidden'
11879             "500":
11880             $ref: '#/responses/InternalServerError'
11881             summary: Cancel the operation
11882             tags:
11883             - operations
11884             get:
11885             description: Gets the operation state.
11886             operationId: operation_get
11887             produces:
11888             - application/json
11889             responses:
11890             "200":
11891             description: Operation
11892             schema:
11893             description: Sync response
11894             properties:
11895             metadata:
11896             $ref: '#/definitions/Operation'
11897             status:
11898             description: Status description
11899             example: Success
11900             type: string
11901             status_code:
11902             description: Status code
11903             example: 200
11904             type: integer
11905             type:
11906             description: Response type
11907             example: sync
11908             type: string
11909             type: object
11910             "403":
11911             $ref: '#/responses/Forbidden'
11912             "500":
11913             $ref: '#/responses/InternalServerError'
11914             summary: Get the operation state
11915             tags:
11916             - operations
11917             /1.0/operations/{id}/wait:
11918             get:
11919             description: Waits for the operation to reach a final state (or timeout) and
11920             retrieve its final state.
11921             operationId: operation_wait_get
11922             parameters:
11923             - description: Timeout in seconds (-1 means never)
11924             example: -1
11925             in: query
11926             name: timeout
11927             type: integer
11928             produces:
11929             - application/json
11930             responses:
11931             "200":
11932             description: Operation
11933             schema:
11934             description: Sync response
11935             properties:
11936             metadata:
11937             $ref: '#/definitions/Operation'
11938             status:
11939             description: Status description
11940             example: Success
11941             type: string
11942             status_code:
11943             description: Status code
11944             example: 200
11945             type: integer
11946             type:
11947             description: Response type
11948             example: sync
11949             type: string
11950             type: object
11951             "403":
11952             $ref: '#/responses/Forbidden'
11953             "500":
11954             $ref: '#/responses/InternalServerError'
11955             summary: Wait for the operation
11956             tags:
11957             - operations
11958             /1.0/operations/{id}/wait?public:
11959             get:
11960             description: |-
11961             Waits for the operation to reach a final state (or timeout) and retrieve its final state.
11962              
11963             When accessed by an untrusted user, the secret token must be provided.
11964             operationId: operation_wait_get_untrusted
11965             parameters:
11966             - description: Authentication token
11967             example: random-string
11968             in: query
11969             name: secret
11970             type: string
11971             - description: Timeout in seconds (-1 means never)
11972             example: -1
11973             in: query
11974             name: timeout
11975             type: integer
11976             produces:
11977             - application/json
11978             responses:
11979             "200":
11980             description: Operation
11981             schema:
11982             description: Sync response
11983             properties:
11984             metadata:
11985             $ref: '#/definitions/Operation'
11986             status:
11987             description: Status description
11988             example: Success
11989             type: string
11990             status_code:
11991             description: Status code
11992             example: 200
11993             type: integer
11994             type:
11995             description: Response type
11996             example: sync
11997             type: string
11998             type: object
11999             "403":
12000             $ref: '#/responses/Forbidden'
12001             "500":
12002             $ref: '#/responses/InternalServerError'
12003             summary: Wait for the operation
12004             tags:
12005             - operations
12006             /1.0/operations/{id}/websocket:
12007             get:
12008             description: |-
12009             Connects to an associated websocket stream for the operation.
12010             This should almost never be done directly by a client, instead it's
12011             meant for LXD to LXD communication with the client only relaying the
12012             connection information to the servers.
12013             operationId: operation_websocket_get
12014             parameters:
12015             - description: Authentication token
12016             example: random-string
12017             in: query
12018             name: secret
12019             type: string
12020             produces:
12021             - application/json
12022             responses:
12023             "200":
12024             description: Websocket operation messages (dependent on operation)
12025             "403":
12026             $ref: '#/responses/Forbidden'
12027             "500":
12028             $ref: '#/responses/InternalServerError'
12029             summary: Get the websocket stream
12030             tags:
12031             - operations
12032             /1.0/operations/{id}/websocket?public:
12033             get:
12034             description: |-
12035             Connects to an associated websocket stream for the operation.
12036             This should almost never be done directly by a client, instead it's
12037             meant for LXD to LXD communication with the client only relaying the
12038             connection information to the servers.
12039              
12040             The untrusted endpoint is used by the target server to connect to the source server.
12041             Authentication is performed through the secret token.
12042             operationId: operation_websocket_get_untrusted
12043             parameters:
12044             - description: Authentication token
12045             example: random-string
12046             in: query
12047             name: secret
12048             type: string
12049             produces:
12050             - application/json
12051             responses:
12052             "200":
12053             description: Websocket operation messages (dependent on operation)
12054             "403":
12055             $ref: '#/responses/Forbidden'
12056             "500":
12057             $ref: '#/responses/InternalServerError'
12058             summary: Get the websocket stream
12059             tags:
12060             - operations
12061             /1.0/operations?recursion=1:
12062             get:
12063             description: Returns a list of operations (structs).
12064             operationId: operations_get_recursion1
12065             produces:
12066             - application/json
12067             parameters:
12068             - description: Project name
12069             example: default
12070             in: query
12071             name: project
12072             type: string
12073             responses:
12074             "200":
12075             description: API endpoints
12076             schema:
12077             description: Sync response
12078             properties:
12079             metadata:
12080             description: List of operations
12081             items:
12082             $ref: '#/definitions/Operation'
12083             type: array
12084             status:
12085             description: Status description
12086             example: Success
12087             type: string
12088             status_code:
12089             description: Status code
12090             example: 200
12091             type: integer
12092             type:
12093             description: Response type
12094             example: sync
12095             type: string
12096             type: object
12097             "403":
12098             $ref: '#/responses/Forbidden'
12099             "500":
12100             $ref: '#/responses/InternalServerError'
12101             summary: Get the operations
12102             tags:
12103             - operations
12104             /1.0/profiles:
12105             get:
12106             description: Returns a list of profiles (URLs).
12107             operationId: profiles_get
12108             parameters:
12109             - description: Project name
12110             example: default
12111             in: query
12112             name: project
12113             type: string
12114             produces:
12115             - application/json
12116             responses:
12117             "200":
12118             description: API endpoints
12119             schema:
12120             description: Sync response
12121             properties:
12122             metadata:
12123             description: List of endpoints
12124             example: |-
12125             [
12126             "/1.0/profiles/default",
12127             "/1.0/profiles/foo"
12128             ]
12129             items:
12130             type: string
12131             type: array
12132             status:
12133             description: Status description
12134             example: Success
12135             type: string
12136             status_code:
12137             description: Status code
12138             example: 200
12139             type: integer
12140             type:
12141             description: Response type
12142             example: sync
12143             type: string
12144             type: object
12145             "403":
12146             $ref: '#/responses/Forbidden'
12147             "500":
12148             $ref: '#/responses/InternalServerError'
12149             summary: Get the profiles
12150             tags:
12151             - profiles
12152             post:
12153             consumes:
12154             - application/json
12155             description: Creates a new profile.
12156             operationId: profiles_post
12157             parameters:
12158             - description: Project name
12159             example: default
12160             in: query
12161             name: project
12162             type: string
12163             - description: Profile
12164             in: body
12165             name: profile
12166             required: true
12167             schema:
12168             $ref: '#/definitions/ProfilesPost'
12169             produces:
12170             - application/json
12171             responses:
12172             "200":
12173             $ref: '#/responses/EmptySyncResponse'
12174             "400":
12175             $ref: '#/responses/BadRequest'
12176             "403":
12177             $ref: '#/responses/Forbidden'
12178             "500":
12179             $ref: '#/responses/InternalServerError'
12180             summary: Add a profile
12181             tags:
12182             - profiles
12183             /1.0/profiles/{name}:
12184             delete:
12185             description: Removes the profile.
12186             operationId: profile_delete
12187             parameters:
12188             - description: Project name
12189             example: default
12190             in: query
12191             name: project
12192             type: string
12193             produces:
12194             - application/json
12195             responses:
12196             "200":
12197             $ref: '#/responses/EmptySyncResponse'
12198             "400":
12199             $ref: '#/responses/BadRequest'
12200             "403":
12201             $ref: '#/responses/Forbidden'
12202             "500":
12203             $ref: '#/responses/InternalServerError'
12204             summary: Delete the profile
12205             tags:
12206             - profiles
12207             get:
12208             description: Gets a specific profile.
12209             operationId: profile_get
12210             parameters:
12211             - description: Project name
12212             example: default
12213             in: query
12214             name: project
12215             type: string
12216             produces:
12217             - application/json
12218             responses:
12219             "200":
12220             description: Profile
12221             schema:
12222             description: Sync response
12223             properties:
12224             metadata:
12225             $ref: '#/definitions/Profile'
12226             status:
12227             description: Status description
12228             example: Success
12229             type: string
12230             status_code:
12231             description: Status code
12232             example: 200
12233             type: integer
12234             type:
12235             description: Response type
12236             example: sync
12237             type: string
12238             type: object
12239             "403":
12240             $ref: '#/responses/Forbidden'
12241             "500":
12242             $ref: '#/responses/InternalServerError'
12243             summary: Get the profile
12244             tags:
12245             - profiles
12246             patch:
12247             consumes:
12248             - application/json
12249             description: Updates a subset of the profile configuration.
12250             operationId: profile_patch
12251             parameters:
12252             - description: Project name
12253             example: default
12254             in: query
12255             name: project
12256             type: string
12257             - description: Profile configuration
12258             in: body
12259             name: profile
12260             required: true
12261             schema:
12262             $ref: '#/definitions/ProfilePut'
12263             produces:
12264             - application/json
12265             responses:
12266             "200":
12267             $ref: '#/responses/EmptySyncResponse'
12268             "400":
12269             $ref: '#/responses/BadRequest'
12270             "403":
12271             $ref: '#/responses/Forbidden'
12272             "412":
12273             $ref: '#/responses/PreconditionFailed'
12274             "500":
12275             $ref: '#/responses/InternalServerError'
12276             summary: Partially update the profile
12277             tags:
12278             - profiles
12279             post:
12280             consumes:
12281             - application/json
12282             description: Renames an existing profile.
12283             operationId: profile_post
12284             parameters:
12285             - description: Project name
12286             example: default
12287             in: query
12288             name: project
12289             type: string
12290             - description: Profile rename request
12291             in: body
12292             name: profile
12293             required: true
12294             schema:
12295             $ref: '#/definitions/ProfilePost'
12296             produces:
12297             - application/json
12298             responses:
12299             "200":
12300             $ref: '#/responses/EmptySyncResponse'
12301             "400":
12302             $ref: '#/responses/BadRequest'
12303             "403":
12304             $ref: '#/responses/Forbidden'
12305             "500":
12306             $ref: '#/responses/InternalServerError'
12307             summary: Rename the profile
12308             tags:
12309             - profiles
12310             put:
12311             consumes:
12312             - application/json
12313             description: Updates the entire profile configuration.
12314             operationId: profile_put
12315             parameters:
12316             - description: Project name
12317             example: default
12318             in: query
12319             name: project
12320             type: string
12321             - description: Profile configuration
12322             in: body
12323             name: profile
12324             required: true
12325             schema:
12326             $ref: '#/definitions/ProfilePut'
12327             produces:
12328             - application/json
12329             responses:
12330             "200":
12331             $ref: '#/responses/EmptySyncResponse'
12332             "400":
12333             $ref: '#/responses/BadRequest'
12334             "403":
12335             $ref: '#/responses/Forbidden'
12336             "412":
12337             $ref: '#/responses/PreconditionFailed'
12338             "500":
12339             $ref: '#/responses/InternalServerError'
12340             summary: Update the profile
12341             tags:
12342             - profiles
12343             /1.0/profiles?recursion=1:
12344             get:
12345             description: Returns a list of profiles (structs).
12346             operationId: profiles_get_recursion1
12347             parameters:
12348             - description: Project name
12349             example: default
12350             in: query
12351             name: project
12352             type: string
12353             produces:
12354             - application/json
12355             responses:
12356             "200":
12357             description: API endpoints
12358             schema:
12359             description: Sync response
12360             properties:
12361             metadata:
12362             description: List of profiles
12363             items:
12364             $ref: '#/definitions/Profile'
12365             type: array
12366             status:
12367             description: Status description
12368             example: Success
12369             type: string
12370             status_code:
12371             description: Status code
12372             example: 200
12373             type: integer
12374             type:
12375             description: Response type
12376             example: sync
12377             type: string
12378             type: object
12379             "403":
12380             $ref: '#/responses/Forbidden'
12381             "500":
12382             $ref: '#/responses/InternalServerError'
12383             summary: Get the profiles
12384             tags:
12385             - profiles
12386             /1.0/projects:
12387             get:
12388             description: Returns a list of projects (URLs).
12389             operationId: projects_get
12390             produces:
12391             - application/json
12392             responses:
12393             "200":
12394             description: API endpoints
12395             schema:
12396             description: Sync response
12397             properties:
12398             metadata:
12399             description: List of endpoints
12400             example: |-
12401             [
12402             "/1.0/projects/default",
12403             "/1.0/projects/foo"
12404             ]
12405             items:
12406             type: string
12407             type: array
12408             status:
12409             description: Status description
12410             example: Success
12411             type: string
12412             status_code:
12413             description: Status code
12414             example: 200
12415             type: integer
12416             type:
12417             description: Response type
12418             example: sync
12419             type: string
12420             type: object
12421             "403":
12422             $ref: '#/responses/Forbidden'
12423             "500":
12424             $ref: '#/responses/InternalServerError'
12425             summary: Get the projects
12426             tags:
12427             - projects
12428             post:
12429             consumes:
12430             - application/json
12431             description: Creates a new project.
12432             operationId: projects_post
12433             parameters:
12434             - description: Project
12435             in: body
12436             name: project
12437             required: true
12438             schema:
12439             $ref: '#/definitions/ProjectsPost'
12440             produces:
12441             - application/json
12442             responses:
12443             "200":
12444             $ref: '#/responses/EmptySyncResponse'
12445             "400":
12446             $ref: '#/responses/BadRequest'
12447             "403":
12448             $ref: '#/responses/Forbidden'
12449             "500":
12450             $ref: '#/responses/InternalServerError'
12451             summary: Add a project
12452             tags:
12453             - projects
12454             /1.0/projects/{name}:
12455             delete:
12456             description: Removes the project.
12457             operationId: project_delete
12458             produces:
12459             - application/json
12460             responses:
12461             "200":
12462             $ref: '#/responses/EmptySyncResponse'
12463             "400":
12464             $ref: '#/responses/BadRequest'
12465             "403":
12466             $ref: '#/responses/Forbidden'
12467             "500":
12468             $ref: '#/responses/InternalServerError'
12469             summary: Delete the project
12470             tags:
12471             - projects
12472             get:
12473             description: Gets a specific project.
12474             operationId: project_get
12475             produces:
12476             - application/json
12477             responses:
12478             "200":
12479             description: Project
12480             schema:
12481             description: Sync response
12482             properties:
12483             metadata:
12484             $ref: '#/definitions/Project'
12485             status:
12486             description: Status description
12487             example: Success
12488             type: string
12489             status_code:
12490             description: Status code
12491             example: 200
12492             type: integer
12493             type:
12494             description: Response type
12495             example: sync
12496             type: string
12497             type: object
12498             "403":
12499             $ref: '#/responses/Forbidden'
12500             "500":
12501             $ref: '#/responses/InternalServerError'
12502             summary: Get the project
12503             tags:
12504             - projects
12505             patch:
12506             consumes:
12507             - application/json
12508             description: Updates a subset of the project configuration.
12509             operationId: project_patch
12510             parameters:
12511             - description: Project configuration
12512             in: body
12513             name: project
12514             required: true
12515             schema:
12516             $ref: '#/definitions/ProjectPut'
12517             produces:
12518             - application/json
12519             responses:
12520             "200":
12521             $ref: '#/responses/EmptySyncResponse'
12522             "400":
12523             $ref: '#/responses/BadRequest'
12524             "403":
12525             $ref: '#/responses/Forbidden'
12526             "412":
12527             $ref: '#/responses/PreconditionFailed'
12528             "500":
12529             $ref: '#/responses/InternalServerError'
12530             summary: Partially update the project
12531             tags:
12532             - projects
12533             post:
12534             consumes:
12535             - application/json
12536             description: Renames an existing project.
12537             operationId: project_post
12538             parameters:
12539             - description: Project rename request
12540             in: body
12541             name: project
12542             required: true
12543             schema:
12544             $ref: '#/definitions/ProjectPost'
12545             produces:
12546             - application/json
12547             responses:
12548             "200":
12549             $ref: '#/responses/EmptySyncResponse'
12550             "400":
12551             $ref: '#/responses/BadRequest'
12552             "403":
12553             $ref: '#/responses/Forbidden'
12554             "500":
12555             $ref: '#/responses/InternalServerError'
12556             summary: Rename the project
12557             tags:
12558             - projects
12559             put:
12560             consumes:
12561             - application/json
12562             description: Updates the entire project configuration.
12563             operationId: project_put
12564             parameters:
12565             - description: Project configuration
12566             in: body
12567             name: project
12568             required: true
12569             schema:
12570             $ref: '#/definitions/ProjectPut'
12571             produces:
12572             - application/json
12573             responses:
12574             "200":
12575             $ref: '#/responses/EmptySyncResponse'
12576             "400":
12577             $ref: '#/responses/BadRequest'
12578             "403":
12579             $ref: '#/responses/Forbidden'
12580             "412":
12581             $ref: '#/responses/PreconditionFailed'
12582             "500":
12583             $ref: '#/responses/InternalServerError'
12584             summary: Update the project
12585             tags:
12586             - projects
12587             /1.0/projects/{name}/state:
12588             get:
12589             description: Gets a specific project resource consumption information.
12590             operationId: project_state_get
12591             produces:
12592             - application/json
12593             responses:
12594             "200":
12595             description: Project state
12596             schema:
12597             description: Sync response
12598             properties:
12599             metadata:
12600             $ref: '#/definitions/ProjectState'
12601             status:
12602             description: Status description
12603             example: Success
12604             type: string
12605             status_code:
12606             description: Status code
12607             example: 200
12608             type: integer
12609             type:
12610             description: Response type
12611             example: sync
12612             type: string
12613             type: object
12614             "403":
12615             $ref: '#/responses/Forbidden'
12616             "500":
12617             $ref: '#/responses/InternalServerError'
12618             summary: Get the project state
12619             tags:
12620             - projects
12621             /1.0/projects?recursion=1:
12622             get:
12623             description: Returns a list of projects (structs).
12624             operationId: projects_get_recursion1
12625             produces:
12626             - application/json
12627             responses:
12628             "200":
12629             description: API endpoints
12630             schema:
12631             description: Sync response
12632             properties:
12633             metadata:
12634             description: List of projects
12635             items:
12636             $ref: '#/definitions/Project'
12637             type: array
12638             status:
12639             description: Status description
12640             example: Success
12641             type: string
12642             status_code:
12643             description: Status code
12644             example: 200
12645             type: integer
12646             type:
12647             description: Response type
12648             example: sync
12649             type: string
12650             type: object
12651             "403":
12652             $ref: '#/responses/Forbidden'
12653             "500":
12654             $ref: '#/responses/InternalServerError'
12655             summary: Get the projects
12656             tags:
12657             - projects
12658             /1.0/resources:
12659             get:
12660             description: Gets the hardware information profile of the LXD server.
12661             operationId: resources_get
12662             parameters:
12663             - description: Cluster member name
12664             example: lxd01
12665             in: query
12666             name: target
12667             type: string
12668             produces:
12669             - application/json
12670             responses:
12671             "200":
12672             description: Hardware resources
12673             schema:
12674             description: Sync response
12675             properties:
12676             metadata:
12677             $ref: '#/definitions/Resources'
12678             status:
12679             description: Status description
12680             example: Success
12681             type: string
12682             status_code:
12683             description: Status code
12684             example: 200
12685             type: integer
12686             type:
12687             description: Response type
12688             example: sync
12689             type: string
12690             type: object
12691             "403":
12692             $ref: '#/responses/Forbidden'
12693             "500":
12694             $ref: '#/responses/InternalServerError'
12695             summary: Get system resources information
12696             tags:
12697             - server
12698             /1.0/storage-pools:
12699             get:
12700             description: Returns a list of storage pools (URLs).
12701             operationId: storage_pools_get
12702             parameters:
12703             - description: Project name
12704             example: default
12705             in: query
12706             name: project
12707             type: string
12708             produces:
12709             - application/json
12710             responses:
12711             "200":
12712             description: API endpoints
12713             schema:
12714             description: Sync response
12715             properties:
12716             metadata:
12717             description: List of endpoints
12718             example: |-
12719             [
12720             "/1.0/storage-pools/local",
12721             "/1.0/storage-pools/remote"
12722             ]
12723             items:
12724             type: string
12725             type: array
12726             status:
12727             description: Status description
12728             example: Success
12729             type: string
12730             status_code:
12731             description: Status code
12732             example: 200
12733             type: integer
12734             type:
12735             description: Response type
12736             example: sync
12737             type: string
12738             type: object
12739             "403":
12740             $ref: '#/responses/Forbidden'
12741             "500":
12742             $ref: '#/responses/InternalServerError'
12743             summary: Get the storage pools
12744             tags:
12745             - storage
12746             post:
12747             consumes:
12748             - application/json
12749             description: |-
12750             Creates a new storage pool.
12751             When clustered, storage pools require individual POST for each cluster member prior to a global POST.
12752             operationId: storage_pools_post
12753             parameters:
12754             - description: Project name
12755             example: default
12756             in: query
12757             name: project
12758             type: string
12759             - description: Cluster member name
12760             example: lxd01
12761             in: query
12762             name: target
12763             type: string
12764             - description: Storage pool
12765             in: body
12766             name: storage
12767             required: true
12768             schema:
12769             $ref: '#/definitions/StoragePoolsPost'
12770             produces:
12771             - application/json
12772             responses:
12773             "200":
12774             $ref: '#/responses/EmptySyncResponse'
12775             "400":
12776             $ref: '#/responses/BadRequest'
12777             "403":
12778             $ref: '#/responses/Forbidden'
12779             "500":
12780             $ref: '#/responses/InternalServerError'
12781             summary: Add a storage pool
12782             tags:
12783             - storage
12784             /1.0/storage-pools/{name}:
12785             delete:
12786             description: Removes the storage pool.
12787             operationId: storage_pools_delete
12788             parameters:
12789             - description: Project name
12790             example: default
12791             in: query
12792             name: project
12793             type: string
12794             produces:
12795             - application/json
12796             responses:
12797             "200":
12798             $ref: '#/responses/EmptySyncResponse'
12799             "400":
12800             $ref: '#/responses/BadRequest'
12801             "403":
12802             $ref: '#/responses/Forbidden'
12803             "500":
12804             $ref: '#/responses/InternalServerError'
12805             summary: Delete the storage pool
12806             tags:
12807             - storage
12808             get:
12809             description: Gets a specific storage pool.
12810             operationId: storage_pool_get
12811             parameters:
12812             - description: Project name
12813             example: default
12814             in: query
12815             name: project
12816             type: string
12817             - description: Cluster member name
12818             example: lxd01
12819             in: query
12820             name: target
12821             type: string
12822             produces:
12823             - application/json
12824             responses:
12825             "200":
12826             description: Storage pool
12827             schema:
12828             description: Sync response
12829             properties:
12830             metadata:
12831             $ref: '#/definitions/StoragePool'
12832             status:
12833             description: Status description
12834             example: Success
12835             type: string
12836             status_code:
12837             description: Status code
12838             example: 200
12839             type: integer
12840             type:
12841             description: Response type
12842             example: sync
12843             type: string
12844             type: object
12845             "403":
12846             $ref: '#/responses/Forbidden'
12847             "500":
12848             $ref: '#/responses/InternalServerError'
12849             summary: Get the storage pool
12850             tags:
12851             - storage
12852             patch:
12853             consumes:
12854             - application/json
12855             description: Updates a subset of the storage pool configuration.
12856             operationId: storage_pool_patch
12857             parameters:
12858             - description: Project name
12859             example: default
12860             in: query
12861             name: project
12862             type: string
12863             - description: Cluster member name
12864             example: lxd01
12865             in: query
12866             name: target
12867             type: string
12868             - description: Storage pool configuration
12869             in: body
12870             name: storage pool
12871             required: true
12872             schema:
12873             $ref: '#/definitions/StoragePoolPut'
12874             produces:
12875             - application/json
12876             responses:
12877             "200":
12878             $ref: '#/responses/EmptySyncResponse'
12879             "400":
12880             $ref: '#/responses/BadRequest'
12881             "403":
12882             $ref: '#/responses/Forbidden'
12883             "412":
12884             $ref: '#/responses/PreconditionFailed'
12885             "500":
12886             $ref: '#/responses/InternalServerError'
12887             summary: Partially update the storage pool
12888             tags:
12889             - storage
12890             put:
12891             consumes:
12892             - application/json
12893             description: Updates the entire storage pool configuration.
12894             operationId: storage_pool_put
12895             parameters:
12896             - description: Project name
12897             example: default
12898             in: query
12899             name: project
12900             type: string
12901             - description: Cluster member name
12902             example: lxd01
12903             in: query
12904             name: target
12905             type: string
12906             - description: Storage pool configuration
12907             in: body
12908             name: storage pool
12909             required: true
12910             schema:
12911             $ref: '#/definitions/StoragePoolPut'
12912             produces:
12913             - application/json
12914             responses:
12915             "200":
12916             $ref: '#/responses/EmptySyncResponse'
12917             "400":
12918             $ref: '#/responses/BadRequest'
12919             "403":
12920             $ref: '#/responses/Forbidden'
12921             "412":
12922             $ref: '#/responses/PreconditionFailed'
12923             "500":
12924             $ref: '#/responses/InternalServerError'
12925             summary: Update the storage pool
12926             tags:
12927             - storage
12928             /1.0/storage-pools/{name}/resources:
12929             get:
12930             description: Gets the usage information for the storage pool.
12931             operationId: storage_pool_resources
12932             parameters:
12933             - description: Cluster member name
12934             example: lxd01
12935             in: query
12936             name: target
12937             type: string
12938             produces:
12939             - application/json
12940             responses:
12941             "200":
12942             description: Hardware resources
12943             schema:
12944             description: Sync response
12945             properties:
12946             metadata:
12947             $ref: '#/definitions/ResourcesStoragePool'
12948             status:
12949             description: Status description
12950             example: Success
12951             type: string
12952             status_code:
12953             description: Status code
12954             example: 200
12955             type: integer
12956             type:
12957             description: Response type
12958             example: sync
12959             type: string
12960             type: object
12961             "403":
12962             $ref: '#/responses/Forbidden'
12963             "500":
12964             $ref: '#/responses/InternalServerError'
12965             summary: Get storage pool resources information
12966             tags:
12967             - storage
12968             /1.0/storage-pools/{name}/volumes:
12969             get:
12970             description: Returns a list of storage volumes (URLs).
12971             operationId: storage_pool_volumes_get
12972             parameters:
12973             - description: Project name
12974             example: default
12975             in: query
12976             name: project
12977             type: string
12978             - description: Cluster member name
12979             example: lxd01
12980             in: query
12981             name: target
12982             type: string
12983             - description: Collection filter
12984             example: default
12985             in: query
12986             name: filter
12987             type: string
12988             produces:
12989             - application/json
12990             responses:
12991             "200":
12992             description: API endpoints
12993             schema:
12994             description: Sync response
12995             properties:
12996             metadata:
12997             description: List of endpoints
12998             example: |-
12999             [
13000             "/1.0/storage-pools/local/volumes/container/a1",
13001             "/1.0/storage-pools/local/volumes/container/a2",
13002             "/1.0/storage-pools/local/volumes/custom/backups",
13003             "/1.0/storage-pools/local/volumes/custom/images"
13004             ]
13005             items:
13006             type: string
13007             type: array
13008             status:
13009             description: Status description
13010             example: Success
13011             type: string
13012             status_code:
13013             description: Status code
13014             example: 200
13015             type: integer
13016             type:
13017             description: Response type
13018             example: sync
13019             type: string
13020             type: object
13021             "403":
13022             $ref: '#/responses/Forbidden'
13023             "500":
13024             $ref: '#/responses/InternalServerError'
13025             summary: Get the storage volumes
13026             tags:
13027             - storage
13028             post:
13029             consumes:
13030             - application/json
13031             description: Creates a new storage volume.
13032             operationId: storage_pool_volumes_post
13033             parameters:
13034             - description: Project name
13035             example: default
13036             in: query
13037             name: project
13038             type: string
13039             - description: Cluster member name
13040             example: lxd01
13041             in: query
13042             name: target
13043             type: string
13044             - description: Storage volume
13045             in: body
13046             name: volume
13047             required: true
13048             schema:
13049             $ref: '#/definitions/StorageVolumesPost'
13050             produces:
13051             - application/json
13052             responses:
13053             "202":
13054             $ref: '#/responses/Operation'
13055             "400":
13056             $ref: '#/responses/BadRequest'
13057             "403":
13058             $ref: '#/responses/Forbidden'
13059             "500":
13060             $ref: '#/responses/InternalServerError'
13061             summary: Add a storage volume
13062             tags:
13063             - storage
13064             /1.0/storage-pools/{name}/volumes/{type}:
13065             get:
13066             description: Returns a list of storage volumes (URLs) (type specific endpoint).
13067             operationId: storage_pool_volumes_type_get
13068             parameters:
13069             - description: Project name
13070             example: default
13071             in: query
13072             name: project
13073             type: string
13074             - description: Cluster member name
13075             example: lxd01
13076             in: query
13077             name: target
13078             type: string
13079             produces:
13080             - application/json
13081             responses:
13082             "200":
13083             description: API endpoints
13084             schema:
13085             description: Sync response
13086             properties:
13087             metadata:
13088             description: List of endpoints
13089             example: |-
13090             [
13091             "/1.0/storage-pools/local/volumes/custom/backups",
13092             "/1.0/storage-pools/local/volumes/custom/images"
13093             ]
13094             items:
13095             type: string
13096             type: array
13097             status:
13098             description: Status description
13099             example: Success
13100             type: string
13101             status_code:
13102             description: Status code
13103             example: 200
13104             type: integer
13105             type:
13106             description: Response type
13107             example: sync
13108             type: string
13109             type: object
13110             "403":
13111             $ref: '#/responses/Forbidden'
13112             "500":
13113             $ref: '#/responses/InternalServerError'
13114             summary: Get the storage volumes
13115             tags:
13116             - storage
13117             post:
13118             consumes:
13119             - application/json
13120             description: Creates a new storage volume (type specific endpoint).
13121             operationId: storage_pool_volumes_type_post
13122             parameters:
13123             - description: Project name
13124             example: default
13125             in: query
13126             name: project
13127             type: string
13128             - description: Cluster member name
13129             example: lxd01
13130             in: query
13131             name: target
13132             type: string
13133             - description: Storage volume
13134             in: body
13135             name: volume
13136             required: true
13137             schema:
13138             $ref: '#/definitions/StorageVolumesPost'
13139             produces:
13140             - application/json
13141             responses:
13142             "202":
13143             $ref: '#/responses/Operation'
13144             "400":
13145             $ref: '#/responses/BadRequest'
13146             "403":
13147             $ref: '#/responses/Forbidden'
13148             "500":
13149             $ref: '#/responses/InternalServerError'
13150             summary: Add a storage volume
13151             tags:
13152             - storage
13153             /1.0/storage-pools/{name}/volumes/{type}/{volume}:
13154             delete:
13155             description: Removes the storage volume.
13156             operationId: storage_pool_volume_type_delete
13157             parameters:
13158             - description: Project name
13159             example: default
13160             in: query
13161             name: project
13162             type: string
13163             - description: Cluster member name
13164             example: lxd01
13165             in: query
13166             name: target
13167             type: string
13168             produces:
13169             - application/json
13170             responses:
13171             "200":
13172             $ref: '#/responses/EmptySyncResponse'
13173             "400":
13174             $ref: '#/responses/BadRequest'
13175             "403":
13176             $ref: '#/responses/Forbidden'
13177             "500":
13178             $ref: '#/responses/InternalServerError'
13179             summary: Delete the storage volume
13180             tags:
13181             - storage
13182             get:
13183             description: Gets a specific storage volume.
13184             operationId: storage_pool_volume_type_get
13185             parameters:
13186             - description: Project name
13187             example: default
13188             in: query
13189             name: project
13190             type: string
13191             - description: Cluster member name
13192             example: lxd01
13193             in: query
13194             name: target
13195             type: string
13196             produces:
13197             - application/json
13198             responses:
13199             "200":
13200             description: Storage volume
13201             schema:
13202             description: Sync response
13203             properties:
13204             metadata:
13205             $ref: '#/definitions/StorageVolume'
13206             status:
13207             description: Status description
13208             example: Success
13209             type: string
13210             status_code:
13211             description: Status code
13212             example: 200
13213             type: integer
13214             type:
13215             description: Response type
13216             example: sync
13217             type: string
13218             type: object
13219             "403":
13220             $ref: '#/responses/Forbidden'
13221             "500":
13222             $ref: '#/responses/InternalServerError'
13223             summary: Get the storage volume
13224             tags:
13225             - storage
13226             patch:
13227             consumes:
13228             - application/json
13229             description: Updates a subset of the storage volume configuration.
13230             operationId: storage_pool_volume_type_patch
13231             parameters:
13232             - description: Project name
13233             example: default
13234             in: query
13235             name: project
13236             type: string
13237             - description: Cluster member name
13238             example: lxd01
13239             in: query
13240             name: target
13241             type: string
13242             - description: Storage volume configuration
13243             in: body
13244             name: storage volume
13245             required: true
13246             schema:
13247             $ref: '#/definitions/StorageVolumePut'
13248             produces:
13249             - application/json
13250             responses:
13251             "200":
13252             $ref: '#/responses/EmptySyncResponse'
13253             "400":
13254             $ref: '#/responses/BadRequest'
13255             "403":
13256             $ref: '#/responses/Forbidden'
13257             "412":
13258             $ref: '#/responses/PreconditionFailed'
13259             "500":
13260             $ref: '#/responses/InternalServerError'
13261             summary: Partially update the storage volume
13262             tags:
13263             - storage
13264             post:
13265             consumes:
13266             - application/json
13267             description: |-
13268             Renames, moves a storage volume between pools or migrates an instance to another server.
13269              
13270             The returned operation metadata will vary based on what's requested.
13271             For rename or move within the same server, this is a simple background operation with progress data.
13272             For migration, in the push case, this will similarly be a background
13273             operation with progress data, for the pull case, it will be a websocket
13274             operation with a number of secrets to be passed to the target server.
13275             operationId: storage_pool_volume_type_post
13276             parameters:
13277             - description: Project name
13278             example: default
13279             in: query
13280             name: project
13281             type: string
13282             - description: Cluster member name
13283             example: lxd01
13284             in: query
13285             name: target
13286             type: string
13287             - description: Migration request
13288             in: body
13289             name: migration
13290             schema:
13291             $ref: '#/definitions/StorageVolumePost'
13292             produces:
13293             - application/json
13294             responses:
13295             "202":
13296             $ref: '#/responses/Operation'
13297             "400":
13298             $ref: '#/responses/BadRequest'
13299             "403":
13300             $ref: '#/responses/Forbidden'
13301             "500":
13302             $ref: '#/responses/InternalServerError'
13303             summary: Rename or move/migrate a storage volume
13304             tags:
13305             - storage
13306             put:
13307             consumes:
13308             - application/json
13309             description: Updates the entire storage volume configuration.
13310             operationId: storage_pool_volume_type_put
13311             parameters:
13312             - description: Project name
13313             example: default
13314             in: query
13315             name: project
13316             type: string
13317             - description: Cluster member name
13318             example: lxd01
13319             in: query
13320             name: target
13321             type: string
13322             - description: Storage volume configuration
13323             in: body
13324             name: storage volume
13325             required: true
13326             schema:
13327             $ref: '#/definitions/StorageVolumePut'
13328             produces:
13329             - application/json
13330             responses:
13331             "200":
13332             $ref: '#/responses/EmptySyncResponse'
13333             "400":
13334             $ref: '#/responses/BadRequest'
13335             "403":
13336             $ref: '#/responses/Forbidden'
13337             "412":
13338             $ref: '#/responses/PreconditionFailed'
13339             "500":
13340             $ref: '#/responses/InternalServerError'
13341             summary: Update the storage volume
13342             tags:
13343             - storage
13344             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups:
13345             get:
13346             description: Returns a list of storage volume backups (URLs).
13347             operationId: storage_pool_volumes_type_backups_get
13348             parameters:
13349             - description: Project name
13350             example: default
13351             in: query
13352             name: project
13353             type: string
13354             - description: Cluster member name
13355             example: lxd01
13356             in: query
13357             name: target
13358             type: string
13359             produces:
13360             - application/json
13361             responses:
13362             "200":
13363             description: API endpoints
13364             schema:
13365             description: Sync response
13366             properties:
13367             metadata:
13368             description: List of endpoints
13369             example: |-
13370             [
13371             "/1.0/storage-pools/local/volumes/custom/foo/backups/backup0",
13372             "/1.0/storage-pools/local/volumes/custom/foo/backups/backup1"
13373             ]
13374             items:
13375             type: string
13376             type: array
13377             status:
13378             description: Status description
13379             example: Success
13380             type: string
13381             status_code:
13382             description: Status code
13383             example: 200
13384             type: integer
13385             type:
13386             description: Response type
13387             example: sync
13388             type: string
13389             type: object
13390             "403":
13391             $ref: '#/responses/Forbidden'
13392             "500":
13393             $ref: '#/responses/InternalServerError'
13394             summary: Get the storage volume backups
13395             tags:
13396             - storage
13397             post:
13398             consumes:
13399             - application/json
13400             description: Creates a new storage volume backup.
13401             operationId: storage_pool_volumes_type_backups_post
13402             parameters:
13403             - description: Project name
13404             example: default
13405             in: query
13406             name: project
13407             type: string
13408             - description: Cluster member name
13409             example: lxd01
13410             in: query
13411             name: target
13412             type: string
13413             - description: Storage volume backup
13414             in: body
13415             name: volume
13416             required: true
13417             schema:
13418             $ref: '#/definitions/StoragePoolVolumeBackupsPost'
13419             produces:
13420             - application/json
13421             responses:
13422             "202":
13423             $ref: '#/responses/Operation'
13424             "400":
13425             $ref: '#/responses/BadRequest'
13426             "403":
13427             $ref: '#/responses/Forbidden'
13428             "500":
13429             $ref: '#/responses/InternalServerError'
13430             summary: Create a storage volume backup
13431             tags:
13432             - storage
13433             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups/{backup}:
13434             delete:
13435             consumes:
13436             - application/json
13437             description: Deletes a new storage volume backup.
13438             operationId: storage_pool_volumes_type_backup_delete
13439             parameters:
13440             - description: Project name
13441             example: default
13442             in: query
13443             name: project
13444             type: string
13445             - description: Cluster member name
13446             example: lxd01
13447             in: query
13448             name: target
13449             type: string
13450             produces:
13451             - application/json
13452             responses:
13453             "202":
13454             $ref: '#/responses/Operation'
13455             "400":
13456             $ref: '#/responses/BadRequest'
13457             "403":
13458             $ref: '#/responses/Forbidden'
13459             "500":
13460             $ref: '#/responses/InternalServerError'
13461             summary: Delete a storage volume backup
13462             tags:
13463             - storage
13464             get:
13465             description: Gets a specific storage volume backup.
13466             operationId: storage_pool_volumes_type_backup_get
13467             parameters:
13468             - description: Project name
13469             example: default
13470             in: query
13471             name: project
13472             type: string
13473             - description: Cluster member name
13474             example: lxd01
13475             in: query
13476             name: target
13477             type: string
13478             produces:
13479             - application/json
13480             responses:
13481             "200":
13482             description: Storage volume backup
13483             schema:
13484             description: Sync response
13485             properties:
13486             metadata:
13487             $ref: '#/definitions/StoragePoolVolumeBackup'
13488             status:
13489             description: Status description
13490             example: Success
13491             type: string
13492             status_code:
13493             description: Status code
13494             example: 200
13495             type: integer
13496             type:
13497             description: Response type
13498             example: sync
13499             type: string
13500             type: object
13501             "403":
13502             $ref: '#/responses/Forbidden'
13503             "500":
13504             $ref: '#/responses/InternalServerError'
13505             summary: Get the storage volume backup
13506             tags:
13507             - storage
13508             post:
13509             consumes:
13510             - application/json
13511             description: Renames a storage volume backup.
13512             operationId: storage_pool_volumes_type_backup_post
13513             parameters:
13514             - description: Project name
13515             example: default
13516             in: query
13517             name: project
13518             type: string
13519             - description: Cluster member name
13520             example: lxd01
13521             in: query
13522             name: target
13523             type: string
13524             - description: Storage volume backup
13525             in: body
13526             name: volume rename
13527             required: true
13528             schema:
13529             $ref: '#/definitions/StorageVolumeSnapshotPost'
13530             produces:
13531             - application/json
13532             responses:
13533             "202":
13534             $ref: '#/responses/Operation'
13535             "400":
13536             $ref: '#/responses/BadRequest'
13537             "403":
13538             $ref: '#/responses/Forbidden'
13539             "500":
13540             $ref: '#/responses/InternalServerError'
13541             summary: Rename a storage volume backup
13542             tags:
13543             - storage
13544             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups/{backup}/export:
13545             get:
13546             description: Download the raw backup file from the server.
13547             operationId: storage_pool_volumes_type_backup_export_get
13548             parameters:
13549             - description: Project name
13550             example: default
13551             in: query
13552             name: project
13553             type: string
13554             - description: Cluster member name
13555             example: lxd01
13556             in: query
13557             name: target
13558             type: string
13559             produces:
13560             - application/octet-stream
13561             responses:
13562             "200":
13563             description: Raw backup data
13564             "403":
13565             $ref: '#/responses/Forbidden'
13566             "500":
13567             $ref: '#/responses/InternalServerError'
13568             summary: Get the raw backup file
13569             tags:
13570             - storage
13571             /1.0/storage-pools/{name}/volumes/{type}/{volume}/backups?recursion=1:
13572             get:
13573             description: Returns a list of storage volume backups (structs).
13574             operationId: storage_pool_volumes_type_backups_get_recursion1
13575             parameters:
13576             - description: Project name
13577             example: default
13578             in: query
13579             name: project
13580             type: string
13581             - description: Cluster member name
13582             example: lxd01
13583             in: query
13584             name: target
13585             type: string
13586             produces:
13587             - application/json
13588             responses:
13589             "200":
13590             description: API endpoints
13591             schema:
13592             description: Sync response
13593             properties:
13594             metadata:
13595             description: List of storage volume backups
13596             items:
13597             $ref: '#/definitions/StoragePoolVolumeBackup'
13598             type: array
13599             status:
13600             description: Status description
13601             example: Success
13602             type: string
13603             status_code:
13604             description: Status code
13605             example: 200
13606             type: integer
13607             type:
13608             description: Response type
13609             example: sync
13610             type: string
13611             type: object
13612             "403":
13613             $ref: '#/responses/Forbidden'
13614             "500":
13615             $ref: '#/responses/InternalServerError'
13616             summary: Get the storage volume backups
13617             tags:
13618             - storage
13619             /1.0/storage-pools/{name}/volumes/{type}/{volume}/snapshots:
13620             get:
13621             description: Returns a list of storage volume snapshots (URLs).
13622             operationId: storage_pool_volumes_type_snapshots_get
13623             parameters:
13624             - description: Project name
13625             example: default
13626             in: query
13627             name: project
13628             type: string
13629             - description: Cluster member name
13630             example: lxd01
13631             in: query
13632             name: target
13633             type: string
13634             produces:
13635             - application/json
13636             responses:
13637             "200":
13638             description: API endpoints
13639             schema:
13640             description: Sync response
13641             properties:
13642             metadata:
13643             description: List of endpoints
13644             example: |-
13645             [
13646             "/1.0/storage-pools/local/volumes/custom/foo/snapshots/snap0",
13647             "/1.0/storage-pools/local/volumes/custom/foo/snapshots/snap1"
13648             ]
13649             items:
13650             type: string
13651             type: array
13652             status:
13653             description: Status description
13654             example: Success
13655             type: string
13656             status_code:
13657             description: Status code
13658             example: 200
13659             type: integer
13660             type:
13661             description: Response type
13662             example: sync
13663             type: string
13664             type: object
13665             "403":
13666             $ref: '#/responses/Forbidden'
13667             "500":
13668             $ref: '#/responses/InternalServerError'
13669             summary: Get the storage volume snapshots
13670             tags:
13671             - storage
13672             post:
13673             consumes:
13674             - application/json
13675             description: Creates a new storage volume snapshot.
13676             operationId: storage_pool_volumes_type_snapshots_post
13677             parameters:
13678             - description: Project name
13679             example: default
13680             in: query
13681             name: project
13682             type: string
13683             - description: Cluster member name
13684             example: lxd01
13685             in: query
13686             name: target
13687             type: string
13688             - description: Storage volume snapshot
13689             in: body
13690             name: volume
13691             required: true
13692             schema:
13693             $ref: '#/definitions/StorageVolumeSnapshotsPost'
13694             produces:
13695             - application/json
13696             responses:
13697             "202":
13698             $ref: '#/responses/Operation'
13699             "400":
13700             $ref: '#/responses/BadRequest'
13701             "403":
13702             $ref: '#/responses/Forbidden'
13703             "500":
13704             $ref: '#/responses/InternalServerError'
13705             summary: Create a storage volume snapshot
13706             tags:
13707             - storage
13708             /1.0/storage-pools/{name}/volumes/{type}/{volume}/snapshots/{snapshot}:
13709             delete:
13710             consumes:
13711             - application/json
13712             description: Deletes a new storage volume snapshot.
13713             operationId: storage_pool_volumes_type_snapshot_delete
13714             parameters:
13715             - description: Project name
13716             example: default
13717             in: query
13718             name: project
13719             type: string
13720             - description: Cluster member name
13721             example: lxd01
13722             in: query
13723             name: target
13724             type: string
13725             produces:
13726             - application/json
13727             responses:
13728             "202":
13729             $ref: '#/responses/Operation'
13730             "400":
13731             $ref: '#/responses/BadRequest'
13732             "403":
13733             $ref: '#/responses/Forbidden'
13734             "500":
13735             $ref: '#/responses/InternalServerError'
13736             summary: Delete a storage volume snapshot
13737             tags:
13738             - storage
13739             get:
13740             description: Gets a specific storage volume snapshot.
13741             operationId: storage_pool_volumes_type_snapshot_get
13742             parameters:
13743             - description: Project name
13744             example: default
13745             in: query
13746             name: project
13747             type: string
13748             - description: Cluster member name
13749             example: lxd01
13750             in: query
13751             name: target
13752             type: string
13753             produces:
13754             - application/json
13755             responses:
13756             "200":
13757             description: Storage volume snapshot
13758             schema:
13759             description: Sync response
13760             properties:
13761             metadata:
13762             $ref: '#/definitions/StorageVolumeSnapshot'
13763             status:
13764             description: Status description
13765             example: Success
13766             type: string
13767             status_code:
13768             description: Status code
13769             example: 200
13770             type: integer
13771             type:
13772             description: Response type
13773             example: sync
13774             type: string
13775             type: object
13776             "403":
13777             $ref: '#/responses/Forbidden'
13778             "500":
13779             $ref: '#/responses/InternalServerError'
13780             summary: Get the storage volume snapshot
13781             tags:
13782             - storage
13783             patch:
13784             consumes:
13785             - application/json
13786             description: Updates a subset of the storage volume snapshot configuration.
13787             operationId: storage_pool_volumes_type_snapshot_patch
13788             parameters:
13789             - description: Project name
13790             example: default
13791             in: query
13792             name: project
13793             type: string
13794             - description: Cluster member name
13795             example: lxd01
13796             in: query
13797             name: target
13798             type: string
13799             - description: Storage volume snapshot configuration
13800             in: body
13801             name: storage volume snapshot
13802             required: true
13803             schema:
13804             $ref: '#/definitions/StorageVolumeSnapshotPut'
13805             produces:
13806             - application/json
13807             responses:
13808             "200":
13809             $ref: '#/responses/EmptySyncResponse'
13810             "400":
13811             $ref: '#/responses/BadRequest'
13812             "403":
13813             $ref: '#/responses/Forbidden'
13814             "412":
13815             $ref: '#/responses/PreconditionFailed'
13816             "500":
13817             $ref: '#/responses/InternalServerError'
13818             summary: Partially update the storage volume snapshot
13819             tags:
13820             - storage
13821             post:
13822             consumes:
13823             - application/json
13824             description: Renames a storage volume snapshot.
13825             operationId: storage_pool_volumes_type_snapshot_post
13826             parameters:
13827             - description: Project name
13828             example: default
13829             in: query
13830             name: project
13831             type: string
13832             - description: Cluster member name
13833             example: lxd01
13834             in: query
13835             name: target
13836             type: string
13837             - description: Storage volume snapshot
13838             in: body
13839             name: volume rename
13840             required: true
13841             schema:
13842             $ref: '#/definitions/StorageVolumeSnapshotPost'
13843             produces:
13844             - application/json
13845             responses:
13846             "202":
13847             $ref: '#/responses/Operation'
13848             "400":
13849             $ref: '#/responses/BadRequest'
13850             "403":
13851             $ref: '#/responses/Forbidden'
13852             "500":
13853             $ref: '#/responses/InternalServerError'
13854             summary: Rename a storage volume snapshot
13855             tags:
13856             - storage
13857             put:
13858             consumes:
13859             - application/json
13860             description: Updates the entire storage volume snapshot configuration.
13861             operationId: storage_pool_volumes_type_snapshot_put
13862             parameters:
13863             - description: Project name
13864             example: default
13865             in: query
13866             name: project
13867             type: string
13868             - description: Cluster member name
13869             example: lxd01
13870             in: query
13871             name: target
13872             type: string
13873             - description: Storage volume snapshot configuration
13874             in: body
13875             name: storage volume snapshot
13876             required: true
13877             schema:
13878             $ref: '#/definitions/StorageVolumeSnapshotPut'
13879             produces:
13880             - application/json
13881             responses:
13882             "200":
13883             $ref: '#/responses/EmptySyncResponse'
13884             "400":
13885             $ref: '#/responses/BadRequest'
13886             "403":
13887             $ref: '#/responses/Forbidden'
13888             "412":
13889             $ref: '#/responses/PreconditionFailed'
13890             "500":
13891             $ref: '#/responses/InternalServerError'
13892             summary: Update the storage volume snapshot
13893             tags:
13894             - storage
13895             /1.0/storage-pools/{name}/volumes/{type}/{volume}/snapshots?recursion=1:
13896             get:
13897             description: Returns a list of storage volume snapshots (structs).
13898             operationId: storage_pool_volumes_type_snapshots_get_recursion1
13899             parameters:
13900             - description: Project name
13901             example: default
13902             in: query
13903             name: project
13904             type: string
13905             - description: Cluster member name
13906             example: lxd01
13907             in: query
13908             name: target
13909             type: string
13910             produces:
13911             - application/json
13912             responses:
13913             "200":
13914             description: API endpoints
13915             schema:
13916             description: Sync response
13917             properties:
13918             metadata:
13919             description: List of storage volume snapshots
13920             items:
13921             $ref: '#/definitions/StorageVolumeSnapshot'
13922             type: array
13923             status:
13924             description: Status description
13925             example: Success
13926             type: string
13927             status_code:
13928             description: Status code
13929             example: 200
13930             type: integer
13931             type:
13932             description: Response type
13933             example: sync
13934             type: string
13935             type: object
13936             "403":
13937             $ref: '#/responses/Forbidden'
13938             "500":
13939             $ref: '#/responses/InternalServerError'
13940             summary: Get the storage volume snapshots
13941             tags:
13942             - storage
13943             /1.0/storage-pools/{name}/volumes/{type}/{volume}/state:
13944             get:
13945             description: Gets a specific storage volume state (usage data).
13946             operationId: storage_pool_volume_type_state_get
13947             parameters:
13948             - description: Project name
13949             example: default
13950             in: query
13951             name: project
13952             type: string
13953             - description: Cluster member name
13954             example: lxd01
13955             in: query
13956             name: target
13957             type: string
13958             produces:
13959             - application/json
13960             responses:
13961             "200":
13962             description: Storage pool
13963             schema:
13964             description: Sync response
13965             properties:
13966             metadata:
13967             $ref: '#/definitions/StorageVolumeState'
13968             status:
13969             description: Status description
13970             example: Success
13971             type: string
13972             status_code:
13973             description: Status code
13974             example: 200
13975             type: integer
13976             type:
13977             description: Response type
13978             example: sync
13979             type: string
13980             type: object
13981             "403":
13982             $ref: '#/responses/Forbidden'
13983             "500":
13984             $ref: '#/responses/InternalServerError'
13985             summary: Get the storage volume state
13986             tags:
13987             - storage
13988             /1.0/storage-pools/{name}/volumes/{type}?recursion=1:
13989             get:
13990             description: Returns a list of storage volumes (structs) (type specific endpoint).
13991             operationId: storage_pool_volumes_type_get_recursion1
13992             parameters:
13993             - description: Project name
13994             example: default
13995             in: query
13996             name: project
13997             type: string
13998             - description: Cluster member name
13999             example: lxd01
14000             in: query
14001             name: target
14002             type: string
14003             produces:
14004             - application/json
14005             responses:
14006             "200":
14007             description: API endpoints
14008             schema:
14009             description: Sync response
14010             properties:
14011             metadata:
14012             description: List of storage volumes
14013             items:
14014             $ref: '#/definitions/StorageVolume'
14015             type: array
14016             status:
14017             description: Status description
14018             example: Success
14019             type: string
14020             status_code:
14021             description: Status code
14022             example: 200
14023             type: integer
14024             type:
14025             description: Response type
14026             example: sync
14027             type: string
14028             type: object
14029             "403":
14030             $ref: '#/responses/Forbidden'
14031             "500":
14032             $ref: '#/responses/InternalServerError'
14033             summary: Get the storage volumes
14034             tags:
14035             - storage
14036             /1.0/storage-pools/{name}/volumes?recursion=1:
14037             get:
14038             description: Returns a list of storage volumes (structs).
14039             operationId: storage_pool_volumes_get_recursion1
14040             parameters:
14041             - description: Project name
14042             example: default
14043             in: query
14044             name: project
14045             type: string
14046             - description: Cluster member name
14047             example: lxd01
14048             in: query
14049             name: target
14050             type: string
14051             - description: Collection filter
14052             example: default
14053             in: query
14054             name: filter
14055             type: string
14056             produces:
14057             - application/json
14058             responses:
14059             "200":
14060             description: API endpoints
14061             schema:
14062             description: Sync response
14063             properties:
14064             metadata:
14065             description: List of storage volumes
14066             items:
14067             $ref: '#/definitions/StorageVolume'
14068             type: array
14069             status:
14070             description: Status description
14071             example: Success
14072             type: string
14073             status_code:
14074             description: Status code
14075             example: 200
14076             type: integer
14077             type:
14078             description: Response type
14079             example: sync
14080             type: string
14081             type: object
14082             "403":
14083             $ref: '#/responses/Forbidden'
14084             "500":
14085             $ref: '#/responses/InternalServerError'
14086             summary: Get the storage volumes
14087             tags:
14088             - storage
14089             /1.0/storage-pools?recursion=1:
14090             get:
14091             description: Returns a list of storage pools (structs).
14092             operationId: storage_pools_get_recursion1
14093             parameters:
14094             - description: Project name
14095             example: default
14096             in: query
14097             name: project
14098             type: string
14099             produces:
14100             - application/json
14101             responses:
14102             "200":
14103             description: API endpoints
14104             schema:
14105             description: Sync response
14106             properties:
14107             metadata:
14108             description: List of storage pools
14109             items:
14110             $ref: '#/definitions/StoragePool'
14111             type: array
14112             status:
14113             description: Status description
14114             example: Success
14115             type: string
14116             status_code:
14117             description: Status code
14118             example: 200
14119             type: integer
14120             type:
14121             description: Response type
14122             example: sync
14123             type: string
14124             type: object
14125             "403":
14126             $ref: '#/responses/Forbidden'
14127             "500":
14128             $ref: '#/responses/InternalServerError'
14129             summary: Get the storage pools
14130             tags:
14131             - storage
14132             /1.0/warnings:
14133             get:
14134             description: Returns a list of warnings.
14135             operationId: warnings_get
14136             parameters:
14137             - description: Project name
14138             example: default
14139             in: query
14140             name: project
14141             type: string
14142             produces:
14143             - application/json
14144             responses:
14145             "200":
14146             description: Sync response
14147             schema:
14148             description: Sync response
14149             properties:
14150             metadata:
14151             description: List of endpoints
14152             example: |-
14153             [
14154             "/1.0/warnings/39c61a48-cc17-40ae-8248-4f7b4cadedf4",
14155             "/1.0/warnings/951779a5-2820-4d96-b01e-88fe820e5310"
14156             ]
14157             items:
14158             type: string
14159             type: array
14160             status:
14161             description: Status description
14162             example: Success
14163             type: string
14164             status_code:
14165             description: Status code
14166             example: 200
14167             type: integer
14168             type:
14169             description: Response type
14170             example: sync
14171             type: string
14172             type: object
14173             "500":
14174             $ref: '#/responses/InternalServerError'
14175             summary: List the warnings
14176             tags:
14177             - warnings
14178             /1.0/warnings/{uuid}:
14179             delete:
14180             description: Removes the warning.
14181             operationId: warning_delete
14182             produces:
14183             - application/json
14184             responses:
14185             "200":
14186             $ref: '#/responses/EmptySyncResponse'
14187             "500":
14188             $ref: '#/responses/InternalServerError'
14189             summary: Delete the warning
14190             tags:
14191             - warnings
14192             get:
14193             description: Gets a specific warning.
14194             operationId: warning_get
14195             produces:
14196             - application/json
14197             responses:
14198             "200":
14199             description: Warning
14200             schema:
14201             description: Sync response
14202             properties:
14203             metadata:
14204             $ref: '#/definitions/Warning'
14205             status:
14206             description: Status description
14207             example: Success
14208             type: string
14209             status_code:
14210             description: Status code
14211             example: 200
14212             type: integer
14213             type:
14214             description: Response type
14215             example: sync
14216             type: string
14217             type: object
14218             "404":
14219             $ref: '#/responses/NotFound'
14220             "500":
14221             $ref: '#/responses/InternalServerError'
14222             summary: Get the warning
14223             tags:
14224             - warnings
14225             patch:
14226             consumes:
14227             - application/json
14228             description: Updates a subset of the warning status.
14229             operationId: warning_patch
14230             parameters:
14231             - description: Warning status
14232             in: body
14233             name: warning
14234             required: true
14235             schema:
14236             $ref: '#/definitions/WarningPut'
14237             produces:
14238             - application/json
14239             responses:
14240             "200":
14241             $ref: '#/responses/EmptySyncResponse'
14242             "400":
14243             $ref: '#/responses/BadRequest'
14244             "403":
14245             $ref: '#/responses/Forbidden'
14246             "500":
14247             $ref: '#/responses/InternalServerError'
14248             summary: Partially update the warning
14249             tags:
14250             - warnings
14251             put:
14252             consumes:
14253             - application/json
14254             description: Updates the warning status.
14255             operationId: warning_put
14256             parameters:
14257             - description: Warning status
14258             in: body
14259             name: warning
14260             required: true
14261             schema:
14262             $ref: '#/definitions/WarningPut'
14263             produces:
14264             - application/json
14265             responses:
14266             "200":
14267             $ref: '#/responses/EmptySyncResponse'
14268             "400":
14269             $ref: '#/responses/BadRequest'
14270             "403":
14271             $ref: '#/responses/Forbidden'
14272             "500":
14273             $ref: '#/responses/InternalServerError'
14274             summary: Update the warning
14275             tags:
14276             - warnings
14277             /1.0/warnings?recursion=1:
14278             get:
14279             description: Returns a list of warnings (structs).
14280             operationId: warnings_get_recursion1
14281             parameters:
14282             - description: Project name
14283             example: default
14284             in: query
14285             name: project
14286             type: string
14287             produces:
14288             - application/json
14289             responses:
14290             "200":
14291             description: API endpoints
14292             schema:
14293             description: Sync response
14294             properties:
14295             metadata:
14296             description: List of warnings
14297             items:
14298             $ref: '#/definitions/Warning'
14299             type: array
14300             status:
14301             description: Status description
14302             example: Success
14303             type: string
14304             status_code:
14305             description: Status code
14306             example: 200
14307             type: integer
14308             type:
14309             description: Response type
14310             example: sync
14311             type: string
14312             type: object
14313             "500":
14314             $ref: '#/responses/InternalServerError'
14315             summary: Get the warnings
14316             tags:
14317             - warnings
14318             /1.0?public:
14319             get:
14320             description: |-
14321             Shows a small subset of the server environment and configuration
14322             which is required by untrusted clients to reach a server.
14323              
14324             The `?public` part of the URL isn't required, it's simply used to
14325             separate the two behaviors of this endpoint.
14326             operationId: server_get_untrusted
14327             produces:
14328             - application/json
14329             responses:
14330             "200":
14331             description: Server environment and configuration
14332             schema:
14333             description: Sync response
14334             properties:
14335             metadata:
14336             $ref: '#/definitions/ServerUntrusted'
14337             status:
14338             description: Status description
14339             example: Success
14340             type: string
14341             status_code:
14342             description: Status code
14343             example: 200
14344             type: integer
14345             type:
14346             description: Response type
14347             example: sync
14348             type: string
14349             type: object
14350             "500":
14351             $ref: '#/responses/InternalServerError'
14352             summary: Get the server environment
14353             tags:
14354             - server
14355             responses:
14356             BadRequest:
14357             description: Bad Request
14358             schema:
14359             properties:
14360             code:
14361             example: 400
14362             format: int64
14363             type: integer
14364             x-go-name: Code
14365             error:
14366             example: bad request
14367             type: string
14368             x-go-name: Error
14369             type:
14370             example: error
14371             type: string
14372             x-go-name: Type
14373             type: object
14374             EmptySyncResponse:
14375             description: Empty sync response
14376             schema:
14377             properties:
14378             status:
14379             example: Success
14380             type: string
14381             x-go-name: Status
14382             status_code:
14383             example: 200
14384             format: int64
14385             type: integer
14386             x-go-name: StatusCode
14387             type:
14388             example: sync
14389             type: string
14390             x-go-name: Type
14391             type: object
14392             Forbidden:
14393             description: Forbidden
14394             schema:
14395             properties:
14396             code:
14397             example: 403
14398             format: int64
14399             type: integer
14400             x-go-name: Code
14401             error:
14402             example: not authorized
14403             type: string
14404             x-go-name: Error
14405             type:
14406             example: error
14407             type: string
14408             x-go-name: Type
14409             type: object
14410             InternalServerError:
14411             description: Internal Server Error
14412             schema:
14413             properties:
14414             code:
14415             example: 500
14416             format: int64
14417             type: integer
14418             x-go-name: Code
14419             error:
14420             example: internal server error
14421             type: string
14422             x-go-name: Error
14423             type:
14424             example: error
14425             type: string
14426             x-go-name: Type
14427             type: object
14428             NotFound:
14429             description: Not found
14430             schema:
14431             properties:
14432             code:
14433             example: 404
14434             format: int64
14435             type: integer
14436             x-go-name: Code
14437             error:
14438             example: not found
14439             type: string
14440             x-go-name: Error
14441             type:
14442             example: error
14443             type: string
14444             x-go-name: Type
14445             type: object
14446             Operation:
14447             description: Operation
14448             schema:
14449             properties:
14450             metadata:
14451             $ref: '#/definitions/Operation'
14452             operation:
14453             example: /1.0/operations/66e83638-9dd7-4a26-aef2-5462814869a1
14454             type: string
14455             x-go-name: Operation
14456             status:
14457             example: Operation created
14458             type: string
14459             x-go-name: Status
14460             status_code:
14461             example: 100
14462             format: int64
14463             type: integer
14464             x-go-name: StatusCode
14465             type:
14466             example: async
14467             type: string
14468             x-go-name: Type
14469             type: object
14470             PreconditionFailed:
14471             description: Precondition Failed
14472             schema:
14473             properties:
14474             code:
14475             example: 412
14476             format: int64
14477             type: integer
14478             x-go-name: Code
14479             error:
14480             example: precondition failed
14481             type: string
14482             x-go-name: Error
14483             type:
14484             example: error
14485             type: string
14486             x-go-name: Type
14487             type: object
14488             swagger: "2.0"