What's the response?
Status:
400 (Bad Request)
NullPointerException(Permission: 33 < PermissionsResource: 74 < ...)
Looks like your request is incorrect. Please provide full HTTP request that you are sending.
full code: https://pastebin.com/4jukwVt9
public permissionsDelete(body: Permission, observe?: 'body', reportProgress?: boolean): Observable<any>;
public permissionsDelete(body: Permission, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public permissionsDelete(body: Permission, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public permissionsDelete(body: Permission, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
    if (body === null || body === undefined) {
        throw new Error('Required parameter body was null or undefined when calling permissionsDelete.');
    }
    let headers = this.defaultHeaders;
    // authentication (basicAuth) required
    if (this.configuration.username || this.configuration.password) {
        headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
    }
    // to determine the Accept header
    let httpHeaderAccepts: string[] = [
        'application/json'
    ];
    const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
    if (httpHeaderAcceptSelected != undefined) {
        headers = headers.set('Accept', httpHeaderAcceptSelected);
    }
    // to determine the Content-Type header
    const consumes: string[] = [
        'application/json'
    ];
    const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
    if (httpContentTypeSelected != undefined) {
        headers = headers.set('Content-Type', httpContentTypeSelected);
    }
    return this.httpClient.delete<any>(`${this.basePath}/permissions`,
        {
            withCredentials: this.configuration.withCredentials,
            headers: headers,
            observe: observe,
            reportProgress: reportProgress
        }
    );
}
I made a video now using the http://demo.traccar.org/api
Are you going to provide HTTP request?
Mateuus :
Video unavailable
This video is private.
Anton Tananaev
Sorry, I'm a little confused. Do you want the result of the request? or the http request code?
http request code: https://pastebin.com/5b7aurGX
I just put the public video.
https://www.youtube.com/watch?v=kT3Ezw0tAII
in the video I'm using eqbin.com to send an http request. to test themethod 'post' works, but 'delete' is not working. using the http://demo.traccar.org/api
Sorry BerndFfm:
https://www.youtube.com/watch?v=kT3Ezw0tAII
Thanks for the help, I managed to fix it here.
 public apiPermissionsDelete(deletePerm: any) {
    let headers = this.defaultHeaders;
    // authentication (basicAuth) required
    if (this.configuration.username || this.configuration.password) {
        headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
    }
    // to determine the Accept header
    let httpHeaderAccepts: string[] = [
        'application/json'
    ];
    const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
    if (httpHeaderAcceptSelected != undefined) {
        headers = headers.set('Accept', httpHeaderAcceptSelected);
    }
    // to determine the Content-Type header
    const consumes: string[] = [
        'application/json'
    ];
    const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
    if (httpContentTypeSelected != undefined) {
        headers = headers.set('Content-Type', httpContentTypeSelected);
    }
    // authentication (basicAuth) required
    if (this.configuration.username || this.configuration.password) {
        headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
    }
    const options = {
        headers: headers,
        body: {
          deviceId: deletePerm.deviceId,
          notificationId: deletePerm.notificationId,
        },
      };
      
      this.httpClient
        .delete(`${this.basePath}/permissions`, options)
        .subscribe((s) => {
          console.log(s);
        });
 }
Hi.
I am creating an application and need to remove a notification assigned to a device.
API
api/permissionsBasic Auth
Admin AccountMethod
POSTworks.but method
DELETEis not working.my default.xml
<entry key='web.origin'>*</entry>Is working "POST"
let permissiondata = {deviceId: this.device.id, notificationId: notification.id}; this.traccarApi.permissionsPost(permissiondata,"body").toPromise();is not working "DELETE"
let permissiondata = {deviceId: this.device.id, notificationId: notification.id}; this.traccarApi.permissionsDelete(permissiondata,"body").toPromise();I made a request on this site reqbin.com and POST works again, but DELETE does not work.
I'm forgetting something?