跳到主要内容

getTemplate

MetadataTemplateWrapper getTemplate(templateId)

GET /api/2.0/files/metadata/templates/{templateId}

Get a metadata template

Returns one metadata template with its fields, in their display order, and the options of its choice fields. Any member of the portal can read a template, the call is read-only. Use it to resolve the template identifiers a file or a folder reports in assignedMetadataTemplates into names and fields. A template that does not exist is answered with 404.

Parameters​

NameInTypeDescriptionNotes
templateIdpathInteger (int32)The template ID.[required] [example: 1]

Responses​

Status codeDescriptionTypeResponse headers
200Metadata templateMetadataTemplateWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
404Template not found--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

MetadataTemplateWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json