# Testforge (fmonq) API

Data is sent to the fmonq aggregator via HTTP requests to the http(s)://<instance-name>/api/public/fm/v1/aggregator API.

# Sending a Build to the Aggregator

POST /api/public/fm/v1/aggregator

# Query Parameters

Parameter Type Description
projectKey string yes Project API key
Can be replaced by the header x-fmonq-project-key=<key>
If the key is specified both ways, then priority is given to the parameter

# Query Headers

Header Required Description
x-fmonq-project-key yes Project API key
Can be replaced by the parameter projectKey=<key>
If the key is specified both ways, then priority is given to the parameter
Content-Type: multipart/form-data yes Necessary to submit the build in the query as the content

# Request Body

The request body is specified in the form-data format.

Key Value Description
build С:/<build-path>.zip Any key is allowed
The build file must be in the .zip format

# CURL Request Example

curl --location --request POST 'https://<instance-name>/api/public/fm/v1/aggregator' \
--header 'x-fmonq-project-key: 4c7fdf6e-f286-42e6-98bc-4b4b65dab0c4' \
--header 'Content-Type: multipart/form-data' \
--form 'build=@"C:/<build-path>.zip"'

# Response Codes

Code Description
201 Build submitted to the processing pipeline.
400 No build file was found in the request body.
400 The FMONQ project key is not specified.
400 The file name is not specified in the 'Content-Disposition' header.
400 The file format is wrong.
415 Wrong type of input data. You must set the type to multipart/form-data.
422 422 The project is not active.
422 422 No project was found for the specified key.