# Client

Client

## Get a specific server for a client

> Fetch a server by its UUID for a specific client.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientServerGetResponse":{"properties":{"server":{"$ref":"#/components/schemas/ClientServerRequest"}},"type":"object"},"ClientServerRequest":{"type":"object","allOf":[{"$ref":"#/components/schemas/ClientServer"},{"properties":{"request_id":{"type":"integer"},"client_server_request":{"description":"The raw request object","type":"object","nullable":true}},"type":"object"}]},"ClientServer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Server"},{"properties":{"client":{"$ref":"#/components/schemas/Client"},"contract_id":{"type":"string","nullable":true},"name":{"description":"Name of the server","type":"string"},"status":{"description":"Status of the server","type":"string"},"status_message":{"description":"Normally empty, but can contain additional information; usually for failures","type":"string","nullable":true},"os":{"$ref":"#/components/schemas/OperatingSystem"},"ip_addresses":{"description":"IP addresses assigned to the server","type":"array","items":{"$ref":"#/components/schemas/IpAddress"}},"tags":{"description":"Tags assigned to the server","type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"delivered_at":{"type":"string","format":"date-time","nullable":true},"released_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}]},"Server":{"properties":{"metal_server_uuid":{"description":"UUID of the metal server","type":"string","format":"uuid"},"inventory_id":{"description":"ID of the inventory server","type":"integer","nullable":true},"instance_type":{"$ref":"#/components/schemas/InstanceType"},"location":{"$ref":"#/components/schemas/Location"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"InstanceType":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Location":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Client":{"properties":{"id":{"description":"Client identifier","type":"integer"},"username":{"type":"string"}},"type":"object"},"OperatingSystem":{"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string","enum":["centos","debian","fedora","fedora-core","fortios","freebsd","gentoo","opensuse","redhat","suse-linux","ubuntu"]},"version":{"type":"string"}},"type":"object"},"IpAddress":{"properties":{"ip_address":{"type":"string"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/server/{serverUuid}":{"get":{"tags":["Client"],"summary":"Get a specific server for a client","description":"Fetch a server by its UUID for a specific client.","operationId":"getClientServer","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"serverUuid","in":"path","description":"UUID of the server","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientServerGetResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Server not found","content":{"application/json":{"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}}}}}}}}
```

## Delete a specific server for a client

> Delete a server by its UUID for a specific client. The server must not be released already.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientServerDeleteResponse":{"properties":{"server":{"$ref":"#/components/schemas/ClientServerRequest"}},"type":"object"},"ClientServerRequest":{"type":"object","allOf":[{"$ref":"#/components/schemas/ClientServer"},{"properties":{"request_id":{"type":"integer"},"client_server_request":{"description":"The raw request object","type":"object","nullable":true}},"type":"object"}]},"ClientServer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Server"},{"properties":{"client":{"$ref":"#/components/schemas/Client"},"contract_id":{"type":"string","nullable":true},"name":{"description":"Name of the server","type":"string"},"status":{"description":"Status of the server","type":"string"},"status_message":{"description":"Normally empty, but can contain additional information; usually for failures","type":"string","nullable":true},"os":{"$ref":"#/components/schemas/OperatingSystem"},"ip_addresses":{"description":"IP addresses assigned to the server","type":"array","items":{"$ref":"#/components/schemas/IpAddress"}},"tags":{"description":"Tags assigned to the server","type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"delivered_at":{"type":"string","format":"date-time","nullable":true},"released_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}]},"Server":{"properties":{"metal_server_uuid":{"description":"UUID of the metal server","type":"string","format":"uuid"},"inventory_id":{"description":"ID of the inventory server","type":"integer","nullable":true},"instance_type":{"$ref":"#/components/schemas/InstanceType"},"location":{"$ref":"#/components/schemas/Location"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"InstanceType":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Location":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Client":{"properties":{"id":{"description":"Client identifier","type":"integer"},"username":{"type":"string"}},"type":"object"},"OperatingSystem":{"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string","enum":["centos","debian","fedora","fedora-core","fortios","freebsd","gentoo","opensuse","redhat","suse-linux","ubuntu"]},"version":{"type":"string"}},"type":"object"},"IpAddress":{"properties":{"ip_address":{"type":"string"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/server/{serverUuid}":{"delete":{"tags":["Client"],"summary":"Delete a specific server for a client","description":"Delete a server by its UUID for a specific client. The server must not be released already.","operationId":"deleteClientServer","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"serverUuid","in":"path","description":"UUID of the server","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Release of server succesful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientServerDeleteResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Server not found","content":{"application/json":{"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}}}}}}}}
```

