Attachments · GET
GET
https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210SDKs & clients
Call the API
const url = "https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210";const response = await fetch(url, { method: "GET", headers: { Authorization: "Bearer <token>", },});if (!response.ok) { throw new Error(`${response.status} ${response.statusText}`);}const data = await response.json();console.log(data);using RestSharp;var client = new RestClient("https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210");var request = new RestRequest(Method.GET);request.AddHeader("Authorization", "Bearer <token>");IRestResponse response = client.Execute(request);curl -X GET "https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210" \ -H "Authorization: Bearer <token>"package mainimport ( "fmt" "io" "net/http")func main() { url := "https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer <token>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body))}<?phprequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210', [ 'headers' => [ 'Authorization' => 'Bearer <token>', ],]);echo $response->getBody();import requestsurl = "https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210"headers = { "Authorization": "Bearer <token>"}response = requests.get(url, headers=headers)print(response.json())require 'uri'require 'net/http'url = URI("https://vsqrd.com/attachments/attachment_9f8e7d6c5b4a3210")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Authorization"] = 'Bearer <token>'response = http.request(request)puts response.read_body| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attachment-id | path | yes | string | — |
HTTP status codes
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Success. JSON for an API client; HTML when the request's Accept header asks for it. | — |
| 401 | No valid credentials were presented. | — |
| 403 | This route is off the agent surface: a personal access key is refused here whatever its scope. Sign-in sessions are unaffected. | — |
| 404 | No such record in the caller's organization. | — |
▸OpenAPI specification
openapi: 3.1.0info: title: lims-core version: 0.1.0 description: "Derived from the running server's routing table. Every endpoint answers JSON to a client sending Accept: application/json, and HTML to a browser."servers: - url: https://vsqrd.compaths: /attachments/{attachment-id}: get: operationId: getAttachmentsByAttachmentId responses: "200": description: Success. JSON for an API client; HTML when the request's Accept header asks for it. "401": description: No valid credentials were presented. "403": description: "This route is off the agent surface: a personal access key is refused here whatever its scope. Sign-in sessions are unaffected." "404": description: No such record in the caller's organization. security: - sessionCookie: [] tags: - attachments parameters: - name: attachment-id in: path required: true schema: type: stringcomponents: schemas: {}