Creates a Extractor resource.
const url = 'https://api.facteur.local/inboxes/example/extractors';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"key":"code","label":"example","pattern":"code (\\d+)","scope":"text"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.facteur.local/inboxes/example/extractors \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "key": "code", "label": "example", "pattern": "code (\\d+)", "scope": "text" }'Creates a Extractor resource.
Authorizations
Section titled “Authorizations”- bearerAuthws:write
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Extractor identifier
Request Bodyrequired
Section titled “Request Bodyrequired”The new Extractor resource
A pointer saved on an inbox: a pattern, the part of the message it reads, and the key its value is written under.
object
The name of the value in extract of a message: a letter, then letters, digits or underscores, 40 characters at most. Unique in the inbox; blanks around it are removed.
Example
codeWhat the editor shows for the extractor, 80 characters at most. Absent, null or empty, it is the key. Blanks around it are removed.
A regular expression of the engine of the ingester (RE2: no lookahead, no backreference), 512 characters at most. The value is the first non-empty group, else the whole match. It is compiled by the engine before it is saved.
Example
code (\d+)The part of the message the pattern reads: text when absent. Any other word is refused.
Example
subjectResponses
Section titled “Responses”Extractor resource created
A pointer saved on an inbox: a pattern, the part of the message it reads, and the key its value is written under.
object
The name of the value in extract of a message. Unique in the inbox.
What the editor shows for the extractor: what was given at creation, the key when nothing was. 80 characters at most.
A regular expression of the engine of the ingester (RE2).
The part of the message the pattern reads.
Example
{ "scope": "text"}Invalid input
A refusal, as RFC 9457 application/problem+json with the code of the register. A code adds the members its rule needs (retryAfter, permission…), so more members than these may come.
object
The stable code of the refusal. It never changes once shipped.
English prose for the person who reads the answer. It may be reworded: branch on code.
The HTTP status.
The name of the HTTP status.
The address of the problem: /errors/<code>.
On a body that fails validation, one entry per field.
object
Example
{ "code": "BAD_REQUEST", "status": 404, "title": "Not Found", "type": "/errors/INBOX_NOT_FOUND", "violations": [ { "code": "BAD_REQUEST" } ]}No key, or a key that is refused. WWW-Authenticate says where to read how to present one.
A refusal, as RFC 9457 application/problem+json with the code of the register. A code adds the members its rule needs (retryAfter, permission…), so more members than these may come.
object
The stable code of the refusal. It never changes once shipped.
English prose for the person who reads the answer. It may be reworded: branch on code.
The HTTP status.
The name of the HTTP status.
The address of the problem: /errors/<code>.
On a body that fails validation, one entry per field.
object
Example
{ "code": "BAD_REQUEST", "status": 404, "title": "Not Found", "type": "/errors/INBOX_NOT_FOUND", "violations": [ { "code": "BAD_REQUEST" } ]}The key does not hold the permission of the operation, or the operation refuses every key.
A refusal, as RFC 9457 application/problem+json with the code of the register. A code adds the members its rule needs (retryAfter, permission…), so more members than these may come.
object
The stable code of the refusal. It never changes once shipped.
English prose for the person who reads the answer. It may be reworded: branch on code.
The HTTP status.
The name of the HTTP status.
The address of the problem: /errors/<code>.
On a body that fails validation, one entry per field.
object
Example
{ "code": "BAD_REQUEST", "status": 404, "title": "Not Found", "type": "/errors/INBOX_NOT_FOUND", "violations": [ { "code": "BAD_REQUEST" } ]}There is none of this identifier in the reach of the key. The answer is the same for another organization or a workspace the key does not name.
A refusal, as RFC 9457 application/problem+json with the code of the register. A code adds the members its rule needs (retryAfter, permission…), so more members than these may come.
object
The stable code of the refusal. It never changes once shipped.
English prose for the person who reads the answer. It may be reworded: branch on code.
The HTTP status.
The name of the HTTP status.
The address of the problem: /errors/<code>.
On a body that fails validation, one entry per field.
object
Example
{ "code": "BAD_REQUEST", "status": 404, "title": "Not Found", "type": "/errors/INBOX_NOT_FOUND", "violations": [ { "code": "BAD_REQUEST" } ]}More calls than the key may make in a minute. Retry-After says when to try again.
A refusal, as RFC 9457 application/problem+json with the code of the register. A code adds the members its rule needs (retryAfter, permission…), so more members than these may come.
object
The stable code of the refusal. It never changes once shipped.
English prose for the person who reads the answer. It may be reworded: branch on code.
The HTTP status.
The name of the HTTP status.
The address of the problem: /errors/<code>.
On a body that fails validation, one entry per field.
object
Example
{ "code": "BAD_REQUEST", "status": 404, "title": "Not Found", "type": "/errors/INBOX_NOT_FOUND", "violations": [ { "code": "BAD_REQUEST" } ]}default
Section titled “default”Any refusal: an application/problem+json body whose code says which.
A refusal, as RFC 9457 application/problem+json with the code of the register. A code adds the members its rule needs (retryAfter, permission…), so more members than these may come.
object
The stable code of the refusal. It never changes once shipped.
English prose for the person who reads the answer. It may be reworded: branch on code.
The HTTP status.
The name of the HTTP status.
The address of the problem: /errors/<code>.
On a body that fails validation, one entry per field.
object
Example
{ "code": "BAD_REQUEST", "status": 404, "title": "Not Found", "type": "/errors/INBOX_NOT_FOUND", "violations": [ { "code": "BAD_REQUEST" } ]}