## List servers for a specific client

> Retrieve a list of servers for a specific client with pagination.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientServerListResponse":{"properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ClientServerRequest"}},"paginator":{"$ref":"#/components/schemas/Paginator"}},"type":"object"},"ClientServerRequest":{"type":"object","allOf":[{"$ref":"#/components/schemas/ClientServer"},{"properties":{"request_id":{"type":"integer"},"client_server_request":{"description":"The raw request object","type":"object","nullable":true}},"type":"object"}]},"ClientServer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Server"},{"properties":{"client":{"$ref":"#/components/schemas/Client"},"contract_id":{"type":"string","nullable":true},"name":{"description":"Name of the server","type":"string"},"status":{"description":"Status of the server","type":"string"},"status_message":{"description":"Normally empty, but can contain additional information; usually for failures","type":"string","nullable":true},"os":{"$ref":"#/components/schemas/OperatingSystem"},"ip_addresses":{"description":"IP addresses assigned to the server","type":"array","items":{"$ref":"#/components/schemas/IpAddress"}},"tags":{"description":"Tags assigned to the server","type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"delivered_at":{"type":"string","format":"date-time","nullable":true},"released_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}]},"Server":{"properties":{"metal_server_uuid":{"description":"UUID of the metal server","type":"string","format":"uuid"},"inventory_id":{"description":"ID of the inventory server","type":"integer","nullable":true},"instance_type":{"$ref":"#/components/schemas/InstanceType"},"location":{"$ref":"#/components/schemas/Location"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"InstanceType":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Location":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Client":{"properties":{"id":{"description":"Client identifier","type":"integer"},"username":{"type":"string"}},"type":"object"},"OperatingSystem":{"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string","enum":["centos","debian","fedora","fedora-core","fortios","freebsd","gentoo","opensuse","redhat","suse-linux","ubuntu"]},"version":{"type":"string"}},"type":"object"},"IpAddress":{"properties":{"ip_address":{"type":"string"}},"type":"object"},"Paginator":{"title":"Paginator","description":"Pagination model","properties":{"from":{"title":"from","type":"integer"},"to":{"title":"to","type":"integer"},"total":{"title":"total","type":"integer"},"current_page":{"title":"current page","type":"integer"},"last_page":{"title":"last page","type":"integer"},"first_page_url":{"title":"first page url","type":"string"},"prev_page_url":{"title":"prev page url","type":"string"},"next_page_url":{"title":"next page url","type":"string"},"last_page_url":{"title":"last page url","type":"string"},"path":{"title":"path","type":"string"},"per_page":{"title":"per page","type":"integer"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/server":{"get":{"tags":["Client"],"summary":"List servers for a specific client","description":"Retrieve a list of servers for a specific client with pagination.","operationId":"listClientServers","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Page number for pagination","schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Number of items per page","schema":{"type":"integer"}},{"name":"filter","in":"query","description":"Filters for server listing (e.g., status)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientServerListResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Client not found"}}}}}}
```

## Add a tag to a specific client server

> Add a tag to a specific client server.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientServerTagPostResponse":{"properties":{"server":{"$ref":"#/components/schemas/ClientServerRequest"}},"type":"object"},"ClientServerRequest":{"type":"object","allOf":[{"$ref":"#/components/schemas/ClientServer"},{"properties":{"request_id":{"type":"integer"},"client_server_request":{"description":"The raw request object","type":"object","nullable":true}},"type":"object"}]},"ClientServer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Server"},{"properties":{"client":{"$ref":"#/components/schemas/Client"},"contract_id":{"type":"string","nullable":true},"name":{"description":"Name of the server","type":"string"},"status":{"description":"Status of the server","type":"string"},"status_message":{"description":"Normally empty, but can contain additional information; usually for failures","type":"string","nullable":true},"os":{"$ref":"#/components/schemas/OperatingSystem"},"ip_addresses":{"description":"IP addresses assigned to the server","type":"array","items":{"$ref":"#/components/schemas/IpAddress"}},"tags":{"description":"Tags assigned to the server","type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"delivered_at":{"type":"string","format":"date-time","nullable":true},"released_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}]},"Server":{"properties":{"metal_server_uuid":{"description":"UUID of the metal server","type":"string","format":"uuid"},"inventory_id":{"description":"ID of the inventory server","type":"integer","nullable":true},"instance_type":{"$ref":"#/components/schemas/InstanceType"},"location":{"$ref":"#/components/schemas/Location"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"InstanceType":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Location":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Client":{"properties":{"id":{"description":"Client identifier","type":"integer"},"username":{"type":"string"}},"type":"object"},"OperatingSystem":{"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string","enum":["centos","debian","fedora","fedora-core","fortios","freebsd","gentoo","opensuse","redhat","suse-linux","ubuntu"]},"version":{"type":"string"}},"type":"object"},"IpAddress":{"properties":{"ip_address":{"type":"string"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/server/{serverUuid}/tag/{tag}":{"post":{"tags":["Client"],"summary":"Add a tag to a specific client server","description":"Add a tag to a specific client server.","operationId":"tagClientServer","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"serverUuid","in":"path","description":"UUID of the server","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tag","in":"path","description":"The tag to add","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientServerTagPostResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Client server not found"}}}}}}
```

