Go Premium for a chance to win a PS4. Enter to Win

x

REST

195

Solutions

402

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

Rows 1 to 73  show what I am trying to do.

1. Move the contents  of the row below the call sign in Column B, or in Column C, (the columns are not regular) into Column O, on the the same row as the call sign from the row immediately above.
2 Where there is a suburb in column A, copy this name into each second row below, onto the same row as the call sign in column B, until there is another suburb.

I'll be able to tidy up the rest.

Thanks.
2017-TV-by-suburb-and-call-sign.xlsx
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Webroot Doubles Down on MSPs

"Some of the new offerings involved acquisitions. Others are homegrown. But they’re all coming together. Indeed, Webroot is coordinating its R&D, sales and marketing efforts to make it easier MSPs to try, buy and deploy the security solutions, Potts says."

Read the rest of the article here.
1
Hello ,

Im trying to find a quick easy way to import the results from a Web API into a sql server database , which will run every minute?

the example of the API is the following

https://bittrex.com/api/v1.1/public/getmarketsummaries   

Can anyone advise on this please?

Thanks
0
Hello Experts -

I have found that if I don't Disable Scripting (in Internet Options), that displaying web content in Internet Explorer is extremely slow - making many sites almost unusable.

Generally speaking, they freeze up or the scroll bars get stuck. I often get messages that say "web site is not responding" and iExplorer will then display a "recover webpage" button. The latter just reloads the same page to drag the experience anew.

But there are a few sites that are exceptions, if I idisable scripting as the default behavior via the setting in Internet Options. These sites are worthless without scripting.

So, is there a way I can get iExplorer turned to allow scripting for a few pre-defined sites - leaving scripting disable for all the rest.

Thanks.

Gordon
0
3
what are advantages of creating a REST service in Web API vs some other technologies in .NET like WCF, ASP .NET MVC etc.
0
I have a groovy script that makes an API call to a rest api and it gets a result. The problem is that I need to sent a file instead of a URL for the final requirements. I am not sure how to do that.

So, I need to change:
FROM: map["file_url"] = "https://i.ytimg.com/vi/JPA_rzHDy6o/maxresdefault.jpg"
TO: map["file"] = "@Nda.pdf"

I think this is a much more difficult situation, to send a file instead of a URL. I would suspect, it starts out trying to understand the def client = HttpClientBuilder.create().build() and how this api supports sending a file.

Any pointers on how to do this?

I also suspect that post.addHeader("content-type", "application/json") may not work and instead another header may have to be used. Perhaps multipart/form-data.



Script that works


import groovy.json.JsonSlurper


@Grab(group='org.apache.httpcomponents', module='httpclient', version='4.5.2')

import groovy.json.*

import org.apache.http.client.methods.*
import org.apache.http.entity.*
import org.apache.http.impl.client.*



def map = [:]
map["message"] = "Hi There"
map["title"] = "Title"
map["subject"] = "sub"
map["test_mode"] = "1"
//map["file"] = "@Nda.pdf"
map["file_url"] = "https://i.ytimg.com/vi/JPA_rzHDy6o/maxresdefault.jpg"
map["signers"] = [name: 'bob', email_address: 'ed_fletcher@aol.com']

def jsonBody = new JsonBuilder(map).toString()
println jsonBody


def url = 'https://APIKEYHERE:@api.hellosign.com/v3/signature_request/send'
def …
0
In jquery, is it possible to find element then get the rest of the nodes(outside of original element)?
E.g.

If i pass you BondName = abc and if it is found, then output me everything within <additionalInformation>?

 <Surety>
  <SuretyLine>
   
    <Commercial>
      <Bond>
		<General Information>
		<BondName>abc</BondName>
   		</General Information>
		<AddtionalInformation>
          		<div class="col-lg-12">
           		 <Input Type="text" Name="additionalInfo_licenseNo" ID="additionalInfo_licenseNo" Onchange="fnSaveSingleData(this.name,'1')" Placeholder="Enter License No." 				Class="form-control" Title="License is required!" PrefillValue="No" Required="" />
          		</div>

        	</AddtionalInformation>
      </Bond>
       <Bond>
	<General Information>
		<BondName>xyz</BondName>
   	</General Information>
	<AddtionalInformation>
          <div class="col-lg-12">
            <Input Type="text" Name="additionalInfo_licenseNo" ID="additionalInfo_licenseNo" Onchange="fnSaveSingleData(this.name,'1')" Placeholder="Enter License No." Class="form-control" 		Title="License is required!" PrefillValue="No" Required="" />
          </div>
        </AddtionalInformation>
      </Bond>
    </Commercial>
  </SuretyLine>
</Surety>

Open in new window

0
What is the equivalent of an in operator in a query for REST API using a filter

Here is a sample URL where I filter for the customer number and I want to filter for multiple values

{{url}}/{{company}}/sales/invoices/?filter={"customer.customerNo": "CASH"}

To query this same data in the database I have

select * from customers where cust_no in ('CASH','ABC','123')
0
Haven't been here in a while.

I am trying to setup the highlight selected record in a continuous form.  Each record has a [delete] button and a [Appt_ID] box.

There is a txtActiveRecord box in the header.  The Delete_OnClick event sets "Me.txtActiveRecord = Me.txtAppt_ID" as the first item in the procedure.  CF then kicks in on "expression is: [txtAppt_ID]=[txtActiveRecord]"  and sets one of the controls to a particular colour. The rest of the On_Click event asks the user "are you sure" etc, and if clicked "No", it all returns to normal.

This works perfectly, EXCEPT the CF doesn't kick in until after the procedure is completed.  i.e. too late.  

However, when I step through the event line by line, the CF kicks in right on cue.  i.e. a the "Me.txtActiveRecord = Me.txtAppt_ID" line.

Where have I gone wrong?

Cheers,
Brodie
0
Concerto's Cloud Advisory Services
LVL 5
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

hello
currently i am returning like below from my asp.net wb api
{
  "emplyoees": [
            {
                "empid": "3301",
                "empname": "John"
                },
 {
                "empid": "3991",
                "empname": "Marty"
                }
                ]
            }
        

Open in new window

i do not want to return key name "employees".
i want some thing like this:
{
   [
            {
                "empid": "3301",
                "empname": "John"
                },
            {
                "empid": "3991",
                "empname": "Marty"
                }
            ]
            }

Open in new window

here is my model classes
 public class EmployeesResponse
    {


      public   Employee[] Employees;
     }
 public class Employee
    {
        public string empid{ get; set; }
        public string empname{ get; set; }
}

Open in new window

0
Hi,

This what vendor provided to test

Error is :

The remote server returned an error: (401) Unauthorized.

My code

string result = string.Empty;
            try
            {
                // Create Request
                HttpWebRequest req = (HttpWebRequest)WebRequest.Create(@"https://api.verilocation.com/public/v1/drivers?id=1093609330685010");
                req.Method = "GET";
                // Create Client
                WebClient client = new WebClient();
                req.ContentType ="application/json; charset=utf-8";
               // req.UseDefaultCredentials = true;
               // req.PreAuthenticate = true;
               // req.Credentials = CredentialCache.DefaultCredentials;

                //req.ContentLength=61;


                req.Credentials = new NetworkCredential("xxx", "xxx111");
               
                   req.Headers.Add("Authorization","Bearer  Y2xpdmUuaG9sZGVuQHN0b25laGFyZHkuY28udWs6bDBnMTV0MWM1");
             //   req.Headers.Add("Authorization","Basic Y2xpdmUuaG9sZGVuQHN0b25laGFyZHkuY28udWs6bDBnMTV0MWM1");
                req.ProtocolVersion =HttpVersion.Version11;
            
                WebResponse response = req.GetResponse();
                string responseData = new StreamReader(response.GetResponseStream()).ReadToEnd();
                MessageBox.Show(responseData.ToString());




              // Assign Credentials
               
                
            }
            catch (WebException 

Open in new window

0
I have a query that joins two tables using three fields in Access 2010.  The fields used in the inner joins have identical data types.  When joining to only two of the three fields the query returns five records but when adding the third join nothing is returned.  Of the five records returned, only one is populated for the field CommitteeName in one table and the rest are null.  I can understand why that record is not returned when adding a third join but don't understand why the other four should be excluded.  The data type of the field in both tables is text and Allow Zero Length = Yes.  

I ran the following query to replace all blanks with null in both tables thinking this would solve it but no change in results occurred.
UPDATE tblBoardCommitteeImport1F SET tblBoardCommitteeImport1F.CommitteeName = Null
WHERE (((Nz([tblBoardCommitteeImport1F].[CommitteeName],''))=''));

I'm guessing the problem has to do with null values in the CommitteeName field in one or both tables but am not sure what to try next.  Any advice on how to troubleshoot this further would be appreciated.
0
I have a file "tobesplitted.xls" and it has 10 columns(column A, Column B,....) I need to split that in to two files....first file containing only the column A and the second file containing the rest of the columns...

so i should get two files "splittedfilecolumA.xls" and "Splittedfilerestofcolumns".

I also want to merge two files again "splittedfile(containing Column A and Column A1)" with "Splittefilerestofcolumns.xls".

Hope i have made my requirement clear.

Appreciate if this can be done in unix
0
Hello guys,

I'm designing a letterhead, i want the first page to have a design while the rest of the document to have a different design (Different header, different margins) all works well so far, my only issue is that i want to be able to paste a document into this letterhead, and the first page will have different layout than the rest of the pages.  

I've added a "section break ( continuous)" but when i paste my documents, the rest of the pages change to the design its supposed to change to but doesn't keep the margin needed, and that's because all the text comes before the "section break" i've added

Is there a chance to lock that section Break to the first page only and the extra text goes to the second page and adapt to its style.

Thank you
BEN
0
Currently I pull Goformz data using Excel VBA code which looks like the code below which works fine.

' Get Rest API Data from Goformz
Dim strUserName As String
Dim strPassword As String

strUserName = ""
strPassword = ""

Dim http As Object, JSON As Object, i As Integer
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", "https://api.goformz.com/v2/formz?" & "status=draft" & "&filter=lastupdateddate%20gt%20" & Sheets("Values").Range("B7") & "%20and%20lastupdateddate%20lt%20" & Sheets("Values").Range("B8") & "&pagesize=" & Sheets("Draft Forms").DraftFormsComboBox1.value & "&pagenumber=" & Sheets("Values").Range("PageNumber").value & "&sort=lastupdateddate%20desc", False
http.setRequestHeader "Authorization", "Basic " & Base64Encode(strUserName & ":" & strPassword)
http.send
Set JSON = ParseJson(http.responseText)
i = 5
For Each Item In JSON
Sheets("Draft Forms").Cells(i, 1).value = Item("status")("status")
Sheets("Draft Forms").Cells(i, 2).value = Format(DateAdd("h", 11, Replace(Left(Item("lastUpdateDate"), 19), "T", " ")), "dd/mm/yyyy hh:mm:ssam/pm")
Sheets("Draft Forms").Cells(i, 3).value = Item("templateId")
Sheets("Draft Forms").Cells(i, 4).value = Item("templateUrl")
Sheets("Draft Forms").Cells(i, 5).value = Item("name")
Sheets("Draft Forms").Cells(i, 6).value = Item("url")
Sheets("Draft Forms").Cells(i, 7).value = Item("assignment")("url")
i = i + 1
Next
     
Sheets("Draft Forms").Range("A4").value = "Status"
Sheets("Draft Forms").Range("B4").value = 

Open in new window

0
Hi Experts!

Is it possible to display the queries results on a form NOT a report, I needed this for the purpose of the bank reconciliation in my Ms Access application for example:
(1)      I want to see all the debits as a list in that form after filtering by date
(2)      I want to see all the credits as a list in that form after filtering by date
If this is possible then the rest I will handle it as long as the above can be seen on a form.


Regards

Chris
0
Hi

I am trying to find an example of building a web project in Visual Studio that manipulates the REST/SOAP API
as per https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm

I am an ASP.net developer and was hoping to use an ASP.net web app
0
Dear All

I am using WebClient.DownloadFile() to download  a text(*.txt) file from server. It was working fine in all systems since years but suddenly in two systems it started giving issues though in rest of the systems its working fine.
Issue is its downloading an empty file from server and getting hang.

Please suggest what could be the reason. Below is the line of code I am using to download the file.

                           using (WebClient wc = new WebClient())
                            {
                                try
                                {
                                    wc.Credentials = System.Net.CredentialCache.DefaultCredentials;
                                    wc.Proxy = null;
                                    wc.DownloadFile(ServerURL + ServerFileName, CurrentDir + ServerFileName);
                                    wc.Dispose();
                                    
                                }
                                catch (Exception ex)
                                {
                                    MessageBox.Show(ServerURL + ServerFileName+Environment.NewLine+ex.ToString());
                                }
                           }

Open in new window


Thanks in advance.
0
Vote for the Most Valuable Expert
LVL 7
Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

I'm extremely new to programming. I've been tinkering with it on and off for decades but have never written an actual program. That changed yesterday.

Now, I've hit a brick wall.

I do not understand the fundamentals, but I get how code works for the most part.

My question is I have code that looks like this:

Private Sub Crystl32Button_Click(ByVal sender As System.Object, e As EventArgs) Handles Crystl32Button.Click
        For Each P As Process In System.Diagnostics.Process.GetProcessesByName("InHouseApp")
            P.Kill()
            P.WaitForExit()
        Next
        My.Computer.FileSystem.CopyFile("\\remoteserver\software\iha\ocx\crystl32\*.*", "C:\Windows\System32\",
        Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
    End Sub

Open in new window


I want to add the functionality of this:

Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Remove the FileSystemAccessRule from the security settings. 
        fSecurity.RemoveAccessRule(New FileSystemAccessRule(account, _
            rights, controlType))

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub

Open in new window


This code is supposed to remove the ACL listing of a specific account for a file.

However, I do not know how to add this:

Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

Open in new window


To my button click sub. Whenever I try, it auto-completes and removes the "Sub" I type in. I assume you can't have a Sub within a Sub but what do I modify in order to get the rest of the ACL code to work with the button click? Do I have to modify the button click Sub in order to match the ACL one?

I apologize if I'm not making sense. Again, this is my first real program and I'm not exactly up to par on all the methodologies.
0
ATTENTION APC UPS USERS! (could apply to other UPS batteries!)

I thought it was only responsible of me to follow up on this question after REAL EXPERIENCE which could have been FATAL!

This question is right on topic with a recent event this week, where I've spent the night in hospital!.

Red Light on Smart UPS 2200

After suffering the effects of Respiratory irritation caused by inhaling toxic gases in the datacentre.

One or Two APC 3000 UPS failed in the datacentre, with battery faults, the gas possible Hydrogen Sulphide (H2S) filled the closed datacentre with possibly Hydrogen Sulphide (H2S).

I only open the door, and walked in for exposure for what could have been more than 10 seconds, it was enough to overwhelm me causing headache for the rest of the afternoon, nausea, coughing and later breathlessness after advice from "NHS 111 Online" I went to Accident and Emergency, where they wired me up to ECG, Heart Rate, Blood Pressure monitors, took blood samples every hour for testing, and oxygen and nebuliser.

I was discharged after 12 hours, being advised to rest, take it easy and the exposure and irritation should get better over 48 hours.

I'm still feeling tired, cough is getting better, but still my chest still feels very heavy which I'm told is the inflammation of the lungs,

My recommendation should you have a battery light is to isolate from the Power Supply Immediately.
3
 
LVL 99

Expert Comment

by:John Hurst
Andy - I offer you my very best wishes and I hope you have a complete recovery. Sounds nasty.  ... John
0
 
LVL 124

Author Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Thanks John
0
I need to write a piece of JavaScript which will make a REST call to update a field within a document library InfoPath (XML) document.

Any help on this would be greatly appreciated.
0
I am hitting a wall here and exhausted my researching skills. Looking to the experts here.
In summary, my developer at work created a REST API for me to call via Access/VBA. Below is some sample code I have created to use this API. This API is to call an import utility to import the data I am passing in the request.

I know my authentication is good as well as the URL. I am getting a http status of 200 and a expected JSON response. Also in the API I am passing the ImportSpecification ID that has to exist in the source system. If I change that value to "XYZ" I get an error saying the Import Specification doesn't exist. So that validates the URL in my opinion.

Based on the JSON response, it doesn't appear the body (response) of my message is getting received. Below is my code for reference. I have taken out the necessary sensitive info. What am I missing here?!?!

Dim sURL As String, Request As String
Dim xmlhtp As XMLHTTP60
Set xmlhtp = New XMLHTTP60

Request = "<ImportData xmlns=""urn:Import.DataUtility"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">"
Request = Request & "<Data xsi:nil=""false"">"
Request = Request & "<string xsi:nil=""false"" xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays"">##INI=EMP</string>"
Request = Request & "<string xsi:nil=""false"" xmlns=""http://schemas.microsoft.com/2003/10/Serialization/Arrays"">1,DATLATEST</string>"
Request = Request & "<string xsi:nil=""false"" …
0
Hello,
I have written a mock for a REST service using SoapUI free version. The resource path looks like <webservice>/employees which returns all employees in JSON. Now I want to pass a parameter which is a date range, something like <webservice>/employees?from=01-01-2017&to=31-12-2017
This will return only a few employees who joined during the date range. I am not able to find a way to accept parameters in the mock response and not sure how do i check something like if(date == 01-01-2017 to 01-04-2017) { //pass this json text   } else if(date == 08/08/2017 to 31/12/2017) { pass this text }

Any help would be greatly appreciated as I am new to SoapUI
0
Hi there!

I have a development written in .NET/C# standard (not .NET Core) that connects to a Rest API for fetching records of my customer's business. In other to login I have automated sending login form using NHtmlUnit, when I get an authorization token, I use RestSharp for fetching the data. The program runs well when I run on my development machine, however, when I deploy the the production environment (in this case, Azure), I get the following exception exception:

[10/04/2017 03:00:31 > 60fd26: INFO] An error occurred authenticating with Exact token info.

[10/04/2017 03:00:31 > 60fd26: INFO] The AddressFamily InterNetwork is not valid for the System.Net.IPEndPoint end point, use InterNetworkV6 instead.

[10/04/2017 03:00:31 > 60fd26: INFO] Parameter name: socketAddress

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.AbstractPlainSocketImpl.doConnect(InetAddress , Int32 , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.AbstractPlainSocketImpl.connectToAddress(InetAddress , Int32 , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.AbstractPlainSocketImpl.connect(SocketAddress , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.PlainSocketImpl.connect(SocketAddress , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.SocksSocketImpl.connect(SocketAddress , Int32 )

[10/04/2017 03:00:31 > 60fd26: INFO]    at java.net.Socket.connect(SocketAddress endpoint, Int32 timeout)

[10/04/2017 03:00:31 > 60fd26: INFO]    at

Open in new window

0

REST

195

Solutions

402

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.