Method assetlinks.check
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지정된 소스 애셋과 타겟 애셋 간에 지정된 (방향) 관계가 존재하는지 확인합니다.
관계는 소스 저작물에서 소유권을 주장한 두 저작물 간의 연결 목적을 설명합니다. 이러한 관계의 예로는 권한 또는 권한 위임이 있습니다.
이 명령어는 인프라 시스템에서 작업의 전제 조건을 확인하는 데 가장 자주 사용됩니다. 예를 들어 클라이언트는 특정 모바일 앱에 웹 URL을 대신 전송해도 괜찮은지 확인하고자 할 수 있습니다. 클라이언트는 웹사이트에서 모바일 앱으로 연결되는 관련 애셋 링크를 확인하여 작업 허용 여부를 결정할 수 있습니다.
보안 관련 참고사항: HTTPS 웹사이트 또는 Android 앱과 같은 보안 애셋을 소스로 지정하면 API는 응답 생성에 사용된 모든 문이 해당 애셋의 소유자가 안전한 방식으로 작성했는지 확인합니다. 반대로 소스 애셋이 안전하지 않은 HTTP 웹사이트인 경우 (즉, URL이 https://
대신 http://
로 시작하는 경우), API는 해당 구문을 안전하게 확인할 수 없으며 제3자가 웹사이트의 구문을 변경하지 않았음을 확인할 수 없습니다. 자세한 내용은 디지털 애셋 링크 기술 디자인 사양을 참고하세요.
HTTP 요청
GET https://digitalassetlinks.googleapis.com/v1/assetlinks:check
쿼리 매개변수
매개변수 이름 |
유형 |
설명 |
source |
object(Asset ) |
명령문 목록을 호스팅하는 소스입니다. Check() 호출을 적절한 소스로 라우팅하는 데 사용됩니다. |
relation |
string |
관계의 쿼리 문자열입니다. <kind>/<detail> 형식의 문자열로 관계를 식별합니다. 여기서 <kind> 는 사전 정의된 목적 카테고리 집합 중 하나여야 하며 <detail> 는 문의 특정 사용 사례를 설명하는 자유 형식의 소문자 영숫자 문자열입니다.
현재 지원되는 관계 목록은 API 문서를 참고하세요. 쿼리가 저작물 링크와 일치시키려면 쿼리의 관계 문자열과 저작물 링크의 관계 문자열이 모두 정확하게 일치해야 합니다. 예: 관계가 delegate_permission/common.handle_all_urls 인 쿼리는 delegate_permission/common.handle_all_urls 관계가 있는 애셋 링크를 일치시킵니다. |
target |
object(Asset ) |
명세서의 타겟 애셋입니다. |
응답 본문
성공할 경우 응답 본문에 다음 구조의 데이터가 포함됩니다.
CheckAssetLinks 호출의 응답 메시지입니다.
JSON 표현 |
{
"linked": boolean,
"maxAge": string,
"debugString": string,
} |
필드 이름 |
유형 |
설명 |
linked |
boolean |
요청에 지정된 저작물이 요청에 지정된 관계로 연결된 경우 true로 설정합니다. REQUIRED |
maxAge |
string |
제공 시간으로부터 추가 업데이트를 제외하고 응답이 유효한 것으로 간주되어야 하는 기간입니다. REQUIRED 초 단위 기간으로, 소수점 아래 9자리까지 지정 가능하며 's '로 끝납니다(예: "3.5s" ). |
debugString |
string |
최종 사용자가 결과를 이해, 재현, 디버그하는 데 도움이 되는 정보가 포함된 인간이 읽을 수 있는 메시지입니다. 메시지는 영어로 제공되며 현재는 번역이 제공되지 않을 예정입니다. 이 문자열의 콘텐츠 또는 형식은 보장되지 않습니다. 이러한 요소의 모든 부분은 예고 없이 변경될 수 있습니다. 이 데이터를 프로그래매틱 방식으로 파싱하려고 해서는 안 됩니다. API가 다른 방법으로 필요한 정보를 노출하지 않기 때문에 이 확인이 필요한 경우에는 먼저 Google에 문의해 주시기 바랍니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-06-26(UTC)
[null,null,["최종 업데이트: 2024-06-26(UTC)"],[[["\u003cp\u003eVerifies the existence of a relationship between two digital assets, like websites and apps.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003eGET\u003c/code\u003e method with query parameters specifying the source, relation, and target assets.\u003c/p\u003e\n"],["\u003cp\u003eReturns a JSON response indicating if the assets are linked and provides additional debugging information.\u003c/p\u003e\n"],["\u003cp\u003ePrimarily used for security checks and ensuring the integrity of relationships between assets.\u003c/p\u003e\n"],["\u003cp\u003eOffers enhanced security when the source asset is secure (HTTPS or Android app).\u003c/p\u003e\n"]]],[],null,["# Method assetlinks.check\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.CheckResponse.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nDetermines whether the specified (directional) relationship exists between the specified source and target assets.\n\nThe relation describes the intent of the link between the two assets as claimed by the source asset. An example for such relationships is the delegation of privileges or permissions.\n\nThis command is most often used by infrastructure systems to check preconditions for an action. For example, a client may want to know if it is OK to send a web URL to a particular mobile app instead. The client can check for the relevant asset link from the website to the mobile app to decide if the operation should be allowed.\n\nA note about security: if you specify a secure asset as the source, such as an HTTPS website or an Android app, the API will ensure that any statements used to generate the response have been made in a secure way by the owner of that asset. Conversely, if the source asset is an insecure HTTP website (that is, the URL starts with `http://` instead of `https://`), the API cannot verify its statements securely, and it is not possible to ensure that the website's statements have not been altered by a third party. For more information, see the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md).\n\n### HTTP request\n\n`GET https://digitalassetlinks.googleapis.com/v1/assetlinks:check`\n\n### Query parameters\n\n| Parameter name | Type | Description |\n|----------------|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `source` | `object(`[Asset](/digital-asset-links/reference/rest/v1/Asset)`)` | The source hosting the statement list. This is used to route the `Check()` call to the proper source. |\n| `relation` | `string` | Query string for the relation. We identify relations with strings of the format `\u003ckind\u003e/\u003cdetail\u003e`, where `\u003ckind\u003e` must be one of a set of pre-defined purpose categories, and `\u003cdetail\u003e` is a free-form lowercase alphanumeric string that describes the specific use case of the statement. Refer to [our API documentation](/digital-asset-links/v1/relation-strings) for the current list of supported relations. For a query to match an asset link, both the query's and the asset link's relation strings must match exactly. Example: A query with relation `delegate_permission/common.handle_all_urls` matches an asset link with relation `delegate_permission/common.handle_all_urls`. |\n| `target` | `object(`[Asset](/digital-asset-links/reference/rest/v1/Asset)`)` | The target asset of the statement. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for the CheckAssetLinks call.\n\n| JSON representation |\n|-------------------------------------------------------------------------|\n| ``` { \"linked\": boolean, \"maxAge\": string, \"debugString\": string, } ``` |\n\n| Field name | Type | Description |\n|---------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `linked` | `boolean` | Set to true if the assets specified in the request are linked by the relation specified in the request. REQUIRED |\n| `maxAge` | `string` | From serving time, how much longer the response should be considered valid barring further updates. REQUIRED A duration in seconds with up to nine fractional digits, terminated by '`s`'. Example: `\"3.5s\"`. |\n| `debugString` | `string` | Human-readable message containing information intended to help end users understand, reproduce and debug the result. The message will be in English and we are currently not planning to offer any translations. Please note that no guarantees are made about the contents or format of this string. Any aspect of it may be subject to change without notice. You should not attempt to programmatically parse this data. If you feel that you need to do this because the information you need is not otherwise exposed by the API, please contact us first. |\n\nTry it!\n-------\n\nUse the [APIs Explorer](https://developers.google.com/apis-explorer/?discovery_url=/digital-asset-links/v1/discoverydocument.json#p/digitalassetlinks/v1/digitalassetlinks.assetlinks.check?relation=delegate_permission%252Fcommon.handle_all_urls&source.web.site=https%253A%252F%252Fexample.digitalassetlinks.org&target.androidApp.certificate.sha256Fingerprint=10%253A39%253A38%253AEE%253A45%253A37%253AE5%253A9E%253A8E%253AE7%253A92%253AF6%253A54%253A50%253A4F%253AB8%253A34%253A6F%253AC6%253AB3%253A46%253AD0%253ABB%253AC4%253A41%253A5F%253AC3%253A39%253AFC%253AFC%253A8E%253AC1&target.androidApp.packageName=org.digitalassetlinks.sampleapp) to call this method on live data and see the response."]]