## Remove a tag from a specific client server

> Remove a tag from a specific client server.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientServerDeleteResponse":{"properties":{"server":{"$ref":"#/components/schemas/ClientServerRequest"}},"type":"object"},"ClientServerRequest":{"type":"object","allOf":[{"$ref":"#/components/schemas/ClientServer"},{"properties":{"request_id":{"type":"integer"},"client_server_request":{"description":"The raw request object","type":"object","nullable":true}},"type":"object"}]},"ClientServer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Server"},{"properties":{"client":{"$ref":"#/components/schemas/Client"},"contract_id":{"type":"string","nullable":true},"name":{"description":"Name of the server","type":"string"},"status":{"description":"Status of the server","type":"string"},"status_message":{"description":"Normally empty, but can contain additional information; usually for failures","type":"string","nullable":true},"os":{"$ref":"#/components/schemas/OperatingSystem"},"ip_addresses":{"description":"IP addresses assigned to the server","type":"array","items":{"$ref":"#/components/schemas/IpAddress"}},"tags":{"description":"Tags assigned to the server","type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"delivered_at":{"type":"string","format":"date-time","nullable":true},"released_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}]},"Server":{"properties":{"metal_server_uuid":{"description":"UUID of the metal server","type":"string","format":"uuid"},"inventory_id":{"description":"ID of the inventory server","type":"integer","nullable":true},"instance_type":{"$ref":"#/components/schemas/InstanceType"},"location":{"$ref":"#/components/schemas/Location"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"InstanceType":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Location":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"Client":{"properties":{"id":{"description":"Client identifier","type":"integer"},"username":{"type":"string"}},"type":"object"},"OperatingSystem":{"properties":{"id":{"type":"integer"},"slug":{"type":"string"},"name":{"type":"string","enum":["centos","debian","fedora","fedora-core","fortios","freebsd","gentoo","opensuse","redhat","suse-linux","ubuntu"]},"version":{"type":"string"}},"type":"object"},"IpAddress":{"properties":{"ip_address":{"type":"string"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/server/{serverUuid}/tag/{tag}":{"delete":{"tags":["Client"],"summary":"Remove a tag from a specific client server","description":"Remove a tag from a specific client server.","operationId":"untagClientServer","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"serverUuid","in":"path","description":"UUID of the server","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"tag","in":"path","description":"The tag to remove","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientServerDeleteResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Client server not found"}}}}}}
```

## Get a specific tag for a specific client

> Retrieve a speific tag for a specific client.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientTagGetResponse":{"properties":{"tag":{"$ref":"#/components/schemas/ClientTag"}},"type":"object"},"ClientTag":{"properties":{"id":{"type":"integer"},"client_id":{"type":"integer"},"tag":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"},"resources":{"description":"A list of resources that use this tag","properties":{"count":{"description":"The total number of resources that use this tag.","type":"integer"},"flex_metal_servers":{"description":"A summary of tag usage for the FlexMetalServer resource type.","properties":{"count":{"description":"The amount of resources of this type that use this tag.","type":"integer"}},"type":"object"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/tag/{tag}":{"get":{"tags":["Client"],"summary":"Get a specific tag for a specific client","description":"Retrieve a speific tag for a specific client.","operationId":"getClientTag","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"tag","in":"path","description":"The tag to list","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagGetResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Client not found"}}}}}}
```

