API cannot view computercommands

aamjohns
Contributor II

When I attempt to view: https://address:8443/JSSResource/computercommands

I get the message:

Internal Server Error UDID or Computer ID must be set to save You can get technical details here. Please continue your visit at our home page.

I have authenticated and I have full API access.

Anyone know what I am doing wrong?

4 REPLIES 4

mm2270
Legendary Contributor III

We've seen something a lot like this here and have an open case with JAMF we've been working through. In our case though, we get a similar Internal Server Error message either in a browser or via command line (curl) when we attempt to view certain Mac's via the API. We don't see the "UDID or Computer ID must be set to save" part of the message though.
We think it has something to do with corrupted or bad inventory data on those Macs in our case. Most of them are stale records,not having checked in in weeks or months, and in tests, if we get our hands on one of the affected systems and simply have it recon again it seems to fix the issue.
We haven't seen this when attempting to view a general category, like computer commands, but I can see how it could happen there as well if there is any bad API data its attempting to load.

I'd talk to JAMF about it since its a bit tricky to track down the exact cause of this. Although I don't wish any problems on anyone, its interesting to hear that someone else is seeing a similar error with their JSS. Its sounding like a more general issue with the JSS rather than an isolated incident as we had believed it to be.

aamjohns
Contributor II

Hi Mike,
As usual, thank you for your response.

Curious, does the computercommands work for you? If so, would you mind attaching the output for me? No biggie.

mm2270
Legendary Contributor III

Aaron, were you looking to see the general API help for computer commands? Or something else? If its the former, I can post it here or send it to you. If you were looking to see what the xml output looked like, it looks something like this below. I genericized the UDID and JSS ID data, but you'll get the general idea. Seems like it lists any 'pending' commands first, then completed ones in a large <computers> </computers> array after with each Mac in its own <computer> </computer> block-

<computer_commands>
    <size>1</size>
    <computer_command>
    <id>1</id>
    <command>RemoveProfile</command>
    <udid>00aabb11-0000-1111-2222-111222333444</udid>
    <date_sent>2013-05-09 16:33:50</date_sent>
    <apns_result_status>Pending</apns_result_status>
    <profile_udid>aa00bb11cc-0000-1111-2222-333344445555</profile_udid>
        <computers>
            <size>5000</size>
            <computer>
                <id>2</id>
                <udid>AA112233-1B23-0000-1111-AB1CDE234FG5</udid>
                <users/>
                <size>0</size>
            </computer>
            <----- snip ---->
            <----- repeat of the above <computer> block for each entry ----->
            </computer>
        </computers>
    </computer_command>
</computer_commands>

HTH

Mike

aamjohns
Contributor II

What you gave me Mike is what I needed. Thank you! Aaron.