{"type":"api","title":"Add Tag to Devices","meta":{"id":"/apps/pubhub/media/cloud-security-apis-in-eft/9d37d008417d562ab46d4b67547a68457ce288d2/59bf0ad6-4eb1-34ae-8274-88981a81af60","info":{"title":"Cisco Umbrella Tagging API","version":"2.0.0","description":"Manage the tags and roaming computers with tags in the Umbrella organization.","contact":{"name":"Cloud Security Developer Community"}},"security":[{"oauthFlow":[]}],"tags":[{"name":"Tags","description":"Manage the tags in the organization."},{"name":"TagDevices","description":"Manage the roaming computers in the Umbrella organization that have a tag."},{"name":"Umbrella"}],"x-parser-conf":{"overview":{"markdownPath":"reference/deployments/tagging-overview.md","uri":"umbrella-api-reference-tagging-overview"}},"openapi":"3.0.1","servers":[{"url":"https://api.umbrella.com/{basePath}","variables":{"basePath":{"default":"deployments/v2"}}}],"securitySchemes":{"oauthFlow":{"type":"oauth2","description":"client credential flow","flows":{"clientCredentials":{"tokenUrl":"https://api.umbrella.com/auth/v2/token","scopes":{"deployments.tags:read":"Tags read access","deployments.tags:write":"Tags write access","deployments.tagDevices:read":"Tagged devices read access","deployments.tagDevices:write":"Tagged devices write access"}}}}}},"spec":{"description":"For the tag ID, add the tag to the roaming computers.","summary":"Add Tag to Devices","operationId":"addTagToDevices","tags":["TagDevices","Umbrella"],"security":[{"oauthFlow":["deployments.tagDevices:write"]}],"parameters":[{"name":"tagId","in":"path","description":"The ID of the tag.","required":true,"schema":{"type":"integer"},"example":2,"$$ref":"#/components/parameters/tagId"}],"requestBody":{"description":"Add the tag to the roaming computers. Provide a list of roaming computer origin IDs.\nThe request body can include at most 500 origin IDs.","content":{"application/json":{"schema":{"type":"object","properties":{"addOrigins":{"type":"array","description":"The list of roaming computers (origin IDs) that have the tag.","items":{"type":"integer","description":"An origin ID.","example":12345678},"example":[12345678,87654321],"$$ref":"#/components/schemas/addOrigins"}}},"example":{"addOrigins":[12321231,123134314]}}},"$$ref":"#/components/requestBodies/addOrigins"},"responses":{"200":{"description":"OK","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","description":"The information about the tagged devices:\ntag ID, origin IDs in the organization that have the tag on the roaming computers, and \norigin IDs in the organization that have the tag removed from the roaming computers.","required":["tagId","addOrigins","removeOrigins"],"properties":{"tagId":{"type":"integer","description":"The unique ID of the tag.","example":12345678,"$$ref":"#/components/schemas/tagId"},"addOrigins":{"type":"array","description":"The list of roaming computers (origin IDs) that have the tag.","items":{"type":"integer","description":"An origin ID.","example":12345678},"example":[12345678,87654321],"$$ref":"#/components/schemas/addOrigins"},"removeOrigins":{"type":"array","description":"The list of roaming computers (origin IDs) that have the tag removed.","items":{"type":"integer","description":"An origin Id.","example":12345678},"example":[12345678,87654321],"$$ref":"#/components/schemas/removeOrigins"}},"$$ref":"#/components/schemas/taggedDeviceInformation"},"example":{"tagId":67343,"addOrigins":[12321231,123134314],"removeOrigins":[12345678]}}}},"400":{"description":"Bad Request","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"Error":{"type":"string"}}}}},"$$ref":"#/components/responses/400Error"},"401":{"description":"Unauthorized","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"Error":{"type":"string"}}}}},"$$ref":"#/components/responses/401Error"},"403":{"description":"Forbidden","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"Error":{"type":"string"}}}}},"$$ref":"#/components/responses/403Error"},"404":{"description":"Tag Not found","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","required":["Error"],"properties":{"Error":{"type":"string"}},"example":{"Error":"object_not_found","message":"Tag not found","code":404,"code_text":"Not Found"}}}},"$$ref":"#/components/responses/404TagNotFound"},"500":{"description":"Internal Server Error","headers":{"Content-Type":{"schema":{"type":"string"},"description":"The MIME content type of the response body.","example":"application/json","$$ref":"#/components/headers/Content-Type"},"Date":{"schema":{"type":"string","pattern":"^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$"},"description":"The timestamp of the response.","example":"2023-03-14T18:34:25Z","$$ref":"#/components/headers/Date"}},"content":{"application/json":{"schema":{"type":"object","properties":{"Error":{"type":"string"}}}}},"$$ref":"#/components/responses/500Error"}},"__originalOperationId":"addTagToDevices","method":"post","path":"/tags/{tagId}/devices"}}