Intel vPro® Platform
Intel Manageability Forum (Intel® EMA, AMT & Manageability Commander)
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

API call problem

hobart_symms
Beginner
1,060 Views

Trying to POST a reboot, and I get this message:

 

"Message": "{\"ExtendedCode\":1034,\"ExtendedMessage\":\"Model cannot be null\"}"

 

This is my URL (edited) using a bearer token. 

https://<system_url>/api/latest/EndpointIBOperations/reboot?EndpointId=<endpoint_id>

 

I can make some API calls just fine.  There doesn't seem to be much info on this model error.

0 Kudos
12 Replies
JoseH_Intel
Moderator
1,038 Views

Hello hobart_symms,


Thank you for joining the Intel community


Are you referring to the EMA API?


In order to reboot an endpoint, follow the next steps:

 

  1. Go into the same directory as when they downloaded the API samples. Specifically, Set-IntelEMAEndpointPowerState.ps1 sample Powershell script.
  2. Use the -emaServerURL switch to call the server.
  3. Put in the fully qualified name of the server.
  4. Use the hostname switch.
  5. Enter the name of the hostname that is in EMA. It should be in the EMA WebUI console. Note: They can also find the system ID in the console.
  6. Use the power state switch to call the command desire, in this example reset. The EMA WebU console also has all the various reset, reboot, wake options available.
  7. Verbose for debugging logs.

Example of the commands on the power shell:

PS> ./Set-IntelEMAEndpointPowerState.ps1 -emaServerURL ema.westus2.cloudapp.azure.com -hostname UsersLaptop -powerState Reset -Verbose


Hope this helps


Regards


Jose A.

Intel Customer Support Technician


hobart_symms
Beginner
992 Views

Thanks, but I'm not really interested in using powershell.  That would add another layer of complexity.  I probably could have phrased my question better.

This is an API call to the EMA server.  According to the Intel documentation, I should be able to do this via an API call.

The hostname and client ID are known, I just removed them for this posting.

I can obtain a token from EMA and can perform various other API calls on the server, however, when it comes to power operations, I get that vague error message: "Message": "{\"ExtendedCode\":1034,\"ExtendedMessage\":\"Model cannot be null\"}"

 

 

MayurSharma
Beginner
985 Views

Hi,

 

I'm also facing similar issue.

I am using PowerShell API Sample script "Add-IntelEMATenantUser.ps1", I have modified it to create multiple user accounts which are imported from CSV file.

It works perfectly on 16 users except 1.

The user account is verified and so are other details, I can create the user manually in the EMA console, but it does fails when using the script.

Please find error details below.

Please let me know if you have any suggestions or need additional details.

 

VERBOSE: POST https://ema.compucom.com/api/latest/users with -1-byte payload
VERBOSE: REST Error Status: 400 Bad Request
Invoke-WebRequest : {"Message":"{\"ExtendedCode\":1034,\"ExtendedMessage\":\"Model cannot be null\"}"}
At line:315 char:7
+ try { Invoke-WebRequest -Uri "$emaServerURL$emaAPICallPath" -UseBasic ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

 

 

Thanks,

Mayur Sharma

JoseH_Intel
Moderator
910 Views

Hello all,


You can find the EMA API guide here: https://www.intel.com/content/www/us/en/support/articles/000055621/software/manageability-products.h...


If you have specific examples just paste them here so we can double-check with our senior team


Regards


Jose A.

Intel Customer Support Technician


hobart_symms
Beginner
903 Views

That is the guide I have already been using.

JoseH_Intel
Moderator
825 Views

Hello all,


I am following up just to ask if you have any further details, updates, questions or comments in regards to this issue? I will elevate your question to our senior team. Will get back with update as soon as available


Regards


Jose A.

Intel Customer Support Technician


JoseH_Intel
Moderator
749 Views

Hello all,


There are some additional documentation in Intel® Endpoint Management Assistant (Intel® EMA) Application Programming Interface (API) Guide (https://www.intel.com/content/www/us/en/support/articles/000055621/software/manageability-products.h...) about individual API URIs (such as descriptions and parameters) contained in the following two HTML files. Latestswagger.html (https://www.intel.com/content/dam/support/us/en/documents/software/manageability-products/Latestswag...) contains the API paths that always point to the latest released API version. In addition, the version 5 API URI details file, V5swagger.html (https://www.intel.com/content/dam/support/us/en/documents/software/manageability-products/V5swagger....), is provided as well which might help you.


To have a better understanding of the command/script you are using I will send you an email so you can share the samples been used and see if we can better assist you that way.


Regards


Jose A.

Intel Customer Support Technician


JoseH_Intel
Moderator
650 Views

Hello all,


I am just following up to double-check if you found the provided information useful. If you have further questions please don't hesitate to ask. If you consider the issue to be completed please let us know so we can proceed to mark this thread as closed. I will try to reach you as a very last time on next Monday 4th. After that the thread will be archived automatically.


Regards


Jose A.

Intel Customer Support Technician


hobart_symms
Beginner
642 Views

Unfortunately, those are all documents which I already had access to.  I did my due diligence on that part.  I think the issue at hand is the "Model cannot be null" error message, which is about as helpful as "PC LOAD LETTER".

For now, I'm just going to assume this call to the EMA is either broken (simply doesn't work) or is lacking in documentation.  I'd be curious to know if anyone has ever gotten it to work.

JoseH_Intel
Moderator
620 Views

Hello all,

 

Thank you for the feedback. I sent you an email so you can reply with an example of your script. Please reply back so I can elevate your question. In case you didn't received the email let me know to resend it.

 

Regards

 

Jose A.

Intel Customer Support Technician

 

JoseH_Intel
Moderator
551 Views

Hello all,

 

I am just following up to double check if you received the email sent. If not just let me know to go ahead and resend it. You can reply to this thread too.

 

Regards

 

Jose A.

Intel Customer Support Technician


JoseH_Intel
Moderator
500 Views

Hello all,

 

We will proceed to mark this thread as closed. If you have further issues or questions just go ahead and submit a new topic.

 

Regards

 

Jose A.

Intel Customer Support Technician


Reply