GraphQL API

Modified on Tue, 9 Dec at 3:25 PM

GraphQL Queries

Introduction

GraphQL is a query language for APIs. GraphQL provides a complete and understandable description of the data in your API, gives you the power to ask for exactly what you need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

URL

Base URL for ILAP analytics Please contact corporate ILAP operation manager for base URL.

Endpoints

Use the /graphql endpoint to post your query and get data in return in JSON format To view the model, use /graphql-voyager endpoint

Methods

Use the POST method to send a query and get data in return

POST https://app-ilapanalytics-api-beta.azurewebsites.net/graphql/ HTTP/1.1

Authorization

For authorization, the API requires you to provide a bearer token in the header of your POST. Please contact corporate ILAP operation manager for access and token.

Parameters (headers / body)

Headers

Provide the following headers (replace YOUR_KEY_HERE with your own token key generated):

Content-Type: "application/json"
Accept: "application/json"
Authorization: "bearer YOUR_KEY_HERE"

Body

The content of the BODY should be a GraphQL query For example, to get a list of report schedules, use the following query:

query{
  reportSchedules(where:{id:{eq:4}}){
    id
    reportScheduleTypeId
    description
    cutoffDate
  }
}

Visit Query types for available graphQL schemas For more comprehensive examples, read the Example queries section

Query types

Metadata

Query for metadata fields and / or values using the type metadataFields For list of fields, use the following :

query{
  metadataFields {
    id
    name
  }
}

To get list of metadata fields including values, include metadataFieldValues in your query :

query{
  metadataFields {
    id
    name
    metadataFieldValues {
      id
      stringValue
      description
    }
  }
}

Report Schedules

Query for report schedules using the type reportSchedules For list of report schedules, use the following :

query{
  reportSchedules {
    id
    reportScheduleTypeId
    description
    pointsInTimeType
    activitiesCount
    cutoffDate
  }
}

For one specific report schedule, add where-clause for report schedule id :

query{
  reportSchedules(where:{id:{eq:4}}){
    id
    reportScheduleTypeId
    description
    ...
  }
}

Report Activities

Query for report schedules and activities using the type reportScheduleByIdWithRevisions. This requires you to provide id of one specific report schedule. For list of report schedules, use the following :

query{ reportScheduleByIdWithRevisions( id:4 ) { 
  id
  reportScheduleTypeId
  reportScheduleDescription: description
  cutoffDate 
  activities {
    code
    description
    start
    startBaseline
    finish
    finishBaseline
    totalWorkHours 
    ...
    }
  }
}

Periodization

To query for periodization of report activities, use the type reportScheduleByIdWithActivitiesPeriodized. This requires you to provide id of one specific report schedule.

query{
   reportScheduleByIdWithActivitiesPeriodized(id:3){
     id
     reportScheduleTypeId
     cutoffDate
     activities {
       ReportActivityId: id
        periodized {
          pointInTime
          actualHours
          earnedHours
          totalPlannedHours
          plannedHours
          baselinePlannedHours
          plannedLoad
          baselinePlannedLoad
        }
     }
   }
}

Data

Query for any schedule data for an imported ILAP file using the type dataById This requires you to provide id of file.

Example:

query{
   dataById (id:65) {
    id
    ilapId
    schedules
    {
     id
     code
     cutoffDate
     created
     activities {
        id
        code
        description
        earlyStart
        earlyFinish 
        plannedWorkHours
     }
    }
   }
}

For developers: see GraphQL/Query.cs for implementation of query types

Example queries

This page provides a set of specific example queries. To get an in-depth explanation of each query type, please read the Query types section.

NOTE: Some of the queries includes specific metadata fields, and requires you to have these fields (OG_Proj…) in your configuration. Simply remove/replace them to match with your own configuration._

Metadata

Query for all metadata fields including values

