跳到主要内容

hasTagLinks

BooleanWrapper hasTagLinks(tagName2, tagName)

GET /api/2.0/files/tags/{tagName}/haslinks

Check room tag usage

Reports whether any room still carries the named tag, which is the check to run before the tag is deleted from the catalog. Only a portal administrator may call it, and every other account is refused. The name is matched exactly against the catalog, and a name that is not in it is answered with 404. That also tells the two ways a tag stops being used apart: taking the tag off the last room that carried it leaves the tag in the catalog and turns the answer to false, while deleting that last room removes the tag itself, after which the call answers 404. A true answer means at least one room, active or archived, still references the tag, so deleting it with DELETE api/2.0/files/tags would strip it from those rooms. The handler reads the tag name from the query string, so the value has to be sent twice: in the path segment and as the tagName query parameter.

Parameters​

NameInTypeDescriptionNotes
tagName2pathStringThe tag being checked. Send the same value as the tagName query parameter, which is the one the handler reads.[required]
tagNamequeryStringThe tag to check, spelled exactly as it is stored in the catalog. This query value is the one the handler reads, so the path segment of the same name has to repeat it.[optional] [example: Important]

Responses​

Status codeDescriptionTypeResponse headers
200True when at least one room still carries the tagBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403Only a portal administrator can check tag usage--
404No tag with this name exists in the catalog, or the tagName query parameter is missing--
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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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