## Delete a tag for a specific client

> Delete a tag for a specific client.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}}},"paths":{"/api/v1/client/{clientId}/tag/{tag}":{"delete":{"tags":["Client"],"summary":"Delete a tag for a specific client","description":"Delete a tag for a specific client.","operationId":"deleteClientTag","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"tag","in":"path","description":"The tag to delete","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}}],"responses":{"204":{"description":"Successful operation"},"401":{"description":"Unauthenticated"},"404":{"description":"Client or Tag not found"}}}}}}
```

## Rename a tag for a specific client

> Rename a tag for a specific client.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientTagPatchRequest":{"properties":{"tag":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"type":"object"},"ClientTagPatchResponse":{"properties":{"tag":{"$ref":"#/components/schemas/ClientTag"}},"type":"object"},"ClientTag":{"properties":{"id":{"type":"integer"},"client_id":{"type":"integer"},"tag":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"},"resources":{"description":"A list of resources that use this tag","properties":{"count":{"description":"The total number of resources that use this tag.","type":"integer"},"flex_metal_servers":{"description":"A summary of tag usage for the FlexMetalServer resource type.","properties":{"count":{"description":"The amount of resources of this type that use this tag.","type":"integer"}},"type":"object"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/tag/{tag}":{"patch":{"tags":["Client"],"summary":"Rename a tag for a specific client","description":"Rename a tag for a specific client.","operationId":"renameClientTag","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"tag","in":"path","description":"The tag to rename","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagPatchRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagPatchResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Client or Tag not found"},"409":{"description":"Target tag name already exists"}}}}}}
```

## List tags for a specific client

