Articles in this section

How to list available services?

A service record can expose fields such as:

  • id : will be required to interact with it directly
  • type
  • version
  • name
  • host
  • port
  • state : running or unreachable
  • uptime
  • current_time

List all services

GET /v1/services

Returned data

Caldera REST API - list available services.png

curl --request GET \
 --url http://localhost:12340/v1/services \
 --header 'Accept: application/json'

Count services

HEAD /v1/services

This is useful when you only need the caldera-total-results header.
 

curl --head \
 --url http://localhost:12340/v1/services

Get a specific service

Access to one specific service data.

GET /v1/services/{serviceId}
curl --request GET \
 --url http://localhost:12340/v1/services{serviceId} \
 --header 'Accept: application/json'

Filtering and pagination 

Services endpoint support: 

  • pagination through `limit` and the `link` header 
  • sorting through the `sort` parameter 
  • field filtering using query values 

Examples

curl 'http://localhost:12340/v1/services?limit=50'
curl 'http://localhost:12340/v1/services?name=*RIP*'

See also: Pagination, Sorting and Filtering.

Was this article helpful?
0 out of 0 found this helpful