> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /sessions

> Creates a new session with a given name and settings (including display name of session in the Granta Material Picker). Returns original session request data together with a unique id and expiry date and time.




## OpenAPI

````yaml docs/granta-mi/granta-mi-connected-materials/api/integration_service.yaml POST /sessions
openapi: 3.0.0
info:
  version: 1.0.0
  title: Granta Integration Service
  description: Integration Service OpenAPI
servers:
  - url: https://integration.service/api/v1/
security:
  - OpenId:
      - is_read
      - is_write
      - is_read_write
paths:
  /sessions:
    post:
      description: >
        Creates a new session with a given name and settings (including display
        name of session in the Granta Material Picker). Returns original session
        request data together with a unique id and expiry date and time.
      operationId: sessions-post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionRequest'
      responses:
        '201':
          description: Session object was successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '400':
          description: Bad request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
        '507':
          description: Number of sessions limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
components:
  schemas:
    SessionRequest:
      description: Data for creating a session by a POST session request.
      type: object
      required:
        - name
      properties:
        name:
          description: >-
            A name associated with the session. The name may be unique to a
            session or could be shared by several sessions.
          type: string
          minLength: 1
        settings:
          $ref: '#/components/schemas/SessionSettings'
          description: The settings to be used for this session.
    Session:
      description: The data returned from a successful POST session request.
      allOf:
        - $ref: '#/components/schemas/SessionRequest'
        - type: object
          required:
            - id
            - expiresAt
          properties:
            id:
              description: The unique global identifier for this session.
              type: string
              format: uuid
            expiresAt:
              description: >-
                The date and time when this Session expires. UTC ISO8601 format
                (YYYY:MM:DDTHH:MM:SSZ). .
              type: string
              format: date-time
    HttpError:
      description: >-
        Returned by requests if an error occurs. Holds HTTP status code and
        message
      type: object
      required:
        - error
      properties:
        error:
          description: Fixed field indicating this is an error
          type: object
          required:
            - code
            - message
          properties:
            code:
              description: Text representation of Http status code category
              type: string
            message:
              description: A string describing the specific error that occurred.
              type: string
    SessionSettings:
      description: Information associated with a session.
      type: object
      properties:
        title:
          description: >-
            (Required) The name of the host application. This will be displayed
            at the top of your Granta Material Picker application. For example,
            if you specify 'MyApplicationName' it will appear as "Granta
            Material Picker > MyApplicationName.
          type: string
          default: None
        packageName:
          description: >-
            The analysis package that the material model data is required to be
            compatible with. Filters the material models that can be selected in
            the Granta Material Picker. Supported package names are: Workbench,
            Mechanical, LS-DYNA, Discovery, Electronics Desktop, Motor-CAD,
            Sherlock, Fluent.
          type: string
          default: None
        exportUnitSystem:
          description: >-
            The unit system that the Material Model Output data from a Session
            Data GET will conform to.
          type: string
          default: SI (Consistent)
        displayUnitSystem:
          description: >-
            The unit system that will be used to display attribute values and
            search results in the Granta Material Picker.
          type: string
          default: Metric
        multiselectEnabled:
          description: >-
            Enables multiple selection of materials in the Granta Material
            Picker.
          type: boolean
          default: true
        maxRecordBatch:
          description: >-
            The maximum number of Material Model records that will be returned
            in a Session Data GET request.
          type: integer
          minimum: 1
          maximum: 255
          default: 50
        pollSeconds:
          description: >-
            The maximum number of seconds that a Session Data GET request will
            block.
          type: integer
          minimum: 0
          maximum: 86400
          default: 50
        mmsApiVersion:
          description: The version of the Granta Material Model Service API to use.
          type: string
          default: v1
        theme:
          $ref: '#/components/schemas/Themes'
          description: The theme to use in the Granta Material Picker application.
    Themes:
      description: Themes available in the Granta Material Picker application.
      type: string
      enum:
        - auto
        - classic
        - light
        - dark
      default: auto
  securitySchemes:
    OpenId:
      type: openIdConnect
      openIdConnectUrl: https://azeww22wpoidc01.win.ansys.com/

````