openapi: '3.0.0'
info:
  description: Api for Scriptation Enterprise Portal partners
  version: 1.0.0
  title: Scriptation Enterprise Portal API
  termsOfService: http://swagger.io/terms/
  contact:
    email: support@scriptation.com
servers:
  - url: https://api.develop-ent.scriptation.com/api/v1
tags:
  - name: Auth
  - name: Enterprise
  - name: Production
  - name: Production Permissions
  - name: Production Invitations
  - name: Production Activations
deepLinking: true
tryItOutEnabled: false
supportedSubmitMethods: []
schemes:
  - https
paths:
  /token:
    post:
      tags:
        - Auth
      description: >-
        Allow the creation of an access-token, refresh_token is generated in the
        Scriptation Enterprise Portal
      consumes:
        - application/json
      operationId: getToken
      produces:
        - application/json
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/AuthRequest'
      responses:
        '200':
          description: successful operation
          schema:
            $ref: '#/definitions/ApiResponse'
  /enterprise:
    get:
      tags:
        - Enterprise
      description: Returns the list of Enterprises the user can see
      operationId: getEnterprises
      produces:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
      security:
        - api_key: []
      responses:
        '200':
          description: '200'
  /enterprise/{enterprise_id}/production:
    get:
      tags:
        - Production
      description: Returns the list of productions from an enterprise
      operationId: getProductions
      produces:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - name: enterprise_id
          in: path
          description: Document identifier of the enterprise
          required: true
          type: string
      security:
        - api_key: []
      responses:
        '200':
          description: '200'
    post:
      tags:
        - Production
      description: Allow the creation of a new production
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: enterprise_id
          in: path
          description: Document identifier of the enterprise
          required: true
          type: string
        - in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/PostProductionBody'
      security:
        - api_key: []
      responses:
        '200':
          description: '409'
  /enterprise/{enterprise_id}/production/{production_id}:
    get:
      tags:
        - Production
      description: Returns the corresponding data of the production
      operationId: getProductionUnique
      produces:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - name: enterprise_id
          in: path
          description: Document identifier of the enterprise
          required: true
          type: string
        - name: production_id
          in: path
          description: Document identifier of the production
          required: true
          type: string
      security:
        - api_key: []
      responses:
        '200':
          description: '200'
    put:
      tags:
        - Production
      description: Allow to modify main data of a production
      produces:
        - application/json
      consumes:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
      requestBody:
        content:
          application/json:
            schema:
              properties:
                production:
                  description: 'Object production'
                  type: object
                  properties:
                    name:
                      type: string
                    active:
                      type: boolean
                    executive:
                      type: boolean
                    support_email:
                      type: string
                    screenshot_notifications:
                      type: boolean
                    screenshot_notifications_email:
                      type: string
      responses:
        '200':
          description: '200'
  /api/v1/enterprise/{enterprise_id}/production/{production_id}/permissions:
    put:
      tags:
        - Production Permissions
      description: Allow to modify main data of a production
      produces:
        - application/json
      consumes:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
      requestBody:
        content:
          application/json:
            schema:
              properties:
                cloudProviders:
                  type: object
                  properties:
                    BOX:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    crooGloo:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    dropbox:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    googleDrive:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    iCloud:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    oneDrive:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                collaborationFeatures:
                  type: object
                  properties:
                    layerExport:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    liveLayers:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                    shareLining:
                      type: number
                      enum: [0, 1, 2]
                      description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                externalSharing:
                  type: number
                  enum: [0, 1, 2]
                  description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                macOSAccess:
                  type: number
                  enum: [0, 1, 2]
                  description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                requireDevicePassword:
                  type: number
                  enum: [0, 1, 2]
                  description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                screenshotPrevention:
                  type: number
                  enum: [0, 1, 2]
                  description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
                watermarking:
                  type: number
                  enum: [0, 1, 2]
                  description: '2 is Available at other levels, 1 is Permitted/On, 0 is Denied/Off'
      responses:
        200:
          description: '200'
  /api/v1/enterprise/{enterprise_id}/production/{production_id}/invitation:
    get:
      tags:
        - Production Invitations
      description: Returns the list of invitations sent within a production
      produces:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
      responses:
        200:
          description: '200'
  /api/v1/enterprise/{enterprise_id}/production/{production_id}/invitation/{invitation_id}:
    get:
      tags:
        - Production Invitations
      description: Returns the data of an invitation
      produces:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
        - in: path
          name: invitation_id
          type: string
          required: true
          description: Document identifier of the invitation
      responses:
        200:
          description: '200'
    post:
      tags:
        - Production Invitations
      description: Allow to sent invitations within a production
      produces:
        - application/json
      consumes:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
      requestBody:
        content:
          application/json:
            schema:
              required:
                - invitations
                - settings
              properties:
                invitations:
                  type: array
                  items:
                    type: object
                    required:
                      - firstname
                      - lastname
                      - email
                    properties:
                      firstname:
                        type: string
                      lastname:
                        type: string
                      email:
                        type: string
                settings:
                  type: object
                  required:
                    - support
                    - reply
                  properties:
                    support:
                      type: string
                    msg:
                      type: string
                    reply:
                      type: string
      responses:
        200:
          description: '200'
  /api/v1/enterprise/{enterprise_id}/production/{production_id}/activation:
    get:
      tags:
        - Production Activations
      description: Returns a list of all the activations within a production
      produces:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
      responses:
        200:
          description: '200'
  /api/v1/enterprise/{enterprise_id}/production/{production_id}/activation/{activation_id}/offboard:
    post:
      tags:
        - Production Activations
      description: Allow to deactivate an activation within a production
      produces:
        - application/json
      consumes:
        - application/json
      parameters:
        - in: header
          name: Access-Token
          type: string
          required: true
          description: Access-Token provided by the API
        - in: path
          name: enterprise_id
          type: string
          required: true
          description: Document identifier of the enterprise
        - in: path
          name: production_id
          type: string
          required: true
          description: Document identifier of the production
        - in: path
          name: activation_id
          type: string
          required: true
          description: Document identifier of the activation
      responses:
        200:
          description: '200'
securityDefinitions:
  api_key:
    type: apiKey
    name: Access-Token
    in: header
  petstore_auth:
    type: oauth2
    authorizationUrl: https://petstore.swagger.io/oauth/authorize
    flow: implicit
definitions:
  ApiResponse:
    type: object
    properties:
      code:
        type: integer
        format: int32
      type:
        type: string
      message:
        type: string
  AuthRequest:
    type: object
    properties:
      refresh_token:
        type: string
    xml:
      name: AuthRequest
  PostProductionBody:
    type: object
    properties:
      production:
        type: object
        description: Object production
        required:
          - name
          - active
          - support_email
        properties:
          name:
            type: string
          active:
            type: boolean
          executive:
            type: boolean
          support_email:
            type: string
          screenshot_notifications:
            type: boolean
          screenshot_notifications_email:
            type: string
    xml:
      name: PostProductionBody
  PutProductionBody:
    type: object
    properties:
      production:
        type: object
        description: Object production
        properties:
          name:
            type: string
          active:
            type: boolean
          executive:
            type: boolean
          support_email:
            type: string
          screenshot_notifications:
            type: boolean
          screenshot_notifications_email:
            type: string
    xml:
      name: PutProductionBody
externalDocs:
  description: Find out more about Swagger
  url: http://swagger.io
