AlphaAlpha Docs

Create API key

Creates a new API key with the given expiration duration and permissions

POST
/api-key
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/api-key" \  -H "Content-Type: application/json" \  -d '{    "daysTillExpiration": 0,    "isCrossTenant": true,    "permissions": {      "appPermissions": [        "CREATE_APIKEYS"      ],      "assetManagementPermissions": [        "CREATE_ASSETS"      ],      "calendarPermissions": [        "CREATE_CALENDAR_EVENTS"      ],      "communicationsPermissions": [        "CREATE_TEMPLATES"      ],      "configuratorPermissions": [        "CREATE_CONCEPTS"      ],      "crmPermissions": [        "CREATE_LEADS"      ],      "documentPermissions": [        "CREATE_DOCUMENTS"      ],      "financePermissions": [        "CREATE_CLIENTS"      ],      "hrPermissions": [        "CREATE_EMPLOYEES"      ],      "inventoryPermissions": [        "CREATE_INVENTORY"      ],      "productionPermissions": [        "CREATE_PRODUCTION"      ],      "productsPermissions": [        "CREATE_PRODUCTS"      ],      "projectsPermissions": [        "CREATE_PROJECTS"      ],      "reportingPermissions": [        "READ_SALES_REPORTS"      ]    }  }'
{
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "expiration": "2019-08-24T14:15:22Z",
  "isCrossTenant": true,
  "key": "string",
  "name": "string",
  "permissions": {
    "appPermissions": [
      "CREATE_APIKEYS"
    ],
    "assetManagementPermissions": [
      "CREATE_ASSETS"
    ],
    "calendarPermissions": [
      "CREATE_CALENDAR_EVENTS"
    ],
    "communicationsPermissions": [
      "CREATE_TEMPLATES"
    ],
    "configuratorPermissions": [
      "CREATE_CONCEPTS"
    ],
    "crmPermissions": [
      "CREATE_LEADS"
    ],
    "documentPermissions": [
      "CREATE_DOCUMENTS"
    ],
    "financePermissions": [
      "CREATE_CLIENTS"
    ],
    "hrPermissions": [
      "CREATE_EMPLOYEES"
    ],
    "inventoryPermissions": [
      "CREATE_INVENTORY"
    ],
    "productionPermissions": [
      "CREATE_PRODUCTION"
    ],
    "productsPermissions": [
      "CREATE_PRODUCTS"
    ],
    "projectsPermissions": [
      "CREATE_PROJECTS"
    ],
    "reportingPermissions": [
      "READ_SALES_REPORTS"
    ]
  },
  "tenantId": "string",
  "truncatedKey": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}