query{
  metadataFields {
    FieldId: id
    FieldName: name
    ilapId
    FieldDescr : description
    ObjectType: planningObjectTypes
    DataType: type
    iri    
    metadataFieldValues {
      ValueId: id
      ValueCode: stringValue
      ValueDescr: description
    }
  }
}

Report Schedules

Query for one report schedules (omit the where-clause to get all report schedules) Note: Some metadata fields (such as OG_Proj_ContractId) are included in the query

query{
  reportSchedules(where:{id:{eq:4}}){
    ReportScheduleId : id
    ReportScheduleTypeId : reportScheduleTypeId
    ReportScheduleDescr : description
    PointsInTimeType : pointsInTimeType
    ActivitiesCount : activitiesCount
    CutoffDate : cutoffDate
    Start : start
    StartBaseline : startBaseline
    Finish : finish
    FinishBaseline : finishBaseline
    TotalWorkHours : totalWorkHours
    TotalWorkHoursBaseline : totalWorkHoursBaseline
    ScheduleTypeId: reportScheduleTypeId
    ScheduleTypeDescr: reportScheduleTypeId
    ScheduleId : id
    OG_Proj_ContractId
    OG_Proj_FieldName
    OG_Proj_OriginatorCompany
    OG_Proj_ProjectName
  }
}

Query for one report schedule at specified earlier cutOff

query{
  reportScheduleArchive(reportScheduleId :4, cutOff:"2021-08-14T00:00:00Z") { 
    ReportScheduleId : reportScheduleId
    ReportScheduleTypeId : reportScheduleTypeId
    ReportScheduleDescr : description
    PointsInTimeType : pointsInTimeType
    ActivitiesCount : activitiesCount
    CutoffDate : cutoffDate
    Start : start
    StartBaseline : startBaseline
    Finish : finish
    FinishBaseline : finishBaseline
    TotalWorkHours : totalWorkHours
    TotalWorkHoursBaseline : totalWorkHoursBaseline
    ScheduleTypeId: reportScheduleTypeId
    ScheduleTypeDescr: reportScheduleTypeId
    ScheduleId : scheduleId       
    OG_Act_ISO_PBSCode              
  }
}

Report Activities

Query for report activities, including report schedule info, for specified report schedule with id = 4. Note: Some metadata fields (such as OG_Act_ISO_CORCode) are included in the query

query{ reportScheduleByIdWithRevisions( id:4 ) { 
  ReportScheduleId : id
  ReportScheduleTypeId : reportScheduleTypeId
  ReportScheduleDescr : description
  PointsInTimeType : pointsInTimeType
  ActivitiesCount : activitiesCount
  CutoffDate : cutoffDate 
  ScheduleStart : start
  ScheduleStartBaseline : startBaseline
  ScheduleFinish : finish
  ScheduleFinishBaseline : finishBaseline
  ScheduleTypeId : reportScheduleTypeId
  ScheduleTypeDescr : reportScheduleTypeId
  PlanningLevel : id
  ReportScheduleCode : code 
  OG_Proj_ContractId
  OG_Proj_FieldName
  OG_Proj_OriginatorCompany
  OG_Proj_ProjectName
  activities {
    ReportActivityId : id
    ReportActivityCode: code
    ReportActivityDescr : description
    Start : start
    StartBaseline : startBaseline
    Finish : finish
    FinishBaseline : finishBaseline
    TotalWorkHours : totalWorkHours 
    TotalWorkHoursBaseline : totalWorkHoursBaseline 
    ActualWorkHoursAtCutoffPeriodic : actualWorkHoursAtCutoffPeriodic
    ActualWorkHoursAtCutoffCumulative : actualWorkHoursAtCutoffCumulative
    EarnedWorkHoursAtCutoffPeriodic : earnedWorkHoursAtCutoffPeriodic
    EarnedWorkHoursAtCutoffCumulative : earnedWorkHoursAtCutoffCumulative
    PlannedWorkHoursAtCutoffPeriodic : plannedWorkHoursAtCutoffPeriodic
    PlannedWorkHoursAtCutoffCumulative : plannedWorkHoursAtCutoffCumulative
    PlannedWorkHoursAtCutoffPeriodicBaseline : plannedWorkHoursAtCutoffPeriodicBaseline
    PlannedWorkHoursAtCutoffCumulativeBaseline : plannedWorkHoursAtCutoffCumulativeBaseline
    CancelledDate : cancelledDate
    IsCancelled : isCancelled
    OriginalBaselineActivityId : originalBaselineActivityId
    BaselineActivityId : baselineActivityId
    CurrentActivityId : currentActivityId
    LiveActivityId : activityId
    ScheduleId : reportScheduleId
    ActivityId : id
    OG_Act_BuildingBlockCode
    OG_Act_BuildingBlockDescr
    OG_Act_CommissioningPkgCode    
    OG_Act_CommissioningPkgDescr
    OG_Act_ContractorDiscCode
    OG_Act_ContractorDiscDescr
    OG_Act_ContractorPhaseCode
    OG_Act_ContractorPhaseDescr
    OG_Act_ContractorProcurementStepCode
    OG_Act_ContractorProcurementStepDescr
    OG_Act_ISO_CORCode
    OG_Act_ISO_PBSCode
    OG_Act_ISO_ProcurementStep
    OG_Act_ProcurementPkgCode    
    OG_Act_ProcurementPkgDescr
    OG_Act_SiteLocation
    OG_Act_WBS
    OG_Act_WorkPackId
    }
  }
}

