> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-management-experimentation/split-api-reference/traffic-types.md).

# Traffic Types

## Get Traffic Types

> Gets a list of traffic types.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Traffic Types"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/trafficTypes/ws/{workspace-id}":{"get":{"summary":"Get Traffic Types","description":"Gets a list of traffic types.","operationId":"get-traffic-types","parameters":[{"in":"path","name":"workspace-id","schema":{"type":"string"},"required":true,"description":"The ID of the project (workspace) to get a list of traffic types from. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name."}],"responses":{"200":{"description":"200","content":{"application/json":{}}},"404":{"description":"404","content":{"application/json":{}}}},"deprecated":false,"tags":["Traffic Types"]}}}}
```

## Create Traffic Types

> This endpoint requires a JSON body containing the name of the traffic type to create.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Traffic Types"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/trafficTypes/ws/{workspace-id}":{"post":{"summary":"Create Traffic Types","description":"This endpoint requires a JSON body containing the name of the traffic type to create.","operationId":"create-traffic-types","parameters":[{"in":"path","name":"workspace-id","schema":{"type":"string"},"required":true,"description":"The ID of the project (workspace) where you want to create the traffic type. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name."}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the new traffic type. Must not exceed 50 characters."}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{}}},"201":{"description":"201","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}}},"displayAttributeId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"id":{"type":"string"}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}}},"deprecated":false,"tags":["Traffic Types"]}}}}
```

## Delete Trafic Types

> Deletes traffic type.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"Traffic Types"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/trafficTypes/{traffic-type-id}":{"delete":{"summary":"Delete Trafic Types","description":"Deletes traffic type.","operationId":"delete-trafic-type","parameters":[{"in":"path","name":"traffic-type-id","schema":{"type":"string"},"required":true,"description":"The ID of the project (workspace) to delete the traffic type from. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name."}],"responses":{"204":{"description":"204","content":{"application/json":{}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}}},"deprecated":false,"tags":["Traffic Types"]}}}}
```
