printerShare を取得する
名前空間: microsoft.graph
プリンター共有のプロパティとリレーションシップを取得します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可」を参照してください。
次のアクセス許可に加えて、ユーザーまたはアプリのテナントにアクティブなユニバーサル 印刷サブスクリプションが必要です。
| アクセス許可の種類 | アクセス許可 (特権の小さいものから大きいものへ) |
|---|---|
| 委任 (職場または学校のアカウント) | PrinterShare.ReadBasic.All、PrinterShare.Read.All、PrinterShare.ReadWrite.All |
| 委任 (個人用 Microsoft アカウント) | サポートされていません。 |
| アプリケーション | サポートされていません。 |
HTTP 要求
GET /print/shares/{printerShareId}
GET /print/printers/{printerId}/shares/{printerShareId}
オプションのクエリ パラメーター
このメソッドは、応答のカスタマイズに役立つ OData クエリ パラメーターの一部 (および$expand含む$select) をサポートします。 例:
例えば。
GET /print/printers/{id}?$select=id,displayName,capabilities
一般的な情報については、「OData クエリ パラメーター」を参照してください。
例外
- 演算子は
$countサポートされていません。
要求ヘッダー
| 名前 | 説明 |
|---|---|
| Authorization | ベアラー {token}。必須。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK 応答コードと応答本文の printerShare オブジェクトを返します。
既定では、応答には printerCapabilities は含まれません。 printerCapabilities を 取得するには、クエリ パラメーターを$select使用します。
例
例 1: printerShare を取得する
要求
GET https://graph.microsoft.com/v1.0/print/shares/{printerShareId}
応答
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/shares/$entity",
"id": "d837c17b-3296-4384-a053-828d56e10f50",
"displayName": "PrinterShare Name",
"createdDateTime": "2020-02-04T00:00:00.0000000Z",
"isAcceptingJobs": true,
"allowAllUsers": false,
"status": {
"state": "stopped",
"details": [
"disconnected"
],
"description": ""
},
"defaults": {
"copiesPerJob": 1,
"finishings": [
"none"
],
"mediaColor": "Unknown",
"mediaType": "stationery",
"mediaSize": "North America Letter",
"pagesPerSheet": 1,
"orientation": "portrait",
"outputBin": "auto",
"inputBin": "auto",
"contentType": "application/oxps",
"fitPdfToPage": false,
"multipageLayout": null,
"colorMode": "color",
"quality": "medium",
"duplexMode": "oneSided",
"dpi": 600,
"scaling": null
},
"location": {
"latitude": 47.6450,
"longitude": -122.1409,
"altitudeInMeters": 3,
"streetAddress": "One Microsoft Way",
"subUnit": [
"Main Plaza",
"Unit 400"
],
"city": "Redmond",
"postalCode": "98052",
"countryOrRegion": "USA",
"site": "Puget Sound",
"building": "Studio E",
"floor": "1",
"floorDescription": "First Floor",
"roomName": "1234",
"roomDescription": "First floor copy room",
"organization": [
"C+AI",
"Microsoft Graph"
],
"subdivision": [
"King County",
"Red West"
],
"stateOrProvince": "Washington"
}
}
例 2: printerShare とその機能を取得する
要求
GET https://graph.microsoft.com/v1.0/print/shares/{printerShareId}?$select=id,displayName,capabilities
応答
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#print/shares/$entity",
"id": "d837c17b-3296-4384-a053-828d56e10f50",
"displayName": "PrinterShare Name",
"capabilities": {
"isColorPrintingSupported": true,
"supportsFitPdfToPage": false,
"contentTypes": [
"application/pdf",
"image/pwg-raster",
"application/PCLm"
],
"isPageRangeSupported": false,
"qualities": [
"medium"
],
"dpis": [
600
],
"duplexModes": [
"oneSided",
"flipOnLongEdge",
"flipOnShortEdge"
],
"finishings": [
"none"
],
"mediaTypes": [
"stationery"
],
"mediaSizes": [
"North America Letter"
],
"outputBins": [
"tray-1"
],
"colorModes": [
"grayscale",
"color"
],
"inputBins": [
"tray-1"
],
"collation": true,
"scalings": [
"fill"
],
"copiesPerJob": {
"start": 1,
"end": 38
}
}
}
フィードバック
フィードバックの送信と表示