# ApiSpecifications

## GET /api/v1/api-management/api-specifications

> List API specifications

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"DtoApiSpecificationPagedResponse":{"required":["Data","Paging"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DtoApiSpecification"},"description":"Response data"},"paging":{"$ref":"#/components/schemas/PagingModel"}},"additionalProperties":false},"DtoApiSpecification":{"required":["ActiveVersion","Id","Name"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the API specification","format":"int64"},"name":{"type":"string","description":"Name of the API specification"},"activeVersion":{"type":"integer","description":"Currently active version of the API specification","format":"int32"},"description":{"type":"string","description":"Description for the API specification","nullable":true}},"additionalProperties":false},"PagingModel":{"required":["CurrentPage","FirstPage","LastPage","PageSize","TotalCount"],"type":"object","properties":{"currentPage":{"type":"integer","description":"Current page","format":"int32"},"pageSize":{"type":"integer","description":"Number of entries per page","format":"int32"},"totalCount":{"type":"integer","description":"Total number of entries","format":"int32"},"firstPage":{"type":"string","description":"Url of the first page","format":"uri","nullable":true},"lastPage":{"type":"string","description":"Url of the last page","format":"uri","nullable":true},"nextPage":{"type":"string","description":"Url of the next page","format":"uri","nullable":true},"previousPage":{"type":"string","description":"Url of the previous page","format":"uri","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/api-management/api-specifications":{"get":{"tags":["ApiSpecifications"],"summary":"List API specifications","operationId":"GetApiSpecifications","parameters":[{"name":"PageNumber","in":"query","description":"Current page number. Default value is 1.","schema":{"type":"integer","format":"int32"}},{"name":"PageSize","in":"query","description":"Maximum page size is 200. Default page size is 30.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoApiSpecificationPagedResponse"}}}}}}}}}
```

## Create API specification

> The Base path (openAPI 2) / Server url (openAPI 3) cannot be modified later.

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"DtoApiSpecificationResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DtoApiSpecification"}},"additionalProperties":false},"DtoApiSpecification":{"required":["ActiveVersion","Id","Name"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the API specification","format":"int64"},"name":{"type":"string","description":"Name of the API specification"},"activeVersion":{"type":"integer","description":"Currently active version of the API specification","format":"int32"},"description":{"type":"string","description":"Description for the API specification","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications":{"post":{"tags":["ApiSpecifications"],"summary":"Create API specification","description":"The Base path (openAPI 2) / Server url (openAPI 3) cannot be modified later.","requestBody":{"description":"OpenAPI Specification in a stringified JSON or YAML format","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"201":{"description":"API specification created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoApiSpecificationResponse"}}}},"400":{"description":"Missing API specification","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"A path is already used in an existing API","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Import API specification

> This can be a very slow action. Please make sure your> \
> &#x20;       client has a long enough timeout so that the operation does not get cancelled. This creates version 1 of the API> \
> &#x20;       specification to the default Agent group. The Base path (openAPI 2) / Server url (openAPI 3) cannot be modified later.

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"DtoApiSpecificationResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DtoApiSpecification"}},"additionalProperties":false},"DtoApiSpecification":{"required":["ActiveVersion","Id","Name"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the API specification","format":"int64"},"name":{"type":"string","description":"Name of the API specification"},"activeVersion":{"type":"integer","description":"Currently active version of the API specification","format":"int32"},"description":{"type":"string","description":"Description for the API specification","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/import":{"post":{"tags":["ApiSpecifications"],"summary":"Import API specification","description":"This can be a very slow action. Please make sure your\r\n        client has a long enough timeout so that the operation does not get cancelled. This creates version 1 of the API\r\n        specification to the default Agent group. The Base path (openAPI 2) / Server url (openAPI 3) cannot be modified later.","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}},"description":"File to upload.","discriminator":{"propertyName":"ImportApiSpecification"}}}}},"responses":{"201":{"description":"API specification created","headers":{"Location":{"description":"Location of the created API specification","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoApiSpecificationResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"A path is already used in an existing API","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"415":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## GET /api/v1/api-management/api-specifications/{id}

> Get a single API specification

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"DtoApiSpecificationResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DtoApiSpecification"}},"additionalProperties":false},"DtoApiSpecification":{"required":["ActiveVersion","Id","Name"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the API specification","format":"int64"},"name":{"type":"string","description":"Name of the API specification"},"activeVersion":{"type":"integer","description":"Currently active version of the API specification","format":"int32"},"description":{"type":"string","description":"Description for the API specification","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{id}":{"get":{"tags":["ApiSpecifications"],"summary":"Get a single API specification","operationId":"SingleApiSpecification","parameters":[{"name":"id","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoApiSpecificationResponse"}}}},"404":{"description":"API specification not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## PUT /api/v1/api-management/api-specifications/{id}

> Update API specification

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{id}":{"put":{"tags":["ApiSpecifications"],"summary":"Update API specification","parameters":[{"name":"id","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"description":"The new specification","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"API specification not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## GET /api/v1/api-management/api-specifications/{id}/{apiVersion}

> Get a specific version of an API specification

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"DtoApiSpecificationResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/DtoApiSpecification"}},"additionalProperties":false},"DtoApiSpecification":{"required":["ActiveVersion","Id","Name"],"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the API specification","format":"int64"},"name":{"type":"string","description":"Name of the API specification"},"activeVersion":{"type":"integer","description":"Currently active version of the API specification","format":"int32"},"description":{"type":"string","description":"Description for the API specification","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{id}/{apiVersion}":{"get":{"tags":["ApiSpecifications"],"summary":"Get a specific version of an API specification","operationId":"GetApiVersion","parameters":[{"name":"id","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoApiSpecificationResponse"}}}},"404":{"description":"API specification or version not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Delete API specification from an Agent Group

> To delete a specification from the> \
> &#x20;       default Agent group, it must first be deleted from all other Agent groups. Deleting the API specification from the default> \
> &#x20;       Agent group deletes it permanently. Linked processes are not deleted.

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{apiSpecificationId}/agent-group/{agentGroupId}":{"delete":{"tags":["ApiSpecifications"],"summary":"Delete API specification from an Agent Group","description":"To delete a specification from the\r\n        default Agent group, it must first be deleted from all other Agent groups. Deleting the API specification from the default\r\n        Agent group deletes it permanently. Linked processes are not deleted.","parameters":[{"name":"apiSpecificationId","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"agentGroupId","in":"path","description":"Agent Group identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"API specification deleted successfully","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Could not find the requested API specification or Agent Group","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Could not delete the API specification from the default Agent group, because it is deployed to another Agent Group","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/api-management/api-specifications/{id}/{apiVersion}/processTemplate

> Get process template for a specific endpoint of an API specification

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ApiProcessTemplateRequest":{"required":["Operation","Path"],"type":"object","properties":{"path":{"type":"string","description":"The path of the HTTP endpoint, as specified in the API specification"},"operation":{"type":"string","description":"The operation of the endpoint (e.g. GET)"}},"additionalProperties":false},"ProcessDataModelResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProcessDataModel"}},"additionalProperties":false},"ProcessDataModel":{"required":["name"],"type":"object","properties":{"isDeleted":{"type":"boolean"},"version":{"type":"integer","format":"int32"},"uniqueIdentifier":{"type":"string","format":"uuid"},"id":{"type":"integer","format":"int64"},"name":{"minLength":1,"type":"string"},"modified":{"type":"string","format":"date-time"},"modifier":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isNotLatestVersion":{"type":"boolean"},"changeDescription":{"type":"string","nullable":true},"bpmn":{"type":"string"},"elementParameters":{"type":"array","items":{"$ref":"#/components/schemas/ElementParameters"}},"manualTrigger":{"type":"array","items":{"$ref":"#/components/schemas/JToken"}},"obsoleteTasks":{"type":"array","items":{"$ref":"#/components/schemas/TaskSelectionData"}},"draftId":{"type":"integer","format":"int64","nullable":true},"idOfBaseProcessForDraft":{"type":"integer","format":"int64","nullable":true},"isDraft":{"type":"boolean"},"isSubprocess":{"type":"boolean"},"graphData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JToken"},"nullable":true},"triggerData":{"type":"array","items":{"$ref":"#/components/schemas/JToken"},"nullable":true},"majorVersion":{"type":"integer","format":"int32"},"minorVersion":{"type":"integer","format":"int32"},"isMigration":{"type":"boolean"},"activateIfNew":{"type":"boolean"},"frendsVersion":{"type":"string","nullable":true},"ignoreDependencyConflicts":{"type":"boolean","nullable":true},"documentationMarkdown":{"type":"string","nullable":true},"targetFramework":{"type":"string"},"apiSpecId":{"type":"integer","format":"int64","nullable":true},"isForMonitoringRule":{"type":"boolean"},"validationOnly":{"type":"boolean"},"cancellationDisabled":{"type":"boolean"},"processVariables":{"type":"array","items":{"$ref":"#/components/schemas/ProcessVariable"},"nullable":true},"processTemplate":{"$ref":"#/components/schemas/ProcessTemplateBase"},"processTemplateDeviated":{"type":"string","format":"date-time","nullable":true},"nextProcessTemplate":{"$ref":"#/components/schemas/ProcessTemplateBase"},"performAdditionalSyntaxValidation":{"type":"boolean"}},"additionalProperties":false},"ElementParameters":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/ElementType"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JToken"},"nullable":true},"selectedTypeId":{"type":"string","nullable":true},"promoteResultAs":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"isDefault":{"type":"boolean","nullable":true},"shouldRetry":{"type":"boolean","nullable":true},"maxRetryCount":{"type":"integer","format":"int32","nullable":true},"shouldNotLogResult":{"type":"boolean","nullable":true},"shouldDispose":{"type":"boolean","nullable":true}},"additionalProperties":false},"ElementType":{"enum":["Start","Task","Decision","SequenceFlow","ConditionBranch","Return","Throw","CallActivity","SubProcess","ParallelForeach","SequentialForeach","While","Expression","SubProcessStartNode","Catch","InclusiveGateway","InclusiveDecisionBranch","IntermediateReturn","GlobalErrorHandler","TestTask","SharedState","Dmn","DataObjectReference","DataStoreReference","NativeAi"],"type":"string"},"JToken":{"type":"array","items":{"$ref":"#/components/schemas/JToken"}},"TaskSelectionData":{"type":"object","properties":{"uri":{"type":"string"},"argumentsJson":{"type":"string","nullable":true},"returnType":{"type":"string","nullable":true},"name":{"type":"string"},"displayName":{"type":"string","nullable":true},"packageName":{"type":"string"},"description":{"type":"string","nullable":true},"isNotLatestVersion":{"type":"boolean"},"isStandard":{"type":"boolean"},"isDotNet":{"type":"boolean"}},"additionalProperties":false},"ProcessVariable":{"type":"object","properties":{"name":{"type":"string","nullable":true},"value":{"type":"string","nullable":true},"isSecret":{"type":"boolean"},"mode":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false},"ProcessTemplateBase":{"required":["bpmn","name"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"minLength":1,"type":"string"},"modifier":{"type":"string","nullable":true},"modified":{"type":"string","format":"date-time"},"majorVersion":{"type":"integer","format":"int32"},"minorVersion":{"type":"integer","format":"int32"},"targetFramework":{"type":"string"},"frendsVersion":{"type":"string"},"isSubprocess":{"type":"boolean"},"staticRequiredEnvironmentVariablesJson":{"type":"string"},"isForMonitoringRule":{"type":"boolean"},"cancellationDisabled":{"type":"boolean"},"description":{"type":"string","nullable":true},"changeDescription":{"type":"string","nullable":true},"bpmn":{"minLength":1,"type":"string"},"elementParameters":{"type":"string","nullable":true},"promotedResultVariablesJson":{"type":"string","nullable":true},"usedSubprocessesJson":{"type":"string","nullable":true},"usedTasksJson":{"type":"string","nullable":true},"triggersJson":{"type":"string","nullable":true},"manualTriggerJson":{"type":"string","nullable":true},"uniqueIdentifier":{"type":"string","format":"uuid"},"isListed":{"type":"boolean"},"version":{"type":"integer","format":"int32"},"isDeleted":{"type":"boolean"},"processVariablesJson":{"type":"string","nullable":true},"processTags":{"type":"string","nullable":true},"templateTags":{"type":"array","items":{"type":"string"}},"getVersion":{"type":"string","readOnly":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{id}/{apiVersion}/processTemplate":{"post":{"tags":["ApiSpecifications"],"summary":"Get process template for a specific endpoint of an API specification","parameters":[{"name":"id","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"Request which specifies the API endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiProcessTemplateRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDataModelResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"API specification or version not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Publish ("save") the active version of an API specification

> This locks down the&#x20;> \
> &#x20;       current specification and process versions. A new active version is created, and the previous one becomes deployable.

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"PublishApiRequest":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the changes made","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{id}/publish":{"post":{"tags":["ApiSpecifications"],"summary":"Publish (\"save\") the active version of an API specification","description":"This locks down the \r\n        current specification and process versions. A new active version is created, and the previous one becomes deployable.","parameters":[{"name":"id","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"description":"Publish API parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishApiRequest"}}}},"responses":{"200":{"description":"API specification published"},"404":{"description":"API specification not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"The current state of linked processes is not fit for publishing","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Begin deploying a version of an API specification to an Agent Group

> Returns> \
> &#x20;       information about the processes which must be deployed to finish the API deployment. The processes can be deployed> \
> &#x20;       using the process-deployments API.

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{id}/{apiVersion}/deploy/{agentGroupId}":{"post":{"tags":["ApiSpecifications"],"summary":"Begin deploying a version of an API specification to an Agent Group","description":"Returns\r\n        information about the processes which must be deployed to finish the API deployment. The processes can be deployed\r\n        using the process-deployments API.","parameters":[{"name":"id","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"agentGroupId","in":"path","description":"Agent Group identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Deployment started"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"API specification, version or Agent group not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## GET /api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough

> List API passthrough configurations

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ApiPassthroughViewModelIListResponse":{"required":["Data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiPassthroughViewModel"},"description":"Response data","nullable":true}},"additionalProperties":false},"ApiPassthroughViewModel":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the passthrough configuration","format":"int64"},"apiVersionId":{"type":"integer","description":"Unique identifier of the API version","format":"int64"},"modifier":{"type":"string","description":"User who last modified the configuration"},"modified":{"type":"string","description":"Time when configuration was last modified","format":"date-time"},"path":{"type":"string","description":"Source API path for this passthrough configuration. Not used when IsDefault is set to true.","nullable":true},"method":{"type":"string","description":"HTTP method. Not used when IsDefault is set to true.","nullable":true},"isDefault":{"type":"boolean","description":"Is this configuration used for all paths and HTTP methods"},"corsEnabled":{"type":"boolean","description":"Is CORS enabled"},"targetUrl":{"$ref":"#/components/schemas/ApiPassthroughTarget"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ApiPassthroughHeader"},"description":"Header definitions","nullable":true},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Allowed origins. Used when CORS is enabled.","nullable":true}},"additionalProperties":false},"ApiPassthroughTarget":{"type":"object","properties":{"server":{"type":"string","description":"Server part of the target URL"},"basePath":{"type":"string","description":"Base path of the target URL"},"operationPath":{"type":"string","description":"Operation path of the target URL","nullable":true},"query":{"type":"string","description":"Query parameters of the target URL","nullable":true}},"additionalProperties":false},"ApiPassthroughHeader":{"type":"object","properties":{"action":{"type":"string","description":"Header action (Add, Overwrite, Remove)"},"name":{"type":"string","description":"Header name"},"value":{"type":"string","description":"Header value"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough":{"get":{"tags":["ApiSpecifications"],"summary":"List API passthrough configurations","parameters":[{"name":"apiSpecificationId","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPassthroughViewModelIListResponse"}}}},"404":{"description":"API version not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough

> Create API passthrough configuration

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ApiPassthroughCreateModel":{"type":"object","properties":{"corsEnabled":{"type":"boolean","description":"Is CORS enabled"},"targetUrl":{"$ref":"#/components/schemas/ApiPassthroughTarget"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ApiPassthroughHeader"},"description":"Header definitions","nullable":true},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Allowed origins. Used when CORS is enabled.","nullable":true},"path":{"type":"string","description":"Source API path for this passthrough configuration. Not used when IsDefault is set to true.","nullable":true},"method":{"type":"string","description":"HTTP method. Not used when IsDefault is set to true.","nullable":true},"isDefault":{"type":"boolean","description":"Is this configuration used for all paths and HTTP methods"}},"additionalProperties":false},"ApiPassthroughTarget":{"type":"object","properties":{"server":{"type":"string","description":"Server part of the target URL"},"basePath":{"type":"string","description":"Base path of the target URL"},"operationPath":{"type":"string","description":"Operation path of the target URL","nullable":true},"query":{"type":"string","description":"Query parameters of the target URL","nullable":true}},"additionalProperties":false},"ApiPassthroughHeader":{"type":"object","properties":{"action":{"type":"string","description":"Header action (Add, Overwrite, Remove)"},"name":{"type":"string","description":"Header name"},"value":{"type":"string","description":"Header value"}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough":{"post":{"tags":["ApiSpecifications"],"summary":"Create API passthrough configuration","parameters":[{"name":"apiSpecificationId","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"API passhthrough configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPassthroughCreateModel"}}}},"responses":{"201":{"description":"API passthrough configuration created"},"400":{"description":"Invalid API passthrough configuration","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"API version not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"A path is already used in an existing API","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## PUT /api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough/{passthroughConfigId}

> Update API passthrough configuration

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ApiPassthroughEditModel":{"type":"object","properties":{"corsEnabled":{"type":"boolean","description":"Is CORS enabled"},"targetUrl":{"$ref":"#/components/schemas/ApiPassthroughTarget"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ApiPassthroughHeader"},"description":"Header definitions","nullable":true},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Allowed origins. Used when CORS is enabled.","nullable":true}},"additionalProperties":false},"ApiPassthroughTarget":{"type":"object","properties":{"server":{"type":"string","description":"Server part of the target URL"},"basePath":{"type":"string","description":"Base path of the target URL"},"operationPath":{"type":"string","description":"Operation path of the target URL","nullable":true},"query":{"type":"string","description":"Query parameters of the target URL","nullable":true}},"additionalProperties":false},"ApiPassthroughHeader":{"type":"object","properties":{"action":{"type":"string","description":"Header action (Add, Overwrite, Remove)"},"name":{"type":"string","description":"Header name"},"value":{"type":"string","description":"Header value"}},"additionalProperties":false},"ApiPassthroughViewModelResponse":{"required":["Data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiPassthroughViewModel"}},"additionalProperties":false},"ApiPassthroughViewModel":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the passthrough configuration","format":"int64"},"apiVersionId":{"type":"integer","description":"Unique identifier of the API version","format":"int64"},"modifier":{"type":"string","description":"User who last modified the configuration"},"modified":{"type":"string","description":"Time when configuration was last modified","format":"date-time"},"path":{"type":"string","description":"Source API path for this passthrough configuration. Not used when IsDefault is set to true.","nullable":true},"method":{"type":"string","description":"HTTP method. Not used when IsDefault is set to true.","nullable":true},"isDefault":{"type":"boolean","description":"Is this configuration used for all paths and HTTP methods"},"corsEnabled":{"type":"boolean","description":"Is CORS enabled"},"targetUrl":{"$ref":"#/components/schemas/ApiPassthroughTarget"},"headers":{"type":"array","items":{"$ref":"#/components/schemas/ApiPassthroughHeader"},"description":"Header definitions","nullable":true},"allowedOrigins":{"type":"array","items":{"type":"string"},"description":"Allowed origins. Used when CORS is enabled.","nullable":true}},"additionalProperties":false},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough/{passthroughConfigId}":{"put":{"tags":["ApiSpecifications"],"summary":"Update API passthrough configuration","parameters":[{"name":"apiSpecificationId","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"passthroughConfigId","in":"path","description":"API passthrough configuration identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"description":"The new configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPassthroughEditModel"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPassthroughViewModelResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"API version or passthrough configuration not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## DELETE /api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough/{passthroughConfigId}

> Delete API passthrough configuration

```json
{"openapi":"3.0.1","info":{"title":"Frends API","version":"1.0"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Enter your bearer token in the format **Bearer &lt;token>**","name":"Authorization","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/v1/api-management/api-specifications/{apiSpecificationId}/{apiVersion}/api-passthrough/{passthroughConfigId}":{"delete":{"tags":["ApiSpecifications"],"summary":"Delete API passthrough configuration","parameters":[{"name":"apiSpecificationId","in":"path","description":"API specification identifier","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"apiVersion","in":"path","description":"API specification version","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"passthroughConfigId","in":"path","description":"API passthrough configuration identifier","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"description":"API passthrough configuration deleted successfully"},"404":{"description":"API version or passthrough configuration not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frends.com/reference/frends-platform-api/platform-api-reference/apispecifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
