REST

251

Solutions

505

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Share tech news, updates, or what's on your mind.

Sign up to Post

One of our clients has exchange 2010 and one user has a huge mailbox (currently about 65GB) so has to work in non-cached mode rather than cached mode.  His OST file just stopped working at 50GB. The user is complaining that searches are not returning all the results it should. Since he is using online mode, I assumed that all the indexing was being done by exchange server and rebuilt the index for the database he was using. (He and one other person share a whole exchange database, the rest of the company is on a different database.) He is still complaining that the search is not returning all the results. I know that when you are in cached mode, the email is indexed by Windows indexing, but what happens in non-cached mode?
0
Cloud Class® Course: Amazon Web Services - Basic
LVL 12
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

I am using the following code which sends an email from excel to outlook
Sub Send_Email_Late()

    Dim rng As Range
    Dim OutApp As Object
    Dim OutMail As Object
    Dim Name_Lookup As String
    
  




    

    Set rng = Nothing
    Name_Lookup = ActiveSheet.Range("A3").Value
    
    
    On Error Resume Next
    'Only the visible cells in the selection
    'Set rng = Sheets("Sheet 1").Range("B2:B22").SpecialCells(xlCellTypeVisible)'
    'You can also use a fixed range if you want
    Set rng = Sheets("Stationary").Range("B1:O8").SpecialCells(xlCellTypeVisible)  ':B11
    On Error GoTo 0

    If rng Is Nothing Then
        MsgBox "The selection is not a range or the sheet is protected" & _
               vbNewLine & "please correct and try again.", vbOKOnly
        Exit Sub
    End If

    With Application
        .EnableEvents = False
        .ScreenUpdating = False
    End With

    
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    On Error Resume Next
    With OutMail
        '.SentOnBehalfOfName = "sales@matthewclark.co.uk"
        .To = ActiveSheet.Range("Cs4").Value
        '.CC = Sheets("Email Data").Range("K2").Value'
        .BCC = ""
        .Subject = "Lateness Email - ENTER DATE"
        .HTMLBody = Name_Lookup & RangetoHTML(rng)
        .Display  'or use .Display
    End With
    On Error GoTo 0

    With Application
        .EnableEvents = True
        .ScreenUpdating = True
    End With
'    MsgBox

Open in new window

0
Hi Experts,
I have the following code which loops thru all records of a given table (on Caspio site) and prints out the contents.
Function GetDataFromCASPIO1()
    Dim objHTTP As New WinHttp.WinHttpRequest
    Dim docXML As MSXML2.DOMDocument
    Dim ResponseText As String
    Dim curNode As IXMLDOMNode
    Dim oNodeList As IXMLDOMSelection

    Set docXML = New MSXML2.DOMDocument

    Set objHTTP = New WinHttp.WinHttpRequest
    URL = "https://abc123.caspio.com/oauth/token"
    
    objHTTP.Open "POST", URL, False
    objHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"

    objHTTP.Send "grant_type=client_credentials&client_id=MyClientID&client_secret=MySecretID"
    ResponseText = Right(objHTTP.ResponseText, Len(objHTTP.ResponseText) - 17)
    access_token = Left(ResponseText, InStr(ResponseText, """") - 1)
    'Debug.Print access_token


    Set objHTTP = New WinHttp.WinHttpRequest
    'objHTTP.setRequestHeader "Content-Type", "application/json"
    URL = "https://abc123.caspio.com/rest/v1/tables/Caregivers/rows"
    objHTTP.Open "GET", URL, False
    objHTTP.SetRequestHeader "Accept", "application/xml"
    objHTTP.SetRequestHeader "Content-Type", "application/json"
    objHTTP.SetRequestHeader "Authorization", "Bearer " + access_token
    objHTTP.Send
    'Debug.Print objHTTP.Status
    'Debug.Print objHTTP.ResponseText
    docXML.loadXML (objHTTP.ResponseText)

    strXPathQuery = "Caspio/Row"
    Set oNodeList = 

Open in new window

0
I got a requirement from the business that they want to use single user mailbox for 20 employee but they don't want to use shared mailbox.  now we are facing problem that only 6 outlook profile for the single mailbox are working at the same time and rest are not connecting. if we close any one of them than another outlook profile start working.Hence could anyone please let me know that how many outlook client can be connected for the single mailbox at the same time to the exchange server in exchange 2013 environment.
0
can anyone explain how to create REST API using PHP
0
Hi All,

I'm developing an app that the user can see which of its contacts are registered for the app.
Say I have a data base of users in the cloud what should be the rest end point for such operation?
Should I send all of the user's contact to the endpoint and the server will make the set intersection between the input contact set the its all registered contacts?
But what if the user has many contacts?

Thank u in advance
0
So I have a block of static ip addresses, im currently using one with my peplink router and I have the rest attached to a switch so I can use them for other applications that need public IP's. From within my lan behind the peplink router I cannot get to one of the public ip's I have attached to a device that is sitting on the public ip side of things on that switch.. I can ping it from with in my lan but I cannot access it. My guess there is a port that is being blocked? 443 is the service port and https is turned on. Any tip or trick on what exectly I need to fwd in my peplink router would be greatly appreciated..
0
I currently upload finish line pictures from races I time to Google + and share the gallery with race finishers so they can find their picture.  I would like to take that a step further and share each finishers individual picture with them.  I believe Google Vision has the technology to do that...albeit for a cost...by pairing participant bib number with bib in the image.  Is anyone familiar enough with this api to give me some direction as to how to do this?  Also, any idea how this product is priced?
0
Hi,

I have this json coming from an REST api. I now want to make a representaion of it in my asp.net site (I use vb.net for the moment). But I don't fully get it to work when I create the classes representing the json and deserialize it. This is how the json looks like when I copy it form Postman:
{
    "data": {
        "type": "vehicle",
        "attributes": {
            "regno": "HCA015",
            "vin": "WF0MXXGBWMDP17671"
        },
        "links": [
            {
                "rel": "self",
                "uri": "vehicle/vin/WF0MXXGBWMDP17671"
            },
            {
                "rel": "biluppgifter",
                "uri": "https://biluppgifter.se/fordon/HCA015"
            }
        ],
        "basic": {
            "data": {
                "make": "Ford",
                "model": "GALAXY 2.0 TDCi",
                "status": 2,
                "color": "Svart",
                "type": "PB",
                "vehicle_year": 2013,
                "model_year": 2013
            }
        },
        "inspection": {
            "data": {
                "latest_inspection": "2016-09-19T00:00:00+02:00",
                "inspection_valid_until": "2018-09-30T00:00:00+02:00",
                "meter": 38650,
                "next_inspection_range": [
                    "2018-05-01T00:00:00+02:00",
                    "2018-09-30T00:00:00+02:00"
                ]
            }
        },
        "status": {
            "data": {
                

Open in new window

0
I'm trying to use Rest assured and JsonPath to extract a value from the pzSetRuleSetFilter field where the pyRuleSetName equals a certain value (TradeMarks in this case). I keep getting the error below. Any ideas on how I can fix this and extract the value would be great

invalid JSON expression:Script1.groovy: 1: expecting EOF, found '[' @ line 1, column 39.

My Query System.out.println(response.jsonPath().getString("$..pxResults[?(@.pyRuleSetName == 'TradeMarks')].pzSetRuleSetFilter"));

See attachment for a screenshot of some of the Json response from SoapUI
Capture.PNG
0
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Downloaded a Sample App.  I am using VS2015.  The app doesn't compile.  I am receiving what seems to be a REST error.

CS1503      Argument 2: cannot convert from 'System.Action<System.IO.Stream>' to 'byte[]'      Tradovate.Services      

The error is occurring at

                request.AddFile(param.Value.Name.ToString(), param.Value.Writer,
                                param.Value.FileName.ToString(), param.Value.ContentType.ToString());

In the below code.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using System.IO;
using System.Web;
using System.Linq;
using System.Net;
using System.Text;
using Newtonsoft.Json;
using RestSharp;

namespace Tradovate.Services.Client
{
    /// <summary>
    /// API client is mainly responsible for making the HTTP call to the API backend.
    /// </summary>
    public partial class ApiClient
    {
        private JsonSerializerSettings serializerSettings = new JsonSerializerSettings
        {
            ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
        };

        /// <summary>
        /// Allows for extending request processing for <see cref="ApiClient"/> generated code.
        /// </summary>
        /// <param name="request">The RestSharp request object</param>
        partial void InterceptRequest(IRestRequest request);

        /// <summary>
        /// Allows for extending response processing for <see

Open in new window

0
I use FOS Rest Bundle with FOS user ton create registration form. The registration does not work so i tried to verify if there's an issue with my database.I've tried doctrine schema update and i receive a strange error .
[Doctrine\DBAL\Exception\DriverException]
  An exception occurred while executing 'CREATE TABLE `buyer` (id INT AUTO_INCREMENT NOT NULL, buyer_type_id INT DEFAULT NULL, country_id
   INT DEFAULT NULL, language_id INT DEFAULT NULL, first_market_region_id INT DEFAULT NULL, second_market_region_id INT DEFAULT NULL, thi
  rd_market_region_id INT DEFAULT NULL, creator_user_id INT DEFAULT NULL, modifier_user_id INT DEFAULT NULL, `name` VARCHAR(320) NOT NULL
  , `description` VARCHAR(1024) DEFAULT NULL, `main_products_services` VARCHAR(512) DEFAULT NULL, `reference_number` VARCHAR(100) DEFAULT
   NULL, `phone` VARCHAR(20) DEFAULT NULL, `fax` VARCHAR(20) DEFAULT NULL, `website` VARCHAR(100) DEFAULT NULL, `email` VARCHAR(255) DEFA
  ULT NULL, `first_name` VARCHAR(100) DEFAULT NULL, `last_name` VARCHAR(100) DEFAULT NULL, `job` VARCHAR(255) DEFAULT NULL, `picture` VAR
  CHAR(255) DEFAULT NULL, `address` VARCHAR(500) DEFAULT NULL, `zip_code` VARCHAR(10) DEFAULT NULL, `city` VARCHAR(10) DEFAULT NULL, `com
  pany_name` VARCHAR(320) DEFAULT NULL, `total_revenu` VARCHAR(100) DEFAULT NULL, `first_market_rate` INT DEFAULT NULL, `second_market_ra
  te` INT DEFAULT NULL, `third_market_rate` INT DEFAULT NULL, `is_public` TINYINT(1) NOT NULL, `views` INT DEFAULT NULL, …
0
windows 7 pro loads 31 processes and sits at black screen for 4 minutes to load the rest.

Only the cursor arrow shows. Partition reimaged with known good acronis tib and gets same result. GUI takes LOOOOONG time to load.
New Samsung 860 top 'o the line ssd appears okay/
0
I have installed a copy of Magento 2 locally on my computer and what I want to do is to set it up so that I can access the whole thing as a Rest Api.

I have tried some url's like: http://127.0.0.1/magento/rest/v1/products but I don't get any json.

How can I set this up so I can access the api from my browser url?
0
Hi all,
I have following powershell script that I use to re-order column, its actually works pretty fine and fast.  There is  few changes that I need to work on this scripts.

1: How do I introduce new column in output file although existing file did not have those column ? I need to add two more column between $data[4], $data[7], $data[6], I also need to add column name header in this new column  since the rest of the column has column header.




$ImportFile="DWH_Import_File.csv"
$ImportDate = (Get-Date).AddDays(-1).ToString('yyyy-MM-dd')
$DWHFile = "DWH_Import_File_$ImportDate"
$DWHFile1 ="$ImportFile-Convert.csv"
$Import = [System.IO.File]::OpenText("F:\DWH\HRISEMP\$ImportFile")
$DWHdata = New-Object System.IO.StreamWriter "F:\DWH\HRISEMP\Tool\$DWHFile1"
for(;;) {
    $line = $Import.ReadLine()
    if ($null -eq $line) {
        break
    }
    $data = $line.Split(",")
    $DWHdata.WriteLine('{0},{1},{2},{3},{4},{5},{6},{7},{8}', $data[0], $data[8], $data[5], $data[4], $data[7], $data[6], $data[2], $data[1], $data[3])
}

$Import.Close()
$DWHdata.Close()

Open in new window

0
Greetings,

I am using evaluation version of microstrategy, can you please let me know  how can I get table and columns of that table using REST API.
OR in generic term relation between objects.
0
In Powershell when I try to run Invoke-WebRequest -Uri http://DMS/admin/apps/478/0.0.2/Android -Method PUT -body $dms2

Invoke-WebRequest : Length Required
HTTP Error 411. The request must be chunked or have a content length.

my mission is to get some parameters in Invoke-WebReques Method Get , replace some variables and update specific line with Method PUT

my script:
$dms2=Invoke-WebRequest -Uri http://DMS/admin/apps/478/0.0.2/Android -Method Get
$dms2.Content.Split(',') | Select-String -Pattern "dictionary_url_rus"
$BB=$dms.tostring().Substring($dms.tostring().LastIndexOF("/") +1).trim('}','"')
$dms2.tostring() -replace $BB, "temp.json"

$dms=Invoke-WebRequest -Uri http://DMS/admin/apps/478/0.0.2/Android -Method PUT -body $dms2
0
Hi guys,
when submitting data to a rest api via curl from php i sometimes get this error but very rarely- like 1 in a 100 times. Why would this be?

Data submitted with response <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
0
Hi guys, i need to submit from my php code via curl to rest api. issue is they want me to submit with date and time stamp in following format: <DateSent>2018-04-26T15:12:36.9769394+02:00</DateSent>
I do have the format correct but i dont understand the part after the time "9769394" ? what could this be? doesnt look like mili seconds at all?
My date looks as follows when submiting : 2018-04-27T13:51:45+02:00 but server not accepting it
0
Free Tool: IP Lookup
LVL 12
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

What is the best practice to log REST API response messages, these responses are too huge.
I am working on a requirement to log the responses to files
0
I have a rest api webservice which is going to return data in form of json doc. In my case it’s a object which I serialize via newtonsoft json. Works all fine but the json string I get in postman has all the escape slashes.  How can I get rid of those other then running a replace
0
Hi Experts,
I have written a small application that is linked to Excel files, reads two spreadsheets and does some comparisons.
Those sheets contain SS numbers.
Now I see that some socials are aligned to the right side and some to the left side.
And the problem is that Access only reads the first set of socials, the rest are showing as error.
Since user gets those files from a third party software, no way to figure out why they're like this..
How can I overcome this issue?
0
I am trying to build a REST API in .NET and are running into some issues. My service will use JSON Data which is send to the Server in the Body.
I Created a Data Class like
Public Class ADDR_VAL_REQUEST
        Private HEAD As ADDR_VAL_HEADER
        Private BODY As ADDR_VAL_BODY
End Class[

 Public Class ADDR_VAL_BODY

        Private AFT As String = ""
        Private LD3 As String = ""
        Private LV3 As String = ""
        Private CITY As String = ""
... and so on

Open in new window


and here my basic sample for the post

      Public Function PostValue(<FromBody()> ByVal value As ADDR_VAL_REQUEST) As String
            If ModelState.IsValid Then
                Console.Write(value.BODY.CITY)

                Return "OK"
            Else

                Return "Error"
            End If

        End Function

Open in new window


Which fails, if i only post the body it works and i can parse the city just fine. So my question what do i need to do to be able to pass
more complex data like mine. It even fails if i send data like this

{		 "ADDR_VAL_BODY": {
			 "LV3": "",
			 "CITY": "NEW YORK"
		}
}

Open in new window

but works for
 {
			 "LV3": "",
			 "CITY": "NEW YORK"
		}

Open in new window


So here is my question, ow do you handle cases where the Data is more complex like in my case ? If the build in parsing does not work, how do i go about to access the posted body to get the json string and parse it via code myself ?
0
I have been asked to stand up a weighted search appliance for a company.  The decision was to use SOLR to create the search tool so they can use the associated REST API for searches and recommendations.

I'm am still beginning in SOLR and have to ask a basic architecture question.  I have a table with 220 elements, 130 Million record strong.  I grow 5 million a year.

Does this become a Hadoop solution?  or can this still be done with a single SOLR engine?  I need to know which direction to start with so I do this right

Thanks much.
0
I have an HP EliteBook laptop that was getting a new image. This is a G2 laptop. Anyway I started the laptop image in the Microsoft System Center\software center. Selected the name-G2 - ME firmware - install bios - and googleDriveSync. I then selected and downloaded the ME updater. The firmware finished. Then in the bios I selected fast boot, PXE internal nic, PXE internal IPV4 nic, and under secure boot config I selected UEFI native without CSM then under device settings checked the box that said SATA device mode set to AHCI, VTx is checked  and G2 only then saved it. Then the user grabbed it before I could start the rest as I had to make a call to another user. She took the laptop and now it will not boot to any OS and goes to shut down mode. I was told that this would make a brick out of the laptop? Is there no way to get this laptop back to factory settings without a new motherboard being needed? This is really my question.
0

REST

251

Solutions

505

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Top Experts In
REST
<
Monthly
>