Query for report activities, including report schedule info, for a specific report schedule at an earlier cutOff.

query{ reportScheduleByIdWithRevisionsArchive( reportScheduleId :4, cutOff:"2021-08-14T00:00:00Z") { 
  ReportScheduleId : reportScheduleId
  ReportScheduleTypeId : reportScheduleTypeId
  ReportScheduleDescr : description
  PointsInTimeType : pointsInTimeType
  ActivitiesCount : activitiesCount
  CutoffDate : cutoffDate 
  ScheduleStart : start
  ScheduleStartBaseline : startBaseline
  ScheduleFinish : finish
  ScheduleFinishBaseline : finishBaseline
  ScheduleTypeId : reportScheduleTypeId
  ScheduleTypeDescr : reportScheduleTypeId
  PlanningLevel : reportScheduleId
  ReportScheduleCode : code 
  OG_Proj_ContractId
  OG_Proj_FieldName
  OG_Proj_OriginatorCompany
  OG_Proj_ProjectName
  activities {
    ReportActivityId : reportActivityId
    ReportActivityCode: code
    ReportActivityDescr : description
    Start : start
    StartBaseline : startBaseline
    Finish : finish
    FinishBaseline : finishBaseline
    TotalWorkHours : totalWorkHours 
    TotalWorkHoursBaseline : totalWorkHoursBaseline 
    ActualWorkHoursAtCutoffPeriodic : actualWorkHoursAtCutoffPeriodic
    ActualWorkHoursAtCutoffCumulative : actualWorkHoursAtCutoffCumulative
    EarnedWorkHoursAtCutoffPeriodic : earnedWorkHoursAtCutoffPeriodic
    EarnedWorkHoursAtCutoffCumulative : earnedWorkHoursAtCutoffCumulative
    PlannedWorkHoursAtCutoffPeriodic : plannedWorkHoursAtCutoffPeriodic
    PlannedWorkHoursAtCutoffCumulative : plannedWorkHoursAtCutoffCumulative
    PlannedWorkHoursAtCutoffPeriodicBaseline : plannedWorkHoursAtCutoffPeriodicBaseline
    PlannedWorkHoursAtCutoffCumulativeBaseline : plannedWorkHoursAtCutoffCumulativeBaseline
    CancelledDate : cancelledDate
    IsCancelled : isCancelled
    OriginalBaselineActivityId : originalBaselineActivityId
    BaselineActivityId : baselineActivityId
    CurrentActivityId : currentActivityId
    LiveActivityId : activityId
    ScheduleId : reportScheduleId
    ActivityId : activityId
    OG_Act_BuildingBlockCode
    OG_Act_WorkPackId
    }
  }
}

