Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 error with function call #252

Open
mehnoorsiddiqui opened this issue Feb 5, 2024 · 4 comments
Open

500 error with function call #252

mehnoorsiddiqui opened this issue Feb 5, 2024 · 4 comments
Labels
component:support How to do xyz? type:bug Something isn't working

Comments

@mehnoorsiddiqui
Copy link

mehnoorsiddiqui commented Feb 5, 2024

Description of the bug:

I am sending a request to Gemini API with tools (function call) but consistently receiving 500 internal server error. Without the function call the API returns 200 response.

I have checked that the request is under the 10k token.

How to reproduce the error?

The request to reproduce the error can be found at the link:
https://drive.google.com/file/d/1rVDXm1zCuDILs3UQOieJd4SYTX2qD2cQ/view?usp=sharing

Actual vs expected behavior:

Expected behavior: function call response
Actual behavior:

 "error": {
        "code": 500,
        "message": "An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting",
        "status": "INTERNAL"
    }

Any other information you'd like to share?

No response

@mehnoorsiddiqui mehnoorsiddiqui added the type:bug Something isn't working label Feb 5, 2024
@8bitmp3
Copy link
Contributor

8bitmp3 commented Feb 5, 2024

Hi, will you be able to share a code snippet (Python, etc) that results in the error. It may be easier to debug this way. Looping in @MarkDaoust @markmcd .

@mehnoorsiddiqui
Copy link
Author

mehnoorsiddiqui commented Feb 5, 2024

I wrote the custom c# wrapper. The complete code is coupled with some business logic

private JsonSerializerOptions SerializerOptions => new JsonSerializerOptions()
{
    PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
    Converters = { new JsonStringEnumConverter() },
    DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
    Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping
};

    public async Task<GenerateContentResponse?> GenerateContent(string model, GenerateContentRequest request, CancellationToken cancellationToken)
    {
        var url = QueryURL(model, Tasks.GenerateContent, false);

        var json = JsonSerializer.Serialize(request, SerializerOptions);

        var stringContent = new StringContent(json, Encoding.UTF8, "application/json");

        var response = await _httpClient.PostAsync(url, stringContent, cancellationToken);

        if (!response.IsSuccessStatusCode)
        {
            throw new Exception($"Error: {response.StatusCode}");
        }

        var stream = await response.Content.ReadAsStreamAsync(cancellationToken);
        return await JsonSerializer.DeserializeAsync<GenerateContentResponse>(stream, SerializerOptions, cancellationToken);            
    }

This link has the request payload https://drive.google.com/file/d/1rVDXm1zCuDILs3UQOieJd4SYTX2qD2cQ/view?usp=sharing

@mehnoorsiddiqui
Copy link
Author

Hi @8bitmp3
Please check the curl command below that results in the 500 error.

