Itgenoda042 Afas subject connector

I’m getting the error message below in the query

itgenoda042
Statement #1 ‘select * from … 5342395E19’) s" starting on line 1 caused an error.
The requested OData URL could not be found on the AFAS Online server.
The remote server returned an error: (404) Not Found.
Please contact Invantive Support or use another table.
https://(omgeving).rest.afas.online/profitrestservices/subjectconnector/1634/ef6dfc0430944e5482d33e5342395e19?take=50000

Message ID: 9351e11f-748e-48c7-bf3c-afa8359b4c12
Occurred (UTC): 13-3-2026 15:25:52

I’m using this syntax in the Query Tool:

select * 
from   AfasOnline.SubjectConnector.Subject@afas(1634,'EF6DFC0430944E5482D33E5342395E19')

How can I resolve this issue?

It’s not uncommon for cloud platforms to return an HTTP 404 (not found) error message when a requested item doesn’t exist.

It’s advisable to first check whether 1634 and EF6DFC0430944E5482D33E5342395E19 are valid values.

This question was automatically closed after 1 week of inactivity. The last answer given has been marked as the solution.

If the problem occurs again, please ask a new question via a separate topic. Please include a link to this topic in the new question by pasting its URL into the text.

Ultimately, the documents can indeed be found; some of the documents return an (undocumented) HTTP 404. The suspicion is that a 404 on Subject means: “No permissions”.

Query:

--
-- In case any document to which access seems impossible: ignore it.
-- 
-- Raises 404 Not Found when not accessible:
--
-- The requested OData URL could not be found on the AFAS Online server.
-- Please contact Invantive Support or use another table. 
-- (https://93926.rest.afas.online/profitrestservices/subjectconnector/9520/90b21cfe240a4213805a164886ba6927?take=50000).
--
-- The 404 can not be answered from document cache on Subject connector, so it will consume
-- approximately 125 ms for each row on every run.
--
set ignore-http-404-errors@afas true

create or replace table tstdoc@sql
as
select m.attachment_id
,      m.subject_id
,      m.file_id
,      m.file_name
,      s.filedata
,      s.mimetype
from   AfasOnline.GetConnector.profit_subject_attachments@afas m
join   Subject@afas(m.subject_id, m.file_id) s
--
-- Possibly forwardable server-side filter.
--
where  m.file_name like 'I________.pdf' 
--
-- Fine-tuned check that the invoice file name pattern is matched.
--
and    regexp_instr(m.file_name, '^I[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].pdf$') = 1