# Search API Serializer
## New Search API
Should work like the existing collection version api with the following changes:
- Repository list should be changed to distribution
```json
"distribution": {
"name": "name of distribution",
"base_path": "distro base path",
"pulp_href": "href to distribution detail api",
"repository_href": "href to repository detail api"
}
```
- Namespace object should be serialized like the current repo api
- Signatures should be included in response
## Differences between existing APIs
- Repo API serializes version details under "latest_version"
- Some fields missing on either API
## Existing Repo API
Missing:
- Repository list
Response sample (without content)
```json
{
"id": "764c6a61-1e22-49c8-a35a-9c140cc5e7a5",
"namespace": {
"pulp_href": "/api/galaxy/pulp/api/v3/pulp_ansible/namespaces/28/",
"id": 28,
"name": "purestorage",
"company": "",
"email": "",
"avatar_url": "",
"description": "",
"groups": [],
"related_fields": {}
},
"name": "flashblade",
"download_count": 0,
"latest_version": {
"id": "764c6a61-1e22-49c8-a35a-9c140cc5e7a5",
"namespace": "purestorage",
"name": "flashblade",
"version": "1.10.0",
"requires_ansible": ">=2.9.10",
"created_at": "2022-12-14T14:11:42.127255Z",
"metadata": {
"dependencies": {},
"contents": [],
"documentation": "https://docs.ansible.com/ansible/latest/collections/purestorage/flashblade/index.html#plugins-in-purestorage-flashblade",
"homepage": "",
"issues": "https://github.com/Pure-Storage-Ansible/FlashBlade-Collection/issues",
"repository": "https://github.com/Pure-Storage-Ansible/FlashBlade-Collection",
"description": "Collection of modules to manage Pure Storage FlashBlades",
"authors": [
"Pure Storage Ansible Team <pure-ansible-team@purestorage.com>"
],
"license": [
"GPL-3.0-or-later",
"BSD-2-Clause"
],
"tags": [
"storage",
"nfs",
"purestorage",
"flashblade",
"object"
],
"signatures": [
{
"signature": "-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1\n\niQIVAwUAYyH2i+GkvXCKgoqtAQishQ/9H1fOOsT0eRyotnprliCLjmROrRQKZiw0\nMdS7O2AA43Xra1Pr2tTNpjpaCDMD7xnngV2cXrSv0re1zrOVldRz3ZMSWRw7SqRV\n/GJEz7hslV+lSCH0W2/dFMzl0pxUZdEGo23N8rY15wuGQu9ICUf8emKUP+OIOWgs\nuokULcPTZwinnmhLu/OAD3dJsb0S2qfgUMNQdJ6m8hg0HHDC/Yqa5Dm6mkwEUeew\nUnsfbA2kM0GI5vWMJRr/r69tpUqGTGVdTGf0AwrCwpmQ2D09G2Gd7s4LGVEBYQBB\nZeHeOTTYz86duJ+EIQ/t6B8iOyHg+sjCL1T02Pesq+i7m+FbIi76RvjMoOlQJtys\ngrEXMaIW8UbmrkEdLdh/N+4Qp17ZybOmcCSXtZ4curoRFCJx/Mmsy726HLdYqbkR\nZEe6dUtVq5+1z1vlGq9SlAepn36QLu434W4GpCemGs0OiZD1aenMr3EVNApCeuNO\nQ2nu8uTcgMZYrLkv+SA9MCBMCH+LgUZyPgODWbeFMUxAe3RsJHrP9oOaNEIpw1qE\n7v90jy2iCSSm+4kd6Cfhf3lXjvV0ELyzQC+RjJmTtjMIirsDNuzxCKqacX6+VqtH\nxGsIn0mkaAs3J2O8c3jRyvQmrDEpz15QOl52xk3Kh2u29jpWtlS2oLlDDkivLQ2v\n6GVHEP5CbIo=\n=kwg6\n-----END PGP SIGNATURE-----\n",
"pubkey_fingerprint": "39B5D759361A97464C564A8FE1A4BD708A828AAD",
"signing_service": null
}
]
},
"contents": [],
"sign_state": "signed"
},
"deprecated": false,
"sign_state": "signed"
}
```
## Existing Collection Version API
Missing:
- Namespace details
- Signatures
Response sample (without content)
```json
{
"id": "1339d16b-349c-495c-bb07-f3062a2ad0f7",
"namespace": "purestorage",
"name": "flashblade",
"version": "1.9.0",
"requires_ansible": ">=2.9.10",
"created_at": "2022-12-14T14:11:47.429462Z",
"metadata": {
"dependencies": {},
"contents": [],
"documentation": "https://docs.ansible.com/ansible/latest/collections/purestorage/flashblade/index.html#plugins-in-purestorage-flashblade",
"homepage": "",
"issues": "https://github.com/Pure-Storage-Ansible/FlashBlade-Collection/issues",
"repository": "https://github.com/Pure-Storage-Ansible/FlashBlade-Collection",
"description": "Collection of modules to manage Pure Storage FlashBlades",
"authors": [
"Pure Storage Ansible Team <pure-ansible-team@purestorage.com>"
],
"license": [
"GPL-3.0-or-later",
"BSD-2-Clause"
],
"tags": [
"storage",
"nfs",
"purestorage",
"flashblade",
"object"
],
"signatures": []
},
"contents": [],
"sign_state": "unsigned",
"repository_list": [
"rh-certified"
]
}
```