curl --location 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=your_api_key' \
--header 'Content-Type: application/json' \
--data '{
    "generationConfig": {
        "temperature": 0,
        "topP": 1
    },
    "tools": [
        {
            "functionDeclarations": [
                {
                    "name": "get_relevant_endpoints",
                    "parameters": {
                        "required": [
                            "endpoint_name"
                        ],
                        "properties": {
                            "endpoint_name": {
                                "type": "ARRAY",
                                "items": {
                                    "type": "STRING"
                                }
                            }
                        },
                        "type": "OBJECT"
                    },
                    "description": "Retrieve Endpoint names that will solve what the user is asking in the question"
                }
            ]
        }
    ],
    "contents": [
        {
            "parts": [
                {
                    "text": "You are API code sample generator for C#. You are provided with all the endpoints in the API with their \"Name\" as well as their \"Description\" at the end of this prompt.\r\nYour task is to identify a maximum of 6 endpoint names based on provided endpoint names and descriptions that will solve what the user is asking in the question.\r\nIn case you find that multiple endpoints serve the exact same purpose, pick the one that best matches the user'\''s need\r\n\r\nRemember while answering                              \r\n    * Only use the provided Endpoint Names and Descriptions; nothing else \r\n    * Only return the endpoint \"Name\" in the function call; nothing else\r\n    \r\nConversation History:\r\n{\"messages\":[{\"Role\":\"user\",\"Content\":\"how to check if a SIM is active or not and then activate the SIM with ICCID and SKU and set custom fields\"},{\"Role\":\"assistant\",\"Content\":\"To check if a SIM is active or not, and then activate the SIM with ICCID and SKU, and set custom fields, you can use the following steps:\\n\\n**Prerequisites:**\\n\\n* You must have a API key and secret.\\n* You must have a SIM card with an ICCID.\\n* You must have a SKU for the service plan you want to activate.\\n\\n**Steps:**\\n\\n1. Check the SIM status:\\n    * Send a GET request to the `/devices/actions/check-sim-status` endpoint with the following parameters:\\n        * `iccid`: The ICCID of the SIM card.\\n    * The response will include the status of the SIM card.\\n\\n2. Activate the SIM:\\n    * If the SIM card is not active, send a POST request to the `/devices/actions/activate` endpoint with the following parameters:\\n        * `iccid`: The ICCID of the SIM card.\\n        * `sku`: The SKU of the service plan you want to activate.\\n    * The response will include the status of the activation request.\\n\\n3. Set custom fields:\\n    * Send a POST request to the `/devices/actions/set-custom-fields` endpoint with the following parameters:\\n        * `iccid`: The ICCID of the SIM card.\\n        * `customFields`: A JSON object containing the custom fields you want to set.\\n    * The response will include the status of the request.\\n\\n**Example:**\\n\\n```\\n// Import the  API client library.\\nconst  = require('\''api-client'\'');\\n\\n// Create a new API client.\\nconst client = new ({\\n  key: '\''YOUR_API_KEY'\'',\\n  secret: '\''YOUR_API_SECRET'\''\\n});\\n\\n// Check the SIM status.\\nclient.devices.actions.checkSimStatus({\\n  iccid: '\''YOUR_ICCID'\''\\n}).then((response) => {\\n  console.log(response.data);\\n});\\n\\n// Activate the SIM.\\nclient.devices.actions.activate({\\n  iccid: '\''YOUR_ICCID'\'',\\n  sku: '\''YOUR_SKU'\''\\n}).then((response) => {\\n  console.log(response.data);\\n});\\n\\n// Set custom fields.\\nclient.devices.actions.setCustomFields({\\n  iccid: '\''YOUR_ICCID'\'',\\n  customFields: {\\n    '\''my-custom-field'\'': '\''my-custom-value'\''\\n  }\\n}).then((response) => {\\n  console.log(response.data);\\n});\\n```\\n\\n**Note:**\\n\\n* You can find more information about the API in the documentation: https://www.het.com/business/support/api-developer-center/\"},{\"Role\":\"user\",\"Content\":\"how to check if a SIM is active or not and then activate the SIM with ICCID and SKU and set custom fields\"},{\"Role\":\"assistant\",\"Content\":\"```csharp  \\nusing System;\\nusing System.Collections.Generic;\\nusing System.Threading.Tasks;\\nusing Standard.Controllers;\\nusing Standard.Exceptions;\\nusing Standard.Http.Response;\\nusing Standard.Models;\\n\\nnamespace Testing\\n{\\n    public class Program\\n    {\\n        public static async Task Main()\\n        {\\n             client = new Client.Builder()\\n                .VZM2mToken(\\\"VZ-M2M-Token\\\")\\n                .Build();\\n\\n            DeviceManagementController deviceManagementController = client.DeviceManagementController;\\n\\n            // Check SIM status\\n            CheckSimStatusRequest checkSimStatusRequest = new CheckSimStatusRequest\\n            {\\n                Iccid = \\\"YOUR_ICCID\\\"\\n            };\\n\\n            try\\n            {\\n                ApiResponse<CheckSimStatusResponse> checkSimStatusResponse = await deviceManagementController.CheckSimStatusAsync(checkSimStatusRequest);\\n                Console.WriteLine($\\\"SIM status: {checkSimStatusResponse.Data.Status}\\\");\\n            }\\n            catch (ApiException e)\\n            {\\n                // Handle exception\\n                Console.WriteLine(e.Message);\\n            }\\n\\n            // Activate SIM\\n            if (checkSimStatusResponse.Data.Status != \\\"ACTIVE\\\")\\n            {\\n                ActivateSimRequest activateSimRequest = new ActivateSimRequest\\n                {\\n                    Iccid = \\\"YOUR_ICCID\\\",\\n                    Sku = \\\"YOUR_SKU\\\"\\n                };\\n\\n                try\\n                {\\n                    ApiResponse<RequestResponse> activateSimResponse = await deviceManagementController.ActivateSimAsync(activateSimRequest);\\n                    Console.WriteLine($\\\"SIM activation status: {activateSimResponse.Data.Status}\\\");\\n                }\\n                catch (ApiException e)\\n                {\\n                    // Handle exception\\n                    Console.WriteLine(e.Message);\\n                }\\n            }\\n\\n            // Set custom fields\\n            SetCustomFieldsRequest setCustomFieldsRequest = new SetCustomFieldsRequest\\n            {\\n                Iccid = \\\"YOUR_ICCID\\\",\\n                CustomFields = new Dictionary<string, string>\\n                {\\n                    { \\\"my-custom-field\\\", \\\"my-custom-value\\\" }\\n                }\\n            };\\n\\n            try\\n            {\\n                ApiResponse<RequestResponse> setCustomFieldsResponse = await deviceManagementController.SetCustomFieldsAsync(setCustomFieldsRequest);\\n                Console.WriteLine($\\\"Custom fields set status: {setCustomFieldsResponse.Data.Status}\\\");\\n            }\\n            catch (ApiException e)\\n            {\\n                // Handle exception\\n                Console.WriteLine(e.Message);\\n            }\\n        }\\n    }\\n}  \\n```\\n\\n**Explanation:**\\n\\n1. Import the necessary libraries.\\n2. Create a `Client` object.\\n3. Use the `DeviceManagementController` to:\\n    * Check the SIM status using the `CheckSimStatusAsync` method.\\n    * Activate the SIM using the `ActivateSimAsync` method.\\n    * Set custom fields using the `SetCustomFieldsAsync` method.\\n4. Handle any exceptions that may occur.\\n\\n**Note:**\\n\\n* Replace `YOUR_ICCID` and `YOUR_SKU` with the actual ICCID and SKU values.\\n* You can find more information about the API in the documentation: https://www.het.com/business/support/api-developer-center/\"},{\"Role\":\"user\",\"Content\":\"how to check if a SIM is active or not and then activate the SIM with ICCID and SKU and set custom fields\"}]}\r\n\r\nConsider conversation history to extract endpoint name for the question. The last message is the newest or recent message\r\nIf the user'\''s question isn'\''t related to achieving a use case using the endpoints in the API below then Say this quote word by word \"Sorry I do not know\"    \r\nQuestion: how to check if a SIM is active or not and then activate the SIM with ICCID and SKU and set custom fields\r\nEndpoint Names and Descriptions: {\"Endpoints\":[{\"Name\":\"ListMECPlatforms\",\"Description\":\"Returns a list of optimal MEC Platforms where you can register your deployed application. **Note:** If a query is sent with all of the parameters, it will fail with a \\\"400\\\" error. You can search based on the following parameter combinations - region plus Service Profile ID and subscriber density (density is optional but recommended), region plus UEIdentity(Including UEIdentity Type) or Service Profile ID plus UEIdentity(Including UEIdentity Type).\"},{\"Name\":\"ListRegions\",\"Description\":\"List the geographical regions available, based on the user'\''s bearer token. **Note:** Country code, Metropolitan area, Area and Zone are future functionality and will currently return a \\\"null\\\" value.\"},{\"Name\":\"ListOptimalServiceEndpoints\",\"Description\":\"Returns a list of optimal Service Endpoints that client devices can connect to. **Note:** If a query is sent with all of the parameters, it will fail with a \\\"400\\\" error. You can search based on the following parameter combinations - Region plus Service Endpoints IDs and Subscriber density (density is optional but recommended), Region plus Service Endpoints IDs and UEIdentity(Including UEIdentity Type) and Service Endpoints IDs plus UEIdentity(Including UEIdentity Type).\"},{\"Name\":\"RegisterServiceEndpoints\",\"Description\":\"Register Service Endpoints of a deployed application to specified MEC Platforms.\"},{\"Name\":\"ListAllServiceEndpoints\",\"Description\":\"Returns a list of all registered service endpoints.\"},{\"Name\":\"GetServiceEndpoint\",\"Description\":\"Returns endpoint information for all Service Endpoints registered to a specified serviceEndpointId.\"},{\"Name\":\"UpdateServiceEndpoint\",\"Description\":\"Update registered Service Endpoint information.\"},{\"Name\":\"DeregisterServiceEndpoint\",\"Description\":\"Deregister an application'\''s Service Endpoint from the MEC Platform(s).\"},{\"Name\":\"CreateServiceProfile\",\"Description\":\"Creates a service profile that describes the resource requirements of a service.\"},{\"Name\":\"ListServiceProfiles\",\"Description\":\"List all service profiles registered under your API key.\"},{\"Name\":\"GetServiceProfile\",\"Description\":\"Returns a specified service profile.\"},{\"Name\":\"UpdateServiceProfile\",\"Description\":\"Update the definition of a Service Profile.\"},{\"Name\":\"DeleteServiceProfile\",\"Description\":\"Delete Service Profile based on unique service profile ID.\"},{\"Name\":\"ActivateServiceForDevices\",\"Description\":\"If the devices do not already exist in the account, this API resource adds them before activation.\"},{\"Name\":\"AddDevices\",\"Description\":\"Use this API if you want to manage some device settings before you are ready to activate service for the devices.\"},{\"Name\":\"UpdateDevicesContactInformation\",\"Description\":\"Sends a CarrierService callback message for each device in the request when the contact information has been changed, or if there was a problem and the change could not be completed.\"},{\"Name\":\"UpdateDevicesCustomFields\",\"Description\":\"Sends a CarrierService callback message for each device in the request when the custom fields have been changed, or if there was a problem and the change could not be completed.\"},{\"Name\":\"DeactivateServiceForDevices\",\"Description\":\"Deactivating service for a device may result in an early termination fee (ETF) being charged to the account, depending on the terms of the contract with. If your contract allows ETF waivers and if you want to use one for a particular deactivation, set the etfWaiver value to True.\"},{\"Name\":\"DeleteDeactivatedDevices\",\"Description\":\"Use this API to remove unneeded devices from an account.\"},{\"Name\":\"ListDevicesInformation\",\"Description\":\"Returns information about a single device or information about all devices that match the given parameters. Returned information includes device provisioning state, service plan, MDN, MIN, and IP address.\"},{\"Name\":\"ListDevicesWithImeiIccidMismatch\",\"Description\":\"Returns a list of all 4G devices with an ICCID (SIM) that was not activated with the expected IMEI (hardware) during a specified time frame.\"},{\"Name\":\"MoveDevicesWithinAccountsOfProfile\",\"Description\":\"Move active devices from one billing account to another within a customer profile.\"},{\"Name\":\"UpdateDevicesState\",\"Description\":\"Changes the provisioning state of one or more devices to a specified customer-defined service and state.\"},{\"Name\":\"ChangeDevicesServicePlan\",\"Description\":\"Changes the service plan for one or more devices.\"},{\"Name\":\"SuspendServiceForDevices\",\"Description\":\"Suspends service for one or more devices.\"},{\"Name\":\"RestoreServiceForSuspendedDevices\",\"Description\":\"Restores service to one or more suspended devices.\"},{\"Name\":\"CheckDevicesAvailabilityForActivation\",\"Description\":\"Checks whether specified devices are registered by the manufacturer with the network and are available to be activated.\"},{\"Name\":\"RetrieveDeviceConnectionHistory\",\"Description\":\"Each response includes a maximum of 500 records. To obtain more records, you can call the API multiple times, adjusting the earliest value each time to start where the previous request finished.\"},{\"Name\":\"UpdateDevicesCostCenterCode\",\"Description\":\"Changes or removes the CostCenterCode value or customer name and address (Primary Place of Use) for one or more devices.\"},{\"Name\":\"GetDeviceExtendedDiagnosticInformation\",\"Description\":\"Returns extended diagnostic information about a specified device, including connectivity, provisioning, billing and location status.\"},{\"Name\":\"ListDevicesProvisioningHistory\",\"Description\":\"Returns the provisioning history of a specified device during a specified time period.\"},{\"Name\":\"ListCurrentDevicesPRLVersion\",\"Description\":\"4G and GSM devices do not have a PRL.\"},{\"Name\":\"GetDeviceServiceSuspensionStatus\",\"Description\":\"Returns DeviceSuspensionStatus callback messages containing the current device state and information on how many days a device has been suspended and can continue to be suspended.\"},{\"Name\":\"ListDevicesUsageHistory\",\"Description\":\"Returns the network data usage history of a device during a specified time period.\"},{\"Name\":\"RetrieveAggregateDeviceUsageHistory\",\"Description\":\"The information is returned in a callback response, so you must register a URL for DeviceUsage callback messages using the POST /callbacks API.\"},{\"Name\":\"UpdateDeviceId\",\"Description\":\"Changes the identifier of a 3G or 4G device to match hardware changes made for a line of service. Use this request to transfer the line of service and the MDN to new hardware, or to change the MDN.\"},{\"Name\":\"DeviceUpload\",\"Description\":\"This corresponds to the M2M-MC SOAP interface, ```DeviceUploadService```.\"},{\"Name\":\"BilledUsageInfo\",\"Description\":\"Gets billed usage for for either multiple devices or an entire billing account.\"},{\"Name\":\"UsageSegmentationLabelAssociation\",\"Description\":\"Allows you to associate your own usage segmentation label with a device.\"},{\"Name\":\"UsageSegmentationLabelDeletion\",\"Description\":\"Allow customers to remove the associated label from a device.\"},{\"Name\":\"ActivationOrderStatus\",\"Description\":\"Uploads and activates device identifiers and SKUs for new devices from OEMs to.\"},{\"Name\":\"UploadDeviceIdentifier\",\"Description\":\"Checks the status of an activation order and lists where the order is in the provisioning process.\"},{\"Name\":\"GetAccountInformation\",\"Description\":\"Returns information about a specified account.\"},{\"Name\":\"ListAccountStatesAndServices\",\"Description\":\"Returns a list and details of all custom services and states defined for a specified account.\"},{\"Name\":\"ListAccountLeads\",\"Description\":\"When HTTP status is 202, a URL will be returned in the Location header of the form /leads/{aname}?next={token}. This URL can be used to request the next set of leads.\"},{\"Name\":\"CreateDeviceGroup\",\"Description\":\"Create a new device group and optionally add devices to the group. Device groups can make it easier to manage similar devices and to get reports on their usage.\"},{\"Name\":\"List Device Groups\",\"Description\":\"Returns a list of all device groups in a specified account.\"},{\"Name\":\"GetDeviceGroupInformation\",\"Description\":\"When HTTP status is 202, a URL will be returned in the Location header of the form /groups/{aname}/name/{gname}/?next={token}. This URL can be used to request the next set of groups.\"},{\"Name\":\"UpdateDeviceGroup\",\"Description\":\"Make changes to a device group, including changing the name and description, and adding or removing devices.\"},{\"Name\":\"DeleteDeviceGroup\",\"Description\":\"Deletes a device group from the account. Devices in the group are moved to the default device group and are not deleted from the account.\"},{\"Name\":\"Send SMS To Device\",\"Description\":\"The messages are queued on the ThingSpace Platform and sent as soon as possible, but they may be delayed due to traffic and routing considerations.\"},{\"Name\":\"List Devices SMS Messages\",\"Description\":\"When HTTP status is 202, a URL will be returned in the Location header of the form /sms/{aname}/history?next={token}. This URL can be used to request the next set of messages.\"},{\"Name\":\"StartQueuedSMSDelivery\",\"Description\":\"Tells the ThingSpace Platform to start sending mobile-originated SMS messages through the EnhancedConnectivityService callback service. SMS messages from devices are queued until they are retrieved by your application, either by callback or synchronously with GET /sms/{accountName}/history.\"},{\"Name\":\"StartConnectivityManagementSession\",\"Description\":\"Initiates a Connectivity Management session and returns a VZ-M2M session token that is required in subsequent API requests.\"},{\"Name\":\"EndConnectivityManagementSession\",\"Description\":\"Ends a Connectivity Management session.\"},{\"Name\":\"ResetConnectivityManagementPassword\",\"Description\":\"The new password is effective immediately. Passwords do not expire, but recommends changing your password every 90 days.\"},{\"Name\":\"ListRegisteredCallbacks\",\"Description\":\"Returns the name and endpoint URL of the callback listening services registered for a given account.\"},{\"Name\":\"RegisterCallback\",\"Description\":\"You are responsible for creating and running a listening process on your server at that URL.\"},{\"Name\":\"DeregisterCallback\",\"Description\":\"Stops ThingSpace from sending callback messages for the specified account and service.\"},{\"Name\":\"GetCurrentAsynchronousRequestStatus\",\"Description\":\"Returns the current status of an asynchronous request that was made for a single device.\"},{\"Name\":\"ListAccountServicePlans\",\"Description\":\"Returns a list of all data service plans that are associated with a specified billing account. When you send a request to /devices/actions/activate to activate a line of service you must specify the code for one of the service plans associated with your account.\"},{\"Name\":\"DeviceReachabilityStatusUsingPOST\",\"Description\":\"If the devices do not already exist in the account, this API resource adds them before activation.\"},{\"Name\":\"RetrieveActiveMonitorsUsingPOST\",\"Description\":\"Retrieve all the active monitors.\"},{\"Name\":\"ActivateDeviceThroughProfile\",\"Description\":\"Uses the profile to bring the device under management.\"},{\"Name\":\"ProfileToActivateDevice\",\"Description\":\"Uses the profile to activate the device.\"},{\"Name\":\"ProfileToDeactivateDevice\",\"Description\":\"Uses the profile to deactivate the device.\"},{\"Name\":\"ProfileToSetFallbackAttribute\",\"Description\":\"Allows the profile to set the fallback attribute to the device.\"},{\"Name\":\"DeviceReachability\",\"Description\":\"\"},{\"Name\":\"StopDeviceReachability\",\"Description\":\"\"},{\"Name\":\"DownloadLocalProfileToEnable\",\"Description\":\"Downloads an eUICC local profile to devices and enables the profile.\"},{\"Name\":\"DownloadLocalProfileToDisable\",\"Description\":\"Downloads an eUICC local profile to devices and leaves the profile disabled.\"},{\"Name\":\"EnableLocalProfile\",\"Description\":\"Enable a local profile that has been downloaded to eUICC devices.\"},{\"Name\":\"DisableLocalProfile\",\"Description\":\"Disable a local profile on eUICC devices. The default or boot profile will become the enabled profile.\"},{\"Name\":\"DeleteLocalProfile\",\"Description\":\"Delete a local profile from eUICC devices. If the local profile is enabled, it will first be disabled and the boot or default profile will be enabled.\"},{\"Name\":\"ListDevicesLocationsSynchronous\",\"Description\":\"This locations endpoint retrieves the locations for a list of devices.\"},{\"Name\":\"ListDevicesLocationsAsynchronous\",\"Description\":\"Requests the current or cached location of up to 10,000 IoT or consumer devices (phones, tablets. etc.). This request returns a synchronous transaction ID, and the location information for each device is returned asynchronously as a DeviceLocation callback message.\"},{\"Name\":\"CancelDeviceLocationRequest\",\"Description\":\"Cancel a queued or unfinished device location request.\"},{\"Name\":\"CreateLocationReport\",\"Description\":\"Request an asynchronous device location report.\"},{\"Name\":\"RetrieveLocationReport\",\"Description\":\"Download a completed asynchronous device location report.\"},{\"Name\":\"GetLocationReportStatus\",\"Description\":\"Returns the current status of a requested device location report.\"},{\"Name\":\"CancelQueuedLocationReportGeneration\",\"Description\":\"Cancel a queued device location report.\"},{\"Name\":\"ExcludeDevices\",\"Description\":\"This consents endpoint sets a new exclusion list.\"},{\"Name\":\"RemoveDevicesFromExclusionList\",\"Description\":\"Removes devices from the exclusion list so that they can be located with Device Location Services requests.\"},{\"Name\":\"ListExcludedDevices\",\"Description\":\"This consents endpoint retrieves a list of excluded devices in an account.\"},{\"Name\":\"GetLocationServiceSubscriptionStatus\",\"Description\":\"This subscriptions endpoint retrieves an account'\''s current location subscription status.\"},{\"Name\":\"GetLocationServiceUsage\",\"Description\":\"This endpoint allows user to search for billable usage for accounts based on the provided date range.\"},{\"Name\":\"ListRegisteredCallbacks\",\"Description\":\"Returns a list of all registered callback URLs for the account.\"},{\"Name\":\"RegisterCallback\",\"Description\":\"Provide a URL to receive messages from a ThingSpace callback service.\"},{\"Name\":\"DeregisterCallback\",\"Description\":\"Deregister a URL to stop receiving callback messages.\"},{\"Name\":\"CreateNewTrigger\",\"Description\":\"Create a new usage trigger, which will send an alert when the number of device location service transactions reaches a specified percentage of the monthly subscription amount.\\n\"},{\"Name\":\"UpdateTrigger\",\"Description\":\"Update an existing usage trigger\\n\"},{\"Name\":\"DeleteTrigger\",\"Description\":\"eletes the specified usage trigger from the given account\"},{\"Name\":\"AddAccount\",\"Description\":\"This endpoint allows user to add managed accounts to a primary account.\\n\"},{\"Name\":\"ManagedAccountAction\",\"Description\":\"Activates a managed billing service relationship between a managed account and the primary account.\"},{\"Name\":\"CancelManagedAccountAction\",\"Description\":\"Deactivates a managed billing service relationship between a managed account and the primary account. \"},{\"Name\":\"ListManagedAccount\",\"Description\":\"This endpoint allows user to retrieve the list of all accounts managed by a primary account.\"},{\"Name\":\"GetAccountSubscriptionStatus\",\"Description\":\"This subscriptions endpoint retrieves an account'\''s current Software Management Service subscription status.\"},{\"Name\":\"GetAccountLicenseStatus\",\"Description\":\"Returns information about an account'\''s Software Management Services licenses and a list of licensed devices.\"},{\"Name\":\"AssignLicensesToDevices\",\"Description\":\"Assigns licenses to a specified list of devices so that firmware upgrades can be scheduled for those devices.\"},{\"Name\":\"RemoveLicensesFromDevices\",\"Description\":\"Remove unused licenses from device.\"},{\"Name\":\"CreateListOfLicensesToRemove\",\"Description\":\"Creates a list of devices from which licenses will be removed if the number of MRC licenses becomes less than the number of assigned licenses.\"},{\"Name\":\"DeleteListOfLicensesToRemove\",\"Description\":\"Deletes the entire list of cancellation candidate devices.\"},{\"Name\":\"ListLicensesToRemove\",\"Description\":\"Returns a list of devices from which licenses will be removed if the number of MRC licenses becomes less than the number of assigned licenses.\"},{\"Name\":\"ListAvailableFirmware\",\"Description\":\"Lists all device firmware images available for an account, based on the devices registered to that account.\"},{\"Name\":\"ScheduleFirmwareUpgrade\",\"Description\":\"Schedules a firmware upgrade for devices.\"},{\"Name\":\"ListFirmwareUpgradeDetails\",\"Description\":\"Returns information about a specified upgrade, include the target date of the upgrade, the list of devices in the upgrade, and the status of the upgrade for each device.\"},{\"Name\":\"UpdateFirmwareUpgradeDevices\",\"Description\":\"Add or remove devices from a scheduled upgrade.\"},{\"Name\":\"CancelScheduledFirmwareUpgrade\",\"Description\":\"Cancel a scheduled firmware upgrade.\"},{\"Name\":\"ListRegisteredCallbacks\",\"Description\":\"Returns the name and endpoint URL of the callback listening services registered for a given account.\"},{\"Name\":\"RegisterCallback\",\"Description\":\"Registers a URL to receive RESTful messages from a callback service when new firmware versions are available and when upgrades start and finish.\"},{\"Name\":\"DeregisterCallback\",\"Description\":\"Deregisters the callback endpoint and stops ThingSpace from sending FOTA callback messages for the specified account.\"},{\"Name\":\"ListAccountDevices\",\"Description\":\"Returns an array of all devices in the specified account. Each device object includes information needed for managing firmware, including the device make and model, MDN and IMEI, and current firmware version.\"},{\"Name\":\"ListUpgradesForSpecifiedStatus\",\"Description\":\"Returns a list of all upgrades with a specified status.\"},{\"Name\":\"GetDeviceFirmwareUpgradeHistory\",\"Description\":\"Returns the upgrade history of the specified device from the previous six months.\"},{\"Name\":\"GetAccountSubscriptionStatus\",\"Description\":\"This endpoint retrieves a FOTA subscription by account.\"},{\"Name\":\"GetAccountLicenseStatus\",\"Description\":\"The endpoint allows user to list license usage.\"},{\"Name\":\"AssignLicensesToDevices\",\"Description\":\"This endpoint allows user to assign licenses to a list of devices.\"},{\"Name\":\"RemoveLicensesFromDevices\",\"Description\":\"This endpoint allows user to remove licenses from a list of devices.\"},{\"Name\":\"ListLicensesToRemove\",\"Description\":\"The license cancel endpoint allows user to list registered license cancellation candidate devices.\"},{\"Name\":\"CreateListOfLicensesToRemove\",\"Description\":\"The license cancel endpoint allows user to create a list of license cancellation candidate devices.\"},{\"Name\":\"DeleteListOfLicensesToRemove\",\"Description\":\"This endpoint allows user to delete a created cancel candidate device list.\"},{\"Name\":\"ScheduleCampaignFirmwareUpgrade\",\"Description\":\"This endpoint allows user to schedule a software upgrade.\"},{\"Name\":\"GetCampaignInformation\",\"Description\":\"This endpoint allows user to get information of a software upgrade.\"},{\"Name\":\"UpdateCampaignFirmwareDevices\",\"Description\":\"This endpoint allows user to Add or Remove devices to an existing software upgrade.\"},{\"Name\":\"CancelCampaign\",\"Description\":\"This endpoint allows user to cancel software upgrade. A software upgrade already started can not be cancelled.\"},{\"Name\":\"UpdateCampaignDates\",\"Description\":\"This endpoint allows user to change campaign dates and time windows. Fields which need to remain unchanged should be also provided.\"},{\"Name\":\"ScheduleFileUpgrade\",\"Description\":\"You can upload configuration files and schedule them in a campaign to devices.\"},{\"Name\":\"ScheduleSWUpgradeHttpDevices\",\"Description\":\"Campaign time windows for downloading and installing software are available as long as the device OEM supports this.\"},{\"Name\":\"ListRegisteredCallbacks\",\"Description\":\"This endpoint allows user to get the registered callback information.\"},{\"Name\":\"UpdateCallback\",\"Description\":\"This endpoint allows user to update the HTTPS callback address.\"},{\"Name\":\"RegisterCallback\",\"Description\":\"This endpoint allows user to create the HTTPS callback address.\"},{\"Name\":\"DeregisterCallback\",\"Description\":\"This endpoint allows user to delete a previously registered callback URL.\"},{\"Name\":\"ListAvailableSoftware\",\"Description\":\"This endpoint allows user to list a certain type of software of an account.\"},{\"Name\":\"ListAccountDevices\",\"Description\":\"The device endpoint gets devices information of an account.\"},{\"Name\":\"GetDeviceFirmwareUpgradeHistory\",\"Description\":\"The endpoint allows user to get software upgrade history of a device based on device IMEI.\"},{\"Name\":\"GetCampaignHistoryByStatus\",\"Description\":\"The report endpoint allows user to get campaign history of an account for specified status.\"},{\"Name\":\"GetCampaignDeviceStatus\",\"Description\":\"The report endpoint allows user to get the full list of device of a campaign.\"},{\"Name\":\"ListDevicesWithLoggingEnabled\",\"Description\":\"Returns an array of all devices in the specified account for which logging is enabled.\"},{\"Name\":\"EnableLoggingForDevices\",\"Description\":\"Each customer may have a maximum of 20 devices enabled for logging.\"},{\"Name\":\"DisableLoggingForDevices\",\"Description\":\"Turn logging off for a list of devices.\"},{\"Name\":\"EnableDeviceLogging\",\"Description\":\"Enables logging for a specific device.\"},{\"Name\":\"DisableDeviceLogging\",\"Description\":\"Disables logging for a specific device.\"},{\"Name\":\"ListDeviceLogs\",\"Description\":\"Gets logs for a specific device.\"},{\"Name\":\"GetDeviceCheckInHistory\",\"Description\":\"Check-in history can be retrieved for any device belonging to the account, not necessarily with logging enabled.\"},{\"Name\":\"GetListOfFiles\",\"Description\":\"You can retrieve a list of configuration or supplementary of files for an account.\"},{\"Name\":\"UploadConfigFile\",\"Description\":\"Uploads a configuration/supplementary file for an account. ThingSpace generates a fileName after the upload and is returned in the response.\"},{\"Name\":\"GetAccountSubscriptionStatus\",\"Description\":\"This endpoint retrieves a FOTA subscription by account.\"},{\"Name\":\"GetAccountLicensesStatus\",\"Description\":\"The endpoint allows user to list license usage.\"},{\"Name\":\"AssignLicensesToDevices\",\"Description\":\"This endpoint allows user to assign licenses to a list of devices.\"},{\"Name\":\"RemoveLicensesFromDevices\",\"Description\":\"This endpoint allows user to remove licenses from a list of devices.\"},{\"Name\":\"ScheduleCampaignFirmwareUpgrade\",\"Description\":\"This endpoint allows a user to schedule a firmware upgrade for a list of devices.\"},{\"Name\":\"UpdateCampaignFirmwareDevices\",\"Description\":\"This endpoint allows user to Add or Remove devices to an existing campaign.\"},{\"Name\":\"UpdateCampaignDates\",\"Description\":\"This endpoint allows user to change campaign dates and time windows. Fields which need to remain unchanged should be also provided.\"},{\"Name\":\"GetCampaignInformation\",\"Description\":\"This endpoint allows the user to retrieve campaign level information for a specified campaign.\"},{\"Name\":\"CancelCampaign\",\"Description\":\"This endpoint allows user to cancel a firmware campaign. A firmware campaign already started can not be cancelled.\"},{\"Name\":\"GetCampaignHistoryByStatus\",\"Description\":\"Retrieve a list of campaigns for an account that have a specified campaign status.\"},{\"Name\":\"GetDeviceFirmwareUpgradeHistory\",\"Description\":\"Retrieve campaign history for a specific device.\"},{\"Name\":\"GetCampaignDeviceStatus\",\"Description\":\"Retrieve a list of all devices in a campaign and the status of each device.\"},{\"Name\":\"ListAvailableFirmware\",\"Description\":\"This endpoint allows user to list the firmware of an account.\"},{\"Name\":\"SynchronizeDeviceFirmware\",\"Description\":\"Synchronize ThingSpace with the FOTA server for up to 100 devices.\"},{\"Name\":\"ReportDeviceFirmware\",\"Description\":\"Ask a device to report its firmware version asynchronously.\"},{\"Name\":\"GetAccountDeviceInformation\",\"Description\":\"Retrieve account device information such as reported firmware on the devices.\"},{\"Name\":\"ListAccountDevicesInformation\",\"Description\":\"Retrieve device information for a list of devices on an account.\"},{\"Name\":\"ListRegisteredCallbacks\",\"Description\":\"This endpoint allows user to get the registered callback information.\"},{\"Name\":\"UpdateCallback\",\"Description\":\"This endpoint allows the user to update the HTTPS callback address.\"},{\"Name\":\"RegisterCallback\",\"Description\":\"This endpoint allows the user to create the HTTPS callback address.\"},{\"Name\":\"DeregisterCallback\",\"Description\":\"This endpoint allows user to delete a previously registered callback URL.\"},{\"Name\":\"AssignLicenseToDevices\",\"Description\":\"Assigns SIM-Secure for IoT licenses to SIMs.\"},{\"Name\":\"UnassignLicenseToDevices\",\"Description\":\"Unassigns SIM-Secure for IoT Flexible and Flexible Bundle license from SIMs.\"},{\"Name\":\"ListAccountSubscriptions\",\"Description\":\"Retrieves the total number of SIM-Secure for IoT subscription licenses purchased for your account by license type, and lists the number of licenses assigned and available for each license type.\"},{\"Name\":\"QueryMECPerformanceMetrics\",\"Description\":\"Query the most recent data for Key Performance Indicators (KPIs) like network availability, MEC hostnames and more.\"},{\"Name\":\"GetDiagnosticsSubscription\",\"Description\":\"This endpoint retrieves a diagnostics subscription by account.\"},{\"Name\":\"StartDiagnosticsObservation\",\"Description\":\"This endpoint allows the user to start or change observe diagnostics.\"},{\"Name\":\"StopDiagnosticsObservation\",\"Description\":\"This endpoint allows the user to stop or reset observe diagnostics.\"},{\"Name\":\"GetDiagnosticsHistory\",\"Description\":\"This endpoint allows the user to get the history data.\"},{\"Name\":\"ListDiagnosticsSettings\",\"Description\":\"This endpoint retrieves diagnostics settings synchronously.\"},{\"Name\":\"GetDiagnosticsSubscriptionCallbackInfo\",\"Description\":\"This endpoint allows user to get the registered callback information of an existing diagnostics subscription.\"},{\"Name\":\"RegisterDiagnosticsCallbackURL\",\"Description\":\"This endpoint allows user update the callback HTTPS address of an existing diagnostics subscription.\"},{\"Name\":\"UnregisterDiagnosticsCallback\",\"Description\":\"This endpoint allows user to delete a registered callback URL and credential.\"},{\"Name\":\"DecivesRestart\",\"Description\":\"Performs a device reboot or a factory reset on the modem portion of the device.\"},{\"Name\":\"QueryTarget\",\"Description\":\"Search for targets by property values. Returns an array of all matching target resources.\"},{\"Name\":\"DeleteTarget\",\"Description\":\"Remove a target from a ThingSpace account.\"},{\"Name\":\"CreateTarget\",\"Description\":\"Define a target to receive data streams, alerts, or callbacks. After creating the target resource, use its ID in a subscription to set up a data stream.\"},{\"Name\":\"GenerateTargetExternalID\",\"Description\":\"Create a unique string that ThingSpace will pass to AWS for increased security.\"},{\"Name\":\"CreateAzureCentralIoTApplication\",\"Description\":\"Deploy a new Azure IoT Central application based on the ARM template within the specified Azure Active Directory account.\"},{\"Name\":\"CreateSubscription\",\"Description\":\"Create a subscription to define a streaming channel that sends data from devices in the account to an endpoint defined in a target resource.\"},{\"Name\":\"QuerySubscription\",\"Description\":\"Search for subscriptions by property values. Returns an array of all matching subscription resources.\"},{\"Name\":\"DeleteSubscription\",\"Description\":\"Remove a subscription from a ThingSpace account.\"},{\"Name\":\"UpdateDevicesConfigurationValue\",\"Description\":\"Change configuration values on a device, such as setting how often a device records and reports sensor readings.\"},{\"Name\":\"FindDeviceByPropertyValues\",\"Description\":\"Find devices by property values. Returns an array of all matching device resources.\"},{\"Name\":\"SearchDevicesResourcesByPropertyValues\",\"Description\":\"Search for devices by property values. Returns an array of all matching device resources.\"},{\"Name\":\"SearchDeviceEventHistory\",\"Description\":\"Search device event history to find events that match criteria.Sensor readings, configuration changes, and other device data are all stored as events.\"},{\"Name\":\"SearchSensorReadings\",\"Description\":\"Returns the readings of a specified sensor, with the most recent reading first. Sensor readings are stored as events; this request an array of events.\"},{\"Name\":\"DeleteDeviceFromAccount\",\"Description\":\"Remove a device from a ThingSpace account.\"},{\"Name\":\"GetDeviceHyperPreciseStatus\",\"Description\":\"Gets the list of a status for hyper-precise location devices.\"},{\"Name\":\"UpdateDeviceHyperPreciseStatus\",\"Description\":\"Enable/disable hyper-precise service for a device.\"},{\"Name\":\"CalculateAggregatedReportSynchronous\",\"Description\":\"Calculate aggregated report per day with number of sessions and usage information. User will receive synchronous response for specified list of devices (Max 10) and date range (Max 180 days).\"},{\"Name\":\"CalculateAggregatedReportAsynchronous\",\"Description\":\"Calculate aggregated report per day with number of sessions and usage information. User will receive an asynchronous callback for the specified list of devices (Max 10000) and date range (Max 180 days).\"},{\"Name\":\"GetSessionsReport\",\"Description\":\"Detailed report of session duration and number of bytes transferred per day.\"},{\"Name\":\"ListRegisteredCallbacks\",\"Description\":\"Find registered callback listener for account by account number.\"},{\"Name\":\"RegisterCallback\",\"Description\":\"Registers a URL at which an account receives asynchronous responses and other messages from a ThingSpace Platform callback service. The messages are REST messages. You are responsible for creating and running a listening process on your server at that URL to receive and parse the messages.\"},{\"Name\":\"DeregisterCallback\",\"Description\":\"Stops ThingSpace from sending callback messages for the specified account and listener name.\"},{\"Name\":\"ActivateAnomalyDetection\",\"Description\":\"Uses the subscribed account ID to activate anomaly detection and set threshold values.\"},{\"Name\":\"ListAnomalyDetectionSettings\",\"Description\":\"Retrieves the current anomaly detection settings for an account.\"},{\"Name\":\"ResetAnomalyDetectionParameters\",\"Description\":\"Resets the thresholds to zero.\"},{\"Name\":\"ListAnomalyDetectionTriggers\",\"Description\":\"This corresponds to the M2M-MC SOAP interface, ```GetTriggers```.\"},{\"Name\":\"UpdateAnomalyDetectionTrigger\",\"Description\":\"This corresponds to the M2M-MC SOAP interface, ```UpdateTriggerRequest```.\"},{\"Name\":\"CreateAnomalyDetectionTrigger\",\"Description\":\"This corresponds to the M2M-MC SOAP interface, ```CreateTrigger```.\"},{\"Name\":\"ListAnomalyDetectionTriggerSettings\",\"Description\":\"This corresponds to the M2M-MC SOAP interface, ```GetTriggers```.\"},{\"Name\":\"DeleteAnomalyDetectionTrigger\",\"Description\":\"Deletes a specific trigger ID\"},{\"Name\":\"CreateAnomalyDetectionTriggerV2\",\"Description\":\"Creates the trigger to identify an anomaly.\"},{\"Name\":\"UpdateAnomalyDetectionTriggerV2\",\"Description\":\"Updates an existing trigger using the account name.\"},{\"Name\":\"ListAnomalyDetectionTriggerSettingsV2\",\"Description\":\"Retrieves the values for a specific trigger ID.\"},{\"Name\":\"NearRealTimeNetworkConditions\",\"Description\":\"WNP Query for current network condition.\"},{\"Name\":\"Domestic4GAnd5GNationwideNetworkCoverage\",\"Description\":\"Run a report to determine network types available and available coverage. Network types covered include: CAT-M, NB-IOT, LTE, LTE-AWS and 5GNW.\"},{\"Name\":\"SiteProximity\",\"Description\":\"Identify the direction and general distance of nearby cell sites and the technology supported by the equipment.\"},{\"Name\":\"DeviceExperience30daysHistory\",\"Description\":\"A report of a specific device'\''s service scores over a 30 day period.\"},{\"Name\":\"DeviceExperienceBulkLatest\",\"Description\":\"Run a report to view the latest device experience score for specific devices.\"},{\"Name\":\"Domestic4GAnd5GFixedWirelessQualification\",\"Description\":\"Use this query for Fixed Wireless Qualification of an address. Network types include: LTE, C-BAND and MMWAVE.\"},{\"Name\":\"ActivateADeviceProfile\",\"Description\":\"Activate a device with either a lead or local profile.\"},{\"Name\":\"EnableADeviceProfile\",\"Description\":\"Enable a device lead or local profile.\"},{\"Name\":\"DeactivateADeviceProfile\",\"Description\":\"Deactivate the lead or local profile. **Note:** to reactivate the profile, use the **Activate** endpoint above.\"},{\"Name\":\"EnableADeviceProfileForDownload\",\"Description\":\"Enable the Global IoT Orchestration device profile for download.\"},{\"Name\":\"DownloadADeviceProfile\",\"Description\":\"Download a Global IoT Orchestration device profile.\"},{\"Name\":\"DeleteADeviceProfile\",\"Description\":\"Delete a device profile for Global IoT Orchestration. **Note:** the profile must be deactivated first!\"},{\"Name\":\"SendAnSmsMessage\",\"Description\":\"Sends an SMS message to one device. Messages are queued on the M2M MC Platform and sent as soon as possible, but they may be delayed due to traffic and routing considerations.\"},{\"Name\":\"GetSmsMessages\",\"Description\":\"Retrieves queued SMS messages sent by all M2M MC devices associated with an account.\"},{\"Name\":\"StartSmsMessageDelivery\",\"Description\":\"Starts delivery of SMS messages for the specified account.\"},{\"Name\":\"ListSmsMessageHistory\",\"Description\":\"Returns a list of sms history for a given device during a specified time frame.\"},{\"Name\":\"RetrieveTheGlobalDeviceList\",\"Description\":\"Allows the profile to fetch the complete device list. This works with US and Global profiles.\"},{\"Name\":\"RetrieveDeviceProvisioningHistory\",\"Description\":\"Retreive the provisioning history of a specific device or devices.\"},{\"Name\":\"GetAsynchronousRequestStatus\",\"Description\":\"Get the status of an asynchronous request made with the Device Actions.\"},{\"Name\":\"CreateAThingSpaceQualityOfServiceAPISubscription\",\"Description\":\"Creates a QoS elevation subscription ID and activates the subscription.\"},{\"Name\":\"StopAThingSpaceQualityOfServiceAPISubscription\",\"Description\":\"Stops an active ThingSpace Quality of Service API subscription using the account name and the subscription ID.\"},{\"Name\":\"KPIList\",\"Description\":\"\"},{\"Name\":\"GetProfileList\",\"Description\":\"\"},{\"Name\":\"ChangePmecDeviceState-Activate\",\"Description\":\"\"},{\"Name\":\"ChangePmecDeviceState-BulkDeactivate\",\"Description\":\"\"},{\"Name\":\"ChangePmecDeviceProfile\",\"Description\":\"\"},{\"Name\":\"ChangePmecDeviceIPaddressBulk\",\"Description\":\"\"},{\"Name\":\"GetMECPerformanceConsent\",\"Description\":\"\"}]}"
                }
            ],
            "role": "user"
        }
    ]
}'

@keertk keertk added the component:support How to do xyz? label Feb 8, 2024
@mehnoorsiddiqui
Copy link
Author

@8bitmp3 @keertk Any update on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:support How to do xyz? type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants