REST

367

Solutions

665

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

Hello!

I'm trying to populate a combobox inside of a datagridview based on what shift is selected in the Operators Filter combobox.  I've been successful in populating the top combo in the datagridview but no data is showing in the rest of the rows.

There are 4 shifts, A,B,C and D which all have operators assigned.  However on any given day an operator that normally works C shift may come in to cover for someone on A.  When I bound the combobox directly to the OperatorsBindingSource every time I would filter by selecting another shift the values already selected in the dgv would disappear because the name did not exist in the filtered binding source.  As a workaround I'm trying to handle it this way.

Here is an image of the form:
ComboIssue.jpg
Here is the code I have so far that is only populating the top combo in the dgv:
private void GetOperators()
        {
            string opshift = cboOperatorFilter.SelectedItem.ToString();

            DataTable opNames = new DataTable();

            var filteredOps = from row in trackingDataSet.Operators.AsEnumerable()
                              where row.Field<string>("HomeShift") == opshift
                              select row.OperatorName.ToString();

            opNames.Columns.Add("OperatorName", typeof(string));
            foreach(string str in filteredOps)
            {
                DataRow row = opNames.NewRow();
                row["OperatorName"] = str;
                

Open in new window

0
OWASP: Forgery and Phishing
LVL 19
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Hi Expert,
Can you help me to find out where i'm doing mistake or how to call this and also I used  newtonsoft

Following way i have tried to Deserialize Json. The results from REST services working fine
(candidateResults) i iwll get the data.

 var jcCandidate1 = JsonConvert.DeserializeObject<List<candidateDetails>>(candidateResults);

also i tried
 var jcCandidate1 = JsonConvert.DeserializeObject<List<candidateDetails>>(candidateResults);

Open in new window



all classes  created according to Json Results. (go to Edit special paste -> select Json)

namespace TestConsolApp
{
   
    public class candidateMain
    {
        public candidateDetails[] Property1 { get; set; }
    }

    public class candidateDetails
    {
        public string _id { get; set; }
        public DateTime creation_date { get; set; }
        public string email_address { get; set; }
        public string headline { get; set; }
        public string initial { get; set; }
        public string name { get; set; }
        public string origin { get; set; }
        public string phone_number { get; set; }
        public candidateResume resume { get; set; }
        public candidateSource source { get; set; }
        public candidateStage stage { get; set; }
        //public object[] tags { get; set; }
        public DateTime updated_date { get; set; }
    }

    public class candidateResume
    {
        public string url { get; set; }
    }

    public class candidateSource
    {
        public

Open in new window

0
Hi
I would like to be sending some short messages system (SMS) from Ms Access App to my colleagues for any urgent issue at hand from my laptop, for the URL I have to organize from a service provider for a fee. Now instead of using a modem, I want use REST API, I have to get URL from the service provider. Below is my scant VBA code which I intend to use, also help to complete !

SMS CODE

Private Sub CmdSmsLines_Click()
Dim strURL As String
  Dim neMb As String
  Dim msGe As String
  Dim appIE As Object
  
    Set appIE = CreateObject("InternetExplorer.Application")
    neMb = Me.txtneMb.Value
    msGe = Me.txtmsGe.Value
    
    
    strURL = "http://bhashsms.com/api/XXXXX=success&pass=RRRRR&sender=ZZZZZ=" & neMb & "text=" & msGe & "priority=ndnd&stype = normal"
       
         
   With appIE
        .Navigate strURL
        ' uncomment the line below if you want to watch the code execute, or for debugging
        '.Visible = True
       
    End With
    ' loop until the page finishes loading
    Do While appIE.busy
        DoEvents
    Loop

    appIE.Quit
End Sub

Open in new window

I intend to use two controls as in memo form see below:
cellNumber:
SMSMessages:

Suppose I want to send the message to 4 people at one go, how do I type in the phone numbers in the memo control box SMSMessages: or msGe
0
I am trying to connect to my SharePoint webservice through a add on for VS code called SPGo.  I am getting a 407 error. Proxy Authentication Required. I then am trying to use node-sp-auth to find the correct parameters so I can use SPGo. My company uses OneLogin (ADFS). I don't understand how to make the call to get the required information for the proxy.  I think I am supposed to pass the user and pass with a key using SAML.  

On another note.  I am making a call from within SharePoint to the API to get my list items without issues.  I think the issue is because of MFA.  I do however have the proxy script address.

The call is just:

$.ajax({
			url: "../_api/web/lists/....",
	        type: "GET",
	        headers: {
	            "accept": "application/json;odata=verbose",
	        }

Open in new window

0
A friend sent me a hoax warning not to accept Facebook friend requests from Andrea Wilson. That it could cause trouble:

"Please tell all the contacts in your messenger list not to accept friendship request from Andrea Wilson . She is a hacker and has the system connected to your Facebook account. If one of your contacts accepts it, you will also be hacked, so make sure that all your friends know it. Thanks."


However, two other friends told me it was a hoax and I found two links that SEEM to indicate they're correct:
https://www.hoax-slayer.net/andrea-wilson-friendship-request-hacker-hoax/?fbclid=IwAR0Oyj4C-_VPi5vfOu-2J7-Xy0rzE1439NtB4fzPeZ3FXo6uFIhuHdTk6n0

https://www.snopes.com/fact-check/social-media-hacker-warning/?fbclid=IwAR0UZDeV6OipD7eb2ykB2-Td5wV2SoMYQ4kCGsvbzx_NNt8jEnuNw5lOp5U
(Search on "Andrea")

Based on the below can I rest assured the original msg I received is a hoax? Thanks.
0
Hi all,

We have been asked by a client to open private access to our API. This will be monetized, and they would like us to provide a pricing model.

I have no idea where to start, i know the types of ways we can charge them (per user, usage, requests, etc), but i have no idea which is best for our use case, and how do we even go about building a mechanism to monitor usage for billing.

Our API is REST based (currently for internal use of a webapp and mobile app) and sends data to the cloud to be run against ML models which then spit back confidence scores to the applications.

My next question is regarding architecture, would we implement a layer between our ML Service and our clients that would implement oauth2/monitoring of API usage?
1
Move a Wordpress site from wildwestdomains (Godaddy's Sister) Deluxe hosting to Godaddy Deluxe hosting CPanel site. The site won't load I get this from error log. I did not design this and I have never moved WP sites before so any help would be great.

[03-Oct-2019 08:11:45 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function site_url() in /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-content/plugins/gravityforms/includes/webapi/webapi.php:21
Stack trace:
#0 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-content/plugins/gravityforms/gravityforms.php(162): require_once()
#1 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-settings.php(305): include_once('/home/mivn8z69y...')
#2 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-config.php(179): require_once('/home/mivn8z69y...')
#3 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-load.php(37): require_once('/home/mivn8z69y...')
#4 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-blog-header.php(13): require_once('/home/mivn8z69y...')
#5 /home/mivn8z69yz1h/public_html/danatannenbaummd.com/index.php(17): require('/home/mivn8z69y...')
#6 {main}
  thrown in /home/mivn8z69yz1h/public_html/danatannenbaummd.com/wp/wordpress/wp-content/plugins/gravityforms/includes/webapi/webapi.php on line 21

Open in new window


Line 21 is:
define( 'GFWEBAPI_API_BASE_URL', site_url( GFWEBAPI_SLUG ) );

the PHP is:

Open in new window

0
Hi, to everybody.
This is my promotion table:
SELECT [LOT_CTL_NO]
      ,[LOT_SERIAL]
      ,[LOT_SUM_POINT]
      ,[LOT_SENIORITY_POINT]
      ,[LOT_CERTIFICAT_POINT]
      ,[LOT_PROM_DATE_47]
      ,[LOT_PROM_DATE_46]
      ,[LOT_PROM_DATE_45]
      ,[LOT_PROM_DATE_44]
      ,[LOT_PROM_DATE_43]
FROM [TBNOMLOT]
order by LOT_SERIAL
in the attached Excel file there are 234 rows(employees). They are ordered by [LOT_SERIAL] .
if employees are equals in LOT_SUM_POINT , LOT_SENIORITY_POINT , LOT_PROM_DATE_46 , LOT_PROM_DATE_45 ,  [LOT_PROM_DATE_44 and  LOT_PROM_DATE_43  
then do the lot operator "NEWID()"  here, to resort the equal rows only, and then put them again in the same sequence but with the new order.
Like for example
 lot01
Here I need to do the LOT for the first 7 records only by (LOT_CTL_NO) and bring them back to the main list again, in the same position.
And so on to the rest of all records when there is equality.
LOT.xlsx
see attached excel file
0
HI, I am new to leaflet js.
I am calling a rest from esri API,  the image is not a tile, it is a dynamic layer. How can I call the service with multiple layers?

Thanks
0
Create a RESTful service (called News-API) using asp.net web api

TODO
● Create a Web-API .NET Core project for a RESTful service
● On startup, create a database by using EF Core (from nuget) containing the table “News”:
○ Id INTEGER PRIMARY KEY
○ Title VARCHAR(100) NOT NULL
○ Content text NULL
● Populate the table with a few dummy records (5 max)
● Add an API-Controller with the name “NewsController”
● Add an action to get all the records
● Add an action to get a specific record (primary key)
● Add an action to add a record
● Add an action to update a record
● Add an action to delete a record
0
C++ 11 Fundamentals
LVL 19
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Good afternoon everyone.   I was wondering if anyone had any experience using the My Fax application.   Currently one of our customer is using the service to send outbound faxes directly from their EMR application.   The majority of the fax numbers associated with the EMR application they send to are coming through without a problem.   There is one fax number (which I believe to be an analog line) when sending , the EMR application shows the fax sends and completes the send however only partial pages are coming through.   This is only happening with 1 fax line out of the rest.   According to the vendor they did state this.

"Good afternoon. Pls note that this change reflects ALL faxes sent. In our experience, this raises a few additional issues:
 
1) Additional Support Calls in to our team as to why the failed confirmations are delayed (ie could take up to 30 minutes to produce a failed confirmation)
2) If the line we are dialing is of poor quality and cuts off multiple times mid transmission, we will still try multiple times to deliver that fax meaning that they would receive partial faxes…."

Where specifically can I look to find out where the break is happening?   Is there a way to verify if the line quality is poor?  Or if not, and the fax is making it to the destination could the drop happen on the way they are processing the inbound transmission on their end?

Here is some additional information from the vendor..

I have investigated and tested the number …
0
Hi Experts!


Thank you so much for helping me here for too long , I have now done 97%  of REST API and all appear to be working accurately.

Now instead of inserting the ID =  1 or 8 manually in the code, I want to use a  text control otherwise how are the people going to accessing the VBA code in Ms Access runtime?

http.Open "GET", "http://jsonplaceholder.typicode.com/users/?id= 1", False

Open in new window



The above works very well in the VBA code , its just that  it will be difficult to be changing the ID in the code , I want something like below:

http.Open "GET", "http://jsonplaceholder.typicode.com/users/?id = &Me.txtUserID", False

Open in new window


How can it be done to work also like the one below?

http.Open "GET", "http://jsonplaceholder.typicode.com/users/?id= 1", False

Open in new window


I thought this was the easiest, but has proved me wrong again , any idea will be very much appreciated.

Regards

Chris
0
I have vba code that opens multiple workbooks, generates an index/match lookup, and then sends it to a range. I need to do it this way because I want the results to show, with the workbooks closed, and Indirect does not work that way (I checked). Everything works well when all the lookup sheets are as expected. But when they are not (like the example, sheet name doesn't exist) I would just like the formula pasted and show a bad result, whatever it is. But instead Excel/VBA won't even continue with the rest of the paste and errors out. On Error Resume Next hides the error, but the problem still exists where the code doesn't finish with the rest of the formula paste. I know I can meticulously check for every case where the error might come up and tweak the formula I generate to avoid it, but I would like it to work as intended, if possible....

Capture.PNG
Sub WriteFormula()
    Dim sForm As String, sTick As String, sFile As String, sFileName As String, sSheetSummary As String, sSheetName As String
    Dim rTick As Range, rForm As Range, avTick As Variant, avForm As Variant, i As Long, lRowEnd As Long, bAskToUpdateLinks As Boolean
    
    With Application
        .ScreenUpdating = False
        .DisplayAlerts = False
        bAskToUpdateLinks = .AskToUpdateLinks
        .AskToUpdateLinks = False
    End With
    
    sSheetSummary = "Sheet1"
    sFileName = ".xlsx"
    sSheetName = " Data"

    With ThisWorkbook.Worksheets(sSheetSummary)
    
        

Open in new window

0
Printing an article from the web in Chrome, the last line of text on a page may get cut-off horizontally and the rest of the line shows up on the next page.

- Using a different printer from the same workstation makes no difference (same problem).
- Using Chrome on a different workstation: works fine (problem is gone).
- Using Firefox on the original workstation: works fine (problem is gone).

So if it was a system or printer driver setting, wouldn't Firefox exhibit the same issue?
But if it is a Chrome setting, which one? I couldn't find any difference between the two workstations.
Could anyone help?
0
Hello,

I got a data object like below. This is a part of RestAPI method return. But when i call REST API using Jquery AJAX , I am getting Name, Address correct but the List of ProductName is coming is empty.

Is there any reason whey List is empty. I checked the method it is having the values but at the side of Jquery Ajax response i am getting it as empty.

public class TotalRectificationOverTime
    {
       
        public string Name;
       
        public int Address;

        public List<string> ProductName;

    }
0
Hi,

I’m looking to use PowerApps as a front end to a SharePoint list, I have a drop-down option for selecting City, I would like the rest of the address fields completing automatically to make the input quicker, how would I do this?

Thanks,
0
I have an old 2003 exchange server with 2 mailboxes and a newer exchange 2010 server with all the rest of our mailboxes. Intermittently we see our internet slow to a crawl. I have found that when I connect the WAN card in the 2010 server to the switch rather than to the Cable Modem, our speed jumps immediately back up. Our Outlook continues to work, but ActiveSync stops for all our phones. So is there a way to configure this so ActiveSync works when the static IP card is connected to the switch? And is there any idea why the modem's upload speed drops to less than 1Mbps at times when the 2010 server is connected to the modem?
0
We have a NetCore web application and we are looking for an SDK or REST API that will parse data in PDF files.
If we upload a PDF file with specific fields we need for the PDF Parser to extract the data in those fields and arrange it into XML or JSON so that we can then use it any way we want.

I found a couple software companies that have this type of PDF Parser but I want to do more research on this. Any recommendations?  Do you have any experience with the recommended software?
0
I have an oracle 11g table TB_Paths  with a field pathname
I need to replace the path name as
replace all the \\KWI_Proj\ to  \\kindle.com\proj\

keeping in mind that there can be following
\\KWI_Proj\123\Myproj
\\Kwi_Proj\125\Myproject
\\kwi_Proj\325\MYPROJ

in all the different cases of \\KWI_Pro it need to convert to  \\kindle.com\proj\    ( without changing cases of the rest of the path
0
Learn Ruby Fundamentals
LVL 19
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Need help with attached SQL table. I need SQL query to select class students grouped by Facility and then by location and then show the rest of the detail data. once the location changes,  then need unique count of each student (a unique student only counted once). I hope that makes sense. thanks for your help.






 SampleClassData.xlsxCapture1.PNG
0
Hi,
New  to java. I am trying to convert java code to C#. I am going to start with this simple code. Can you please help me or provide me some tips to convert this small java class to C#. Advance thanks!

package token;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;

public class MatchTokens
{
	private String response = null;;
	private String SSOUrl = null;;
	private static String grant_type = "password";
	private String SystemID = null;
	private String SystemPassword = null;
	private String ClientID = null;
	private String ClientSecret = null;
	private String AccessToken = null;
	private String RefreshToken = null;
	private static String access_token_key = "match-access";
	private static String refresh_token_key = "match-refresh ";
	
	public MatchTokens(String SSOUrl, String ClientID,
			String 

Open in new window

0
Hi!

I try to understand how to use the filter in this API:

https://de.wiki.bluespice.com/wiki/Spezial:ApiSandbox#action=bs-user-
store&format=json&filter=%5B%7B%22user_id%22%3A1%7D%2C%7B%22user_name%22%3A%22WikiSysop%22%7D%5D

The filter is supposed to be an array of objects.
The filter I try to test is: [{"user_id":1},{"user_name":"WikiSysop"}]
Is this an array of objects?

I expect to get user_id for id 1in return. However, it looks like all users are in the response.

(anyone can test de.wiki.bluespice.com/wiki/Spezial:ApiSandbox)
0
I have working with an Rest api, which returns json data, but not sorted out the way I want. Api is not flexible enough, such that we can pass a sort parameter and it returns the result accordingly.

so, the data in such form

public class records {

....
      public Collection<Item> items ;

.....

}


in my c# code, I do something like this,


var results = CallApi();


var sortedResults = results.OrderBy(x => x.items.price);

return soretedResults.tolist();


I am concerned that this sorting and converting it back to the list , is expensive and as the results
grow larger, this might cause problem.

any thoughts in this?
0
My boss wants to be able to download all email addresses, and supporting data, from Mailman (mailing lists).
He is an admin on the site, but does not have access to log in directly and use the "dumpdb" command.
He also doesn't want to use any sort of script to scrape the website.

So, basically, is there some manner (through either the REST API, or the web address bar) to request and receive all the email address of a mailing list for which you have administrative rights?
0
we had recently password spray attack on our COMPANY.

We have on premise ADFS AND AD server. I was researching and found below
2.      In Unified Audit logs, searchable via: https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-audit/search-unifiedauditlog?view=exchange-ps
a.      These logs are only maintained for 90 days and would have rolled prior to the escalation below.
b.      The customer can archive these logs via REST to a SIEM or other log storage solution for longer if required.

regarding point no. b is there any method where I can archive logs via REST or SIEM  method

we don't have on premise exchange all mailboxes are in 365.
0

REST

367

Solutions

665

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.

Related Topics