Periodization

To query for periodization of report activities, use the type reportScheduleByIdWithActivitiesPeriodized. This requires you to provide id of one specific report schedule.

query{
   reportScheduleByIdWithActivitiesPeriodized(id:4){
     ReportScheduleId: id
     ReportScheduleTypeId : reportScheduleTypeId
     CutoffDate : cutoffDate
     activities {
       ReportActivityId: id
        periodized {
          PointInTime : pointInTime
          ActualHours : actualHours
          EarnedHours : earnedHours
          TotalPlannedHours : totalPlannedHours
          PlannedHours : plannedHours
          BaselinePlannedHours : baselinePlannedHours
          OriginalBaselinePlannedHours : originalBaselinePlannedHours
          CurrentPlannedHours : currentPlannedHours
          PlannedLoad : plannedLoad
          BaselinePlannedLoad : baselinePlannedLoad
          OriginalBaselinePlannedLoad : originalBaselinePlannedLoad
          CurrentPlannedLoad : currentPlannedLoad
        }
     }
   }
}

Query for periodization of report activities for a specific report schedule at specified previous cutOff.

query{
   reportScheduleByIdWithActivitiesPeriodizedArchive(reportScheduleId :4, cutOff:"2021-08-14T00:00:00Z"){
     ReportScheduleId: reportScheduleId
     ReportScheduleTypeId : reportScheduleTypeId
     CutoffDate : cutoffDate
     activities {
       ReportActivityId: reportActivityId
        periodized {
          PointInTime : pointInTime
          ActualHours : actualHours
          EarnedHours : earnedHours
          TotalPlannedHours : totalPlannedHours
          PlannedHours : plannedHours
          BaselinePlannedHours : baselinePlannedHours
          OriginalBaselinePlannedHours : originalBaselinePlannedHours
          CurrentPlannedHours : currentPlannedHours
          PlannedLoad : plannedLoad
          BaselinePlannedLoad : baselinePlannedLoad
          OriginalBaselinePlannedLoad : originalBaselinePlannedLoad
          CurrentPlannedLoad : currentPlannedLoad
        }
     }
   }
}

Alternative 2: Report Activities Periodization

query{
  metadataFields(where:{id:{eq:11}}){
    metadataFieldValues(where:{stringValue:{eq:"4503834675"}} ){
      reportSchedules{
        metadataFieldValues(where:{and:[{stringValue:{eq:"4503834675"}}, {metadataFieldId:{eq:11}}]}){
          reportSchedules{
            ReportScheduleId: id
            CutoffDate: cutoffDate
            activities{  
              ReportActivityId: id
              periodized{
                PointInTime : pointInTime
                ActualHours : actualHours
                EarnedHours : earnedHours
                TotalPlannedHours : totalPlannedHours
                PlannedHours : plannedHours
                BaselinePlannedHours : baselinePlannedHours
                OriginalBaselinePlannedHours : originalBaselinePlannedHours
                CurrentPlannedHours : currentPlannedHours
                PlannedLoad : plannedLoad
                BaselinePlannedLoad : baselinePlannedLoad
                OriginalBaselinePlannedLoad : originalBaselinePlannedLoad
                CurrentPlannedLoad : currentPlannedLoad
              }
            }
          }
        }
      }
    }
  }
}

Progress Summary Queries

This section provides comprehensive guidance on querying progress summaries with configurable cutoff dates, enabling retrospective analysis of project progress at various reporting levels.

Report Schedule Level Progress Summary

The following query retrieves progress summary data aggregated at the report schedule level for a specified cutoff date.


