tencent cloud

Read

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-08-28 16:06:55
AI 번역

API Description

This is used to read the latest version of a specified resource based on its resource ID. This API follows the standard FHIR Read operation. The client accesses the specified resource address via the HTTP GET method, and the server returns the complete content and version information of the resource's current latest version.
This example demonstrates how to call the API to read the latest version of a Patient resource.

Input parameters

Parameter Name
Type
Required
Description
HTTP Method
String
Yes
Fixed as GET.
URL
String
Yes
The address for reading resources, in the format [baseUrl]/[resourceType]/[id].
Authorization
String
Yes
The authentication token, in the format Bearer <AccessToken>. The AccessToken is obtained via the GetAccessToken API in Calling Methods (or via the GetWebAccessToken API in the instance console scenario).
Path Parameter Description:
Field
Type
Required
Description
resourceType
String
Yes
The FHIR resource type, such as Patient, Observation, MedicationRequest, and so on. To view all resource types actually supported by the current instance, call the CapabilityStatement API via GET /INSTANCE_ID/fhir/metadata and check the returned rest[].resource[].type (the resource types supported by an instance can be configured and trimmed during creation via supported_resource_types, which may vary across instances). For field definitions of each resource type, refer to FHIR Resource Types.
id
String
Yes
The unique ID of the resource. It is the logical ID automatically assigned by the server when the resource is created, and can be obtained in the following ways:
Call the Create API (POST) to create a resource. Obtain the resource identifier from the Content-Location response header or the id field in the response body.
Call the Search API (GET /[resourceType]?_id= or /[resourceType]?identifier=) to query for existing resource IDs.
Request URL Example:
https://HOSTNAME/INSTANCE_ID/fhir/Patient/199963

Output Parameters

Upon a successful API call, the HTTP status code 200 OK is typically returned. The response headers contain the resource version information and the current version URL, while the response body returns the complete resource content.
Response Header Example Description:
Parameter Name
Type
Description
Status Code
Integer
Returns 200 OK when successful.
ETag
String
Resource version identifier, for example W/"3".
Content-Location
String
The address of the current resource version, in the format [baseUrl]/[resourceType]/[id]/_history/[versionId].
Last-Modified
String
The last modification time of the resource, in the HTTP-date format, for example Fri, -03 Jul 2026 00:56:41 GMT.
Key Response Body Field Descriptions:
Field
Type
Description
resourceType
String
Resource type
id
String
Unique ID of the resource.
meta.versionId
String
Version ID of the current resource.
meta.lastUpdated
String
Last update time of the resource.
identifier
Array
Identification information.
name
Array
Name information.
gender
String
Gender.
birthDate
String
Date of birth.
address
Array
Address information.

Examples

Request Example

GET /INSTANCE_ID/fhir/Patient/199963 HTTP/1.1
Host: HOSTNAME
Authorization: Bearer YOUR_ACCESS_TOKEN

Response Example

HTTP/1.1 200 OK
ETag: W/"3"
Content-Location: https://HOSTNAME/INSTANCE_ID/fhir/Patient/199963/_history/3
Last-Modified: Mon, 06 Jul 2026 08:42:36 GMT
{
"resourceType": "Patient",
"id": "199963",
"meta": {
"versionId": "3",
"lastUpdated": "2019-07-12T01:58:07.164+00:00"
},
"identifier": [
{
"system": "urn:oid:1.2.36.146.595.217.0.1",
"value": "12345"
}
],
"name": [
{
"family": "Chalmers",
"given": [
"Peter",
"James"
]
}
],
"gender": "male",
"birthDate": "1974-02-13",
"address": [
{
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"state": "Vic",
"postalCode": "M5C 2X8"
}
]
}

Error Codes

Common error codes are listed below. For more error codes, see Error Codes.
Error Code
Description
400 Bad Request
Incorrect request format or invalid resource ID.
401 Unauthorized
Not authenticated, and valid credentials are missing. Check whether the request header contains the correct Authorization: Bearer <AccessToken> and whether the Token has expired.
403 Forbidden
Authenticated but not authorized to read the resource.
404 Not Found
The specified resource does not exist.
410 Gone
The resource has been logically deleted or is inaccessible.
500 Internal Server Error
Internal server processing exception.


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백