> Retrieve a list of tags for a specific client with pagination.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientTagListResponse":{"properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/ClientTag"}},"paginator":{"$ref":"#/components/schemas/Paginator"}},"type":"object"},"ClientTag":{"properties":{"id":{"type":"integer"},"client_id":{"type":"integer"},"tag":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"},"resources":{"description":"A list of resources that use this tag","properties":{"count":{"description":"The total number of resources that use this tag.","type":"integer"},"flex_metal_servers":{"description":"A summary of tag usage for the FlexMetalServer resource type.","properties":{"count":{"description":"The amount of resources of this type that use this tag.","type":"integer"}},"type":"object"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"Paginator":{"title":"Paginator","description":"Pagination model","properties":{"from":{"title":"from","type":"integer"},"to":{"title":"to","type":"integer"},"total":{"title":"total","type":"integer"},"current_page":{"title":"current page","type":"integer"},"last_page":{"title":"last page","type":"integer"},"first_page_url":{"title":"first page url","type":"string"},"prev_page_url":{"title":"prev page url","type":"string"},"next_page_url":{"title":"next page url","type":"string"},"last_page_url":{"title":"last page url","type":"string"},"path":{"title":"path","type":"string"},"per_page":{"title":"per page","type":"integer"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/tag":{"get":{"tags":["Client"],"summary":"List tags for a specific client","description":"Retrieve a list of tags for a specific client with pagination.","operationId":"listClientTags","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagListResponse"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Client not found"}}}}}}
```

## Create a tag for a specific client

> Create a tag for a specific client.

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientTagPostRequest":{"properties":{"tag":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"}},"type":"object"},"ClientTagPostResponse":{"properties":{"tag":{"$ref":"#/components/schemas/ClientTag"}},"type":"object"},"ClientTag":{"properties":{"id":{"type":"integer"},"client_id":{"type":"integer"},"tag":{"type":"string","pattern":"^[A-Za-z0-9_:-]{1,64}$"},"resources":{"description":"A list of resources that use this tag","properties":{"count":{"description":"The total number of resources that use this tag.","type":"integer"},"flex_metal_servers":{"description":"A summary of tag usage for the FlexMetalServer resource type.","properties":{"count":{"description":"The amount of resources of this type that use this tag.","type":"integer"}},"type":"object"}},"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/tag":{"post":{"tags":["Client"],"summary":"Create a tag for a specific client","description":"Create a tag for a specific client.","operationId":"createClientTag","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagPostRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientTagPostResponse"}}}},"401":{"description":"Unauthenticated"},"409":{"description":"Tag already exists for client"}}}}}}
```

## Usage for 1 client endpoint

> Usage for 1 client endpoint

```json
{"openapi":"3.0.0","info":{"title":"MetalWorks API","version":"1.0"},"tags":[{"name":"Client","description":"Client"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"ClientUsageGetResponse":{"properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ClientServerUsage"}},"paginator":{"$ref":"#/components/schemas/Paginator"}},"type":"object"},"ClientServerUsage":{"properties":{"serverId":{"type":"integer"},"locationId":{"type":"integer"},"instanceType":{"type":"string"},"deliveredAt":{"type":"string","format":"date-time"},"releasedAt":{"type":"string","format":"date-time","nullable":true},"bandwidth":{"oneOf":[{"$ref":"#/components/schemas/Bandwidth"}],"nullable":true,"type":"object"},"contractId":{"type":"string","default":""},"tags":{"type":"array","items":{"type":"string"}}},"type":"object"},"Bandwidth":{"properties":{"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time","nullable":true},"bandwidthIn":{"description":"Bandwidth In (bytes)","type":"integer"},"bandwidthOut":{"description":"Bandwidth Out (bytes)","type":"integer"}},"type":"object"},"Paginator":{"title":"Paginator","description":"Pagination model","properties":{"from":{"title":"from","type":"integer"},"to":{"title":"to","type":"integer"},"total":{"title":"total","type":"integer"},"current_page":{"title":"current page","type":"integer"},"last_page":{"title":"last page","type":"integer"},"first_page_url":{"title":"first page url","type":"string"},"prev_page_url":{"title":"prev page url","type":"string"},"next_page_url":{"title":"next page url","type":"string"},"last_page_url":{"title":"last page url","type":"string"},"path":{"title":"path","type":"string"},"per_page":{"title":"per page","type":"integer"}},"type":"object"}}},"paths":{"/api/v1/client/{clientId}/usage":{"get":{"tags":["Client"],"summary":"Usage for 1 client endpoint","description":"Usage for 1 client endpoint","operationId":"Client","parameters":[{"name":"clientId","in":"path","description":"ID of the client","required":true,"schema":{"type":"integer"}},{"name":"deliveredAt","in":"query","schema":{"type":"string","format":"datetime"}},{"name":"releasedAt","in":"query","schema":{"type":"string","format":"datetime"}},{"name":"limit","in":"query","schema":{"type":"integer","default":15}},{"name":"page","in":"query","schema":{"type":"integer","default":1}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUsageGetResponse"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthenticated"},"422":{"description":"Unprocessable Content"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.i3d.net/api-references/flex-metal/client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
