Dela via


Content Item - Get

Returnerar utvecklarportalens innehållsobjekt som anges av dess identifierare.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}?api-version=2024-05-01

URI-parametrar

Name I Obligatorisk Typ Description
contentItemId
path True

string

minLength: 1
maxLength: 80

Identifierare för innehållsobjekt.

contentTypeId
path True

string

minLength: 1
maxLength: 80

Identifierare för innehållstyp.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

Namnet på API Management-tjänsten.

subscriptionId
path True

string (uuid)

ID för målprenumerationen. Värdet måste vara ett UUID.

api-version
query True

string

minLength: 1

DEN API-version som ska användas för den här åtgärden.

Svar

Name Typ Description
200 OK

ContentItemContract

Returnerar innehållsobjektet.

Sidhuvuden

ETag: string

Other Status Codes

ErrorResponse

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow.

Typ: oauth2
Flow: implicit
Auktoriseringswebbadress: https://login.microsoftonline.com/common/oauth2/authorize

Omfattningar

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

ApiManagementGetContentTypeContentItem

Exempelbegäran

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8?api-version=2024-05-01

Exempelsvar

{
  "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
  "type": "Microsoft.ApiManagement/service/contentTypes/contentItems",
  "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
  "properties": {
    "en_us": {
      "title": "About",
      "description": "Short story about the company.",
      "keywords": "company, about",
      "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
      "permalink": "/about"
    }
  }
}

Definitioner

Name Description
ContentItemContract

Kontraktsinformation för innehållstyp.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorDetail

Felinformationen.

ErrorResponse

Felsvar

ContentItemContract

Kontraktsinformation för innehållstyp.

Name Typ Description
id

string

Fullständigt kvalificerat resurs-ID för resursen. Ex – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Namnet på resursen

type

string

Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts"

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Ytterligare information.

type

string

Ytterligare informationstyp.

ErrorDetail

Felinformationen.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felobjektet.