# Applications

Create and manage applications in the tenant.

## Get Apps list.

> Return the list of apps of the tenant. Deprecated in favor of the new endpoint api/v1/apps.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Roles":{"in":"query","required":false,"name":"roles","schema":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"description":"Filter the returned entities to only those with the required role"},"CreatedByMe":{"in":"query","required":false,"name":"onlyCreatedByMe","schema":{"type":"boolean"},"description":"Filter the returned entities to only those that created by the requesting subject"}},"schemas":{"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"App":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["name"]},{"properties":{"clientId":{"type":"string","description":"The client ID of the application."},"name":{"type":"string","description":"The name of the application."},"revoked":{"type":"boolean","description":"Whether the application has been revoked."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/apps":{"get":{"operationId":"getApplications","deprecated":true,"tags":["Applications"],"summary":"Get Apps list.","description":"Return the list of apps of the tenant. Deprecated in favor of the new endpoint api/v1/apps.","parameters":[{"$ref":"#/components/parameters/Roles"},{"$ref":"#/components/parameters/CreatedByMe"}],"responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create a new app.

> Create a new app and assign it with a client secret. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"App":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["name"]},{"properties":{"clientId":{"type":"string","description":"The client ID of the application."},"name":{"type":"string","description":"The name of the application."},"revoked":{"type":"boolean","description":"Whether the application has been revoked."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/apps":{"post":{"operationId":"createApplication","deprecated":true,"tags":["Applications"],"summary":"Create a new app.","description":"Create a new app and assign it with a client secret. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"responses":{"200":{"description":"The complete set of permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get app details.

> Get the details of a given app. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ClientId":{"description":"Unique identifier of the app","type":"string","format":"uuid"},"App":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["name"]},{"properties":{"clientId":{"type":"string","description":"The client ID of the application."},"name":{"type":"string","description":"The name of the application."},"revoked":{"type":"boolean","description":"Whether the application has been revoked."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/apps/{clientId}":{"get":{"operationId":"getApplicationById","deprecated":true,"tags":["Applications"],"summary":"Get app details.","description":"Get the details of a given app. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.","parameters":[{"in":"path","required":true,"name":"clientId","schema":{"$ref":"#/components/schemas/ClientId"}}],"responses":{"200":{"description":"App details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update app details.

> Update the details of a given app. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ClientId":{"description":"Unique identifier of the app","type":"string","format":"uuid"},"App":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["name"]},{"properties":{"clientId":{"type":"string","description":"The client ID of the application."},"name":{"type":"string","description":"The name of the application."},"revoked":{"type":"boolean","description":"Whether the application has been revoked."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/apps/{clientId}":{"put":{"operationId":"updateApplicationById","deprecated":true,"tags":["Applications"],"summary":"Update app details.","description":"Update the details of a given app. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.","parameters":[{"in":"path","required":true,"name":"clientId","schema":{"$ref":"#/components/schemas/ClientId"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete a App.

> Delete the given app from the tenant. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ClientId":{"description":"Unique identifier of the app","type":"string","format":"uuid"},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/apps/{clientId}":{"delete":{"operationId":"deleteApplicationById","deprecated":true,"tags":["Applications"],"summary":"Delete a App.","description":"Delete the given app from the tenant. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.","parameters":[{"in":"path","required":true,"name":"clientId","schema":{"$ref":"#/components/schemas/ClientId"}}],"responses":{"200":{"description":"User deleted successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Re-generate secret of application.

> Generate a new secret for a given application. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}/secret.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ClientId":{"description":"Unique identifier of the app","type":"string","format":"uuid"},"App":{"allOf":[{"$ref":"#/components/schemas/AuthEntity"},{"required":["name"]},{"properties":{"clientId":{"type":"string","description":"The client ID of the application."},"name":{"type":"string","description":"The name of the application."},"revoked":{"type":"boolean","description":"Whether the application has been revoked."}}}]},"AuthEntity":{"properties":{"entityType":{"$ref":"#/components/schemas/AuthEntityType"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"userId":{"$ref":"#/components/schemas/UserId"},"permitAllClusters":{"type":"boolean"},"permittedClusters":{"type":"array","description":"A list of clusters that the user or application can access.","items":{"$ref":"#/components/schemas/ClusterId"}},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"type":"string","format":"date-time","description":"The creation date of the application."}}},"AuthEntityType":{"type":"string","description":"The type of authentication entity.","enum":["regular-user","sso-user","app","group","internal-user","super-admin"]},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"UserId":{"description":"Unique identifier of the user","type":"string","format":"uuid"},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Role":{"type":"string","enum":["admin","department_admin","researcher","editor","viewer","research_manager","ml_engineer"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/k8s/apps/{clientId}/secret":{"post":{"operationId":"resetAppSecret","deprecated":true,"tags":["Applications"],"summary":"Re-generate secret of application.","description":"Generate a new secret for a given application. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}/secret.","parameters":[{"in":"path","required":true,"name":"clientId","schema":{"$ref":"#/components/schemas/ClientId"}}],"responses":{"200":{"description":"The secret generated succefully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get a list of applications.

> Retrieve a list of applications.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Applications":{"type":"array","items":{"$ref":"#/components/schemas/Application"}},"Application":{"type":"object","required":["name","createdBy","createdAt","updatedAt","enabled","lastLogin","id"],"properties":{"name":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean"},"tenantId":{"type":"string"},"lastLogin":{"type":"string","format":"date-time","nullable":true},"id":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/apps":{"get":{"summary":"Get a list of applications.","description":"Retrieve a list of applications.","operationId":"get_applications","tags":["Applications"],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Applications"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create an application.

> Used to create an application.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ApplicationCreationRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"ApplicationPostResponse":{"type":"object","required":["id","name","secret"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"secret":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409Conflict":{"description":"The specified resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/apps":{"post":{"summary":"Create an application.","description":"Used to create an application.","operationId":"create_application","tags":["Applications"],"requestBody":{"description":"Application object to create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreationRequest"}}}},"responses":{"201":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPostResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get a list of installer applications.

> Retrieve a list of installer applications.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ApplicationPostResponse":{"type":"object","required":["id","name","secret"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"secret":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/apps/installer":{"get":{"summary":"Get a list of installer applications.","description":"Retrieve a list of installer applications.","operationId":"get_installer_app","tags":["Applications"],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPostResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get application by id.

> Retrieve the details of an application by id.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"appId":{"name":"appId","in":"path","required":true,"description":"The application id to retrieve","schema":{"type":"string"}}},"schemas":{"Application":{"type":"object","required":["name","createdBy","createdAt","updatedAt","enabled","lastLogin","id"],"properties":{"name":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"enabled":{"type":"boolean"},"tenantId":{"type":"string"},"lastLogin":{"type":"string","format":"date-time","nullable":true},"id":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/apps/{appId}":{"get":{"summary":"Get application by id.","description":"Retrieve the details of an application by id.","operationId":"get_application_by_id","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete an application by id.

> Use to delete an application by id.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"appId":{"name":"appId","in":"path","required":true,"description":"The application id to retrieve","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/apps/{appId}":{"delete":{"summary":"Delete an application by id.","description":"Use to delete an application by id.","operationId":"delete_application_by_id","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"204":{"description":"Executed successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update application details by id.

> Use to update the details of an application by id.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"appId":{"name":"appId","in":"path","required":true,"description":"The application id to retrieve","schema":{"type":"string"}}},"schemas":{"ApplicationPatchRequest":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/apps/{appId}":{"patch":{"summary":"Update application details by id.","description":"Use to update the details of an application by id.","operationId":"update_application_by_id","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/appId"}],"requestBody":{"description":"Application object that needs to be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationPatchRequest"}}}},"responses":{"200":{"description":"Executed successfully."},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Regenerate an application secret.

> Use to regenerate the application secret by id.

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.19"},"tags":[{"name":"Applications","description":"Create and manage applications in the tenant."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"appId":{"name":"appId","in":"path","required":true,"description":"The application id to retrieve","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/apps/{appId}/secret":{"post":{"summary":"Regenerate an application secret.","description":"Use to regenerate the application secret by id.","operationId":"regenerate_application_secret","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/appId"}],"responses":{"200":{"description":"Regenerated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```


---

# 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://run-ai-docs.nvidia.com/api/2.19/authentication-and-authorization/applications.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.