query {

  reportScheduleLevelProgressSummary(cutoffDate: "2025-10-27T00:00:00Z") {

    nodes {

      reportScheduleCode
      reportScheduleDescription      

      perActualHours
      perBaselineCalendarHours
      perBaselineEarnedHours
      perBaselinePlannedHours
      perBaselineTotalPlannedHours
      perCalendarHours
      perCurrentCalendarHours
      perCurrentTotalPlannedHours
      perEarnedHours
      perOriginalBaselineCalendarHours
      perOriginalBaselinePlannedHours
      perOriginalBaselineTotalPlannedHours
      perPlannedHours
      perTotalPlannedHours    

      cumActualHours
      cumBaselineCalendarHours
      cumBaselineEarnedHours
      cumBaselinePlannedHours
      cumBaselineTotalPlannedHours
      cumCalendarHours
      cumCurrentCalendarHours
      cumCurrentPlannedHours
      cumCurrentTotalPlannedHours
      cumEarnedHours
      cumOriginalBaselineCalendarHours
      cumOriginalBaselinePlannedHours
      cumOriginalBaselineTotalPlannedHours
      cumPlannedHours
      cumTotalPlannedHours
    }
  }
}

Implementing Pagination

To retrieve a limited subset of results, apply pagination using the first parameter. The following example fetches the first 100 items.


query {

  reportActivityLevelProgressSummary(

    cutoffDate: "2025-10-27T00:00:00Z"
    reportScheduleId: 3252
    first: 100 # Fetch first 100 items
  ) {
    nodes {
      code
      description

      # Additional fields...
    }
  }
}

Retrieving Pagination Cursors

To implement cursor-based pagination, retrieve the cursor values associated with each node. These cursors are used to navigate through paginated result sets.


query {

  reportActivityLevelProgressSummary(

    cutoffDate: "2025-10-27T00:00:00Z"
    reportScheduleId: 3252    
  ) {    
    edges {
      cursor
      node {
        id
      }
    }    
  }
}

Fetching Data After a Specific Cursor

Utilize the after parameter in conjunction with first to retrieve a specified number of items following a particular cursor position.


query {
  reportActivityLevelProgressSummary(

    cutoffDate: "2025-10-27T00:00:00Z"
    reportScheduleId: 3252
    first: 2
    after: "Mw=="
  )
  {
    nodes{
        id
        code
        activityId
    }    
  }
}

Note: The last and before parameters can be used similarly to retrieve the last N items before a specified cursor position.

Accessing Pagination Metadata

The pageInfo object provides essential metadata for navigating paginated results, including indicators for additional pages and cursor boundaries.


