blob: 19eabe3ff60775b764ecac1f5b64509cc530916e [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="remotebuildexecution_v2.html">Remote Build Execution API</a> . <a href="remotebuildexecution_v2.blobs.html">blobs</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#batchRead">batchRead(instanceName, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070079<p class="firstline">Download many blobs at once. The server may enforce a limit of the combined total size of blobs to be downloaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or downloaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream `Read` request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * `INVALID_ARGUMENT`: The client attempted to read more than the server supported limit. Every error on individual read will be returned in the corresponding digest status.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#batchUpdate">batchUpdate(instanceName, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Upload many blobs at once. The server may enforce a limit of the combined total size of blobs to be uploaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or uploaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream `Write` request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * `INVALID_ARGUMENT`: The client attempted to upload more than the server supported limit. Individual requests may return the following errors, additionally: * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob. * `INVALID_ARGUMENT`: The Digest does not match the provided data.</p>
83<p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#findMissing">findMissing(instanceName, body=None, x__xgafv=None)</a></code></p>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -080088<p class="firstline">Determine if blobs are present in the CAS. Clients can use this API before uploading blobs to determine which ones are already present in the CAS and do not need to be uploaded again. Servers SHOULD increase the lifetimes of the referenced blobs if necessary and applicable. There are no method-specific errors.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080090 <code><a href="#getTree">getTree(instanceName, hash, sizeBytes, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Fetch the entire directory tree rooted at a node. This request must be targeted at a Directory stored in the ContentAddressableStorage (CAS). The server will enumerate the `Directory` tree recursively and return every node descended from the root. The GetTreeRequest.page_token parameter can be used to skip ahead in the stream (e.g. when retrying a partially completed and aborted request), by setting it to a value taken from GetTreeResponse.next_page_token of the last successfully processed GetTreeResponse). The exact traversal order is unspecified and, unless retrieving subsequent pages from an earlier request, is not guaranteed to be stable across multiple invocations of `GetTree`. If part of the tree is missing from the CAS, the server will return the portion present and omit the rest. Errors: * `NOT_FOUND`: The requested tree root is not present in the CAS.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
93 <code><a href="#getTree_next">getTree_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="batchRead">batchRead(instanceName, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070098 <pre>Download many blobs at once. The server may enforce a limit of the combined total size of blobs to be downloaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or downloaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream `Read` request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * `INVALID_ARGUMENT`: The client attempted to read more than the server supported limit. Every error on individual read will be returned in the corresponding digest status.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099
100Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700101 instanceName: string, The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 The object takes the form of:
104
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105{ # A request message for ContentAddressableStorage.BatchReadBlobs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800106 &quot;digests&quot;: [ # The individual blob digests.
107 { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.
108 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
109 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
110 },
111 ],
112}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113
114 x__xgafv: string, V1 error format.
115 Allowed values
116 1 - v1 error format
117 2 - v2 error format
118
119Returns:
120 An object of the form:
121
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700122 { # A response message for ContentAddressableStorage.BatchReadBlobs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800123 &quot;responses&quot;: [ # The responses to the requests.
124 { # A response corresponding to a single blob that the client tried to download.
125 &quot;data&quot;: &quot;A String&quot;, # The raw binary data.
126 &quot;digest&quot;: { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. # The digest to which this response corresponds.
127 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
128 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800130 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The result of attempting to download that blob.
131 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
132 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
133 {
134 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
135 },
136 ],
137 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
138 },
139 },
140 ],
141}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142</div>
143
144<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 <code class="details" id="batchUpdate">batchUpdate(instanceName, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700146 <pre>Upload many blobs at once. The server may enforce a limit of the combined total size of blobs to be uploaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or uploaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream `Write` request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * `INVALID_ARGUMENT`: The client attempted to upload more than the server supported limit. Individual requests may return the following errors, additionally: * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob. * `INVALID_ARGUMENT`: The Digest does not match the provided data.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147
148Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 instanceName: string, The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 The object takes the form of:
152
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700153{ # A request message for ContentAddressableStorage.BatchUpdateBlobs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800154 &quot;requests&quot;: [ # The individual upload requests.
155 { # A request corresponding to a single blob that the client wants to upload.
156 &quot;data&quot;: &quot;A String&quot;, # The raw binary data.
157 &quot;digest&quot;: { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. # The digest of the blob. This MUST be the digest of `data`.
158 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
159 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800161 },
162 ],
163}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164
165 x__xgafv: string, V1 error format.
166 Allowed values
167 1 - v1 error format
168 2 - v2 error format
169
170Returns:
171 An object of the form:
172
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700173 { # A response message for ContentAddressableStorage.BatchUpdateBlobs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800174 &quot;responses&quot;: [ # The responses to the requests.
175 { # A response corresponding to a single blob that the client tried to upload.
176 &quot;digest&quot;: { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. # The blob digest to which this response corresponds.
177 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
178 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700179 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800180 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The result of attempting to upload that blob.
181 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
182 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
183 {
184 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
185 },
186 ],
187 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
188 },
189 },
190 ],
191}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700192</div>
193
194<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700195 <code class="details" id="close">close()</code>
196 <pre>Close httplib2 connections.</pre>
197</div>
198
199<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700200 <code class="details" id="findMissing">findMissing(instanceName, body=None, x__xgafv=None)</code>
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800201 <pre>Determine if blobs are present in the CAS. Clients can use this API before uploading blobs to determine which ones are already present in the CAS and do not need to be uploaded again. Servers SHOULD increase the lifetimes of the referenced blobs if necessary and applicable. There are no method-specific errors.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202
203Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700204 instanceName: string, The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206 The object takes the form of:
207
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208{ # A request message for ContentAddressableStorage.FindMissingBlobs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800209 &quot;blobDigests&quot;: [ # A list of the blobs to check.
210 { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.
211 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
212 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
213 },
214 ],
215}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216
217 x__xgafv: string, V1 error format.
218 Allowed values
219 1 - v1 error format
220 2 - v2 error format
221
222Returns:
223 An object of the form:
224
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700225 { # A response message for ContentAddressableStorage.FindMissingBlobs.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800226 &quot;missingBlobDigests&quot;: [ # A list of the blobs requested *not* present in the storage.
227 { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.
228 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
229 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
230 },
231 ],
232}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233</div>
234
235<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800236 <code class="details" id="getTree">getTree(instanceName, hash, sizeBytes, pageSize=None, pageToken=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700237 <pre>Fetch the entire directory tree rooted at a node. This request must be targeted at a Directory stored in the ContentAddressableStorage (CAS). The server will enumerate the `Directory` tree recursively and return every node descended from the root. The GetTreeRequest.page_token parameter can be used to skip ahead in the stream (e.g. when retrying a partially completed and aborted request), by setting it to a value taken from GetTreeResponse.next_page_token of the last successfully processed GetTreeResponse). The exact traversal order is unspecified and, unless retrieving subsequent pages from an earlier request, is not guaranteed to be stable across multiple invocations of `GetTree`. If part of the tree is missing from the CAS, the server will return the portion present and omit the rest. Errors: * `NOT_FOUND`: The requested tree root is not present in the CAS.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238
239Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700240 instanceName: string, The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted. (required)
241 hash: string, The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 sizeBytes: string, The size of the blob, in bytes. (required)
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800243 pageSize: integer, A maximum page size to request. If present, the server will request no more than this many items. Regardless of whether a page size is specified, the server may place its own limit on the number of items to be returned and require the client to retrieve more items using a subsequent request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800244 pageToken: string, A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use that token as an offset, returning only that page and the ones that succeed it.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 x__xgafv: string, V1 error format.
246 Allowed values
247 1 - v1 error format
248 2 - v2 error format
249
250Returns:
251 An object of the form:
252
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700253 { # A response message for ContentAddressableStorage.GetTree.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800254 &quot;directories&quot;: [ # The directories descended from the requested root.
255 { # A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both &quot;Foo&quot; and &quot;foo&quot; as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: &quot;bar&quot;, digest: { hash: &quot;4a73bc9d03...&quot;, size: 65534 }, node_properties: [ { &quot;name&quot;: &quot;MTime&quot;, &quot;value&quot;: &quot;2017-01-15T01:30:15.01Z&quot; } ] } ], directories: [ { name: &quot;foo&quot;, digest: { hash: &quot;4cf2eda940...&quot;, size: 43 } } ] } // (Directory proto with hash &quot;4cf2eda940...&quot; and size 43) { files: [ { name: &quot;baz&quot;, digest: { hash: &quot;b2c941073e...&quot;, size: 1294, }, is_executable: true } ] } ```
256 &quot;directories&quot;: [ # The subdirectories in the directory.
257 { # A `DirectoryNode` represents a child of a Directory which is itself a `Directory` and its associated metadata.
258 &quot;digest&quot;: { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. # The digest of the Directory object represented. See Digest for information about how to take the digest of a proto message.
259 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
260 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800261 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800262 &quot;name&quot;: &quot;A String&quot;, # The name of the directory.
263 },
264 ],
265 &quot;files&quot;: [ # The files in the directory.
266 { # A `FileNode` represents a single file and associated metadata.
267 &quot;digest&quot;: { # A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields. # The digest of the file&#x27;s content.
268 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
269 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
270 },
271 &quot;isExecutable&quot;: True or False, # True if file is executable, false otherwise.
272 &quot;name&quot;: &quot;A String&quot;, # The name of the file.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800273 &quot;nodeProperties&quot;: { # Node properties for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the properties that it accepts.
274 &quot;mtime&quot;: &quot;A String&quot;, # The file&#x27;s last modification timestamp.
275 &quot;properties&quot;: [ # A list of string-based NodeProperties.
276 { # A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times.
277 &quot;name&quot;: &quot;A String&quot;, # The property name.
278 &quot;value&quot;: &quot;A String&quot;, # The property value.
279 },
280 ],
281 &quot;unixMode&quot;: 42, # The UNIX file mode, e.g., 0755.
282 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800283 },
284 ],
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800285 &quot;nodeProperties&quot;: { # Node properties for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the properties that it accepts.
286 &quot;mtime&quot;: &quot;A String&quot;, # The file&#x27;s last modification timestamp.
287 &quot;properties&quot;: [ # A list of string-based NodeProperties.
288 { # A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times.
289 &quot;name&quot;: &quot;A String&quot;, # The property name.
290 &quot;value&quot;: &quot;A String&quot;, # The property value.
291 },
292 ],
293 &quot;unixMode&quot;: 42, # The UNIX file mode, e.g., 0755.
294 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800295 &quot;symlinks&quot;: [ # The symlinks in the directory.
296 { # A `SymlinkNode` represents a symbolic link.
297 &quot;name&quot;: &quot;A String&quot;, # The name of the symlink.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800298 &quot;nodeProperties&quot;: { # Node properties for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the properties that it accepts.
299 &quot;mtime&quot;: &quot;A String&quot;, # The file&#x27;s last modification timestamp.
300 &quot;properties&quot;: [ # A list of string-based NodeProperties.
301 { # A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times.
302 &quot;name&quot;: &quot;A String&quot;, # The property name.
303 &quot;value&quot;: &quot;A String&quot;, # The property value.
304 },
305 ],
306 &quot;unixMode&quot;: 42, # The UNIX file mode, e.g., 0755.
307 },
308 &quot;target&quot;: &quot;A String&quot;, # The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path as logical canonicalization may lead to different behavior in the presence of directory symlinks (e.g. `foo/../bar` may not be the same as `bar`). To reduce potential cache misses, canonicalization is still recommended where this is possible without impacting correctness.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 },
310 ],
311 },
312 ],
313 &quot;nextPageToken&quot;: &quot;A String&quot;, # If present, signifies that there are more results which the client can retrieve by passing this as the page_token in a subsequent request. If empty, signifies that this is the last page of results.
314}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315</div>
316
317<div class="method">
318 <code class="details" id="getTree_next">getTree_next(previous_request, previous_response)</code>
319 <pre>Retrieves the next page of results.
320
321Args:
322 previous_request: The request for the previous page. (required)
323 previous_response: The response from the request for the previous page. (required)
324
325Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 page. Returns None if there are no more items in the collection.
328 </pre>
329</div>
330
331</body></html>