recently, IBM Bluemix releases Reserved Virtual Server(SoftLayer_Virtual_ReservedCapacityGroup).
We checked a relative API.
SoftLayer_Virtual_ReservedCapacityGroup
SoftLayer_Virtual_ReservedCapacityGroup_Instance
SoftLayer_Account::getActiveReservedCapacityAgreements
SoftLayer_Virtual_Guest_Status(1009)
And we can't find how to create reserved capacity group.
we are using API(placeorder) for order.
Looking this api, there are containers about each product.
but there is no container about reserved capacity group.
To order a SoftLayer_Virtual_ReservedCapacityGroup you can use the following rest api:
Method: POST
https://[username]:[apiKey]#api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder
Replace the [username] and [apiKey] with your credentials.
Body: Json
{
"parameters":[
{
"complexType":"SoftLayer_Container_Product_Order_Virtual_ReservedCapacity",
"backendRouterId": 11111,
"name": "test",
"packageId":1059,
"prices":[
{
"id":217601,
"categories": [
{
"categoryCode": "reserved_capacity",
"id": 2060,
"name": "Reserved Capacity"
}
],
"item": {
"capacity": "12",
"description": "B1.4x16 (1 Year Term)",
"id": 12293,
"keyName": "B1_4X16_1_YEAR_TERM"
}
}
],
"quantity":1,
"useHourlyPricing": true
}
]
}
Reference:
https://softlayer.github.io/reference/datatypes/SoftLayer_Container_Product_Order_Virtual_ReservedCapacity/
To get the available "backendRouterId" you can use the below rest call:
Method: GET
https://[username]:[apiKey]#api.softlayer.com/rest/v3.1/SoftLayer_Network_Pod/getAllObjects
You will get a response like this example:
{
"backendRouterId": 11111,
"backendRouterName": "bcr01a.dal13",
"datacenterId": 1854895,
"datacenterLongName": "Dallas 13",
"datacenterName": "dal13",
"frontendRouterId": 22222,
"frontendRouterName": "fcr01a.dal13",
"name": "dal13.pod01"
},
I selected the "backendRouterId" for "Dallas 13", you can choose any datacenter that you want.
Reference:
https://softlayer.github.io/reference/services/SoftLayer_Network_Pod/getAllObjects/
To get the item prices ID for "Reserved Capacity" you can use this rest api:
Method: GET
https://[username]:[apiKey]#api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/1059/getItemPrices?objectMask=mask[categories,pricingLocationGroup[locations]]
Keep in mind the item price id that you choose has to be in the same location that the "backendRouterId".
The item prices that do not have locations are standard, it means that are available for all locations.
Reference:
https://softlayer.github.io/reference/services/SoftLayer_Product_Package/getItemPrices/
Related
We are trying to add new Alternate Id to a current Stock Item, when pushing the service body we receive the point back without any error. However, it does not add the additional Cross Reference Item.
{
"InventoryID": {
"value": "APR000195XXX"
},
"CrossReferences": [
{
"AlternateID": {
"value": "19405"
},
"AlternateType": {
"value": "Global"
},
"Description": {
"value": "XXXPUL0001"
},
"Subitem": {
"value": "000000"
},
"VendorOrCustomer": {},
"custom": {},
"files": []
}
]
}
the issue came down to screen rights on roles that were not set
If you want add line Cross-Reference to existing stock Item your request should work.
Just check that you use correct type - "PUT" and correct endpoint:
So, experimenting with Plesk's REST API (available as of version 17.8) for a project at work, and I'm starting to get a feel for it. I've been trying to experiment with adding a domain, but it's been giving me errors when I have to specify the hosting type.
The request body itself is as follows:
{
"name":"example.com",
"hosting_type":"virtual",
"description":"Description goes here"
}
This gets the following cryptic response:
{
"code": 1014,
"message": "htype\/vrt_hst is specified but there is no hosting\/vrt_hst"
}
Per the documentation provided at /api/v2/swagger.yml, any of the following values should be allowed: virtual, standard_forwarding, frame_forwarding, none
No matter what I put in, however, I get a variant of the response above (htype\/{type} is specified but there is no hosting\/{type}).
At this point I'm kind of stuck; I'm not sure what to check, and any references when I try to look up the error code go to references on Plesk's XML API instead. What's the missing link here needed to get the request to work?
It looks like system user is not specified - hosting_settings. Try to add domain with full json request. Here is example:
{
"name": "example.com",
"description": "My website",
"hosting_type": "virtual",
"hosting_settings": {
"ftp_login": "test_login",
"ftp_password": "test_pwd"
},
"base_domain": {
"id": 7,
"name": "a10-52-41-48.qa.plesk.ru",
"guid": "b623e93d-dc72-4102-b5f0-ded427cf0fb1"
},
"parent_domain": {
"id": 7,
"name": "a10-52-41-48.qa.plesk.ru",
"guid": "b623e93d-dc72-4102-b5f0-ded427cf0fb1"
},
"owner_client": {
"id": 7,
"login": "a10-52-41-48.qa.plesk.ru",
"guid": "b623e93d-dc72-4102-b5f0-ded427cf0fb1",
"external_id": "b623e93d-dc72-4102-b5f0-ded427cf0fb1"
},
"ipv4": [
"212.192.122.46"
],
"ipv6": [
"2002:5bcc:18fd:c:123:123:123:123"
],
"plan": {
"name": "Unlimited"
}
}
Examples for REST API https://app.swaggerhub.com/apis/plesk/api/v2#/Domains/post_domains
I saw in the Facebook API that I can retrieve the Bulk Data, but this doesn't return information about the Lead Ad. I am interested in retrieving what type of user I am targeting so I can have for reference and statistics. Fields like Age Range, Country and etc. The problem is that I am going to run a couple of them at the same time targeting different age groups and countries.
response:
{
"data": [
{
"created_time": "2018-02-28T08:49:14+0000",
"id": "<LEAD_ID>",
"ad_id": "<AD_ID>",
"form_id": "<FORM_ID>",
"field_data": [
{
"name": "car_make",
"values": [
"Honda"
]
},
{
"name": "full_name",
"values": [
"Joe Example"
]
},
{
"name": "email",
"values": [
"joe#example.com"
]
},
]
}
],
"paging": {
"cursors": {
"before": "OTc2Nz3M8MTgyMzU1NDMy",
"after": "OTcxNjcyOTg8ANTI4NzE4"
}
}
}
Facebook does not provide details about individuals that have completed your lead forms, but does provide aggregated information via the Insights API, including breakdowns by age and gender.
When making valid requests to http://ap-southeast-1.api.acrcloud.com/v1/identify I get successful responses, however both external_ids and external_metadata always come back as empty objects.
Example response:
{
"external_ids": {},
"play_offset_ms": 97480,
"external_metadata": {},
"label": "Universal Music Ltd.",
"release_date": "2012-01-01",
"album": {
"name": "The Love Club EP"
},
"title": "Royals",
"duration_ms": "190185",
"genres": [
{
"name": "Pop"
}
],
"acrid": "b748d828aba29c699f732bd660123bae",
"result_from": 3,
"artists": [
{
"name": "Lorde"
}
]
}
Anyone know why all my identifications wouldn't contain this data?
Please select the 3rd party ID integration while creating the projects.
I'm trying to create a report definition using the GoodData REST API. I use the following endpoint to invoke the rest call.
"/gdc/md/{project-id}/obj"
When i try to invoke the API call with the following dataset in which the projectId and the userId are valid, it gives me the error with the response code 500.
{
"reportDefinition": {
"content": {
"filters": [],
"format": "grid",
"grid": {
"rows": [],
"columns": [
"metricGroup"
],
"sort": {
"columns": [],
"rows": []
},
"columnWidths": [],
"metrics": [
{
"uri": "/gdc/md/qy48iv4flikdlcwpwioizuip74wt8nb5/obj/63f3cecd2a8d3ce2ec9378381c8f39e3",
"alias": ""
}
]
}
},
"meta": {
"title": "Sample report definition",
"summary": "This is a sample report",
"tags": "",
"deprecated": 0,
"category": "samplecategory"
}
}
}
{
"error": {
"message": "Internal server error. Please fill in bug report with request_id='lp78FL5S1IPMqB2n'"
}
}
I'm certain that the user project_id and the user_id are valid. Is this an error in the API?
Thank you in advance.
Apart from the metrics URI that looks weird (hash instead of numeric ID), I was able to dig in our logs an error that says: "Category is not equal to tag structure".
In your example you have its value set to "samplecategory". "category" property defines what type of object are you creating. If you are creating a report definition it should have value of "reportDefinition".
Last time I worked with GoodData API, metrics had numeric IDs. That seems most likely to be the culprit. Where did you get "/gdc/md/qy48iv4flikdlcwpwioizuip74wt8nb5/obj/63f3cecd2a8d3ce2ec9378381c8f39e3" from, especially the "63f3cecd2a8d3ce2ec9378381c8f39e3" part?