Skip to content

Latest commit

 

History

History
214 lines (146 loc) · 5.32 KB

TagsAPI.md

File metadata and controls

214 lines (146 loc) · 5.32 KB

TagsAPI

All URIs are relative to https://<sub_domain>.api.kandji.io

Method HTTP request Description
createTag POST /api/v1/tags Create Tag
deleteTag DELETE /api/v1/tags/{tag_id} Delete Tag
getTags GET /api/v1/tags Get Tags
updateTag PATCH /api/v1/tags/{tag_id} Update Tag

createTag

    open class func createTag(body: String? = nil, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Create Tag

Create a tag. Can only create one tag per request.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let body = "body_example" // String |  (optional)

// Create Tag
TagsAPI.createTag(body: body) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
body String [optional]

Return type

AnyCodable

Authorization

bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteTag

    open class func deleteTag(tagId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void)

Delete Tag

Delete a tag.

Request Parameters

tag_id (path parameter): The unique identifier of the tag.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let tagId = "tagId_example" // String | 

// Delete Tag
TagsAPI.deleteTag(tagId: tagId) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
tagId String

Return type

Void (empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTags

    open class func getTags(search: String, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Get Tags

Return configured tags.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let search = "search_example" // String | Return resultes containing a given tag search string.

// Get Tags
TagsAPI.getTags(search: search) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
search String Return resultes containing a given tag search string.

Return type

AnyCodable

Authorization

bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateTag

    open class func updateTag(tagId: String, body: String? = nil, completion: @escaping (_ data: AnyCodable?, _ error: Error?) -> Void)

Update Tag

Update tag name.

Request Parameters

tag_id (path parameter): The unique identifier of the tag.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import kandji_sdk

let tagId = "tagId_example" // String | 
let body = "body_example" // String |  (optional)

// Update Tag
TagsAPI.updateTag(tagId: tagId, body: body) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
tagId String
body String [optional]

Return type

AnyCodable

Authorization

bearer

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]