none
Swagger Function error in Azure API Definition RRS feed

  • Question

  • Hi All,

    I am currently working on Developer edition of O365

    Scenario is to build bring Audit Logs through API and insert data into AZURE SQL via Microsoft FLOW

    I am using Office 365 Management Activity API

    I have set up all permissions and did everything right till the point of API Definition which I need to customize

    here is my definition that is currently not parsing and throws an error "cannot save malformed api"

    Please guide me on where it is going wrong

    ===============================================================================

    swagger: '2.0'
    info:
      title: powerbiauditlog.azurewebsites.net
      version: 1.0.0
    host: powerbiauditlog.azurewebsites.net
    basePath: /
    schemes:
      - https
      - http
    paths:
      /api/powerbiauditlog:
        get:
          operationId: powerbiauditlog
          produces: 
          - application/json
          consumes: []
          parameters: 
          - name: days
            in: query
            required: false
            type: string
          description: 
            Select No.of Days to retrieve Audit Logs
          responses: 
    '200':
            description: details of Logs
            x-ms-summary: List of Audit Records
            schema:
              type: array
              items:
                type: object
      
            properties:
            Id:
                  x-ms-summary: Id
                  description: Id of log

    type: string

    CreationTime:

    x-ms-summary: CreationTime

    description: CreationTime of log

    type: string

    format: date-time

    CreationTimeUTC:

    x-ms-summary: CreationTimeUTC

    description: CreationTimeUTC of log

    type: string

    format: date-time

    RecordType:

    x-ms-summary: RecordType

    description: RecordType of log

    type: integer

    format: int32

    Operation:

    x-ms-summary: Operation

    description: Operation of log

    type: string

    OrganizationId:

    x-ms-summary: OrganizationId

    description: OrganizationId of log

    type: string

    UserType:

    x-ms-summary: UserType

    description: UserType of log

    type: integer

    format: int32

    UserKey:

    x-ms-summary: UserKey

    description: UserKey of log

    type: string

    Workload:

    x-ms-summary: Workload

    description: Workload of log

    type: string

    UserId:

    x-ms-summary: UserId

    description: UserId of log

    type: string

    ClientIP:

    x-ms-summary: ClientIP

    description: ClientIP of log

    type: string

    UserAgent:

    x-ms-summary: UserAgent

    description: UserAgent of log

    type: string

    Activity:

    x-ms-summary: Activity

    description: Activity of log

    type: string

    ItemName:

    x-ms-summary: ItemName

    description: ItemName of log

    type: string

    WorkSpaceName:

    x-ms-summary: WorkSpaceName

    description: WorkSpaceName of log

    type: string

    DashboardName:

    x-ms-summary: DashboardName

    description: DashboardName of log

    type: string

    DatasetName:

    x-ms-summary: DatasetName

    description: DatasetName of log

    type: string

    ReportName:

    x-ms-summary: ReportName

    description: ReportName of log

    type: string

    WorkspaceId:

    x-ms-summary: WorkspaceId

    description: WorkspaceId of log

    type: string

    ObjectId:

    x-ms-summary: ObjectId

    description: ObjectId of log

    type: string

    DashboardId:

    x-ms-summary: DashboardId

    description: DashboardId of log

    type: string

    DatasetId:

    x-ms-summary: DatasetId

    description: DatasetId of log

    type: string

    ReportId:

    x-ms-summary: ReportId

    description: ReportId of log

    type: string

    OrgAppPermission:

    x-ms-summary: OrgAppPermission

    description: OrgAppPermission of log

    type: string

    DataflowType:

    x-ms-summary: DataflowType

    description: DataflowType of log

    type: string

    DataflowRefreshScheduleType:

    x-ms-summary: DataflowRefreshScheduleType

    description: DataflowRefreshScheduleType of log

    type: string

    IsSuccess:

    x-ms-summary: IsSuccess

    description: IsSuccess of log

    type: boolean

    security:

    – apikeyQuery: []

    definitions: {}

    securityDefinitions:

    apikeyQuery:

    type: apiKey

    name: code

    in: query

    ===============================================================================

    Thursday, December 5, 2019 5:08 PM

All replies

  • Hi NovaSia,

    I am going to move this forum thread to the O365 for Developers forum where the audience is more likely to assist you with this issue. You have been directed to the Azure SQL Database forum but the issue is with the API itself. Another resource you could search is the Office 365 Dev Center.

    Regards,

    Mike

    Tuesday, December 10, 2019 1:56 AM