APIHub
Back to Explore

Microcks API v1.7

Microcks API v1.7 exposes REST endpoints for managing mock service definitions, artifacts, import/export snapshots, secrets, and service metadata, as well as for retrieving operational metrics, test results, and related resources such as conformance and invocation statistics.

Development
OAuth
No HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

714ms p95

Uptime

87.5% 30d

Playground

Verified

live

Endpoints

REST · JSON
POST

/artifact/upload

Upload an artifact

  • mainArtifact (query, required) — Flag telling if this should be considered as primary or secondary artifact. Default to 'true'
GET

/export

Export a snapshot

  • serviceIds (query, required) — List of service identifiers to export
GET

/features/config

Get features configuration

POST

/import

Import a snapshot

GET

/jobs

Get ImportJobs

  • page (query, page) — Page of ImportJobs to retrieve (starts at and defaults to 0)
  • size (query, limit) — Size of a page. Maximum number of ImportJobs to include in a response (defaults to 20)
  • name (query) — Name like criterion for query
POST

/jobs

Create ImportJob

GET

/jobs/count

Get the ImportJobs counter

DELETE

/jobs/{id}

Delete ImportJob

GET

/jobs/{id}

Get ImportJob

POST

/jobs/{id}

Update ImportJob

PUT

/jobs/{id}/activate

Activate an ImportJob

PUT

/jobs/{id}/start

Start an ImportJob

PUT

/jobs/{id}/stop

Stop an ImportJob

GET

/keycloak/config

Get authentification configuration

GET

/metrics/conformance/aggregate

Get aggregation of conformance metrics

GET

/metrics/conformance/service/{serviceId}

Get conformance metrics for a Service

GET

/metrics/invocations/global

Get aggregated invocation statistics for a day

  • day (query) — The day to get statistics for (formatted with yyyyMMdd pattern). Default to today if not provided.
GET

/metrics/invocations/global/latest

Get aggregated invocations statistics for latest days

  • limit (query, limit) — Number of days to get back in time. Default is 20.
GET

/metrics/invocations/top

Get top invocation statistics for a day

  • day (query) — The day to get statistics for (formatted with yyyyMMdd pattern). Default to today if not provided.
  • limit (query, limit) — The number of top invoked mocks to return
GET

/metrics/invocations/{serviceName}/{serviceVersion}

Get invocation statistics for Service

  • day (query) — The day to get statistics for (formatted with yyyyMMdd pattern). Default to today if not provided.
GET

/metrics/tests/latest

Get latest tests results

  • limit (query, limit) — Number of days to consider for test results to return. Default is 7 (one week)
GET

/resources/service/{serviceId}

Get Resources by Service

GET

/resources/{name}

Get Resource

GET

/secrets

Get Secrets

  • page (query, page) — Page of Secrets to retrieve (starts at and defaults to 0)
  • size (query, limit) — Size of a page. Maximum number of Secrets to include in a response (defaults to 20)
POST

/secrets

Create a new Secret

GET

/secrets/count

Get the Secrets counter

DELETE

/secrets/{id}

Delete Secret

GET

/secrets/{id}

Get Secret

PUT

/secrets/{id}

Update Secret

GET

/services

Get Services and APIs

  • page (query, page) — Page of Services to retrieve (starts at and defaults to 0)
  • size (query, limit) — Size of a page. Maximum number of Services to include in a response (defaults to 20)
GET

/services/count

Get the Services counter

GET

/services/labels

Get the already used labels for Services

GET

/services/search

Search for Services and APIs

  • queryMap (query, required) — Map of criterion. Key can be simply 'name' with value as the searched string. You can also search by label using keys like 'labels.x' where 'x' is the label and value the label value
DELETE

/services/{id}

Delete Service

GET

/services/{id}

Get Service

  • messages (query) — Whether to include details on services messages into result. Default is false
PUT

/services/{id}/metadata

Update Service Metadata

PUT

/services/{id}/operation

Override Service Operation

  • operationName (query, required) — Name of operation to update
POST

/tests

Create a new Test

GET

/tests/service/{serviceId}

Get TestResults by Service

GET

/tests/service/{serviceId}/count

Get the TestResults for Service counter

GET

/tests/{id}

Get TestResult

GET

/tests/{id}/events/{testCaseId}

Get events for TestCase

GET

/tests/{id}/messages/{testCaseId}

Get messages for TestCase

POST

/tests/{id}/testCaseResult

Report and create a new TestCaseResult

44 endpoints auto-detected

Authentication

This API requires authentication: OAuth.

curl -X POST \
  "http://microcks.local/artifact/upload"

microcks.local · HTTPS only