Answers.Body: <p>For api4 the instructions are at <a href="https://docs.civicrm.org/dev/en/latest/api/v4/architecture/#api-entity-classes" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/api/v4/architecture/#api-entity-classes</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-22T13:26:42.207Z
Answers.Text: Thanks. Those instructions don't mention civix, hence my interest in this question.  It appears that civix does not facilitate extensions that add api v4 entities. The other conclusion I'm drawing is that Scheduled Jobs only looks at api v3 entities. If either of these conclusions is off, I'd appreciate corrections.
Answers.UserDisplayName: wil_SRQ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-22T13:36:28.283Z
Answers.Text: For scheduled jobs, I haven't tried it but I think it uses any mgd.php file where the entity inside the file is "Job", so you could copy/paste an mgd.php file for a v3 scheduled job and then just edit the params in there to match your v4 class and see what happens.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-20T17:53:18.673Z
Answers.LastActivityDate: 2021-09-20T17:53:18.673Z
Answers.UserDisplayName: Demerit
Body: <p>I am using civix tool to create an extension. I created an API using civix tool.I want to create API v4. How to create API v4?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-09-01T11:31:30.490Z
Comments.Text: The documentation* shows '--api-version=' in an example for generate:entity, but when I tried to apply it to generate:api it errors with 'The "--api-version" option does not exist.' I'm running civix version v21.04.1.
  
  *https://docs.civicrm.org/dev/en/latest/step-by-step/create-entity/
Comments.UserDisplayName: wil_SRQ
Tags: <api><civix>
Title: How to create an v4 api using civix tool?
ThreadText: # How to create an v4 api using civix tool?
  
  (Asked by: username_0 on 2019-05-24)
  
  I am using civix tool to create an extension. I created an API using civix tool.I want to create API v4. How to create API v4?
  
  **Tags:** api, civix
  
  > **Comments:**
  > **username_1**: The documentation* shows '--api-version=' in an example for generate:entity, but when I tried to apply it to generate:api it errors with 'The "--api-version" option does not exist.' I'm running civix version v21.04.1.  *https://docs.civicrm.org/dev/en/latest/step-by-step/create-entity/  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-09-20. Score: 1
  
  For api4 the instructions are at <https://docs.civicrm.org/dev/en/latest/api/v4/architecture/#api-entity-classes>
  
  > **Comments:**
  > **username_1**: Thanks. Those instructions don't mention civix, hence my interest in this question.  It appears that civix does not facilitate extensions that add api v4 entities. The other conclusion I'm drawing is that Scheduled Jobs only looks at api v3 entities. If either of these conclusions is off, I'd appreciate corrections.  
  > **username_2**: For scheduled jobs, I haven't tried it but I think it uses any mgd.php file where the entity inside the file is "Job", so you could copy/paste an mgd.php file for a v3 scheduled job and then just edit the params in there to match your v4 class and see what happens.  
  
  ---
  
  