query {

  reportActivityLevelProgressSummary(

    cutoffDate: "2025-10-27T00:00:00Z"
    reportScheduleId: 3252
    first: 2    
  ) {
    nodes {
      id
      code
      activityId
      activityType
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Applying Filters

Query results can be refined using the where parameter to apply conditional filters. The following example demonstrates filtering by activity ID and activity type.


query {

  reportActivityLevelProgressSummary(

    cutoffDate: "2025-10-27T00:00:00Z"
    reportScheduleId: 3252
    first: null
    where: { activityId: { gt: 10 }, activityType: { eq: MILESTONE_START } }
  ) {
    nodes {
      id
      code
      activityId
      activityType
    }
  }
}

Report Activity Level Progress Summary

The following query retrieves progress summary data at the individual activity level


query {

  reportActivityLevelProgressSummary(cutoffDate: "2025-10-27T00:00:00Z", reportScheduleId: 3252) {
    nodes {       
      reportScheduleCode
      reportScheduleDescription        

      # Report activity properties

      code
      description
      actualFinish
      actualStart    

      # Additional fields...

      # Report activity metadata

      OG_Act_DisciplineCode
      OG_Act_Phase

      # Additional metadata...

      # Progress summary

      cumActualHours
      cumBaselineCalendarHours
      cumBaselineEarnedHours
      cumBaselinePlannedHours
      cumBaselineTotalPlannedHours
      cumCalendarHours
      cumCurrentCalendarHours
      cumCurrentPlannedHours
      cumCurrentTotalPlannedHours
      cumEarnedHours
      cumOriginalBaselineCalendarHours
      cumOriginalBaselinePlannedHours
      cumOriginalBaselineTotalPlannedHours
      cumPlannedHours
      cumTotalPlannedHours

      perActualHours
      perBaselineCalendarHours
      perBaselineEarnedHours
      perBaselinePlannedHours
      perBaselineTotalPlannedHours
      perCalendarHours
      perCurrentCalendarHours
      perCurrentTotalPlannedHours
      perEarnedHours
      perOriginalBaselineCalendarHours
      perOriginalBaselinePlannedHours
      perOriginalBaselineTotalPlannedHours
      perPlannedHours
      perTotalPlannedHours      
    }
  }
}

Note: The same pagination and filtering capabilities described above are applicable to activity-level queries.

Create JSON-files for TWEL:

$auth_header = @{ "Authorization" = "Bearer eyJ0eX...."; }

$file_path = 'C:\ILAP files\TEST\'
$file_name = 'twel08'

$api =' https://app-ilapanalytics-api-equinor-prod.azurewebsites.net/graphql'


$body = '{"query":"query{\r\n  reportSchedules(where:{id:{eq:4}}){\r\n    ReportScheduleId : id\r\n    ReportScheduleTypeId : reportScheduleTypeId\r\n    ReportScheduleDescr : description\r\n    PointsInTimeType : pointsInTimeType\r\n    ActivitiesCount : activitiesCount\r\n    CutoffDate : cutoffDate\r\n    Start : start\r\n    StartBaseline : startBaseline\r\n    Finish : finish\r\n    FinishBaseline : finishBaseline\r\n    TotalWorkHours : totalWorkHours\r\n    TotalWorkHoursBaseline : totalWorkHoursBaseline\r\n    ScheduleTypeId: reportScheduleTypeId\r\n    ScheduleTypeDescr: reportScheduleTypeId\r\n    ScheduleId : id\r\n    OG_Proj_ContractId\r\n    OG_Proj_FieldName\r\n    OG_Proj_OriginatorCompany\r\n    OG_Proj_ProjectName\r\n  }\r\n}"}'

$file = $file_path + $file_name + '_sch.json'

Invoke-RestMethod -Method POST -Headers $auth_header -ContentType "application/json; charset=utf-8" -Uri $api -Body $body -OutFile $file

$body = '{"query":"query{ reportScheduleByIdWithRevisions( id:4 ) { \r\n  ReportScheduleId : id\r\n  ReportScheduleTypeId : reportScheduleTypeId\r\n  ReportScheduleDescr : description\r\n  PointsInTimeType : pointsInTimeType\r\n  ActivitiesCount : activitiesCount\r\n  CutoffDate : cutoffDate \r\n  ScheduleStart : start\r\n  ScheduleStartBaseline : startBaseline\r\n  ScheduleFinish : finish\r\n  ScheduleFinishBaseline : finishBaseline\r\n  ScheduleTypeId : reportScheduleTypeId\r\n  ScheduleTypeDescr : reportScheduleTypeId\r\n  PlanningLevel : id\r\n  ReportScheduleCode : code \r\n  OG_Proj_ContractId\r\n  OG_Proj_FieldName\r\n  OG_Proj_OriginatorCompany\r\n  OG_Proj_ProjectName\r\n  activities {\r\n    ReportActivityId : id\r\n    ReportActivityCode: code\r\n    ReportActivityDescr : description\r\n    Start : start\r\n    StartBaseline : startBaseline\r\n    Finish : finish\r\n    FinishBaseline : finishBaseline\r\n    TotalWorkHours : totalWorkHours \r\n    TotalWorkHoursBaseline : totalWorkHoursBaseline \r\n    ActualWorkHoursAtCutoffPeriodic : actualWorkHoursAtCutoffPeriodic\r\n    ActualWorkHoursAtCutoffCumulative : actualWorkHoursAtCutoffCumulative\r\n    EarnedWorkHoursAtCutoffPeriodic : earnedWorkHoursAtCutoffPeriodic\r\n    EarnedWorkHoursAtCutoffCumulative : earnedWorkHoursAtCutoffCumulative\r\n    PlannedWorkHoursAtCutoffPeriodic : plannedWorkHoursAtCutoffPeriodic\r\n    PlannedWorkHoursAtCutoffCumulative : plannedWorkHoursAtCutoffCumulative\r\n    PlannedWorkHoursAtCutoffPeriodicBaseline : plannedWorkHoursAtCutoffPeriodicBaseline\r\n    PlannedWorkHoursAtCutoffCumulativeBaseline : plannedWorkHoursAtCutoffCumulativeBaseline\r\n    CancelledDate : cancelledDate\r\n    IsCancelled : isCancelled\r\n    OriginalBaselineActivityId : originalBaselineActivityId\r\n    BaselineActivityId : baselineActivityId\r\n    CurrentActivityId : currentActivityId\r\n    LiveActivityId : activityId\r\n    ScheduleId : reportScheduleId\r\n    ActivityId : id\r\n    OG_Act_BuildingBlockCode\r\n    OG_Act_BuildingBlockDescr\r\n    OG_Act_CommissioningPkgCode    \r\n    OG_Act_CommissioningPkgDescr\r\n    OG_Act_ContractorDiscCode\r\n    OG_Act_ContractorDiscDescr\r\n    OG_Act_ContractorPhaseCode\r\n    OG_Act_ContractorPhaseDescr\r\n    OG_Act_ContractorProcurementStepCode\r\n    OG_Act_ContractorProcurementStepDescr\r\n    OG_Act_ISO_CORCode\r\n    OG_Act_ISO_PBSCode\r\n    OG_Act_ISO_ProcurementStep\r\n    OG_Act_ProcurementPkgCode    \r\n    OG_Act_ProcurementPkgDescr\r\n    OG_Act_SiteLocation\r\n    OG_Act_WBS\r\n    OG_Act_WorkPackId\r\n    }\r\n  }\r\n}"}'

$file = $file_path + $file_name + '_act.json'

Invoke-RestMethod -Method POST -Headers $auth_header -ContentType "application/json; charset=utf-8" -Uri $api -Body $body -OutFile $file

$body = '{"query":"query{\r\n  metadataFields(where:{id:{eq:11}}){\r\n    metadataFieldValues(where:{stringValue:{eq:\"4503834675\"}} ){\r\n      reportSchedules{\r\n        metadataFieldValues(where:{and:[{stringValue:{eq:\"4503834675\"}}, {metadataFieldId:{eq:11}}]}){\r\n          reportSchedules{\r\n            ReportScheduleId: id\r\n            CutoffDate: cutoffDate\r\n            activities{  \r\n              ReportActivityId: id\r\n              periodized{\r\n                PointInTime : pointInTime\r\n                ActualHours : actualHours\r\n                EarnedHours : earnedHours\r\n                TotalPlannedHours : totalPlannedHours\r\n                PlannedHours : plannedHours\r\n                BaselinePlannedHours : baselinePlannedHours\r\n                OriginalBaselinePlannedHours : originalBaselinePlannedHours\r\n                CurrentPlannedHours : currentPlannedHours\r\n                PlannedLoad : plannedLoad\r\n                BaselinePlannedLoad : baselinePlannedLoad\r\n                OriginalBaselinePlannedLoad : originalBaselinePlannedLoad\r\n                CurrentPlannedLoad : currentPlannedLoad\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n}"}'

$file = $file_path + $file_name + '_per.json'

Invoke-RestMethod -Method POST -Headers $auth_header -ContentType "application/json; charset=utf-8" -Uri $api -Body $body -OutFile $file

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article